WO2001045385A1 - Image processing device and method and recording medium - Google Patents
Image processing device and method and recording medium Download PDFInfo
- Publication number
- WO2001045385A1 WO2001045385A1 PCT/JP1999/007129 JP9907129W WO0145385A1 WO 2001045385 A1 WO2001045385 A1 WO 2001045385A1 JP 9907129 W JP9907129 W JP 9907129W WO 0145385 A1 WO0145385 A1 WO 0145385A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- pixel
- value
- data
- difference value
- quantization
- Prior art date
Links
- 238000012545 processing Methods 0.000 title claims abstract description 82
- 238000000034 method Methods 0.000 title claims description 76
- 238000007906 compression Methods 0.000 claims abstract description 52
- 230000006835 compression Effects 0.000 claims abstract description 46
- 238000013139 quantization Methods 0.000 claims description 157
- 238000004364 calculation method Methods 0.000 claims description 26
- 238000003672 processing method Methods 0.000 claims description 24
- 230000002441 reversible effect Effects 0.000 claims description 21
- 230000002093 peripheral effect Effects 0.000 claims description 18
- 230000000694 effects Effects 0.000 claims description 17
- 230000006837 decompression Effects 0.000 claims description 12
- 230000015556 catabolic process Effects 0.000 abstract description 4
- 238000006731 degradation reaction Methods 0.000 abstract description 4
- 230000000007 visual effect Effects 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 14
- 238000007781 pre-processing Methods 0.000 description 13
- 230000006870 function Effects 0.000 description 12
- 230000002829 reductive effect Effects 0.000 description 9
- 238000012805 post-processing Methods 0.000 description 8
- 238000013500 data storage Methods 0.000 description 3
- 238000007796 conventional method Methods 0.000 description 2
- 230000002427 irreversible effect Effects 0.000 description 2
- 238000012886 linear function Methods 0.000 description 2
- 241000255925 Diptera Species 0.000 description 1
- 241000287462 Phalacrocorax carbo Species 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000000740 bleeding effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000007429 general method Methods 0.000 description 1
- 230000012447 hatching Effects 0.000 description 1
- 230000000670 limiting effect Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
- 230000009978 visual deterioration Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N1/00—Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
- H04N1/41—Bandwidth or redundancy reduction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
Definitions
- the present invention relates to an image processing method and apparatus for processing a still image such as an art image or a medical image having a natural gradation and a recording medium, and particularly to a method for compressing still image data obtained by digitization. zTechnology for restoration. Background art
- JPEG Joint Photographic and Expert Experts Group
- DCT Digital Cosine Transform
- JPEG compresses each block, so when restoring still image data, a phenomenon called block distortion occurs in which distortion occurs at the block boundaries of the still image.For example, continuous contours become zigzag. I will.
- the present invention has been made in view of such circumstances, and it is possible to obtain an image with little visual deterioration after restoration while maintaining a relatively high compression ratio by limiting the object of quantization. It is an object of the present invention to provide an image processing method and an apparatus thereof and a recording medium capable of performing the method.
- An image processing method is an image processing method for compressing still image data, which includes dividing a still image data into blocks each having an arbitrary number of pixels, A reference pixel selection process of selecting one pixel as a reference pixel, pixels of each peripheral pixel other than the reference pixel in each block, and reference pixels in a block corresponding to each peripheral pixel A difference value calculation process for calculating the difference value of the values, an occurrence ratio calculation process for calculating the appearance ratio of each difference value, and a difference value range larger than a specific occurrence ratio is obtained from the relationship between the difference value and the appearance ratio.
- a quantization range calculating step of obtaining a range as a quantization range, a quantization step of quantizing a difference value within the quantization range, a pixel value of a reference pixel, a quantized difference value, and the dividing step The pixel value of the fractional pixel that is out of the block at An entropy encoding process of performing reversible encoding on at least the quantized difference values of the difference values outside the quantization range so as to suppress data redundancy; and The reference pixel data according to the pixel value of the fractional pixel data, the fractional pixel data according to the pixel value of the fractional pixel, the out-of-range pixel data corresponding to the difference value outside the quantization range, and the encoded difference value And generating a compressed data including the encoded difference value data, the decompression data including the quantization table, and the image status of the still image data. is there.
- the original image Since there is a statistical bias in the appearance rate of the difference value, the original image It is possible to express a still image with a small amount of information, and by calculating such a difference value, it is modeled into a form suitable for processing in the encoding process .
- the appearance rate of the difference value sharply decreases as the value increases.
- Such a large difference value often corresponds to a contour portion in a still image, but since it has a large effect on the image quality, it should not be quantized.
- the difference value within this range includes a quantization error.
- this difference value corresponds to a low frequency component and has little effect on image quality.
- the quantized difference value is selected.
- the difference value is subjected to end-to-end coding and lossless compression is performed.
- quantization is performed only on the difference values of pixel values within a specific quantization range corresponding to low-frequency components, and lossless coding is performed on other values at least as quantized difference values. Therefore, errors in high-frequency components can be suppressed in the compressed data obtained in this manner.
- the method invention according to the present invention, only the difference value within the quantization range among the difference values is quantized, and the pixel value of the reference pixel, the quantized difference value, and the block At least the quantized difference value among the pixel values of the fractional pixels located outside and the difference value outside the quantization range is subjected to the lossy Be-encoding and subjected to lossless compression.
- the reference pixels are held over the entire still image, it is possible to reduce the occurrence of overall color shift. Also, since the high-frequency components are held in a completely reversible state, the sharpness of the still image is not easily reduced. Furthermore, since the DCT processing is unnecessary, the processing is relatively simple, so that the processing load can be reduced and the compression processing can be performed at high speed.
- a pixel value of a reference pixel, a pixel value of a fractional pixel, and a difference value outside a quantization range are provided.
- those that have a compression effect are also subjected to reversible encoding so as to suppress data redundancy, and in the storing step, data newly encoded in the It is preferable to store the data in place of the original data.
- the data amount can be further reduced by applying reversible entropy coding not only to the quantized difference values but also to those that can provide a compression effect. Therefore, the compression ratio of the compressed data can be further increased.
- an image processing method is an image processing method for restoring still image data compressed by the above image processing method, wherein the reference pixel data corresponding to the pixel value of the reference pixel and a fractional pixel Restoration including fractional pixel data according to the pixel value, out-of-range pixel data according to the difference value outside the quantization range, encoded difference value data according to the encoded difference value, and quantization table Reversible data restoring process of restoring reversibly encoded data among compressed data including data for use and image status of still image data before compression, and A temporary difference value is obtained based on the quantized difference value restored on the basis of the quantization table.
- the static pixel value based on a reference pixel value, a predicted pixel value of a surrounding pixel corresponding to each reference pixel value, a pixel value of each fractional pixel, a difference value of each pixel outside the quantization range, and an image status.
- a provisional difference value is obtained for the quantized difference value of the data based on the quantization table.
- the pixel value of the surrounding pixel is determined as the provisional pixel value.
- this temporary pixel value includes a quantization error
- a predicted pixel value is determined so as to suppress the quantization error based on the pixel value of the reference image located near the temporary pixel value.
- the restored still image data is obtained based on the predicted pixel value, the reference pixel value, the pixel value of the fractional pixel, the difference value of each pixel outside the quantization range, and the like thus obtained.
- the restored still image data is obtained as described above, since the pixel values restored based on completely reversible reference pixel data are almost uniformly dispersed throughout the still image, the quantization error is reduced. Can be prevented.
- the quantization included in the restored surrounding pixel is predicted. Errors can be suppressed.
- the quantization error is prevented from being dispersed throughout the restored still image. And overall color shift can be suppressed.
- the quantization error of the surrounding pixels can be suppressed. Can be greatly suppressed as compared with the conventional example.
- the processing is simpler than the conventional example, so that the processing load can be reduced and the restoration processing can be performed at high speed.
- a reference pixel positioned across each peripheral pixel is used, and a line connecting these pixels is determined according to a quantization width. It is preferable that the provisional pixel value is shifted to be the predicted pixel value of each surrounding pixel.
- the quantization error included in the predicted pixel value of the surrounding pixels can be suppressed. Therefore, the block distortion generated at the block boundary can be suppressed, and the phenomenon that a continuous contour becomes zigzag can be suppressed.
- an image processing apparatus for compressing still image data, comprising: a block dividing unit that divides the still image data into blocks having an arbitrary number of pixels; One pixel of the package is the reference pixel
- a reference pixel selection unit to be selected as a reference pixel, a difference for calculating a pixel value difference between each peripheral pixel other than the reference pixel in each block, and a reference pixel in a block corresponding to each peripheral pixel.
- Lossless encoding is performed so as to suppress data redundancy with respect to the pixel value of the fractional pixel that has become a fraction and the difference value outside the quantization range, which is at least the quantized difference value.
- a compressed data generation unit that generates compressed data including restoration data including a quantization table and image status of the still image data.
- the still image data from the original image data storage unit is divided into blocks by the block division unit, and one pixel in each block is used as a reference in the reference pixel selection unit. Select to pixel.
- the difference calculation unit calculates a difference between the pixel values of the reference pixel and the surrounding pixels to give a statistical bias to the difference value, and the appearance rate calculation unit obtains the appearance rate. From the distribution of the difference values, a range of the difference value larger than a specific appearance rate is obtained by the quantization range calculation unit, and only the difference value within this range is quantized by the quantization unit.
- the quantized difference value is entropy-coded to perform lossless compression.
- the compressed data generated in this way is stored in the storage unit, but only the difference between pixel values within a specific quantization range is subjected to quantization, and other values are at least quantized. Since lossless encoding is performed on the difference value, it is possible to suppress errors in high frequency components in the compressed data.
- an image processing device is an image processing device for restoring still image data compressed by the image processing device, wherein the reference pixel data according to the pixel value of the reference pixel and a block Fractional pixel data according to the pixel value of the pixel that has become a fraction outside the range, pixel data outside the range according to the difference value outside the quantization range, and encoded difference value according to the encoded difference value.
- Reversible data restoration unit for restoring losslessly encoded data among compressed data including data, restoration data, and the image status of the still image data before compression;
- a quantized data restoring unit that determines a temporary difference value based on the quantized difference value restored based on the difference value data and the quantization table;
- Each temporary difference A temporary pixel value calculation unit that adds the pixel value of each peripheral pixel as a temporary pixel value by adding to the pixel value of the reference pixel in the block corresponding to the value, and each of the temporary pixel value calculated by the temporary pixel value calculation unit.
- a prediction unit that obtains a pixel value of a surrounding pixel as a predicted pixel value so as to suppress a quantization error based on a temporary pixel value of the surrounding pixel and a pixel value of a reference pixel located near each surrounding pixel.
- the reference pixel value in each block the predicted pixel value of the surrounding pixels corresponding to each reference pixel value, the pixel value of each fractional pixel, the difference value of each pixel outside the quantization range,
- a generating unit that generates the still image data as restored still image data based on the image status.
- the compressed data is stored in the compressed data storage unit.
- all of the losslessly encoded data is restored by the lossless data restoration unit, and the quantized difference value is used as a temporary difference value by the quantization data restoration unit.
- the pixel values of the surrounding pixels are determined as temporary pixel values by the temporary pixel value calculation unit based on the temporary difference value and the pixel value of the corresponding reference pixel.
- this temporary pixel value includes a quantization error
- a prediction pixel value is obtained by the prediction unit so as to suppress the quantization error based on the pixel value of the reference image positioned so as to sandwich the temporary pixel value.
- the restored still image data is obtained in the restored data storage unit based on the predicted pixel value thus obtained, the reference pixel value, the pixel value of the fractional pixel, the difference value of each pixel outside the quantization range, and the like.
- the restored still image data is obtained in this way, since the pixel values restored based on completely reversible reference pixel data are dispersed throughout the still image, quantization errors are dispersed throughout the restored still image. Can be prevented. Also, since high-frequency components can be completely restored, no error occurs in pixel values corresponding to the outline of the image.
- the quantization error included in the restored surrounding pixel can be suppressed.
- FIG. 1 is a block diagram showing a schematic configuration of the image processing apparatus
- FIG. 2 is a block diagram functionally showing the image processing apparatus related to compression.
- Fig. 3 is a schematic diagram showing the relationship between the reference pixel and surrounding pixels in the block.
- FIG. 4 is a distribution diagram showing an example of a difference value appearance frequency.
- FIG. 5 is a diagram schematically showing a state of a block after quantization
- FIG. 6 is a flowchart showing a compression process.
- FIG. 7 is a flowchart showing the compression process.
- FIG. 8 is a flowchart showing an entropy encoding process
- FIG. 9 is a block diagram functionally showing an image processing apparatus relating to restoration.
- FIG. 10 is a diagram provided for explanation of the prediction process.
- FIG. 11 is a diagram provided for explanation of the prediction process.
- FIG. 12 is a flowchart showing the restoration process.
- FIG. 13 is a flowchart showing the restoration processing. BEST MODE FOR CARRYING OUT THE INVENTION
- FIG. 1 is a block diagram showing a hardware configuration of the image processing apparatus according to the present invention.
- the apparatus of this embodiment is configured by a computer system, and a CPU 1 executes a process of compressing still image data and a process of restoring compressed still image data according to a processing program stored in an internal memory 3. Run. CPU 1 and internal memory 3 are connected via bus line 5.
- the internal memory 3 has a pre-processing storage section 3b for storing data before compression processing and decompression processing and data being processed, in addition to a program storage section 3a for storing processing programs, and a compression processing section. It has a post-processing storage unit 3c for storing data after and after restoration processing.
- the CPU 1 also includes, via an input / output interface (IZO) 9, a recording medium driver 15 into which the recording medium 13 is loaded, an external storage device 17 that stores various data and files, and a still image It is also connected to a display device 19 such as a monitor display used to display data as images, an input device 21 such as a keyboard or mouse, and an image input device 23 such as a scanner. I have.
- IZO input / output interface
- the processing program read from the recording medium 13 loaded in the recording medium driver 15 is transferred and stored in the program storage section 3a, and the CPU 1 executes the processing described below. It has become so.
- Examples of the recording medium 13 include a floppy disk, a magneto-optical disk, a CD-ROM, and a memory card.
- an image file containing still image data to be processed is input from the image input device 23 or the external storage device 27 and stored in the pre-processing storage portion 3b.
- the still image data referred to here is generally in a reversible image format such as BMP (bitmap) or TIFF (tiff), but it is a specified process that converts the data into a format that can be processed as described later.
- the format of the still image data input from the image input device 23 does not matter as long as the procedure is performed.
- the pre-processing storage unit 3b stores the image status of the image file including information such as image size, color format (RGB, CMYK, black and white), and resolution. A work area necessary for processing is secured based on the task, and image information based on still image data is developed in this area.
- an arbitrary pixel group (horizontal jX vertical k pixels) based on the image information of the pre-processing storage unit 3b is processed.
- the work of dividing into minute blocks BL (m ⁇ n pixels, for example, 3 ⁇ 3 pixels) is performed.
- a fractional pixel that is not taken as the block B L may occur, but the pixel value of such a fractional pixel PA is stored in the work area as it is.
- the reference pixel selection unit 27 selects one reference pixel (for example, the central pixel P 5) for each block BL. I do. From the viewpoint of processing speed, it is preferable that the reference pixel is common to each block B L, but a different reference pixel may be selected for each block B.
- the difference value calculation unit 29 calculates the difference between the pixel value of the reference pixel in each block BL and the pixel values of surrounding pixels located around it. Ask. As a result, statistical bias can be imparted to a general still image, and the efficiency of subsequent quantization and coding can be increased.
- the appearance rate calculator 31 calculates the appearance rate of the difference value.
- the quantization range calculation unit 33 determines a range to be quantized using the difference value appearance rate. That is, instead of quantizing all the difference values as in the conventional example, the quantization is selectively performed only in a certain range where the appearance rate is high.
- the quantization unit 35 actually performs quantization on each difference value for the quantization range determined in this way.
- the entropy encoding unit 37 the pixel value of the fractional pixel PA, the pixel value of the reference pixel P5, and the quantized value corresponding to the low frequency component If the compression effect is obtained, the difference between the pixel value of the fractional pixel, the pixel value of the reference pixel, and the difference value out of the quantization range is obtained. The information is compressed, and the quantized difference value is always encoded to compress the amount of information.
- the compressed still image data is stored in the post-processing storage unit 3c as compressed data together with the decompression data including the quantization table required for decompression.
- output to external storage device 17 if necessary
- the post-processing storage unit 3c corresponds to the compressed data generation unit in the present invention.
- the file containing the still image data input from the image input device 23 or the external storage device 17 is opened, and necessary data and the like are stored in the pre-processing storage section 3b.
- a queryer required for processing is secured in the pre-processing storage unit 3b.
- the image information of the still image data is developed in the work area of the pre-processing storage unit 3b.
- the image information developed in the work area is divided into small blocks BL, for example, 3 ⁇ 3 pixels as shown in FIG.
- the image information may not be divisible by 3, but for those fractional pixels PA, their pixel values ⁇ ⁇ > ⁇ are stored in the work area as they are.
- Step S4 described above corresponds to the dividing process in the present invention.
- the image information divided for each block B L is selected for each block B L, for example, the central pixel ⁇ 5 is set as a reference pixel. It is preferable that the reference pixel # 5 be at the same position in each block in consideration of later processing. The pixel value of the reference pixel # 5 thus selected is stored in the work area.
- Step S7 corresponds to a reference pixel selection step in the present invention.
- the difference values dif (1) to dif (8) from the pixel values 1 to 4 and V6 to 9 of 9 are obtained.
- the difference values dif (1) to dif (8) thus obtained are overwritten with the image information of the work area to save resources. If there are sufficient resources, the difference values dif (l) to dif (8) may be stored in another area.
- This step S8 corresponds to a difference value calculating step in the present invention.
- steps S7 and S8 described above are performed for all the blocks BL, and when the process is completed, the process proceeds to the next step S10.
- the appearance rate is calculated for the obtained difference value dif.
- the difference between the pixel values can range from 255 to 255 ( ⁇ 2 to the eighth power).
- a histogram is created by plotting the difference value di ⁇ between 255 and 255 on the horizontal axis and the number of pixels corresponding to the vertical axis. More specifically, the number of occurrences of each difference value may be divided by the total number of pixels, but the number of occurrences may simply be used as the appearance rate.
- this calculation includes an error for the number of fractional pixels ⁇ ⁇ , but since it accounts for a very small percentage of the total number of pixels, ignoring it has no effect.
- the range to be quantized is determined from the appearance rate obtained as described above.
- a range R2 in which the total appearance frequency accounts for 95% or more of the total number of pixels is obtained, and this range R2 is set as a quantization range. In this way, quantization is performed only for the range R2 having a high appearance rate.
- an arbitrary quantization width is set for a difference value existing in the quantization range R2, and a quantization code is assigned to generate a quantization table.
- the quantization width may be set at equal intervals, but for a difference value with a low frequency of appearance, the quantization width may be set slightly larger to generate a quantization table that performs coarse quantization. Les ,.
- This step corresponds to the quantization range calculation process in the present invention.
- the difference value dif within the quantization range R2 is subject to quantization.
- the difference value dif outside the quantization range R2 that is, the difference value dif within the range R1, R3
- the difference value dif without being quantized is stored in the pre-processing storage unit 3b. You. At this time, the image information in the work area is overwritten to save resources, but if there is enough resources, it may be stored in another area.
- Step S 17 The data generated through the above-described steps includes a pixel value V K HP of the reference pixel P 5, a quantized difference value Q dif, a pixel value ⁇ ⁇ ) ⁇ of the fractional pixel PA, and a value outside the quantization range.
- the entropy coding for suppressing the redundancy of the information amount is performed on these difference values dif.
- the pixel value V li EF of the reference pixel P 5 the quantized difference value Q dif, the pixel value V of the fractional pixel PA, and the difference value dif outside the quantization range are treated as symbols in Huffman coding. Sorting is performed according to the appearance rate corresponding to the symbol.
- Assign a code (eg, “1” to one and “0” to the other) for the least significant symbol and the second least significant symbol.
- the appearance rate of the least significant symbol and the second least significant symbol are merged and newly defined as a merged symbol. Then, the above steps are repeatedly performed until the number of symbols becomes “1”.
- the Huffman table is created by reading back the accumulated assignment codes.
- the symbol determined to have the compression effect is represented by the corresponding Huffman table. If it is determined that there is no compression effect by performing encoding with reference to, the actual value as it is is used.
- the quantized difference value Qdif is encoded with reference to the Huffman table, and stored in the post-processing storage unit 3c.
- this step S29 at least the quantized difference value Q d i ⁇ is subjected to reversible coding with suppressed data redundancy.
- Reference pixel data corresponding to the pixel value of the reference pixel P5 stored in the work area of the pre-processing storage unit 3b, fractional pixel data corresponding to the pixel value ⁇ ⁇ > ⁇ of the fractional pixel PA, and post-processing storage The encoded difference value data corresponding to the encoded difference value Q dif stored in the unit 3c, the restoration data including the quantization table and the Huffman table used for quantization, and a still image
- the compressed data including the image status of the data is stored in the post-processing storage unit 3c.
- This step corresponds to the generation process in the present invention.
- the compressed data generated as described above is output to the external storage unit 17 and stored as a file.
- the quantization and encoding targets are limited so that quantization errors are not generated in addition to the difference values within the quantization range. It is possible to obtain compressed data that can suppress the visual degradation of the restored still image at the time of restoration as compared with the example.
- the reference pixels are held over the entire still image, overall color shift is unlikely to occur, and since the high-frequency components are held in a completely reversible state, the sharpness of the still image is reduced. Nikure, Furthermore, since the DCT processing is unnecessary, the processing is relatively simple, so that the processing load can be reduced and the compression processing can be performed at high speed.
- Huffman coding is used as an example, but the present invention is not limited to this.
- the following method may be used.
- Block coding In Huffman coding, coding was performed for each symbol alone, but depending on the number of symbols and the conditions of their occurrence probabilities, the information sources to be processed are combined into an arbitrary block. The average code length can be shortened by performing coding.
- the compression rate can be further improved by considering the blocks with a large number of blocks as one symbol and performing the Huffman coding described above.
- each symbol is represented as a real number segment between real numbers 0 and 1. Similar to Huffman coding, when performing arithmetic coding, it is necessary to know the symbol occurrence probability in advance.
- a given symbol sequence stores several symbols before and after the symbol currently being encoded in a buffer, and uses this buffer as a dictionary to perform encoding using a slide dictionary.
- Law or symbol column There is a dynamic dictionary method that dynamically creates a dictionary when encoding, and uses the index numbers of the dictionary to represent previously appearing symbols (columns).
- the pixel value of the reference pixel in addition to the quantized difference value, the pixel value of the reference pixel, the pixel value of the fractional pixel, and whether or not the difference value outside the quantization range has a compression effect are determined. If it is determined that there is a compression effect, entropy coding is applied to that as well. However, it is also possible to omit the decision flow and apply the event-port coding only to the quantized difference value.
- the external storage device 17 stores a file including the compressed data generated by the above-described compression processing, and the compressed data of this file is provided to the pre-processing storage unit 3b.
- 1 is for the data included in the compressed data that has been subjected to lossless encoding, and refers to the encoding table (Huffman table) used for encoding. Restore.
- encoding table Huffman table
- the data includes the reference pixel data corresponding to the pixel value V, .cl . Of the reference pixel P5 and the fraction pixel data corresponding to the pixel value ⁇ ,, ⁇ of the fractional pixel PA out of the block.
- there are data for restoration including an image and an encoding table, and an image status including information such as an image size, a color format, and a resolution.
- the quantized data decoding unit 43 restores only the quantized irreversible data. Therefore, only the quantized difference value data decoded from the encoded difference value Qdif is targeted.
- the quantization table is referred to, but the temporary difference value is temporarily determined by temporarily using the center value of the quantization width as a temporary restoration value.
- quantized data decoding unit 43 corresponds to the quantized data restoration unit in the present invention.
- the data adding unit 45 adds the temporary difference value calculated as described above and the pixel value V ⁇ . Of the reference pixel P5 in the corresponding block to obtain the pixel value of each surrounding pixel. Is calculated as a temporary pixel value.
- the data adding section 45 corresponds to the provisional pixel value calculating section in the present invention.
- the restored data prediction unit 47 performs prediction to achieve visual smoothness and corrects the data. Specifically, the temporary pixel values of the surrounding pixels between the reference pixel P5 are corrected using the pixel value V ⁇ of the reference pixel P5 and a linear function.
- FIG. 10 is a plot of pixel values in a horizontal direction at a position including the reference pixel P5 of the blocks BL (1) to BL (3) shown in FIG. 5 for a general image.
- FIG. 9 is a diagram showing an example of a case where the user has turned on the camera.
- the reference pixel P5 in each of the blocks BL (1) to BL (3) and the quantized peripheral pixel P located between the reference pixels P5 are used.
- the pixel values of P4 and P6 the pixel values of the pixels quantized by the general method before quantization are the pixel values of each reference pixel P5 and the pixel values of surrounding pixels P4 and P6. It is reasonable to assume that it is likely to exist in a smooth curved line connecting.
- the primary function connecting the reference pixel P5 of the block BL (1) and the reference pixel P5 of the block BL (2) adjacent to the block BL (1) is their If the distance change in the horizontal direction is dX, the change in pixel value is dy, and the pixel value of the reference pixel P5 of the block BL (1) is ya, any point X between them
- the predicted value y is expressed by the following equation (1) (shown by a dotted line in FIG. 11).
- This prediction value y is the temporary pixel value of the peripheral solid pixels obtained by the data adding section 4 5 described above, is shifted within the range of the quantization width Q w in the direction of the prediction value y, and the shift The value is adopted as the predicted pixel value.
- the temporary pixel value of the peripheral pixel P5 located at the block BL (1) is V
- the temporary pixel value of the peripheral pixel P4 located at the block BL (1) is V ′.
- the quantization values included in the predicted pixel values V B and V of the surrounding pixels P 6 and P 4 are obtained.
- the conversion error can be suppressed. Therefore, it is possible to suppress the block distortion that occurs at the block boundary, which has been a problem in the conventional example, and to suppress the phenomenon that a continuous contour line becomes zigzag. 47 corresponds to the prediction unit in the present invention.
- the pixel value of the reference pixel in each block restored in this way, the predicted pixel value of the surrounding pixel value, the pixel value of the fractional pixel, the difference value outside the quantization range, and the image status are stored after processing. Stored in part 3c. Then, it is output to the external storage device 17 or the display device 19 if necessary.
- the post-processing storage unit 3c corresponds to the generation unit in the present invention.
- the file including the compressed data input from the external storage device 17 is opened and stored in the pre-processing storage unit 3b.
- reference pixel data according to the pixel value of the reference pixel
- encoded difference value data according to the encoded difference value
- out of quantization range Acquires out-of-range pixel data according to the difference value and fractional pixel data according to the fractional pixel value, and acquires the encoding table (Huffman table in this example) and the quantization table required for restoration. I do.
- a query area of a size necessary for the restoration processing according to the image status is secured in the pre-processing storage unit 3b. Then, if there is data that has not been encoded or quantized, such as the pixel value of the reference pixel, it is output as it is into the query.
- the encoded difference value data the out-of-range difference value data, and the fractional pixel data
- data that has been reversibly encoded is restored. If lossless encoding has been performed, restoration is performed with reference to the Huffman table, and the restored data is placed in the work area of the pre-processing storage unit 3b. These processes are repeatedly executed until all the data subjected to the lossless encoding is restored. From the rules at the time of the compression process, at least the encoded difference value data is restored to obtain a quantized difference value.
- restoration processing is performed on the quantized difference value, which is the difference value within the quantization range determined to be irreversible by quantization.
- the quantized difference value is restored as a temporary difference value. Then, each difference value is added to the pixel value of the reference pixel in the corresponding block, and each pixel value is determined as a temporary pixel value for all surrounding pixels of all blocks. The temporary pixel value obtained in this way is mapped to the work area.
- the temporary pixel value (including the quantization error) of each surrounding pixel obtained as described above is predicted to suppress the quantization error based on this and the temporary pixel value of each surrounding pixel. Perform processing.
- the predicted value y of the prediction point is calculated based on the equation (1).
- the temporary pixel value of each surrounding pixel is shifted to the predicted value y obtained in the above step within the range of the quantization width, and the pixel value is adopted as the predicted pixel value.
- the quantization error can be suppressed, and the block distortion generated at the block boundary can be suppressed.
- Data group that has been expanded as is or restored in the work area reference pixel values in each block, predicted pixel values of surrounding pixels corresponding to each reference pixel value, and pixel values of fractional pixels Then, an image status is added to the difference value of each pixel outside the quantization range, and restored still image data is generated so that the image processing device can take the image data.
- the restored still image data is stored in the post-processing storage unit 3c.
- Step S42 The restored still image data is output to the external storage device 17 and saved as a file.
- the still image data compressed by the above ⁇ compression process> is restored as the restored still image data, but the pixel values of the completely restored reference pixels are almost the same over the entire still image. Since they are uniformly distributed, it is possible to prevent the quantization error from being dispersed throughout the restored still image, and to suppress the overall color shift.
- the quantization error of the surrounding pixels can be suppressed. It can be greatly reduced compared to the example.
- the processing is simpler than in the conventional example, so that the processing load can be reduced and the restoration processing can be performed at high speed.
- step S40 is collectively performed after obtaining all temporary pixel values in steps S36 to S39, but in order to increase the processing efficiency, step S3 is performed.
- step S3 is performed.
- step 7 the prediction processing of step S40 may be performed sequentially.
- the loop of step S49 in FIG. 13 is unnecessary because there is a no-rape in step S39 in FIG. This eliminates the need to read the mapped data prior to the prediction processing and perform the mapping again after the prediction processing, thereby improving the efficiency.
- the predicted pixel value is expressed by equation (1).
- equation (1) the predicted pixel value is expressed by equation (1).
- equation (1) the following various functions may be used.
- X j indicates the position of the reference pixel, and ⁇ ”. Indicates the pixel value of the reference pixel.
- the pixel value of an arbitrary surrounding pixel X is compared with the solution obtained by the above polynomial, and a value closer to the quantization width is corrected as a restoration value.
- f) f (x Q ) + U-,)) f (x «, x,) + (x-x.) -x,) f (X (,» X ,, x 2 ) +
- the difference Quotient is the slope of a line connecting the data points (Xi, y ,.) and a (x i + 1 y i + l).
- analysis function is guaranteed to be the only smoothest function in the interval [x () xj (that is, the m-first derivative is a continuous function). May vibrate at both ends of the section (runge phenomenon), which may cause a problem at the end of the section. For these reasons, it is not preferable to increase the number of data points.
- ⁇ ( ⁇ ) ⁇ y j + 1 + ⁇ Yj + h (( 3 - ⁇ ) ⁇ j + 1 + ( ⁇ ⁇ +) ⁇ .) ⁇ - ⁇ .
- the image processing method, the apparatus, and the recording medium according to the present invention can be used for the apparatus for compressing / decompressing still image data and the software in general.
- Digital image processing devices that perform processing such as compression and decompression, shooting devices such as digital cameras and digital video cameras for obtaining still image data, and computers Image processing board, computer image processing software, and floppy disk, CD-ROM, MO, etc. that store these image processing software. Suitable for medium.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
An image processing device comprising a quantizing range calculating unit (33) for determining a range of difference values with occurrence frequencies larger than a specified one, a quantizing unit (35) for quantizing difference values within the range, an entropy encoding unit (37) for reversibly encoding at least quantized difference values and a compressed data creating unit (3c) for creating compressed data including encoded difference value data corresponding to encoded difference values, wherein difference values falling within the quantizing range only are quantized and at least quantized difference values are entropy-encoded and reversibly compressed. Since the above limited quantizing and encoding do not subject difference values outside the quantizing range to quantizing errors, compressed data are available that can restore still images far less in visual degradation than conventional ones while maintaining a comparatively high compression ratio.
Description
明細書 画像処理方法及びその装置並びに記録媒体 技術分野 TECHNICAL FIELD Image processing method and apparatus and recording medium
本発明は、 例えば、 自然な階調を有する美術画像や医療画像などの静 止画像を処理する画像処理方法及びその装置並びに記録媒体に係り、 特 にデジタル化して得られた静止画像データを圧縮 z復元するための技術 に関する。 背景技術 The present invention relates to an image processing method and apparatus for processing a still image such as an art image or a medical image having a natural gradation and a recording medium, and particularly to a method for compressing still image data obtained by digitization. zTechnology for restoration. Background art
従来のこの種の画像処理方法には、 種々の手法が確立されており、 い ずれも複数の手法を利用したハイプリ ッ ドな処理であることが多い。 こ の処理は大きく 2つに分けられ、 静止画像の特性などを考慮して静止画 像データを圧縮しやすいデータ列に変換する工程 (モデリ ング工程と呼 ばれる) と、 データ列の冗長度を抑圧して効率的なコー ドに変換するェ 程 (符号化工程と呼ばれる) からなる。 Various methods have been established for this type of conventional image processing method, and each method is often a hybrid processing using a plurality of methods. This process can be roughly divided into two processes. The process of converting the still image data into a data stream that is easy to compress in consideration of the characteristics of the still image (called a modeling process), and the redundancy of the data sequence. It consists of the process of suppressing and converting to efficient code (called the encoding process).
標準的に用いられている圧縮のための画像処理方法と しては、 J P E G (Joint Photographic し oding Experts Group) 力 挙けられる。 この方 法では、 まず静止画像データを指定画素数 (一般的には 8 X 8 = 6 4画 素) で構成されるブロ ックに分割した後、 各ブロ ック毎に全画素に対し て D C T (Discrete Cosine Transform:離散コサイン変換) による直交 変換を行う。 As a standard image processing method for compression, JPEG (Joint Photographic and Expert Experts Group) can be mentioned. In this method, first, the still image data is divided into blocks composed of a specified number of pixels (generally, 8 × 8 = 64 pixels), and DCT is applied to all pixels for each block. Performs orthogonal transformation by (Discrete Cosine Transform).
そして、 D C T係数に対して量子化を行って情報省略を行った後に、 各ブロ ック毎に D C成分と A C成分を対象にして周波数の低いほうから 順にェント口 ピー符号化を施すよ うになつている。 このような処理を施
すことによつて高い圧縮率を得ることができるよ うになつている。 しかしながら、 このよ うな従来方法の場合には、 次のよ うな問題があ る。 Then, after quantizing the DCT coefficients and omitting the information, for each block, the DC component and the AC component are subjected to the event peak coding in order from the lowest frequency. ing. Applying such processing As a result, a high compression ratio can be obtained. However, in the case of such a conventional method, there are the following problems.
すなわち、 J P E Gではブロック毎に圧縮するので、 静止画像データ を復元すると、 静止画像のブロック境界線で歪みが生じるブロ ック歪み と呼ばれる現象が発生し、 例えば、 連続した輪郭線がジグザグになって しま う。 In other words, JPEG compresses each block, so when restoring still image data, a phenomenon called block distortion occurs in which distortion occurs at the block boundaries of the still image.For example, continuous contours become zigzag. I will.
また、 A C成分のう ち高周波成分を荒く量子化するので、 輪郭部分に 「にじみ」 や 「ざらざら感」 が生じるモスキート雑音が発生したり、 量 子化に伴う全体的な 「色ずれ」 が生じ、 視覚的劣化が非常に大きいとい う欠点、力 sある。 In addition, since the high-frequency component of the AC component is roughly quantized, mosquito noise that causes bleeding or graininess in the outline occurs, and overall color shift due to quantization occurs. , visual degradation is very large trough cormorant drawback, there is a force s.
さ らに、 従来の手法を実現するに際しては、 D C T処理を実行するの にかなり複雑な構成を必要と し、 なおかつ処理負荷が重いという問題が ある。 Furthermore, when implementing the conventional method, there is a problem that a considerably complicated configuration is required to execute the DCT processing, and the processing load is heavy.
上述したよ うな問題が存在しているため、 復元後も高精細な静止画像 を最優先で必要とする美術画像や医療画像などにおいては特に不適切で ある場合が多い。 Because of the above-mentioned problems, it is often inappropriate especially for art images and medical images that require high-resolution still images as a top priority after restoration.
さらに、 近年では高解像度の力ラー静止画像が多く用いられるよ うに なっている関係上、 データ量も膨大となる傾向があるので、 高速でかつ 高精細な復元が可能な圧縮 · 復元手法が望まれている。 Furthermore, since high-resolution still images are increasingly used in recent years, the amount of data tends to be enormous.Therefore, a compression / decompression method capable of high-speed and high-resolution restoration is desired. It is rare.
本発明は、 このよ うな事情に鑑みてなされたものであって、 量子化の 対象を限定することにより、 比較的高い圧縮率を保ちつつも復元後の視 覚的劣化が少ない画像を得ることができる画像処理方法及びその装置並 びに記録媒体を提供することを目的とする。 発明の開示
本発明に係る画像処理方法は、 静止画像データを圧縮する画像処理方 法であつて、 静止画像データを任意の画素数からなるプロ ックに分割す る分割過程と、 各プロ ック内の一つの画素を基準画素と して選択する基 準画素選択過程と、 各ブロ ック内の基準画素以外の各周囲画素と、 各周 囲画素に対応するプロ ック内の基準画素との画素値の差分値を算出する 差分値算出過程と、 各差分値の出現率を求める出現率算出過程と、 差分 値と出現率の関係から特定の出現率より大きい差分値の範囲を求め、 こ の範囲を量子化範囲と して求める量子化範囲算出過程と、 量子化範囲内 の差分値を量子化する量子化過程と、 基準画素の画素値と、 量子化済の 差分値と、 前記分割過程にてブロ ックから外れて端数となった端数画素 の画素値と、 量子化範囲外の差分値のうち、 少なく と も量子化済の差分 値に対してデータ冗長度を抑圧するよ うに可逆性の符号化を施すェン ト ロ ビー符号化過程と、 基準画素の画素値に応じた基準画素データと、 端 数画素の画素値に応じた端数画素データと、 量子化範囲外の差分値に応 じた範囲外画素データと、 符号化済の差分値に応じた符号化済差分値デ ータ と、 量子化テーブルを含む復元用データと、 前記静止画像データの 画像ステータスとを含む圧縮データを生成する生成過程と、 からなるこ とを特徴とするものである。 The present invention has been made in view of such circumstances, and it is possible to obtain an image with little visual deterioration after restoration while maintaining a relatively high compression ratio by limiting the object of quantization. It is an object of the present invention to provide an image processing method and an apparatus thereof and a recording medium capable of performing the method. Disclosure of the invention An image processing method according to the present invention is an image processing method for compressing still image data, which includes dividing a still image data into blocks each having an arbitrary number of pixels, A reference pixel selection process of selecting one pixel as a reference pixel, pixels of each peripheral pixel other than the reference pixel in each block, and reference pixels in a block corresponding to each peripheral pixel A difference value calculation process for calculating the difference value of the values, an occurrence ratio calculation process for calculating the appearance ratio of each difference value, and a difference value range larger than a specific occurrence ratio is obtained from the relationship between the difference value and the appearance ratio. A quantization range calculating step of obtaining a range as a quantization range, a quantization step of quantizing a difference value within the quantization range, a pixel value of a reference pixel, a quantized difference value, and the dividing step The pixel value of the fractional pixel that is out of the block at An entropy encoding process of performing reversible encoding on at least the quantized difference values of the difference values outside the quantization range so as to suppress data redundancy; and The reference pixel data according to the pixel value of the fractional pixel data, the fractional pixel data according to the pixel value of the fractional pixel, the out-of-range pixel data corresponding to the difference value outside the quantization range, and the encoded difference value And generating a compressed data including the encoded difference value data, the decompression data including the quantization table, and the image status of the still image data. is there.
自然な階調を有する一般的な静止画像においては、 画像内の任意の画 素の画素値と、 近接する画素の画素値とが極めて近い値をとる確率が高 く 、 このよ うな傾向は解像度が高く なるほど顕著になる。 In a general still image having a natural gradation, there is a high probability that the pixel value of an arbitrary pixel in the image and the pixel value of an adjacent pixel take an extremely close value. The higher the value, the more noticeable.
したがって、 そのよ うな静止画像を対象にしてプロ ック内の基準画素 と周囲画素の画素値との差分からなる値の分布を求めると、 例えば、 第 4図のグラフのよ うに差分値の出現率は 『 0』 付近に集中することにな る。 Therefore, if the distribution of values consisting of the difference between the reference pixel in the block and the pixel value of the surrounding pixels is determined for such a still image, for example, the appearance of the difference value as shown in the graph of FIG. The rate will be concentrated around “0”.
このよ うに差分値の出現率には統計的な偏りが存在するので、 原画像
である静止画像に対して少ない情報量で表現することが可能であり、 こ のよ うな差分値を求めることによ り符号化工程での処理に適した形へと モデリ ングされたことになる。 Since there is a statistical bias in the appearance rate of the difference value, the original image It is possible to express a still image with a small amount of information, and by calculating such a difference value, it is modeled into a form suitable for processing in the encoding process .
ところで、 差分値の出現率は、 第 4図から明らかなよ うに、 その値が 大きく なるにつれて急激に少なく なる。 このよ うな大きな差分値は、 静 止画像における輪郭部分に相当することが多いが、 これらは画質に大き な影響を与えるので量子化しないよ うにする。 By the way, as apparent from FIG. 4, the appearance rate of the difference value sharply decreases as the value increases. Such a large difference value often corresponds to a contour portion in a still image, but since it has a large effect on the image quality, it should not be quantized.
換言すると、 差分値の分布から特定の出現率よ り も大きな差分値の範 囲を求めて、 この範囲内の差分値だけを量子化する。 したがって、 この 範囲内の差分値には量子化誤差が含まれることになる。 しかし、 この差 分値は、 低周波成分に相当し、 画質への影響が小さい。 In other words, a range of difference values larger than a specific appearance rate is obtained from the difference value distribution, and only the difference values within this range are quantized. Therefore, the difference value within this range includes a quantization error. However, this difference value corresponds to a low frequency component and has little effect on image quality.
次に、 基準画素の画素値と、 量子化済の差分値と、 ブロ ック外に位置 する端数画素の画素値と、 量子化範囲外の差分値のうち、 少なく と も量 子化済の差分値をェン ト口 ピー符号化して可逆性の圧縮を施す。 Next, of the pixel value of the reference pixel, the quantized difference value, the pixel value of the fractional pixel located outside the block, and the difference value outside the quantization range, at least the quantized difference value is selected. The difference value is subjected to end-to-end coding and lossless compression is performed.
このよ うに低周波成分に相当する特定の量子化範囲内の画素値の差分 値だけを対象に量子化を施し、 そのほかの値については少なく と も量子 化済の差分値に可逆性の符号化を施すので、 このよ うにして得られる圧 縮データでは高周波成分における誤差を抑制することができる。 In this way, quantization is performed only on the difference values of pixel values within a specific quantization range corresponding to low-frequency components, and lossless coding is performed on other values at least as quantized difference values. Therefore, errors in high-frequency components can be suppressed in the compressed data obtained in this manner.
以上のよ うに本発明に係る方法発明によれば、 差分値のうち量子化範 囲内の差分値だけを対象に量子化し、 基準画素の画素値と、 量子化済の 差分値と、 ブロ ック外に位置する端数画素の画素値と、 量子化範囲外の 差分値のうち少なく とも量子化済の差分値に对してはェン ト口ビー符号 化して可逆性の圧縮を施す。 As described above, according to the method invention according to the present invention, only the difference value within the quantization range among the difference values is quantized, and the pixel value of the reference pixel, the quantized difference value, and the block At least the quantized difference value among the pixel values of the fractional pixels located outside and the difference value outside the quantization range is subjected to the lossy Be-encoding and subjected to lossless compression.
このよ うに量子化の对象を限定して量子化範囲内の差分値の他には量 子化誤差を発生させないようにしているので、 比較的高い圧縮率を保持 しつつも従来例に比較して復元時における復元静止画像の視覚的な劣化
を抑制することができる圧縮データを得ることができる。 In this way, quantization is limited so that quantization errors are not generated in addition to the difference value within the quantization range. Degradation of Restored Still Image at Restoration Can be obtained.
また、 基準画素を静止画像の全体にわたって保持しているので、 全体 的な色ずれが生じにく くすることができる。 また、 高周波成分を完全に 可逆な状態で保持しているので、 静止画像の先鋭度が低下しにく レ、。 さ らに、 D C T処理が不要であることから処理が比較的簡単であるので、 処理時の負荷を軽くすることができて圧縮処理を高速に施すことができ る。 In addition, since the reference pixels are held over the entire still image, it is possible to reduce the occurrence of overall color shift. Also, since the high-frequency components are held in a completely reversible state, the sharpness of the still image is not easily reduced. Furthermore, since the DCT processing is unnecessary, the processing is relatively simple, so that the processing load can be reduced and the compression processing can be performed at high speed.
また、 本発明に係る画像処理方法は、 上記の画像処理方法において、 前記エン ト ロ ピー符号化過程では、 基準画素の画素値と、 端数画素の画 素値と、 量子化範囲外の差分値のうち圧縮効果があるものについてもデ ータ冗長度を抑圧するよ うに可逆性の符号化を施し、 前記記憶過程では 、 前記ェン ト口ピー符号化過程で新たに符号化されたデータを元のデー タに代えて記憶することが好ましい。 Further, in the image processing method according to the present invention, in the above image processing method, in the entropy encoding step, a pixel value of a reference pixel, a pixel value of a fractional pixel, and a difference value outside a quantization range are provided. Among them, those that have a compression effect are also subjected to reversible encoding so as to suppress data redundancy, and in the storing step, data newly encoded in the It is preferable to store the data in place of the original data.
このよ うに量子化済の差分値だけでなく、 圧縮効果が得られるものに ついても可逆性のエン トロ ピー符号化を施すことにより、 データ量をさ らに少なくすることができる。 したがって、 圧縮データの圧縮率をさら に高めることができる。 In this way, the data amount can be further reduced by applying reversible entropy coding not only to the quantized difference values but also to those that can provide a compression effect. Therefore, the compression ratio of the compressed data can be further increased.
また、 本発明に係る画像処理方法は、 上記の画像処理方法によって圧 縮された静止画像データを復元する画像処理方法であって、 基準画素の 画素値に応じた基準画素データと、 端数画素の画素値に応じた端数画素 データ と、 量子化範囲外の差分値に応じた範囲外画素データと、 符号化 済の差分値に応じた符号化済差分値データと、 量子化テーブルを含む復 元用データ と、 圧縮前の静止画像データの画像ステータスとを含む圧縮 データのうち、 可逆性の符号化が施されたデータを復元する可逆性デー タ復元過程と、 前記符号化済差分値データに基づき復元された量子化済 の差分値と量子化テーブルとに基づき仮差分値を求め、 各仮差分値を、
各々の仮差分値に对応するプロック内の基準画素の画素値に加算して各 周囲画素の画素値を仮画素値と して求める仮画素値算出過程と、 各周囲 画素の仮画素値と、 各々の周囲画素の近辺に位置する基準画素の画素値 とに基づいて、 量子化誤差を抑圧するよ うに周囲画素の画素値を予測画 素値と して求める予測過程と、 各ブロック内の基準画素値と、 各々の基 準画素値に対応する周囲画素の予測画素値と、 各端数画素の画素値と、 量子化範囲外の各画素の差分値と、 画像ステータスとに基づいて前記静 止画像データを復元静止画像データと して生成する生成過程と、 からな ることを特徴とするものである。 Further, an image processing method according to the present invention is an image processing method for restoring still image data compressed by the above image processing method, wherein the reference pixel data corresponding to the pixel value of the reference pixel and a fractional pixel Restoration including fractional pixel data according to the pixel value, out-of-range pixel data according to the difference value outside the quantization range, encoded difference value data according to the encoded difference value, and quantization table Reversible data restoring process of restoring reversibly encoded data among compressed data including data for use and image status of still image data before compression, and A temporary difference value is obtained based on the quantized difference value restored on the basis of the quantization table. A temporary pixel value calculating process of adding the pixel value of each peripheral pixel as a temporary pixel value by adding to the pixel value of the reference pixel in the block corresponding to each temporary difference value; A prediction process in which the pixel value of a surrounding pixel is determined as a prediction pixel value so as to suppress a quantization error based on the pixel value of a reference pixel located near each of the surrounding pixels. The static pixel value based on a reference pixel value, a predicted pixel value of a surrounding pixel corresponding to each reference pixel value, a pixel value of each fractional pixel, a difference value of each pixel outside the quantization range, and an image status. And a generation process for generating still image data as restored still image data.
まず、 可逆性の符号化が施されたデータを全て復元し、 そのうちの量 子化済の差分値について量子化テーブルに基づき仮差分値を求める。 こ の仮差分値と、 対応する基準画素の画素値とに基づき周囲画素の画素値 を仮画素値と して求める。 この仮画素値には、 量子化誤差が含まれてい るが、 仮画素値の近辺に位置する基準画の画素値に基づき量子化誤差を 抑圧するよ うに予測画素値を求める。 First, all the losslessly encoded data is restored, and a provisional difference value is obtained for the quantized difference value of the data based on the quantization table. Based on the provisional difference value and the pixel value of the corresponding reference pixel, the pixel value of the surrounding pixel is determined as the provisional pixel value. Although this temporary pixel value includes a quantization error, a predicted pixel value is determined so as to suppress the quantization error based on the pixel value of the reference image located near the temporary pixel value.
このよ うにして求めた予測画素値と、 基準画素値と、 端数画素の画素 値と、 量子化範囲外の各画素の差分値などに基づき復元静止画像データ を得る。 The restored still image data is obtained based on the predicted pixel value, the reference pixel value, the pixel value of the fractional pixel, the difference value of each pixel outside the quantization range, and the like thus obtained.
上記のよ うに復元静止画像データを得るが、 完全に可逆の基準画素デ ータに基づき復元された画素値が静止画像の全体にわたってほぼ均一に 分散しているので、 量子化誤差が復元静止画像の全体に分散することを 防止できる。 Although the restored still image data is obtained as described above, since the pixel values restored based on completely reversible reference pixel data are almost uniformly dispersed throughout the still image, the quantization error is reduced. Can be prevented.
また、 高周波成分についても誤差なく完全に復元できるので、 画像の 輪郭に相当する画素値に誤差が生じない。 In addition, since high-frequency components can be completely restored without errors, no errors occur in pixel values corresponding to the contours of the image.
さらに、 量子化誤差を含む周囲画素の画素値を、 隣接するブロ ックの 基準画素を用いて予測するので、 復元された周囲画素に含まれる量子化
誤差を抑圧することができる。 Furthermore, since the pixel value of the surrounding pixel including the quantization error is predicted using the reference pixel of the adjacent block, the quantization included in the restored surrounding pixel is predicted. Errors can be suppressed.
以上のよ うな方法発明によれば、 完全に復元された基準画素の画素値 が静止画像の全体にわたってほぼ均一に分散しているので、 量子化誤差 が復元静止画像の全体に分散することを防止でき、 全体的な色ずれを抑 制することができる。 According to the method invention as described above, since the pixel values of the completely restored reference pixels are almost uniformly dispersed throughout the still image, the quantization error is prevented from being dispersed throughout the restored still image. And overall color shift can be suppressed.
また、 高周波成分についても誤差なく完全に復元できるので、 画像の 輪郭に相当する画素値に誤差が生じず、 圧縮前の静止画像の先鋭度を従 来例に比較して忠実に復元することができる。 In addition, since high-frequency components can be completely restored without errors, there is no error in the pixel values corresponding to the contours of the image, and the sharpness of the still image before compression can be faithfully restored compared to the conventional example. it can.
さ らに、 量子化誤差を含む周囲画素の画素値を、 隣接するブロ ックの 基準画素で予測することによ り周囲画素の量子化誤差を抑圧することが できるので、 ブロ ック間歪みを従来例に比較して大幅に抑制することが できる。 その上、 逆 D C T処理が不要であることから従来例に比較して 処理が簡単であるので、 処理時の負荷を軽くすることができて復元処理 を高速に施すことができる。 Furthermore, by predicting the pixel value of the surrounding pixels including the quantization error with the reference pixel of the adjacent block, the quantization error of the surrounding pixels can be suppressed. Can be greatly suppressed as compared with the conventional example. In addition, since the inverse DCT processing is not required, the processing is simpler than the conventional example, so that the processing load can be reduced and the restoration processing can be performed at high speed.
また、 本発明に係る画像処理方法は、 上記の画像処理方法において、 前記予測過程では、 各々の周囲画素を挟んで位置する基準画素を用いて 、 これらを結ぶ線側に量子化幅に応じて仮画素値をシフ ト して各々の周 囲画素の予測画素値とするのが好ましい。 Further, in the image processing method according to the present invention, in the image processing method described above, in the predicting step, a reference pixel positioned across each peripheral pixel is used, and a line connecting these pixels is determined according to a quantization width. It is preferable that the provisional pixel value is shifted to be the predicted pixel value of each surrounding pixel.
この方法発明によれば、 誤差を含まない基準画素同士を用いて周囲画 素の画素値を求めるので、 周囲画素の予測画素値に含まれる量子化誤差 を抑圧することができる。 したがって、 ブロ ック境界線で生じるブロ ッ ク歪みを抑制することができ、 連続した輪郭線がジグザグになるよ うな 現象を抑制できる。 According to this method invention, since the pixel values of the surrounding pixels are obtained using the reference pixels that do not include the error, the quantization error included in the predicted pixel value of the surrounding pixels can be suppressed. Therefore, the block distortion generated at the block boundary can be suppressed, and the phenomenon that a continuous contour becomes zigzag can be suppressed.
また、 本発明に係る画像処理装置は、 静止画像データを圧縮する画像 処理装置であって、 前記静止画像データを任意の画素数からなるブロ ッ クに分割するブロ ック分割部と、 各ブロ ック內の一つの画素を基準画素
と して選択する基準画素選択部と、 各ブロック内の基準画素以外の各周 囲画素と、 各周囲画素に対応するプロ ック内の基準画素との画素値の差 分値を算出する差分値算出部と、 各差分値の出現率を求める出現率算出 部と、 差分値と出現率の関係から特定の出現率よ り大きい差分値の範囲 を求め、 この範囲を量子化範囲と して求める量子化範囲算出部と、 量子 化範囲内の差分値を量子化する量子化部と、 基準画素の画素値と、 量子 化済の差分値と、 前記プロ ック分割部においてプロ ックから外れて端数 となった端数画素の画素値と、 量子化範囲外の差分値のうち、 少なく と も量子化済の差分値に対してデータ冗長度を抑圧するよ うに可逆性の符 号化を施すエン ト ロ ピー符号化部と、 基準画素の画素値に応じた基準画 素データと、 端数画素の画素値に応じた端数画素データと、 量子化範囲 外の差分値に応じた範囲外画素データと、 符号化済の差分値に応じた符 号化済差分値データと、 量子化テーブルを含む復元用データと、 前記静 止画像データの画像ステータスとを含む圧縮データを生成する圧縮デー タ生成部と、 を備えていることを特徴とする。 Further, an image processing apparatus according to the present invention is an image processing apparatus for compressing still image data, comprising: a block dividing unit that divides the still image data into blocks having an arbitrary number of pixels; One pixel of the package is the reference pixel A reference pixel selection unit to be selected as a reference pixel, a difference for calculating a pixel value difference between each peripheral pixel other than the reference pixel in each block, and a reference pixel in a block corresponding to each peripheral pixel. A value calculation unit, an appearance rate calculation unit for calculating an appearance rate of each difference value, and a range of difference values larger than a specific appearance rate from a relationship between the difference value and the appearance rate, and this range is set as a quantization range. A quantization range calculation unit to be obtained; a quantization unit that quantizes a difference value within the quantization range; a pixel value of a reference pixel; a quantized difference value; and a block in the block division unit. Lossless encoding is performed so as to suppress data redundancy with respect to the pixel value of the fractional pixel that has become a fraction and the difference value outside the quantization range, which is at least the quantized difference value. The entropy encoding unit to be applied and the reference pixel data corresponding to the pixel value of the reference pixel. Fractional pixel data according to the pixel value of the fractional pixel, out-of-range pixel data according to the difference value outside the quantization range, and encoded difference value data according to the encoded difference value. A compressed data generation unit that generates compressed data including restoration data including a quantization table and image status of the still image data.
このよ うに構成された装置では、 原画像データ記憶部からの静止画像 データをブロ ック分割部でブロ ックに分割し、 各ブロ ック内の一つの画 素を基準画素選択部において基準画素に選択する。 そして、 差分算出部 で基準画素と周囲画素の画素値の差分をとつて差分値に統計的な偏りを もたせ、 出現率算出部で出現率を求める。 差分値の分布から特定の出現 率よ り も大きな差分値の範囲を量子化範囲算出部で求め、 この範囲内の 差分値だけを量子化部により量子化する。 In the device configured in this way, the still image data from the original image data storage unit is divided into blocks by the block division unit, and one pixel in each block is used as a reference in the reference pixel selection unit. Select to pixel. Then, the difference calculation unit calculates a difference between the pixel values of the reference pixel and the surrounding pixels to give a statistical bias to the difference value, and the appearance rate calculation unit obtains the appearance rate. From the distribution of the difference values, a range of the difference value larger than a specific appearance rate is obtained by the quantization range calculation unit, and only the difference value within this range is quantized by the quantization unit.
次に、 エン トロピー符号化部において、 基準画素の画素値と、 量子化 済の差分値と、 ブロ ック外に位置する端数画素の画素値と、 量子化範囲 外の差分値のうち、 少なく とも量子化済の差分値をエン ト ロ ピー符号化 して可逆性の圧縮を施す。
このよ う にして生成した圧縮データを記憶部に記憶するが、 特定の量 子化範囲内の画素値の差分値だけを対象に量子化を施し、 そのほかの値 については少なく とも量子化済の差分値に可逆性の符号化を施すので、 圧縮データにおける高周波成分の誤差を抑制することができる。 Next, in the entropy coding unit, at least the pixel value of the reference pixel, the quantized difference value, the pixel value of the fractional pixel located outside the block, and the difference value outside the quantization range are calculated. In both cases, the quantized difference value is entropy-coded to perform lossless compression. The compressed data generated in this way is stored in the storage unit, but only the difference between pixel values within a specific quantization range is subjected to quantization, and other values are at least quantized. Since lossless encoding is performed on the difference value, it is possible to suppress errors in high frequency components in the compressed data.
したがって、 この発明装置によれば、 上記の圧縮のための方法発明を 好適に実施することができる。 Therefore, according to the apparatus of the present invention, the above-described method invention for compression can be suitably implemented.
また、 本発明に係る画像処理装置は、 上記の画像処理装置によって圧 縮された静止画像データを復元する画像処理装置であって、 基準画素の 画素値に応じた基準画素データと、 ブロ ックから外れて端数となった画 素の画素値に応じた端数画素データと、 量子化範囲外の差分値に応じた 範囲外画素データと、 符号化済の差分値に応じた符号化済差分値データ と、 復元用データと、 圧縮前の静止画像データの画像ステータス とを含 む圧縮データのうち、 可逆性の符号化が施されたデータを復元する可逆 性データ復元部と、 前記符号化済差分値データに基づき復元された量子 化済の差分値と量子化テーブルとに基づき仮差分値を求める量子化デー タ復元部と、 前記量子化データ復元部によって求められた各仮差分値を 、 各々の仮差分値に対応するプロ ック内の基準画素の画素値に加算して 各周囲画素の画素値を仮画素値と して求める仮画素値算出部と、 前記仮 画素値算出部によって求められた各周囲画素の仮画素値と、 各々の周囲 画素の近辺に位置する基準画素の画素値とに基づいて、 量子化誤差を抑 圧するよ うに周囲画素の画素値を予測画素値と して求める予測部と、 各 ブロ ック内の基準画素値と、 各々の基準画素値に対応する周囲画素の予 測画素値と、 各端数画素の画素値と、 量子化範囲外の各画素の差分値と 、 画像ステータスとに基づいて前記静止画像データを復元静止画像デー タ と して生成する生成部と、 を備えていることを特徴とする。 Further, an image processing device according to the present invention is an image processing device for restoring still image data compressed by the image processing device, wherein the reference pixel data according to the pixel value of the reference pixel and a block Fractional pixel data according to the pixel value of the pixel that has become a fraction outside the range, pixel data outside the range according to the difference value outside the quantization range, and encoded difference value according to the encoded difference value. Reversible data restoration unit for restoring losslessly encoded data among compressed data including data, restoration data, and the image status of the still image data before compression; A quantized data restoring unit that determines a temporary difference value based on the quantized difference value restored based on the difference value data and the quantization table; Each temporary difference A temporary pixel value calculation unit that adds the pixel value of each peripheral pixel as a temporary pixel value by adding to the pixel value of the reference pixel in the block corresponding to the value, and each of the temporary pixel value calculated by the temporary pixel value calculation unit. A prediction unit that obtains a pixel value of a surrounding pixel as a predicted pixel value so as to suppress a quantization error based on a temporary pixel value of the surrounding pixel and a pixel value of a reference pixel located near each surrounding pixel. , The reference pixel value in each block, the predicted pixel value of the surrounding pixels corresponding to each reference pixel value, the pixel value of each fractional pixel, the difference value of each pixel outside the quantization range, A generating unit that generates the still image data as restored still image data based on the image status.
このよ うに構成された装置では、 圧縮データ記憶部に記憶されている
圧縮データのうち、 可逆性の符号化が施されたデータを可逆性データ復 元部にて全て復元し、 そのうちの量子化済の差分値を量子化データ復元 部にて仮差分値と して一旦求め、 この仮差分値と、 対応する基準画素の 画素値とに基づき周囲画素の画素値を仮画素値と して仮画素値算出部に て求める。 この仮画素値には、 量子化誤差が含まれているが、 仮画素値 を挟む形で位置する基準画の画素値に基づき量子化誤差を抑圧するよ う に予測画素値を予測部において求める。 In the device configured as described above, the compressed data is stored in the compressed data storage unit. Among the compressed data, all of the losslessly encoded data is restored by the lossless data restoration unit, and the quantized difference value is used as a temporary difference value by the quantization data restoration unit. Once obtained, the pixel values of the surrounding pixels are determined as temporary pixel values by the temporary pixel value calculation unit based on the temporary difference value and the pixel value of the corresponding reference pixel. Although this temporary pixel value includes a quantization error, a prediction pixel value is obtained by the prediction unit so as to suppress the quantization error based on the pixel value of the reference image positioned so as to sandwich the temporary pixel value. .
このよ うにして求めた予測画素値と、 基準画素値と、 端数画素の画素 値と、 量子化範囲外の各画素の差分値などに基づいて復元データ記憶部 に復元静止画像データを得る。 The restored still image data is obtained in the restored data storage unit based on the predicted pixel value thus obtained, the reference pixel value, the pixel value of the fractional pixel, the difference value of each pixel outside the quantization range, and the like.
このよ うに復元静止画像データを得るが、 完全に可逆の基準画素デー タに基づき復元された画素値が静止画像の全体にわたって分散している ので、 量子化誤差が復元静止画像の全体に分散することを防止できる。 また、 高周波成分についても完全に復元できるので、 画像の輪郭に相 当する画素値に誤差が生じない。 Although the restored still image data is obtained in this way, since the pixel values restored based on completely reversible reference pixel data are dispersed throughout the still image, quantization errors are dispersed throughout the restored still image. Can be prevented. Also, since high-frequency components can be completely restored, no error occurs in pixel values corresponding to the outline of the image.
さらに、 量子化誤差を含む周囲画素の画素値を、 隣接するブロ ックの 基準画素を用いて予測するので、 復元された周囲画素に含まれる量子化 誤差を抑圧することができる。 Furthermore, since the pixel value of the surrounding pixel including the quantization error is predicted using the reference pixel of the adjacent block, the quantization error included in the restored surrounding pixel can be suppressed.
したがって、 この発明装置によれば、 上記の復元のための方法発明を 好適に実施することができる。 図面の簡単な説明 Therefore, according to the apparatus of the present invention, the above-described method invention for restoration can be suitably implemented. BRIEF DESCRIPTION OF THE FIGURES
第 1 図は、 画像処理装置の概略構成を示すプロ ック図であり、 第 2図は、 圧縮に係る画像処理装置を機能的に示したプロック図であ り、 FIG. 1 is a block diagram showing a schematic configuration of the image processing apparatus, and FIG. 2 is a block diagram functionally showing the image processing apparatus related to compression.
第 3図は、 ブロ ック内の基準画素と周囲画素との関係を示した模式図
であり 、 Fig. 3 is a schematic diagram showing the relationship between the reference pixel and surrounding pixels in the block. And
第 4図は、 差分値出現頻度の一例を示した分布図であり、 FIG. 4 is a distribution diagram showing an example of a difference value appearance frequency.
第 5図は、 量子化後のプロ ックの状態を模式的に示した図であり、 第 6図は、 圧縮処理を示すフローチャー トであり、 FIG. 5 is a diagram schematically showing a state of a block after quantization, and FIG. 6 is a flowchart showing a compression process.
第 7図は、 圧縮処理を示すフローチャー トであり、 FIG. 7 is a flowchart showing the compression process.
第 8図は、 ェン トロ ビー符号化過程を示すフローチャー トであり、 第 9図は、 復元に係る画像処理装置を機能的に示したプロ ック図であ り、 FIG. 8 is a flowchart showing an entropy encoding process, and FIG. 9 is a block diagram functionally showing an image processing apparatus relating to restoration.
第 1 0図は、 予測処理の説明に供する図であり、 FIG. 10 is a diagram provided for explanation of the prediction process.
第 1 1図は、 予測処理の説明に供する図であり、 FIG. 11 is a diagram provided for explanation of the prediction process.
第 1 2図は、 復元処理を示すフローチャー トであり、 FIG. 12 is a flowchart showing the restoration process.
第 1 3図は、 復元処理を示すフローチャー トである。 発明を実施するための最良の形態 FIG. 13 is a flowchart showing the restoration processing. BEST MODE FOR CARRYING OUT THE INVENTION
従来の問題点を解決するための形態と して、 以下のものがある。 The following are forms for solving the conventional problems.
第 1 図は本発明に係る画像処理装置のハー ドウユア構成を示すプロ ッ クである。 FIG. 1 is a block diagram showing a hardware configuration of the image processing apparatus according to the present invention.
この実施例装置はコンピュータシステムで構成されており 、 C P U 1 は内部メモ リ 3に記憶された処理プログラムに従って、 静止画像データ を圧縮する処理や、 圧縮された静止画像データを復元する処理などを実 行する。 C P U 1 と内部メモ リ 3 とはバスライ ン 5を介して接続されて いる。 The apparatus of this embodiment is configured by a computer system, and a CPU 1 executes a process of compressing still image data and a process of restoring compressed still image data according to a processing program stored in an internal memory 3. Run. CPU 1 and internal memory 3 are connected via bus line 5.
内部メモリ 3には、 処理プログラムを記憶するプログラム記憶部 3 a の他に、 圧縮処理や復元処理を施す前のデータや処理中のデータを記憶 するための処理前記憶部 3 b と、 圧縮処理後や復元処理後のデータを記 憶するための処理後記憶部 3 c とを備えている。
また、 C P U 1 は、 入出力インターフェイス ( I Z O ) 9を介して、 記録媒体 1 3が装填される記録媒体用 ドライバ 1 5 と、 各種のデータや ファイルを記憶する外部記憶装置 1 7 と、 静止画像データを画像と して 表示する等に用いられるモニタディ スプレイなどの表示装置 1 9 と、 キ 一ボー ドやマウスなどの入力装置 2 1 と、 スキャナーなどの画像入力器 2 3などにも接続されている。 The internal memory 3 has a pre-processing storage section 3b for storing data before compression processing and decompression processing and data being processed, in addition to a program storage section 3a for storing processing programs, and a compression processing section. It has a post-processing storage unit 3c for storing data after and after restoration processing. The CPU 1 also includes, via an input / output interface (IZO) 9, a recording medium driver 15 into which the recording medium 13 is loaded, an external storage device 17 that stores various data and files, and a still image It is also connected to a display device 19 such as a monitor display used to display data as images, an input device 21 such as a keyboard or mouse, and an image input device 23 such as a scanner. I have.
プログラム記憶部 3 a には、 記録媒体用 ドライバ 1 5に装填された記 録媒体 1 3から読み出された処理プログラムが転送されて記憶され、 C P U 1 によって以下に説明するよ うな処理が実行されるよ うになってい る。 記録媒体 1 3 と しては、 フロ ッ ピーディスク、 光磁気デイスク、 C D— R O M、 メモリカー ドなどが例示される。 The processing program read from the recording medium 13 loaded in the recording medium driver 15 is transferred and stored in the program storage section 3a, and the CPU 1 executes the processing described below. It has become so. Examples of the recording medium 13 include a floppy disk, a magneto-optical disk, a CD-ROM, and a memory card.
なお、 以下の説明においては、 理解の容易のために処理プログラムに よる各処理を機能的にプロ ック図にも示している。 In the following description, each process according to the processing program is also functionally shown in a block diagram for easy understanding.
<圧縮処理〉 <Compression processing>
第 2図の機能ブロ ック図を参照して、 上述のよ うに構成された画像処 理装置による圧縮処理について説明する。 The compression processing by the image processing apparatus configured as described above will be described with reference to the functional block diagram of FIG.
この装置では、 まず、 処理対象である静止画像データを含んだ画像フ ァィルを画像入力器 2 3あるいは外部記憶装置 2 7から入力して処理前 記憶部 3 bに格納する。 In this device, first, an image file containing still image data to be processed is input from the image input device 23 or the external storage device 27 and stored in the pre-processing storage portion 3b.
こ こでいう静止画像データは、 B M P (ビッ トマップ), T I F F (テ ィフ) などの可逆性画像フォーマッ トが一般的であるが、 後述する処理 を施せるよ うなフォーマッ トに変換する規定の処理手順を行うのであれ ば、 画像入力器 2 3から入力する静止画像データのフォーマッ トは問わ ない。 The still image data referred to here is generally in a reversible image format such as BMP (bitmap) or TIFF (tiff), but it is a specified process that converts the data into a format that can be processed as described later. The format of the still image data input from the image input device 23 does not matter as long as the procedure is performed.
また、 処理前記憶部 3 bには、 画像サイズや、 色形式 (R G B , C M Y K, 白黒など)、 解像度などの情報を含んだ画像ファイルの画像ステー
タスに基づいて処理に必要なワークェリァを確保すると と もに、 この領 域に静止画像データに基づくィメージ情報を展開する。 The pre-processing storage unit 3b stores the image status of the image file including information such as image size, color format (RGB, CMYK, black and white), and resolution. A work area necessary for processing is secured based on the task, and image information based on still image data is developed in this area.
ブロ ック分割部 2 5では、 例えば、 第 3図の模式図に示すよ うに、 処 理前記憶部 3 bのイメージ情報に基づく画素群 (横 j X縦 k画素) に対 して任意の微小ブロ ック B L ( m X n画素であり、 例えば 3 X 3画素) に分割する作業が行われる。 In the block division unit 25, for example, as shown in the schematic diagram of FIG. 3, an arbitrary pixel group (horizontal jX vertical k pixels) based on the image information of the pre-processing storage unit 3b is processed. The work of dividing into minute blocks BL (m × n pixels, for example, 3 × 3 pixels) is performed.
なお、 静止画像データのサイズによってはブロ ック B Lと して取り极 われない端数の画素が生じることになるが、 このよ うな端数画素 P Aに ついてはその画素値をそのままワークエリァに記憶しておく。 Depending on the size of the still image data, a fractional pixel that is not taken as the block B L may occur, but the pixel value of such a fractional pixel PA is stored in the work area as it is.
このよ うにブロック B Lごとに分割されたイメージ情報に対して、 基 準画素選択部 2 7は、 各ブロ ック B L毎に、 一つの基準画素 (例えば、 中心の画素 P 5 ) という ものを選択する。 処理速度の面から、 基準画素 と しては各ブロ ック B Lで共通であることが好ましいが、 各ブロ ック B しごとに異なる基準画素を選択するよ うにしてもよい。 For the image information divided for each block BL, the reference pixel selection unit 27 selects one reference pixel (for example, the central pixel P 5) for each block BL. I do. From the viewpoint of processing speed, it is preferable that the reference pixel is common to each block B L, but a different reference pixel may be selected for each block B.
各ブロ ック B Lごとに基準画素が選択された後は、 差分値算出部 2 9 が各プロ ック B L内の基準画素の画素値とその周り に位置する周囲画素 の画素値との差分を求める。 これによつて一般的な静止画像であれば統 計的な偏り をもたせることができ、 後の量子化や符号化の効率を高める ことができる。 After the reference pixel is selected for each block BL, the difference value calculation unit 29 calculates the difference between the pixel value of the reference pixel in each block BL and the pixel values of surrounding pixels located around it. Ask. As a result, statistical bias can be imparted to a general still image, and the efficiency of subsequent quantization and coding can be increased.
全てのブロ ック B Lにて基準画素と周囲画素の画素値の差分値を求め た後は、 出現率算出部 3 1 において差分値の出現率を求める。 After calculating the difference between the pixel values of the reference pixel and the surrounding pixels in all the blocks BL, the appearance rate calculator 31 calculates the appearance rate of the difference value.
量子化範囲算出部 3 3では、 この差分値出現率を用いて量子化する範 囲を決定する。 つま り、 従来例のように全ての差分値を量子化するので はなく 、 出現率が高いある一定の範囲だけを対象にして選択的に量子化 するのである。 The quantization range calculation unit 33 determines a range to be quantized using the difference value appearance rate. That is, instead of quantizing all the difference values as in the conventional example, the quantization is selectively performed only in a certain range where the appearance rate is high.
ところで自然な階調の一般的な静止画像では、 ある画素の画素値と、
それに近接する画素の画素値とが近い値をとる確率が高い。 そのため差 分値の分布を求めると、 例えば、 第 4図のグラフのよ うに差分値の出現 率は 『 0』 付近の範囲 R 2に集中する。 By the way, in a general still image with natural gradation, the pixel value of a certain pixel, There is a high probability that the pixel value of a pixel adjacent thereto takes a value close to the pixel value. Therefore, when the distribution of the difference values is obtained, for example, as shown in the graph of FIG. 4, the appearance rate of the difference values is concentrated in a range R 2 near “0”.
よって、 画像の輪郭部分に相当し、 高周波成分に相当する出現率が低 い範囲 R l, R 3を除き、 出現率が高い一定の範囲 R 2だけを量子化す るだけでもかなりの圧縮率が期待できる。 Therefore, except for the ranges R1 and R3, which correspond to the contours of the image and have a low appearance rate corresponding to the high-frequency component, a considerable compression rate can be obtained simply by quantizing only the constant range R2 having a high appearance rate. Can be expected.
量子化部 3 5では、 このよ うにして決定された量子化範囲を対象にし て実際に各差分値に対して量子化を施す。 The quantization unit 35 actually performs quantization on each difference value for the quantization range determined in this way.
ェン トロ ピー符号化部 3 7では、 プロ ック分割の際に端数となった端 数画素 P Aの画素値と、 基準画素 P 5の画素値と、 低周波成分に相当す る量子化済の差分値と、 高周波成分に相当する量子化範囲外の差分値の うち、 圧縮効果が得られるならば端数画素の画素値、 基準画素の画素値 、 量子化範囲外の差分値のいずれかに対して符号化を施し、 量子化済の 差分値に対しては必ず符号化を施して情報量を圧縮する。 In the entropy encoding unit 37, the pixel value of the fractional pixel PA, the pixel value of the reference pixel P5, and the quantized value corresponding to the low frequency component If the compression effect is obtained, the difference between the pixel value of the fractional pixel, the pixel value of the reference pixel, and the difference value out of the quantization range is obtained. The information is compressed, and the quantized difference value is always encoded to compress the amount of information.
以上の処理により、 例えば、 第 5図に示すよ うに、 ブロ ック B L ( 1 ) 〜B L ( 3 ) では、 ハッチングで示した中央の基準画素 P 5を除いた 周囲画素の全てが量子化の対象となって非可逆性と される一方、 プロ ッ ク B L ( j + 1 ) では右下の周囲画素が量子化されていない可逆性と さ れる。 このよ うに上述した出現率から明らかなよ うに、 画素群のうちの 大部分が量子化されて可逆性と されるのである。 By the above processing, for example, as shown in FIG. 5, in the blocks BL (1) to BL (3), all the surrounding pixels except for the central reference pixel P5 indicated by hatching are quantized. On the other hand, in the block BL (j + 1), the surrounding pixels at the lower right are non-quantized and invertible. As is clear from the above-mentioned appearance rate, most of the pixel group is quantized and made reversible.
そして、 圧縮を施された静止画像データは、 復元に必要な量子化テー ブルを含む復元用データと ともに圧縮データと して処理後記憶部 3 c に 格納される。 さらに、 必要であれば外部記憶装置 1 7に出力される Then, the compressed still image data is stored in the post-processing storage unit 3c as compressed data together with the decompression data including the quantization table required for decompression. In addition, output to external storage device 17 if necessary
なお、 処理後記憶部 3 cは、 本発明における圧縮データ生成部に相当 するものである。 The post-processing storage unit 3c corresponds to the compressed data generation unit in the present invention.
次に、 第 6図ないし第 8図のフローチャー トを参照しながら圧縮処理
に順を追って説明する。 Next, the compression process is performed with reference to the flowcharts in FIGS. 6 to 8. Will be described step by step.
〔ステップ S 1 〕 [Step S 1]
画像入力器 2 3または外部記憶装置 1 7から入力された静止画像デー タを含むファイルをオープンし、 必要なデータ等を処理前記憶部 3 bに 格納する。 The file containing the still image data input from the image input device 23 or the external storage device 17 is opened, and necessary data and the like are stored in the pre-processing storage section 3b.
〔ステップ S 2〕 [Step S 2]
このファイルに含まれる画像ステータスに基づいて、 処理に必要なヮ —クエリァを処理前記憶部 3 bに確保する。 Based on the image status included in this file, a queryer required for processing is secured in the pre-processing storage unit 3b.
〔ステップ S 3〕 [Step S 3]
上記のファイルに基づき、 処理前記憶部 3 bのワークエリ アに静止画 像データのィメ一ジ情報を展開する。 Based on the above file, the image information of the still image data is developed in the work area of the pre-processing storage unit 3b.
〔ステップ S 4〜 S 6〕 [Steps S4 to S6]
ワークエリァに展開したィメージ情報を微小プロ ック B L、 例えば、 第 3図に示すように 3 X 3画素に分割する。 この場合にィメージ情報が 3で割り切れない場合が生じるが、 それらの端数画素 P Aについては、 それらの画素値 ν ι>Λをそのままワークエリアに記憶しておく。 The image information developed in the work area is divided into small blocks BL, for example, 3 × 3 pixels as shown in FIG. In this case, the image information may not be divisible by 3, but for those fractional pixels PA, their pixel values ν ι> Λ are stored in the work area as they are.
なお、 上記のステップ S 4は、 本発明における分割過程に相当するも のである。 Step S4 described above corresponds to the dividing process in the present invention.
〔ステップ S 7〕 [Step S 7]
ブロ ック B Lごとに分割されたィメージ情報に対して各プロ ック B L 毎に、 例えば、 中央部の画素 Ρ 5を基準画素と して選択する。 この基準 画素 Ρ 5 と しては、 後の処理を考慮して、 各ブロ ックで同じ位置のもの であることが好ましい。 このよ う して選択された基準画素 Ρ 5の画素値 は、 ワークエリアに格納される。 The image information divided for each block B L is selected for each block B L, for example, the central pixel Ρ5 is set as a reference pixel. It is preferable that the reference pixel # 5 be at the same position in each block in consideration of later processing. The pixel value of the reference pixel # 5 thus selected is stored in the work area.
なお、 このステップ S 7が本発明における基準画素選択過程に相当す る。
〔ステップ S 8〕 Step S7 corresponds to a reference pixel selection step in the present invention. [Step S 8]
各ブロ ック B L内の基準画素 P 5の画素値 V y とその周り に位置す る各周囲画素 P 1〜 P 4 , ? 6〜? 9の画素値 1〜4, V 6〜 9 との 差分値 d i f ( 1 ) 〜 d i f ( 8 ) を求める。 このよ うにして求められ た差分値 d i f ( 1 ) 〜 d i f ( 8 ) は、 リ ソース節約のためにワーク エリ アのィメージ情報に上書きされる。 リ ソースが十分にある場合には 、 別の領域に差分値 d i f ( l ) 〜 d i f ( 8 ) を格納するよ うにして もよい。 The pixel value V y of the reference pixel P 5 in each block B L and surrounding pixels P 1 to P 4,? 6 to? The difference values dif (1) to dif (8) from the pixel values 1 to 4 and V6 to 9 of 9 are obtained. The difference values dif (1) to dif (8) thus obtained are overwritten with the image information of the work area to save resources. If there are sufficient resources, the difference values dif (l) to dif (8) may be stored in another area.
なお、 このステ ップ S 8は、 本発明における差分値算出過程に相当す る。 This step S8 corresponds to a difference value calculating step in the present invention.
〔ステップ S 9〕 [Step S 9]
上記のステップ S 7 , S 8の処理を全てのブロ ック B Lについて実施 し、 終了したら次のステップ S 1 0に移行する。 The processes in steps S7 and S8 described above are performed for all the blocks BL, and when the process is completed, the process proceeds to the next step S10.
〔ステ ップ S 1 0, S 1 1〕 [Step S10, S11]
求められた差分値 d i f を対象にして出現率を求める。 The appearance rate is calculated for the obtained difference value dif.
例えば、 静止画像が 8 ビッ ト階調である場合には、 画素値の差分値が 2 5 5〜 2 5 5 (± 2の 8乗) の範囲をと り得るので、 イメージ的に は、 第 4図に示すよ うに、 横軸に 2 5 5〜 2 5 5の差分値 d i ί を、 縦軸に該当する画素数をプロ ッ ト したヒ ス ト グラムを作成することにな る。 具体的には、 各差分値の出現個数毎に全画素数で割ればよいが、 単 に出現個数を出現率と して採用してもよレ、。 For example, if the still image has an 8-bit gradation, the difference between the pixel values can range from 255 to 255 (± 2 to the eighth power). As shown in Fig. 4, a histogram is created by plotting the difference value diί between 255 and 255 on the horizontal axis and the number of pixels corresponding to the vertical axis. More specifically, the number of occurrences of each difference value may be divided by the total number of pixels, but the number of occurrences may simply be used as the appearance rate.
と ころで、 この計算では端数画素 Ρ Αの画素数だけ誤差を含むことに なるが、 全画素数に占める割合が極めて小さいので無視しても何ら影響 はない。 In this case, this calculation includes an error for the number of fractional pixels Ρ 、, but since it accounts for a very small percentage of the total number of pixels, ignoring it has no effect.
なお、 これらのステップ S 1 0, S 1 1 が本発明の出現率算出過程に 相当する。
〔ステップ S 1 2 ] Note that these steps S10 and S11 correspond to the appearance rate calculation process of the present invention. [Step S 1 2]
ここでは上記のよ う して求めた出現率から量子化する範囲を決定す る。 Here, the range to be quantized is determined from the appearance rate obtained as described above.
例えば、 第 4図に示すよ うに、 出現頻度の総計が全画素数に対して 9 5 %以上を占める範囲 R 2を求め、 この範囲 R 2を量子化範囲と して設 定する。 このよ うにして出現率が高い範囲 R 2だけを対象にして量子化 する。 For example, as shown in FIG. 4, a range R2 in which the total appearance frequency accounts for 95% or more of the total number of pixels is obtained, and this range R2 is set as a quantization range. In this way, quantization is performed only for the range R2 having a high appearance rate.
次に、 量子化範囲 R 2内に存在する差分値を対象にして、 任意の量子 化幅を設定し、 量子化符号を割り当てて量子化テーブルを生成する。 量 子化幅は等間隔に設定してもよいが、 出現頻度が少ない差分値において は量子化幅を若干大きく設定して荒く量子化を行う量子化テーブルを生 成するよ うにしてもよレ、。 Next, an arbitrary quantization width is set for a difference value existing in the quantization range R2, and a quantization code is assigned to generate a quantization table. The quantization width may be set at equal intervals, but for a difference value with a low frequency of appearance, the quantization width may be set slightly larger to generate a quantization table that performs coarse quantization. Les ,.
なお、 このステツプが本発明における量子化範囲算出過程に相当する This step corresponds to the quantization range calculation process in the present invention.
〔ステップ S 1 3〜 S 1 6〕 [Steps S13 to S16]
上記のステップで生成した量子化テーブルを用いて、 全ての差分値 d i f を量子化して、 量子化済の差分値 Q d i f と して生成する。 Using the quantization table generated in the above steps, all the difference values dif are quantized to generate quantized difference values Qdif.
このときに量子化の対象となるのは、 量子化範囲 R 2内にある差分値 d i f だけである。 量子化範囲 R 2外にある差分値 d i f (つま り範囲 R 1, R 3内の差分値 d i f ) は、 量子化されることなくそのままの差 分値 d i f が処理前記憶部 3 bに格納される。 この際、 リ ソース節約の ためにワークエリ アのイメージ情報に上書きされるが、 リ ソースが十分 にある場合には別の領域に格納するよ うにしてもよレ、。 At this time, only the difference value dif within the quantization range R2 is subject to quantization. As for the difference value dif outside the quantization range R2 (that is, the difference value dif within the range R1, R3), the difference value dif without being quantized is stored in the pre-processing storage unit 3b. You. At this time, the image information in the work area is overwritten to save resources, but if there is enough resources, it may be stored in another area.
なお、 これらのステップ S 1 3〜 S 1 6が本発明における量子化過程 に相当する。 These steps S13 to S16 correspond to the quantization process in the present invention.
「ステップ S 1 7〕
上述した各ステップを経て生成されたデータは、 基準画素 P 5 の画素 値 V K HP と、 量子化済の差分値 Q d i f と、 端数画素 P Aの画素値 ν ι)Λと 、 量子化範囲外の差分値 d i f であるが、 これらを対象にして情報量の 冗長度を抑圧するためのェン トロ ピー符号化を施す。 "Step S 17" The data generated through the above-described steps includes a pixel value V K HP of the reference pixel P 5, a quantized difference value Q dif, a pixel value ν ι) Λ of the fractional pixel PA, and a value outside the quantization range. The entropy coding for suppressing the redundancy of the information amount is performed on these difference values dif.
具体的には、 以下に説明するよ うに、 一般的なボ トムアップ形式のハ フマン符号化を用いている。 Specifically, as described below, general bottom-up Huffman coding is used.
なお、 第 8図を参照して説明する以下のステップが本発明におけるェ ン トロ ピー符号化過程に相当する。 The following steps described with reference to FIG. 8 correspond to the entropy coding process in the present invention.
〔〔ステップ S 2 0〕〕 [[Step S20]]
基準画素 P 5の画素値 V li EF 、 量子化済の差分値 Q d i f 、 端数画素 P Aの画素値 V 、 量子化範囲外の差分値 d i f をハフマン符号化におけ るシンボルと して取り扱い、 各シンボルに対応する出現率に応じてソー トを行う。 The pixel value V li EF of the reference pixel P 5, the quantized difference value Q dif, the pixel value V of the fractional pixel PA, and the difference value dif outside the quantization range are treated as symbols in Huffman coding. Sorting is performed according to the appearance rate corresponding to the symbol.
〔〔ステップ S 2 1 〕〕 [[Step S2 1]]
最劣勢となっているシンボルと、 二番目に劣勢となっているシンボル に対して符号 (例えば、 一方に 「 1」 を、 他方に 「 0」) を割り 当てる。 Assign a code (eg, “1” to one and “0” to the other) for the least significant symbol and the second least significant symbol.
〔〔ステップ S 2 2, S 2 3〕〕 [[Step S22, S23]]
最劣勢シンボルと二番目に劣勢となっているシンボルの出現率を合併 し、 合併シンボルと して新たに定義する。 そして、 シンボル数が 「 1 」 になるまで上記のステップを繰り返し実行する。 The appearance rate of the least significant symbol and the second least significant symbol are merged and newly defined as a merged symbol. Then, the above steps are repeatedly performed until the number of symbols becomes “1”.
〔〔ステップ S 2 4〕〕 [[Step S2 4]]
上記のステップからなるループが終了した後、 累積した割り 当て符号 を逆読みしてハフマンテーブルを作成する。 After the loop consisting of the above steps is completed, the Huffman table is created by reading back the accumulated assignment codes.
〔〔ステップ S 2 5〕〕 [[Step S25]]
上記の処理を各シンボルについて実施して、 各シンボル毎にハフマン テーブルが作成されるまで繰り返す。
〔〔ステップ S 2 6〕〕 The above processing is performed for each symbol, and is repeated until a Huffman table is created for each symbol. [[Step S26]]
各シンボルについてハフマンテーブルが作成された後、 各々のシンポ ル毎に自身のハフマンテーブルに基づいて、 ェン トロ ピー符号化による 圧縮効果が得られるか否かを判断し、 この判断によ り処理を分岐する。 この判断は、 出現頻度とハフマンテーブルの符号長に基づいて容易に行 う ことができる。 After a Huffman table is created for each symbol, it is determined for each symbol whether or not the compression effect of entropy coding can be obtained based on its own Huffman table, and processing is performed based on this determination. Branch. This determination can be made easily based on the frequency of appearance and the code length of the Huffman table.
〔〔ステ ップ S 2 8, S 2 9 ] ] [[Step S28, S29]]
基準画素 P 5の画素値 V li l;l 、 端数画素 P Aの画素値 V M、 量子化範囲 外の差分値 d i f のシンボルのうち圧縮効果があると判断されたものに ついては、 対応するハフマンテーブルを参照して符号化を施し、 圧縮効 果が無いと判断されたものについては、 そのままの実値を用いる。 Among the symbols of the pixel value V li l; l of the reference pixel P 5, the pixel value V M of the fractional pixel PA, and the difference value dif out of the quantization range, the symbol determined to have the compression effect is represented by the corresponding Huffman table. If it is determined that there is no compression effect by performing encoding with reference to, the actual value as it is is used.
一般的には、 画像が高解像度であるほどエン ト ロ ピー (情報量) が多 く 、 ハフマン符号化を代表とするェン ト口 ピー符号化ではあま り効果が 得られないことや、 これらのデータが全画素数に対する割合と して非常 に少ない量であることから、 圧縮効果がないと判断された場合に実値を 用いたと しても全体の圧縮率に対して大きな影響は生じない。 In general, the higher the resolution of an image, the greater the entropy (amount of information), and the effect is not so much obtained in the case of Huffman coding as a typical example. Is very small as a percentage of the total number of pixels, so even if the actual value is used when it is determined that there is no compression effect, there is no significant effect on the overall compression ratio .
このよ うに量子化済の差分値 Q d i 〖 だけでなく 、 圧縮効果が得られ るものについても可逆性のェン ト口 ビー符号化を施すことによ り、 デー タ量をさらに少なくすることができる。 したがって、 圧縮データの圧縮 率をさ らに高めることができる。 In this way, not only the quantized difference value Q di 〖but also a compression effect can be obtained by applying reversible end-port Bee coding to further reduce the data amount. Can be. Therefore, the compression ratio of the compressed data can be further increased.
〔〔ステップ S 2 9〕〕 [[Step S29]]
ここでは、 量子化済の差分値 Q d i f だけをハフマンテーブルを参照 して符号化し、 処理後記憶部 3 cに格納する。 このステップ S 2 9によ り少なく とも量子化済の差分値 Q d i 〖 は、 データ冗長度が抑圧された 可逆性の符号化を施されることになる。 Here, only the quantized difference value Qdif is encoded with reference to the Huffman table, and stored in the post-processing storage unit 3c. By this step S29, at least the quantized difference value Q d i 〖is subjected to reversible coding with suppressed data redundancy.
ここで、 第 7図のフローチャー トに戻る。
〔ステップ S 1 8〕 Now, return to the flowchart of FIG. [Step S 18]
処理前記憶部 3 b のワークエリァに格納されている基準画素 P 5 の画 素値 に応じた基準画素データと、 端数画素 P Aの画素値 ν ι>Λに応じ た端数画素データと、 処理後記憶部 3 c に格納されている符号化済の差 分値 Q d i f に応じた符号化済差分値データと、 量子化の際の使用した 量子化テーブル及びハフマンテーブルを含む復元用データと、 静止画像 データの画像ステータスなどを含む圧縮データを処理後記憶部 3 cに格 糸内する。 Reference pixel data corresponding to the pixel value of the reference pixel P5 stored in the work area of the pre-processing storage unit 3b, fractional pixel data corresponding to the pixel value ν ι> Λ of the fractional pixel PA, and post-processing storage The encoded difference value data corresponding to the encoded difference value Q dif stored in the unit 3c, the restoration data including the quantization table and the Huffman table used for quantization, and a still image The compressed data including the image status of the data is stored in the post-processing storage unit 3c.
なお、 このステツプが本発明における生成過程に相当する。 This step corresponds to the generation process in the present invention.
〔ステップ S 1 9〕 [Step S 19]
上のよ うにして生成された圧縮データを外部記憶部 1 7に出力してフ アイルと して保存する。 The compressed data generated as described above is output to the external storage unit 17 and stored as a file.
このよ うに差分値のうち量子化範囲内の差分値だけを対象に量子化し 、 基準画素の画素値と、 量子化済の差分値と、 ブロ ック外に位置する端 数画素の画素値と、 量子化範囲外の差分値のうち少なく とも量子化済の 差分値に対してはェン ト口ピー符号化して可逆性の圧縮を施す。 このよ うに量子化と符号化の対象を限定して量子化範囲内の差分値の他には量 子化誤差を発生させないよ うにしているので、 比較的高い圧縮率を保持 しつつも従来例に比較して復元時における復元静止画像の視覚的な劣化 を抑制することができる圧縮データを得ることができる。 Thus, only the difference value within the quantization range among the difference values is quantized, and the pixel value of the reference pixel, the quantized difference value, and the pixel value of the fractional pixel located outside the block are calculated. In addition, among the difference values outside the quantization range, at least quantized difference values are subjected to loss-to-loss compression by performing edge-to-peak coding. In this way, the quantization and encoding targets are limited so that quantization errors are not generated in addition to the difference values within the quantization range. It is possible to obtain compressed data that can suppress the visual degradation of the restored still image at the time of restoration as compared with the example.
また、 基準画素を静止画像の全体にわたって保持しているので、 全体 的な色ずれが生じにく く、 高周波成分を完全に可逆な状態で保持してい るので、 静止画像の先鋭度が低下しにくレ、。 さらに、 D C T処理が不要 であることから処理が比較的簡単であるので、 処理時の負荷を軽くする ことができて圧縮処理を高速に施すことができる。 In addition, since the reference pixels are held over the entire still image, overall color shift is unlikely to occur, and since the high-frequency components are held in a completely reversible state, the sharpness of the still image is reduced. Nikure, Furthermore, since the DCT processing is unnecessary, the processing is relatively simple, so that the processing load can be reduced and the compression processing can be performed at high speed.
なお、 上述したステップ S 1 7におけるエン トロピー符号化では、 一
例と してハフマン符号化を用いたが、 本発明はこれに限定されるもので はなく 、 例えば、 以下の手法を用いてもよい。 In the entropy coding in step S17 described above, Huffman coding is used as an example, but the present invention is not limited to this. For example, the following method may be used.
( 1 ) ブロ ック符号化 ハフマン符号化では、 各シンボル単体ご とに符号化を行ったが、 シンボル数とその生起確率の条件によっては、 処理対象の情報源を任意のプロ ックにまとめて符号化を行ったほうが平 均符号長を短くすることができる。 (1) Block coding In Huffman coding, coding was performed for each symbol alone, but depending on the number of symbols and the conditions of their occurrence probabilities, the information sources to be processed are combined into an arbitrary block. The average code length can be shortened by performing coding.
特に、 高解像度の画像のよ うに、 ある程度連続したブロ ックを生成し てもェン トロピーが小さい (ある程度データの生起確率が特定のシンポ ルに偏っている) と考えられる場合には、 適度な数量でブロ ック化した ものを 1 シンボルと して考え、 上述したハフマン符号化を施すほうがさ らに圧縮率を向上できることがある。 In particular, if the entropy is considered to be small even if a certain amount of continuous blocks are generated (such as high-resolution images) (the probability of occurrence of data is biased to a particular symbol to a certain extent), it is appropriate. In some cases, the compression rate can be further improved by considering the blocks with a large number of blocks as one symbol and performing the Huffman coding described above.
( 2 ) 算術符号化 各シンボルを実数 0 と 1 の間にある実数の区 間で表現されるというふうに考える手法である。 ハフマン符号化と同様 に、 算術符号化を行う際には予めシンボルの生起確率が既知である必要 がある。 (2) Arithmetic coding In this method, each symbol is represented as a real number segment between real numbers 0 and 1. Similar to Huffman coding, when performing arithmetic coding, it is necessary to know the symbol occurrence probability in advance.
( 3 ) ユニバーサル符号化 昨今のフアイルアーカイバや圧縮ュ 一ティ リティのほとんどにおいて用いられている符号化である。 (3) Universal encoding This is the encoding used in most file archivers and compression utilities these days.
この符号化では、 上述したような各アルゴ リ ズムとは異なり、 事前に シンボルの生起確率を知っている必要はない。 小規模のファイルでは十 分に効果を発揮しないことがあるという欠点があるものの、 本発明のよ うに大規模なファイルを扱う場合には、 データ長が長く なるにつれて平 均符号長がェン ト口ピーに収束する性質ことから有効な符号化手段であ るとレヽえる。 In this coding, unlike the algorithms described above, it is not necessary to know the symbol occurrence probability in advance. Although there is a drawback that small files may not be effective enough, when dealing with large files as in the present invention, the average code length becomes longer as the data length becomes longer. It is considered to be an effective encoding means because it converges on the speech.
この符号化には、 与えられたシンボル列において、 現在符号化を行つ ているシンボルの前後の数シンボルをバッファに格納し、 このバッファ を辞書と して利用して符号化を施すスライ ド辞書法や、 シンボル列を符
号化してゆく際に動的に辞書を作成し、 以前に出現したシンボル (列) に関しては、 辞書のィンデックス番号を用いて表現する動的辞書法など 力 ある。 For this encoding, a given symbol sequence stores several symbols before and after the symbol currently being encoded in a buffer, and uses this buffer as a dictionary to perform encoding using a slide dictionary. Law or symbol column There is a dynamic dictionary method that dynamically creates a dictionary when encoding, and uses the index numbers of the dictionary to represent previously appearing symbols (columns).
また、 基準画素の画素値や、 量子化済の差分値などのデータの種類に よって符号化の手法を変えたり、 上記の符号化の手法を複数組み合わせ てェン ト ロ ピー符号化を施すよ う にしてもよレ、。 It is also possible to change the encoding method depending on the type of data such as the pixel value of the reference pixel and the quantized difference value, or to perform the entropy encoding by combining a plurality of the above encoding methods. You can do it.
なお、 上述した説明では、 量子化済の差分値の他に、 基準画素の画素 値と、 端数画素の画素値と、 量子化範囲外の差分値について圧縮効果が あるか否かを判断し、 圧縮効果があると判断した場合にはそれについて もエン ト ロ ピー符号化を施すよ うにしている。 しかしながら、 その判断 フローを省略して量子化済の差分値だけを対象にェン ト口 ピー符号化を 施すよ うにしてもよレ、。 In the above description, in addition to the quantized difference value, the pixel value of the reference pixel, the pixel value of the fractional pixel, and whether or not the difference value outside the quantization range has a compression effect are determined. If it is determined that there is a compression effect, entropy coding is applied to that as well. However, it is also possible to omit the decision flow and apply the event-port coding only to the quantized difference value.
<復元処理 > <Restore process>
次に、 第 9図の機能ブロック図を参照して、 上述したく圧縮処理 >に よって生成された圧縮データを、 上記のよ うに構成された画像処理装置 によって復元する際の処理について説明する。 Next, with reference to a functional block diagram of FIG. 9, a description will be given of a process when the compressed data generated by the above-described compression process> is restored by the image processing apparatus configured as described above.
外部記憶装置 1 7には、 上記の圧縮処理によって生成された圧縮デー タを含むファイルが格納されており、 このファイルのうちの圧縮データ が処理前記憶部 3 bに与えられる。 The external storage device 17 stores a file including the compressed data generated by the above-described compression processing, and the compressed data of this file is provided to the pre-processing storage unit 3b.
本発明における可逆性データ復元部に相当する実データ符号解読部 4 Real data decoding unit 4 corresponding to the reversible data restoration unit in the present invention 4
1 は、 圧縮データに含まれているデータのうち、 可逆性の符号化が施さ れたものだけを対象と し、 符号化の際に使用された符号化テーブル (ハ フマンテーブル) を参照して復元する。 1 is for the data included in the compressed data that has been subjected to lossless encoding, and refers to the encoding table (Huffman table) used for encoding. Restore.
データと しては、基準画素 P 5の画素値 V ,.c l. に応じた基準画素データ と、 ブロ ックから外れた端数画素 P Aの画素値 ν ,,Λに応じた端数画素デ
ータ と、 量子化範囲外の差分値 d i f に応じた範囲外画素データと、 符 号化済の差分値 Q d i f に応じた符号化済差分値データと、 圧縮処理時 に使用した量子化テーブルや符号化テーブルを含む復元用データと、 画 像サイズや、 色形式、 解像度などの情報を含んだ画像ステータスなどが ある。 The data includes the reference pixel data corresponding to the pixel value V, .cl . Of the reference pixel P5 and the fraction pixel data corresponding to the pixel value ν ,, Λ of the fractional pixel PA out of the block. Data, out-of-range pixel data corresponding to the difference value dif outside the quantization range, encoded difference value data corresponding to the encoded difference value Q dif, and the quantization table used during the compression processing. For example, there are data for restoration including an image and an encoding table, and an image status including information such as an image size, a color format, and a resolution.
量子化データ符号解読部 4 3は、 量子化された非可逆性のデータだけ を復元する。 したがって、 対象となるのは、 符号化済の差分値 Q d i f から複号化された量子化済差分値データだけとなる。 The quantized data decoding unit 43 restores only the quantized irreversible data. Therefore, only the quantized difference value data decoded from the encoded difference value Qdif is targeted.
この際には、 量子化テーブルが参照されるが、 一時的に量子化幅の中 心値を仮の復元値と して仮差分値を求めるよ うにしている。 At this time, the quantization table is referred to, but the temporary difference value is temporarily determined by temporarily using the center value of the quantization width as a temporary restoration value.
なお、 この量子化データ符号解読部 4 3が本発明における量子化デー タ復元部に相当する。 Note that the quantized data decoding unit 43 corresponds to the quantized data restoration unit in the present invention.
データ加算部 4 5は、 上記のよ うにして算出された仮差分値と、 対応 するプロ ック内の基準画素 P 5の画素値 V ^. とを加算して、各周囲画素 の画素値を仮画素値と して算出する。 The data adding unit 45 adds the temporary difference value calculated as described above and the pixel value V ^. Of the reference pixel P5 in the corresponding block to obtain the pixel value of each surrounding pixel. Is calculated as a temporary pixel value.
なお、 データ加算部 4 5が本発明における仮画素値算出部に相当する ものである。 The data adding section 45 corresponds to the provisional pixel value calculating section in the present invention.
復元データ予測部 4 7は、 視覚的な滑らかさを実現するために予測を 行ってデータの更正を行う。 具体的には、 基準画素 P 5の画素値 V ^ と一次関数とを利用して基準画素 P 5間の周囲画素の仮画素値を更正す るのである。 The restored data prediction unit 47 performs prediction to achieve visual smoothness and corrects the data. Specifically, the temporary pixel values of the surrounding pixels between the reference pixel P5 are corrected using the pixel value V ^ of the reference pixel P5 and a linear function.
第 1 0図は、 一般的な画像を対象にして、 第 5図に示したブロ ック B L ( 1 ) 〜 B L ( 3 ) の基準画素 P 5を含む位置で水平方向に画素値を プロ ッ ト した場合の例を示す図である。 FIG. 10 is a plot of pixel values in a horizontal direction at a position including the reference pixel P5 of the blocks BL (1) to BL (3) shown in FIG. 5 for a general image. FIG. 9 is a diagram showing an example of a case where the user has turned on the camera.
このよ うに一般的な画像では、 各ブロ ック B L ( 1 ) 〜 B L ( 3 ) 内 の基準画素 P 5及び各基準画素 P 5間に位置する量子化済の周囲画素 P
4, P 6の画素値において、 一般的な手法で量子化された画素の画素値 の量子化前の画素値は、 各基準画素 P 5の画素値や周囲画素 P 4, P 6 の画素値を結ぶ滑らかな曲線状に存在する可能性が高いと考えるのが妥 当である。 In such a general image, the reference pixel P5 in each of the blocks BL (1) to BL (3) and the quantized peripheral pixel P located between the reference pixels P5 are used. For the pixel values of P4 and P6, the pixel values of the pixels quantized by the general method before quantization are the pixel values of each reference pixel P5 and the pixel values of surrounding pixels P4 and P6. It is reasonable to assume that it is likely to exist in a smooth curved line connecting.
つま り、 ブロック B L ( 1 ) の基準画素 P 5 と、 このブロ ック B L ( 1 ) に隣接しているブロ ック B L ( 2 ) の基準画素 P 5 とを結ぶ一次関 数は、 それらの水平方向の距離変化量を d X と し、 画素値の変化量を d y と し、 ブロ ック B L ( 1 ) の基準画素 P 5の画素値を y a とすると、 それらの間の任意の点 Xでの予測値 yは、 次の ( 1 ) 式のよ うに表され る (第 1 1 図中には点線で示してある)。 In other words, the primary function connecting the reference pixel P5 of the block BL (1) and the reference pixel P5 of the block BL (2) adjacent to the block BL (1) is their If the distance change in the horizontal direction is dX, the change in pixel value is dy, and the pixel value of the reference pixel P5 of the block BL (1) is ya, any point X between them The predicted value y is expressed by the following equation (1) (shown by a dotted line in FIG. 11).
y = ( d y / d x ) x + y a 、 1 ) y = (d y / d x) x + ya, 1)
この予測値 yは、 上述したデータ加算部 4 5で求められた周固画素の 仮画素値を、 この予測値 yの方向に量子化幅 Qw の範囲内でシフ トさせ 、 このシフ ト した値を予測画素値と して採用する。 This prediction value y is the temporary pixel value of the peripheral solid pixels obtained by the data adding section 4 5 described above, is shifted within the range of the quantization width Q w in the direction of the prediction value y, and the shift The value is adopted as the predicted pixel value.
具体的には、 ブロ ック B L ( 1 ) に位置する周囲画素 P 5の仮画素値 を V, と し、 ブロ ック B L ( 1 ) に位置する周囲画素 P 4の仮画素値 を V ' とすると、 それぞれ上記の ( 1 ) 式で表される予測値 y側に量 子化幅 Qw の範囲内でシフ ト し、 それぞれが予測画素値 Vl)fi, V,,, (図中 の黒丸) と される。 Specifically, the temporary pixel value of the peripheral pixel P5 located at the block BL (1) is V, and the temporary pixel value of the peripheral pixel P4 located at the block BL (1) is V ′. When, respectively shift in the range of quantization width Q w to the predicted value y side represented by the above formula (1), each predicted pixel value V l) fi, V ,,, (figure Black circle).
このよ うに量子化誤差を含まない基準画素 P 5同士を用いて周囲画素 P 6 , P 4の画素値を求めるので、 周囲画素 P 6, P 4の予測画素値 V B, V に含まれる量子化誤差を抑圧することができる。 したがって、 従 来例では問題となっていたプロ ック境界線で生じるプロ ック歪みを抑制 することができ、 連続した輪郭線がジグザグになる現象を抑制できる, なお、 上記の復元データ予測部 4 7は、 本発明における予測部に相当 する。
このよ うにして復元された各ブロック内の基準画素の画素値と、 周囲 画素値の予測画素値と、 端数画素の画素値と、 量子化範囲外の差分値と 、 画像ステータスが処理後記憶部 3 cに格納される。 そして、 必要であ れば外部記憶装置 1 7や表示装置 1 9に出力される。 As described above, since the pixel values of the surrounding pixels P 6 and P 4 are obtained by using the reference pixels P 5 that do not include the quantization error, the quantization values included in the predicted pixel values V B and V of the surrounding pixels P 6 and P 4 are obtained. The conversion error can be suppressed. Therefore, it is possible to suppress the block distortion that occurs at the block boundary, which has been a problem in the conventional example, and to suppress the phenomenon that a continuous contour line becomes zigzag. 47 corresponds to the prediction unit in the present invention. The pixel value of the reference pixel in each block restored in this way, the predicted pixel value of the surrounding pixel value, the pixel value of the fractional pixel, the difference value outside the quantization range, and the image status are stored after processing. Stored in part 3c. Then, it is output to the external storage device 17 or the display device 19 if necessary.
なお、 処理後記憶部 3 cは、 本発明における生成部に相当するもので ある。 The post-processing storage unit 3c corresponds to the generation unit in the present invention.
次に、 第 1 2図及び第 1 3図のフローチャー トを参照しながら復元処 理について説明する。 Next, the restoration processing will be described with reference to the flowcharts of FIGS.
〔ステップ S 3 0 ] [Step S 30]
外部記憶装置 1 7から入力された圧縮データを含むファイルをォーフ ンして処理前記憶部 3 bに格納する。 The file including the compressed data input from the external storage device 17 is opened and stored in the pre-processing storage unit 3b.
〔ステップ S 3 1 〕 [Step S31]
このファイルに含まれる画像ステータスに基づき、 4種類のデータ : 基準画素の画素値に応じた基準画素データと、 符号化済の差分値に応じ た符号化済差分値データと、 量子化範囲外の差分値に応じた範囲外画素 データ と、 端数画素の画素値に応じた端数画素データを取得すると と も に、 復元に必要な符号化テーブル (この例ではハフマンテーブル) と量 子化テーブルを取得する。 Based on the image status included in this file, there are four types of data: reference pixel data according to the pixel value of the reference pixel, encoded difference value data according to the encoded difference value, and out of quantization range. Acquires out-of-range pixel data according to the difference value and fractional pixel data according to the fractional pixel value, and acquires the encoding table (Huffman table in this example) and the quantization table required for restoration. I do.
さ らに、 画像ステータスに応じて復元処理に必要となる大きさのヮー クエリ アを処理前記憶部 3 b内に確保する。 そして、 基準画素の画素値 など、 符号化や量子化が施されていないデータがあれば、 そのままヮー クエリ ア内に出力しておく。 Further, a query area of a size necessary for the restoration processing according to the image status is secured in the pre-processing storage unit 3b. Then, if there is data that has not been encoded or quantized, such as the pixel value of the reference pixel, it is output as it is into the query.
〔ステップ S 3 2〜 S 3 5〕 [Steps S32 to S35]
4種類のデータ : 基準画素データと、 符号化済差分値データと、 範囲 外差分値データ と、 端数画素データのうち、 可逆性の符号化が施された データを対象にして復元する。
もし仮に、 可逆性の符号化が施されていればハフマンテーブルを参照 して復元し、 復元したデータを処理前記憶部 3 bのワークエリアに配置 する。 そして可逆性の符号化が施されたデータの全てが復元されるまで 、 これらの処理を繰り返し実行する。 圧縮処理時の規定から、 少なく と も符号化済差分値データに対する復元が施されて、 量子化済の差分値と される。 Four types of data: Of the reference pixel data, the encoded difference value data, the out-of-range difference value data, and the fractional pixel data, data that has been reversibly encoded is restored. If lossless encoding has been performed, restoration is performed with reference to the Huffman table, and the restored data is placed in the work area of the pre-processing storage unit 3b. These processes are repeatedly executed until all the data subjected to the lossless encoding is restored. From the rules at the time of the compression process, at least the encoded difference value data is restored to obtain a quantized difference value.
なお、 上記のステップは、 本発明における可逆性データ復元過程に相 当する。 The above steps correspond to the reversible data restoration process in the present invention.
〔ステップ S 3 6〜 S 3 9〕 [Steps S36 to S39]
次に、 量子化によ り非可逆性と されている量子化範囲内の差分値であ る量子化済の差分値を対象にして復元処理を施す。 Next, restoration processing is performed on the quantized difference value, which is the difference value within the quantization range determined to be irreversible by quantization.
具体的には、 圧縮処理時に使用した量子化テーブルを用いて、 量子化 済の差分値を仮差分値と して復元する。 そして、 各差分値を、 対応する ブロ ック内の基準画素の画素値に加算して、 全てのブロ ックの全ての周 囲画素について各々の画素値を仮画素値と して求める。 このよ うにして 求めた仮画素値はワークエリアにマッピングしておく。 Specifically, using the quantization table used at the time of the compression processing, the quantized difference value is restored as a temporary difference value. Then, each difference value is added to the pixel value of the reference pixel in the corresponding block, and each pixel value is determined as a temporary pixel value for all surrounding pixels of all blocks. The temporary pixel value obtained in this way is mapped to the work area.
なお、 上記のステップ S 3 6〜 S 3 9が本発明における仮画素値算出 過程に相当する。 Note that the above steps S36 to S39 correspond to the provisional pixel value calculation process in the present invention.
〔ステップ S 4 0〕 [Step S40]
ここでは、 上記のよ うにして求めた各周囲画素の仮画素値 (量子化誤 差を含む) について、 これと各々の周囲画素の仮画素値とに基づき量子 化誤差を抑圧するよ うに予測処理を行う。 Here, the temporary pixel value (including the quantization error) of each surrounding pixel obtained as described above is predicted to suppress the quantization error based on this and the temporary pixel value of each surrounding pixel. Perform processing.
ここで第 1 3図を参照する。 Reference is now made to FIG.
〔〔ステップ S 4 3〕〕 [[Step S43]]
これから予測しよう とする周囲画素を含んだプロ ックに対して隣接す るブロ ックを抽出し、 その基準画素を抽出する。
〔〔ステップ S 4 4〕〕 The block adjacent to the block containing the surrounding pixels to be predicted is extracted, and the reference pixel is extracted. [[Step S44]]
これらの位置関係から予測点である周囲画素の X座標を抽出する。 From these positional relationships, the X-coordinates of surrounding pixels that are prediction points are extracted.
[〔ステップ S 4 5〕〕 [[Step S 4 5]]
上記の ( 1 ) 式を算出する際に説明したよ うにして、 予測する周囲画 素を含んだブロック と、 これに隣接するブロ ックの基準画素間を通る直 線の傾き d y / d xを求める。 As described when calculating the above equation (1), the slope dy / dx of the line containing the surrounding pixel to be predicted and the straight line passing between the reference pixels of the adjacent block is calculated as follows. Ask.
〔〔ステップ S 4 6〕〕 [[Step S46]]
上述した ( 1 ) 式が上記のステップ S 4 5にて求まるので、 この ( 1 ) 式に基づいて予測点の予測値 yを算出する。 Since the above equation (1) is obtained in the above step S45, the predicted value y of the prediction point is calculated based on the equation (1).
〔〔ステップ S 4 7〕〕 [[Step S47]]
各周囲画素の仮画素値を、 上記ステップにて求められた予測値 y側に 量子化幅の範囲内でシフ ト して、 その画素値を予測画素値と して採用す る。 これによ り量子化誤差を抑圧することができ、 ブロ ック境界線で生 じるブロ ック歪みを抑制することができる。 The temporary pixel value of each surrounding pixel is shifted to the predicted value y obtained in the above step within the range of the quantization width, and the pixel value is adopted as the predicted pixel value. As a result, the quantization error can be suppressed, and the block distortion generated at the block boundary can be suppressed.
〔〔ステップ S 4 8, S 4 9〕〕 [[Step S48, S49]]
ブロ ック内の全ての周囲画素を処理した後、 全てのブロ ックを処理す るまで上述したステップを繰り返し実行する。 After processing all surrounding pixels in a block, the above steps are repeatedly performed until all blocks are processed.
第 1 2図に戻る。 Return to FIG.
〔ステ ップ S 4 1 〕 [Step S 4 1]
ワークエリアにそのまま又は復元されて展開されているデータ群 : 各 ブロ ック内の基準画素値と、 各々の基準画素値に対応する周囲画素の予 測画素値と、 各端数画素の画素値と、 量子化範囲外の各画素の差分値に 画像ステータスを付加して、 画像処理装置で取り极う ことができるよ う に復元静止画像データを生成する。 この復元静止画像データは、 処理後 記憶部 3 c に記憶される。 Data group that has been expanded as is or restored in the work area: reference pixel values in each block, predicted pixel values of surrounding pixels corresponding to each reference pixel value, and pixel values of fractional pixels Then, an image status is added to the difference value of each pixel outside the quantization range, and restored still image data is generated so that the image processing device can take the image data. The restored still image data is stored in the post-processing storage unit 3c.
〔ステップ S 4 2〕
上記の復元静止画像データを外部記憶装置 1 7に出力してファイルと して保存する。 [Step S42] The restored still image data is output to the external storage device 17 and saved as a file.
このよ うにして上記の <圧縮処理〉で圧縮された静止画像データが復 元静止画像データと して復元されるが、 完全に復元された基準画素の画 素値が静止画像の全体にわたってほぼ均一に分散しているので、 量子化 誤差が復元静止画像の全体に分散することを防止でき、 全体的な色ずれ を抑制することができる。 In this way, the still image data compressed by the above <compression process> is restored as the restored still image data, but the pixel values of the completely restored reference pixels are almost the same over the entire still image. Since they are uniformly distributed, it is possible to prevent the quantization error from being dispersed throughout the restored still image, and to suppress the overall color shift.
また、 高周波成分についても誤差なく完全に復元できるので、 画像の 輪郭に相当する画素値に誤差が生じず、 圧縮前の静止画像の先鋭度を従 来例に比較して忠実に復元することができる。 In addition, since high-frequency components can be completely restored without errors, there is no error in the pixel values corresponding to the contours of the image, and the sharpness of the still image before compression can be faithfully restored compared to the conventional example. it can.
さ らに、 量子化誤差を含む周囲画素の画素値を、 隣接ブロ ックの基準 画素で予測することにより周囲画素の量子化誤差を抑圧することができ るので、 プロ ック間歪みを従来例に比較して大幅に抑制することができ る。 Furthermore, by predicting the pixel value of the surrounding pixels including the quantization error with the reference pixel of an adjacent block, the quantization error of the surrounding pixels can be suppressed. It can be greatly reduced compared to the example.
また、 逆 D C T処理が不要であることから従来例に比較して処理が簡 単であるので、 処理時の負荷を軽くすることができて復元処理を高速に 施すことができる。 Further, since the inverse DCT processing is not required, the processing is simpler than in the conventional example, so that the processing load can be reduced and the restoration processing can be performed at high speed.
なお、 上記の説明では、 ステップ S 3 6〜 S 3 9で全ての仮画素値を 求めた後にまとめてステップ S 4 0の予測処理を行っているが、 処理効 率を高めるためにステップ S 3 7の次に逐次ステップ S 4 0の予測処理 を行う よ うにしてもよレ、。 但し、 この場合には、 第 1 2図にステップ S 3 9 のノレープがあるので、 第 1 3図のステップ S 4 9のループは不要で ある。 これによ り予測処理に先立ってマッビングしたデータを読み出し 、 予測処理の後に再びマッビングする処理が不要となって効率を向上で き る。 In the above description, the prediction processing of step S40 is collectively performed after obtaining all temporary pixel values in steps S36 to S39, but in order to increase the processing efficiency, step S3 is performed. After step 7, the prediction processing of step S40 may be performed sequentially. However, in this case, the loop of step S49 in FIG. 13 is unnecessary because there is a no-rape in step S39 in FIG. This eliminates the need to read the mapped data prior to the prediction processing and perform the mapping again after the prediction processing, thereby improving the efficiency.
また、 上記の説明では、 予測画素値を求める際に ( 1 ) 式で表される
一次関数を用いているが、 以下のよ うな各種の関数を用いるよ うにして もよい。 In the above description, when calculating the predicted pixel value, the predicted pixel value is expressed by equation (1). Although a linear function is used, the following various functions may be used.
( 1 ) し agrange多項式 (1) Agrange polynomial
m点を結ぶ m— 1次多項式は、 以下に示す Lagrangeの公式で与えられ The m-first degree polynomial connecting the m points is given by Lagrange's formula
すなわち、 始点を 0 と し、 終点を mとする区間 [ 0, m] にて、 P„ ( X」 ) = f j j = 0, 1 , …… , m That is, in the interval [0, m] where the start point is 0 and the end point is m, P „(X)) = f j j = 0, 1,…,, m
を満たす多項式は、 The polynomial that satisfies is
P (x) =∑w.(x)f . P (x) = ∑w. (X) f.
(X - χ0ノ ( -Xj_, (χ-χί+!) (χ-χ J (X-χ 0ノ (-Xj_, (χ-χ ί + !)) (Χ-χ J
(x;- 0; .■ . j- j.^ (χ;— xj+1) .. , (Xj- で与えられる。 (x; -.. 0; ■ j- j ^ (χ; -. x j + 1) .., it is given by (Xj-.
X jは、 基準画素の位置を示し、 ί」.はその基準画素の画素値を示して いる。 このとき、 任意の周囲画素 Xにおける画素値と、 上記の多項式に よ り得られる解とを比較し、 量子化幅内で近い方の値を復元値と して更 正する。 X j indicates the position of the reference pixel, and ί ”. Indicates the pixel value of the reference pixel. At this time, the pixel value of an arbitrary surrounding pixel X is compared with the solution obtained by the above polynomial, and a value closer to the quantization width is corrected as a restoration value.
( 2 ) Newton差分商 (2) Newton difference quotient
多項式を求めるには、 さらに簡便な以下の Newton差分商公式を用いて もよい。 To find the polynomial, a simpler Newton difference quotient formula below may be used.
f ) =f (xQ) + U- ,)) f (x«, x,) + (x - x。) -x,) f (X(,» X,, x2) + f) = f (x Q ) + U-,)) f (x «, x,) + (x-x.) -x,) f (X (,» X ,, x 2 ) +
+ (x-x0) (x- ,) ( -xm -,) f (X(). Xい xj + (xx 0 ) (x-,) (-x m- ,) f (X ().
+ (x-x0) (x-x.) (x-xm) f (x, x(l, x,, x„,) + (xx 0 ) (xx.) (xx m ) f (x, x (l , x ,, x „,)
なお、 式中の f (x,., xi + 1)は、 Note that f (x,., X i + 1 ) in the equation is
f(xi+1)-f (Xi) f (x i + 1 ) -f ( Xi )
f (x;, Xw i+r) X l.+'l— x l. f (x ;, Xw i + r) X l. + 'l— x l.
で表される差分商と して定義される。 この式よ り明らかなよ うに差分
商とはデータ点(Xi, y,.) と (xi + 1 yi + l)を結ぶ線分の傾きである。 It is defined as the difference quotient represented by As is clear from this equation, the difference Quotient is the slope of a line connecting the data points (Xi, y ,.) and a (x i + 1 y i + l).
なお、 高階差分商 f (Xi, xi + 1 xi+r+1)は、 Note that the higher-order difference quotient f (Xi, x i + 1 x i + r + 1 ) is
f(xi+1,xi+2 •••,xi+r+1)-f(xi,xi+i> · ' · χί+Γ)f (x i + 1 , x i + 2・ ••, x i + r + 1 ) -f (x i , x i + i >'· ί ί + Γ )
によって順次定義される。 Are defined sequentially.
上述した多項式を用いる場合には、 式に用いる基準画素の選択個数に 注意する必要がある。 つまり、 選択個数をあま り多くすると、 高次の多 項式を解く ための計算量が加速度的に増えてしま うからである。 When using the above polynomial, it is necessary to pay attention to the selected number of reference pixels used in the equation. In other words, if the number of selections is too large, the amount of computation for solving higher-order polynomials will increase at an accelerating rate.
また、 「解析関数」 と呼ばれる関数に関しては、 区間 [ x () x j にお いて唯一の最も滑らかな関数 (すなわち、 m— 1階微分が連続関数) で あることが保証されているが、 これらは区間の両端で振動 (ルンゲの現 象) することがあり、 区間端で判定に不具合を生じる可能性があるので 、 これらの理由からもデータ点を多く とることは好ましく ない。 In addition, the function called “analysis function” is guaranteed to be the only smoothest function in the interval [x () xj (that is, the m-first derivative is a continuous function). May vibrate at both ends of the section (runge phenomenon), which may cause a problem at the end of the section. For these reasons, it is not preferable to increase the number of data points.
( 3 ) n次スプライ ン関数による更正 (3) Correction by n-th spline function
上述した多項式をスライ ドさせる手法 (これを区間的多項式と称する ) においては、 スライ ドした隣接区間の間の部分 (以下、 これを 「節」 と称する) での滑らかさが保証されないことは明らかである (つまり、 節における 1階微分が不連続である)。 In the above-mentioned method of sliding a polynomial (this is called an interval polynomial), it is clear that smoothness is not guaranteed in a portion between sliding adjacent sections (hereinafter referred to as a “node”). (Ie, the first derivative in the clause is discontinuous).
この不具合に対して、 各多項式の区間同士の節における接触条件を保 証するような関数がスプライ ン関数である。 このスプライン関数の求め 方は様々であるが、 簡便的に以下の方法が良く用いられる。 For this problem, a function that guarantees the contact condition in the nodes between the sections of each polynomial is the spline function. There are various ways to find this spline function, but the following method is often used simply and conveniently.
小区間 [ X j , における 3次スプライ ン関数を f 」と した場 合の 2階微分 f は、 The second derivative f, where f is the cubic spline function in the small section [X j, is
X. X χ-χ. X. X χ-χ.
f."(x) = a . —— ^ +σ ' f. "(x) = a. —— ^ + σ '
j+i j + 1 σ x」 上の 2階微分係数
h」 = x j +1 - x j j + ij + 1 σ x '' h "= x j +1 -xj
と表すことができ、 これを二回積分して、 ΐ(χ) = Φ yj+1+ Φ Yj+h (( 3-φ) σ j+1 + (φ^+ ) σ .) χ-χ . ― 二 (積分) = Φ y j + 1 + Φ Yj + h (( 3 -φ) σ j + 1 + (φ ^ +) σ.) Χ- χ.
φ = φ^Ι-φ φ = φ ^ Ι-φ
h. h.
が得られる。 Is obtained.
これでスプライ ン関数の条件 (補間条件, 0, 2階の接触条件) が示 される。 This shows the conditions of the spline function (interpolation conditions, 0, second-order contact conditions).
また、 f 」 の 1 階微分である Is the first derivative of f
f .(x) = A.+h.((3 3-l) σ j+1-(3(^2-l) σ ) f. (x) = A. + h. ((3 3 -l) σ j + 1- (3 (^ 2 -l) σ)
yj+厂 yj yj +厂y j
Δ において連続性の保証、 すなわち f' j-^Xj) : f' j (Xj)が保証されればよ レゝ If continuity is guaranteed in Δ, that is, f 'j- ^ Xj): f' j (Xj) is guaranteed.
これによ り、 結局、 σ」 , j = l, ……, N— 1 を未知数とする以下 の n— 1元連立方程式を解けばよいことになる。 Thus, in the end, it is sufficient to solve the following n−1 system of simultaneous equations with σ ”, j = l, ……, N−1 as unknowns.
2 (h0+h〗) σ t+h! σ 2=Δ ,-Δ0 2 (h 0 + h〗) σ t + h! Σ 2 = Δ, -Δ 0
hj_, σ j_,+2(hj_1+hj) σ j+hj σ j+1 =Δ Δ j_, (j = l, ·'·, Ν - 1) hN— 2 σ Ν_2 + 2 (hN— 2+ — ,) σ Ν— ,= Δ Δ Ν— 2 hj_, σ j _, + 2 (h j _ 1 + h j ) σ j + hj σ j + 1 = Δ Δ j_, (j = l, '', Ν-1) h N — 2 σ Ν _ 2 + 2 (h N — 2 + —,) σ Ν —, = Δ Δ Ν — 2
産業上の利用可能性 Industrial applicability
以上のよ うに、 本発明に係る画像処理方法及びその装置並びに記録媒 体は、 静止画像データを圧縮/復元する装置ゃソフ トウエア全般にわた つて利用可能であり 、 具体的には静止画像データを圧縮したり復元する などの処理を施すデジタル画像処理装置、 静止画像データを得るための デジタルカメ ラやデジタルビデオカメラなどの撮影装置、 コンピュータ
に取り付けられて圧縮 Z復元処理を高速に実行するための画像処理ボー ド、 コンピュータの画像処理ソフ トウェア、 これらの画像処理ソフ トゥ エアを記憶したフロ ッ ピーディスク、 C D— ROM、 MOなどの記録媒 体に適している。
As described above, the image processing method, the apparatus, and the recording medium according to the present invention can be used for the apparatus for compressing / decompressing still image data and the software in general. Digital image processing devices that perform processing such as compression and decompression, shooting devices such as digital cameras and digital video cameras for obtaining still image data, and computers Image processing board, computer image processing software, and floppy disk, CD-ROM, MO, etc. that store these image processing software. Suitable for medium.
Claims
1 . 静止画像データを圧縮する画像処理方法であって、 1. An image processing method for compressing still image data,
静止画像データを任意の画素数からなるプロックに分割する分割過程 と、 A dividing process of dividing the still image data into blocks having an arbitrary number of pixels;
各プロ ック内の一つの画素を基準画素と して選択する基準画素選択過 程と、 A reference pixel selection process in which one pixel in each block is selected as a reference pixel;
各プロック内の基準画素以外の各周囲画素と、 各周囲画素に対応する プロ ック内の基準画素との画素値の差分値を算出する差分値算出過程と 各差分値の出現率を求める出現率算出過程と、 A difference value calculation process for calculating a difference value between each peripheral pixel other than the reference pixel in each block and a reference pixel in the block corresponding to each peripheral pixel, and an appearance for calculating an appearance rate of each difference value Rate calculation process,
差分値と出現率の関係から特定の出現率より大きい差分値の範囲を求 め、 この範囲を量子化範囲と して求める量子化範囲算出過程と、 A quantization range calculating step of obtaining a range of the difference value larger than a specific appearance rate from the relationship between the difference value and the appearance rate, and obtaining this range as a quantization range;
量子化範囲内の差分値を量子化する量子化過程と、 A quantization process for quantizing the difference value within the quantization range,
基準画素の画素値と、 量子化済の差分値と、 前記分割過程にてブロッ クから外れて端数となった端数画素の画素値と、 量子化範囲外の差分値 のうち、 少なく とも量子化済の差分値に対してデータ冗長度を抑圧する よ うに可逆性の符号化を施すェン ト口ピー符号化過程と、 At least quantization among the pixel value of the reference pixel, the quantized difference value, the pixel value of a fractional pixel that has fallen out of the block in the division process, and the difference value outside the quantization range An end-to-peak coding process for applying reversible coding to the already-processed difference value so as to suppress data redundancy;
基準画素の画素値に応じた基準画素データと、 端数画素の画素値に応 じた端数画素データと、 量子化範囲外の差分値に応じた範囲外画素デー タと、 符号化済の差分値に応じた符号化済差分値データ と、 量子化テー ブルを含む復元用データと、 前記静止画像データの画像ステータスとを 含む圧縮データを生成する生成過程と、 Reference pixel data corresponding to the pixel value of the reference pixel, fractional pixel data corresponding to the pixel value of the fractional pixel, out-of-range pixel data corresponding to the difference value outside the quantization range, and encoded difference value Generating compressed data including encoded difference value data according to the following, decompression data including a quantization table, and an image status of the still image data;
からなることを特徴とする画像処理方法。 An image processing method comprising:
2 . 請求項 1 に記載の画像処理方法において、 2. In the image processing method according to claim 1,
前記エン トロ ピー符号化過程では、 基準画素の画素値と、 端数画素の
画素値と、 量子化範囲外の差分値のうち圧縮効果があるものについても データ冗長度を抑圧するよ うに可逆性の符号化を施し、 In the entropy encoding process, the pixel value of the reference pixel and the fractional pixel Lossless encoding is performed to suppress data redundancy even for pixel values and difference values outside the quantization range that have a compression effect.
前記記憶過程では、 前記ェントロピー符号化過程で新たに符号化され たデータを元のデータに代えて記憶することを特徴とする画像処理方法 The image processing method, wherein in the storing step, data newly coded in the entropy coding step is stored in place of original data.
3 . 請求項 1 に記載の画像処理方法によって圧縮された静止画像デー タを復元する画像処理方法であって、 3. An image processing method for restoring still image data compressed by the image processing method according to claim 1,
基準画素の画素値に応じた基準画素データと、 端数画素の画素値に応 じた端数画素データと、 量子化範囲外の差分値に応じた範囲外画素デー タと、 符号化済の差分値に応じた符号化済差分値データと、 量子化テー ブルを含む復元用データと、 圧縮前の静止画像データの画像ステータス とを含む圧縮データのうち、 可逆性の符号化が施されたデータを復元す る可逆性データ復元過程と、 Reference pixel data corresponding to the pixel value of the reference pixel, fractional pixel data corresponding to the pixel value of the fractional pixel, out-of-range pixel data corresponding to the difference value outside the quantization range, and encoded difference value Of compressed data including the encoded differential value data according to the above, decompression data including a quantization table, and the image status of the still image data before compression, Reversible data restoration process to restore,
前記符号化済差分値データに基づき復元された量子化済の差分値と量 子化テーブルとに基づき仮差分値を求め、 各仮差分値を、 各々の仮差分 値に対応するプロ ック内の基準画素の画素値に加算して各周囲画素の画 素値を仮画素値と して求める仮画素値算出過程と、 A provisional difference value is obtained based on the quantized difference value restored based on the encoded difference value data and a quantization table, and each provisional difference value is stored in a block corresponding to each provisional difference value. A temporary pixel value calculating step of adding the pixel value of each surrounding pixel as a temporary pixel value by adding to the pixel value of the reference pixel of
各周囲画素の仮画素値と、 各々の周囲画素の近辺に位置する基準画素 の画素値とに基づいて、 量子化誤差を抑圧するよ うに周囲画素の画素値 を予測画素値と して求める予測過程と、 Prediction that obtains the pixel value of a surrounding pixel as a predicted pixel value so as to suppress a quantization error based on the temporary pixel value of each surrounding pixel and the pixel value of a reference pixel located near each surrounding pixel. Process
各ブロ ック内の基準画素値と、 各々の基準画素値に対応する周囲画素 の予測画素値と、 各端数画素の画素値と、 量子化範囲外の各画素の差分 値と、 画像ステータスとに基づいて前記静止画像データを復元静止画像 データと して生成する生成過程と、 The reference pixel value in each block, the predicted pixel value of surrounding pixels corresponding to each reference pixel value, the pixel value of each fractional pixel, the difference value of each pixel outside the quantization range, and the image status Generating the still image data as restored still image data based on
からなることを特徴とする画像処理方法。 An image processing method comprising:
4 . 請求項 3に記載の画像処理方法において、
前記予測過程では、 各々の周囲画素を挟んで位置する基準画素を用い て、 これらを結ぶ線側に量子化幅に応じて仮画素値をシフ ト して各々の 周囲画素の予測画素値とすることを特徴とする画像処理方法。 4. The image processing method according to claim 3, In the above-mentioned prediction process, a temporary pixel value is shifted according to the quantization width on a line connecting the reference pixels located between the respective neighboring pixels to obtain a predicted pixel value of each neighboring pixel. An image processing method comprising:
5 . 静止画像データを圧縮する画像処理装置であって、 5. An image processing apparatus for compressing still image data,
前記静止画像データを任意の画素数からなるプロ ックに分割するプロ ック分割部と、 A block dividing unit for dividing the still image data into blocks each having an arbitrary number of pixels;
各プロック内の一つの画素を基準画素と して選択する基準画素選択部 と、 A reference pixel selection unit for selecting one pixel in each block as a reference pixel;
各ブロ ック内の基準画素以外の各周囲画素と、 各周囲画素に対応する プロ ック内の基準画素との画素値の差分値を算出する差分値算出部と、 各差分値の出現率を求める出現率算出部と、 A difference value calculation unit that calculates a difference value between each peripheral pixel other than the reference pixel in each block and a reference pixel in the block corresponding to each peripheral pixel, and an appearance rate of each difference value An appearance rate calculation unit for calculating
差分値と出現率の関係から特定の出現率より大きい差分値の範囲を求 め、 この範囲を量子化範囲と して求める量子化範囲算出部と、 A quantization range calculating unit that obtains a range of the difference value larger than a specific appearance rate from a relationship between the difference value and the appearance rate, and obtains this range as a quantization range;
量子化範囲内の差分値を量子化する量子化部と、 A quantization unit that quantizes a difference value within a quantization range,
基準画素の画素値と、 量子化済の差分値と、 前記ブロ ック分割部にお いてプロックから外れて端数となった端数画素の画素値と、 量子化範囲 外の差分値のうち、 少なく とも量子化済の差分値に対してデータ冗長度 を抑圧するように可逆性の符号化を施すェン ト口 ピー符号化部と、 基準画素の画素値に応じた基準画素データと、 端数画素の画素値に応 じた端数画素データと、 量子化範囲外の差分値に応じた範囲外画素デー タと、 符号化済の差分値に応じた符号化済差分値データと、 量子化テー ブルを含む復元用データと、 前記静止画像データの画像ステータスとを 含む圧縮データを生成する圧縮データ生成部と、 At least one of the pixel value of the reference pixel, the quantized difference value, the pixel value of the fractional pixel that has become a fraction outside the block in the block division unit, and the difference value outside the quantization range An end-to-end coding unit that performs reversible coding so as to suppress data redundancy with respect to the quantized difference value, reference pixel data corresponding to the pixel value of the reference pixel, and fractional pixels Fractional pixel data according to the pixel value of, the pixel data outside the range according to the difference value outside the quantization range, the encoded difference value data according to the encoded difference value, and the quantization table A compressed data generation unit that generates compressed data including decompression data including the following, and image status of the still image data:
を備えていることを特徴とする画像処理装置。 An image processing apparatus comprising:
6 . 請求項 5に記載の画像処理装置において、 6. The image processing apparatus according to claim 5,
前記エン トロ ピー符号化部は、 基準画素の画素値と、 端数画素の画素
値と、 量子化範囲外の差分値のうち圧縮効果があるものについてもデー タ冗長度を抑圧するよ うに可逆性の符号化を施し、 The entropy encoding unit includes a pixel value of a reference pixel and a pixel of a fractional pixel. Lossless coding is performed to suppress data redundancy for values and difference values outside the quantization range that have a compression effect.
前記記憶部は、 前記ェント口ピー符号化部で新たに符号化されたデー タを元のデータに代えて記憶することを特徴とする画像処理装置。 The image processing apparatus according to claim 1, wherein the storage unit stores the data newly coded by the event-to-peak coding unit instead of the original data.
7 . 請求項 5に記載の画像処理装置によって圧縮された静止画像デー タを復元する画像処理装置であって、 7. An image processing device for restoring still image data compressed by the image processing device according to claim 5,
基準画素の画素値に応じた基準画素データと、 ブロ ックから外れて端 数となった画素の画素値に応じた端数画素データと、 量子化範囲外の差 分値に応じた範囲外画素データと、 符号化済の差分値に応じた符号化済 差分値データと、 復元用データと、 圧縮前の静止画像データの画像ステ 一タスとを含む圧縮データのうち、 可逆性の符号化が施されたデータを 復元する可逆性データ復元部と、 Reference pixel data corresponding to the pixel value of the reference pixel, fractional pixel data corresponding to the pixel value of the pixel that has become a fraction outside the block, and pixels outside the range corresponding to the difference value outside the quantization range Of the compressed data including the data, the encoded difference value data corresponding to the encoded difference value, the decompression data, and the image status of the still image data before compression, the lossless encoding is performed. A reversible data restoration unit for restoring the applied data;
前記符号化済差分値データに基づき復元された量子化済の差分値と量 子化テーブルとに基づき仮差分値を求める量子化データ復元部と、 前記量子化データ復元部によって求められた各仮差分値を、 各々の仮 差分値に対応するプロ ック内の基準画素の画素値に加算して各周囲画素 の画素値を仮画素値と して求める仮画素値算出部と、 A quantized data restoring unit for obtaining a temporary difference value based on the quantized difference value restored based on the encoded difference value data and a quantization table; A temporary pixel value calculation unit that adds the difference value to a pixel value of a reference pixel in a block corresponding to each temporary difference value and obtains a pixel value of each surrounding pixel as a temporary pixel value;
前記仮画素値算出部によつて求められた各周囲画素の仮画素値と、 各 々の周囲画素の近辺に位置する基準画素の画素値とに基づいて、 量子化 誤差を抑圧するように周囲画素の画素値を予測画素値と して求める予測 部と、 Based on the provisional pixel value of each surrounding pixel obtained by the provisional pixel value calculation unit and the pixel value of a reference pixel located in the vicinity of each surrounding pixel, the surrounding pixels are suppressed so as to suppress the quantization error. A prediction unit for determining a pixel value of a pixel as a predicted pixel value;
各プロ ック内の基準画素値と、 各々の基準画素値に対応する周囲画素 の予測画素値と、 各端数画素の画素値と、 量子化範囲外の各画素の差分 値と、 画像ステータスとに基づいて前記静止画像データを復元静止画像 データと して生成する生成部と、 The reference pixel value in each block, the predicted pixel value of surrounding pixels corresponding to each reference pixel value, the pixel value of each fractional pixel, the difference value of each pixel outside the quantization range, and the image status A generating unit that generates the still image data as restored still image data based on
を備えていることを特徴とする画像処理装置。
An image processing apparatus comprising:
8 . 請求項 7に記載の画像処理装置において、 8. The image processing apparatus according to claim 7,
前記予測部は、 各々の周囲画素を挟んで位置する基準画素を用いて、 これらを結ぶ線側に量子化幅に応じて仮画素値をシフ ト して各々の周囲 画素の予測画素値とすることを特徴とする画像処理装置。 The prediction unit shifts the provisional pixel value according to the quantization width on the line connecting the reference pixels using the reference pixels positioned across each of the surrounding pixels to obtain the predicted pixel value of each of the surrounding pixels. An image processing apparatus characterized by the above-mentioned.
9 . 静止画像データを圧縮する画像処理プログラムを格納した記録媒 体であって、 9. A recording medium storing an image processing program for compressing still image data,
静止画像データを任意の画素数からなるプロックに分割する分割処理 と、 A dividing process of dividing the still image data into blocks having an arbitrary number of pixels;
各プロ ック内の一つの画素を基準画素と して選択する基準画素選択処 理と、 A reference pixel selection process for selecting one pixel in each block as a reference pixel;
各ブロック内の基準画素以外の各周囲画素と、 各周囲画素に対応する プロ ック内の基準画素との画素値の差分値を算出する差分値算出処理と A difference value calculation process of calculating a difference value between each peripheral pixel other than the reference pixel in each block and a reference pixel in the block corresponding to each peripheral pixel;
各差分値の出現率を求める出現率算出処理と、 An appearance rate calculation process for finding an appearance rate of each difference value;
差分値と出現率の関係から特定の出現率より大きい差分値の範囲を求 め、 この範囲を量子化範囲と して求める量子化範囲算出処理と、 量子化範囲内の差分値を量子化する量子化処理と、 From the relationship between the difference value and the appearance rate, a range of difference values larger than a specific appearance rate is obtained, and this range is used as a quantization range. Quantization processing,
基準画素の画素値と、 量子化済の差分値と、 前記分割処理にてブロッ クから外れて端数となった端数画素の画素値と、 量子化範囲外の差分値 のうち、 少なく とも量子化済の差分値に対してデータ冗長度を抑圧する ように可逆性の符号化を施すェン ト口ピー符号化処理と、 At least one of the pixel value of the reference pixel, the quantized difference value, the pixel value of a fractional pixel that has become a fraction outside the block in the division processing, and the difference value outside the quantization range An edge-to-peak coding process for performing reversible coding on the already-processed difference value so as to suppress data redundancy;
基準画素の画素値に応じた基準画素データと、 端数画素の画素値に応 じた端数画素データと、 量子化範囲外の差分値に応じた範囲外画素デー タと、 符号化済の差分値に応じた符号化済差分値データと、 量子化テー ブルを含む復元用データと、 前記静止画像データの画像ステータスとを 含む圧縮データを生成する生成処理と、
を実施するようにコンピュータを制御するためのプログラムを格納し た記録媒体。 Reference pixel data corresponding to the pixel value of the reference pixel, fractional pixel data corresponding to the pixel value of the fractional pixel, out-of-range pixel data corresponding to the difference value outside the quantization range, and encoded difference value A generation process of generating compressed data including encoded difference value data corresponding to the above, decompression data including a quantization table, and an image status of the still image data; Recording medium for storing a program for controlling a computer so as to execute the program.
1 0 . 請求項 9に記載の記録媒体に格納されたプログラムによって圧縮 された静止画像データを復元するための画像処理プログラムを格納した 記録媒体であって、 10. A recording medium storing an image processing program for restoring still image data compressed by the program stored in the recording medium according to claim 9.
基準画素の画素値に応じた基準画素データ と、 端数画素の画素値に応 じた端数画素データと、 量子化範囲外の差分値に応じた範囲外画素デー タと、 符号化済の差分値に応じた符号化済差分値データと、 量子化テー ブルを含む復元用データと、 圧縮前の静止画像データの画像ステータス とを含む圧縮データのうち、 可逆性の符号化が施されたデータを復元す る可逆性データ復元処理と、 Reference pixel data corresponding to the pixel value of the reference pixel, fractional pixel data corresponding to the pixel value of the fractional pixel, out-of-range pixel data corresponding to the difference value outside the quantization range, and encoded difference value Of compressed data including the encoded differential value data according to the above, decompression data including a quantization table, and the image status of the still image data before compression, Reversible data restoration processing to restore,
前記符号化済差分値データに基づき復元された量子化済の差分値と量 子化テーブルとに基づき仮差分値を求め、 各仮差分値を、 各々の仮差分 値に対応するブロック内の基準画素の画素値に加算して各周囲画素の画 素値を仮画素値と して求める仮画素値算出処理と、 A provisional difference value is obtained based on the quantized difference value restored based on the encoded difference value data and the quantization table, and each provisional difference value is defined as a reference in a block corresponding to each provisional difference value. A temporary pixel value calculation process in which the pixel value of each peripheral pixel is obtained as a temporary pixel value by adding to the pixel value of the pixel;
各周囲画素の仮画素値と、 各々の周囲画素の近辺に位置する基準画素 の画素値とに基づいて、 量子化誤差を抑圧するように周囲画素の画素値 を予測画素値と して求める予測処理と、 Prediction in which the pixel value of a surrounding pixel is determined as a predicted pixel value so as to suppress a quantization error based on the temporary pixel value of each surrounding pixel and the pixel value of a reference pixel located near each surrounding pixel. Processing,
各ブロック内の基準画素値と、 各々の基準画素値に対応する周囲画素 の予測画素値と、 各端数画素の画素値と、 量子化範囲外の各画素の差分 値と、 画像ステータスとに基づいて前記静止画像データを復元静止画像 データと して生成する生成処理と、 Based on the reference pixel value in each block, the predicted pixel value of surrounding pixels corresponding to each reference pixel value, the pixel value of each fractional pixel, the difference value of each pixel outside the quantization range, and the image status Generating the still image data as restored still image data by using
を実施するようにコンピュータを制御するためのプログラムを格納し た記録媒体。
Recording medium for storing a program for controlling a computer so as to execute the program.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001546146A JP3530844B2 (en) | 1999-12-17 | 1999-12-17 | Image processing method and apparatus, and recording medium |
PCT/JP1999/007129 WO2001045385A1 (en) | 1999-12-17 | 1999-12-17 | Image processing device and method and recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP1999/007129 WO2001045385A1 (en) | 1999-12-17 | 1999-12-17 | Image processing device and method and recording medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2001045385A1 true WO2001045385A1 (en) | 2001-06-21 |
Family
ID=14237616
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP1999/007129 WO2001045385A1 (en) | 1999-12-17 | 1999-12-17 | Image processing device and method and recording medium |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP3530844B2 (en) |
WO (1) | WO2001045385A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5621025B1 (en) * | 2013-09-02 | 2014-11-05 | 泰 坂野 | Image processing system, image processing method, and image processing program |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6021899A (en) * | 1983-07-19 | 1985-02-04 | Agency Of Ind Science & Technol | Apparatus for preparing compound semiconductor single crystal |
JPS6096079A (en) * | 1983-10-31 | 1985-05-29 | Matsushita Electric Ind Co Ltd | Encoding method of multivalue picture |
JPS62199171A (en) * | 1986-02-27 | 1987-09-02 | Matsushita Graphic Commun Syst Inc | Dither picture encoding method |
JPH0326081A (en) * | 1989-06-23 | 1991-02-04 | Nec Home Electron Ltd | Quantization characteristic control method |
JPH047989A (en) * | 1989-08-02 | 1992-01-13 | Fujitsu Ltd | Image signal encoding control method |
JPH05130433A (en) * | 1991-09-02 | 1993-05-25 | Matsushita Electric Ind Co Ltd | Picture coding method and picture coder |
JPH08275153A (en) * | 1995-03-29 | 1996-10-18 | Sharp Corp | Image compressor and image decoder |
JPH1051775A (en) * | 1996-05-14 | 1998-02-20 | Daewoo Electron Co Ltd | Method and device for removing block phenomenon for moving video decoder |
JPH11331617A (en) * | 1998-05-19 | 1999-11-30 | Dainippon Screen Mfg Co Ltd | Binary image data coding method, its device, and record medium recording program to execute the processing |
-
1999
- 1999-12-17 WO PCT/JP1999/007129 patent/WO2001045385A1/en active Search and Examination
- 1999-12-17 JP JP2001546146A patent/JP3530844B2/en not_active Expired - Lifetime
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6021899A (en) * | 1983-07-19 | 1985-02-04 | Agency Of Ind Science & Technol | Apparatus for preparing compound semiconductor single crystal |
JPS6096079A (en) * | 1983-10-31 | 1985-05-29 | Matsushita Electric Ind Co Ltd | Encoding method of multivalue picture |
JPS62199171A (en) * | 1986-02-27 | 1987-09-02 | Matsushita Graphic Commun Syst Inc | Dither picture encoding method |
JPH0326081A (en) * | 1989-06-23 | 1991-02-04 | Nec Home Electron Ltd | Quantization characteristic control method |
JPH047989A (en) * | 1989-08-02 | 1992-01-13 | Fujitsu Ltd | Image signal encoding control method |
JPH05130433A (en) * | 1991-09-02 | 1993-05-25 | Matsushita Electric Ind Co Ltd | Picture coding method and picture coder |
JPH08275153A (en) * | 1995-03-29 | 1996-10-18 | Sharp Corp | Image compressor and image decoder |
JPH1051775A (en) * | 1996-05-14 | 1998-02-20 | Daewoo Electron Co Ltd | Method and device for removing block phenomenon for moving video decoder |
JPH11331617A (en) * | 1998-05-19 | 1999-11-30 | Dainippon Screen Mfg Co Ltd | Binary image data coding method, its device, and record medium recording program to execute the processing |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5621025B1 (en) * | 2013-09-02 | 2014-11-05 | 泰 坂野 | Image processing system, image processing method, and image processing program |
Also Published As
Publication number | Publication date |
---|---|
JP3530844B2 (en) | 2004-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7003168B1 (en) | Image compression and decompression based on an integer wavelet transform using a lifting scheme and a correction method | |
JP4906855B2 (en) | Efficient coding and decoding of transform blocks | |
JP3973104B2 (en) | Reconfiguration method and apparatus | |
KR0154739B1 (en) | Fractal image compression device and method | |
US7548583B2 (en) | Generation and use of masks in MPEG video encoding to indicate non-zero entries in transformed macroblocks | |
JP4248754B2 (en) | Data processing method and apparatus | |
JP2001136526A (en) | Method for image processing, device thereof and storage medium | |
US7187805B1 (en) | Maximum likelihood estimation of JPEG quantization values | |
JP4831547B2 (en) | Method for image compression and decompression acceleration | |
JP3833224B2 (en) | Encoding method and apparatus, computer program, and computer-readable storage medium | |
WO2001045385A1 (en) | Image processing device and method and recording medium | |
JP6564315B2 (en) | Encoding device, decoding device, and program | |
US10015507B2 (en) | Transform system and method in video and image compression | |
JP2004310735A (en) | Fast inverse discrete cosine transform method and apparatus | |
JP3722169B2 (en) | Image processing apparatus and image processing method | |
JP4784386B2 (en) | Decoding device, inverse quantization method, and program | |
JP2003283840A (en) | Filtering processing apparatus and filtering processing method | |
JP2002077920A (en) | Picture compressing apparatus and method therefor | |
JP3205028B2 (en) | Image compression apparatus and method | |
CN113068033B (en) | Multimedia inverse quantization processing method, device, equipment and storage medium | |
CN100396101C (en) | Image compression device and method for generating and using auxiliary images | |
JP3199786B2 (en) | Image processing device | |
JPH05276391A (en) | Method for compressing picture and device therefor | |
JPH0746407A (en) | Image data compression device and image data decompression device | |
JPH07240920A (en) | Compression and extension for digital image data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A1 Designated state(s): JP US |
|
DFPE | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101) | ||
ENP | Entry into the national phase |
Ref country code: JP Ref document number: 2001 546146 Kind code of ref document: A Format of ref document f/p: F |