WO2014167730A1 - Compression device, compression method, and compression program - Google Patents

Compression device, compression method, and compression program Download PDF

Info

Publication number
WO2014167730A1
WO2014167730A1 PCT/JP2013/061119 JP2013061119W WO2014167730A1 WO 2014167730 A1 WO2014167730 A1 WO 2014167730A1 JP 2013061119 W JP2013061119 W JP 2013061119W WO 2014167730 A1 WO2014167730 A1 WO 2014167730A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
compression
zero
image
compression apparatus
Prior art date
Application number
PCT/JP2013/061119
Other languages
French (fr)
Japanese (ja)
Inventor
大地 島田
真一 佐沢
佐藤 裕一
Original Assignee
富士通株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士通株式会社 filed Critical 富士通株式会社
Priority to PCT/JP2013/061119 priority Critical patent/WO2014167730A1/en
Publication of WO2014167730A1 publication Critical patent/WO2014167730A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods 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/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]

Definitions

  • the present invention relates to a compression device, a compression method, and a compression program.
  • an image is divided into a plurality of blocks, and image data representing each block is frequency-decomposed using a discrete cosine transform (DCT) or wavelet transform, and a coefficient matrix obtained by the frequency decomposition is quantized.
  • DCT discrete cosine transform
  • wavelet transform wavelet transform
  • a coefficient matrix obtained by the frequency decomposition is quantized.
  • the present invention aims to improve the compression rate of image data.
  • a matrix having each spatial frequency component of a plurality of spatial frequency components representing an image as an element is acquired, and a non-zero element whose value is not zero among the acquired matrix elements is Compression apparatus and compression method for creating information indicating a position, extracting non-zero elements of matrix elements in a predetermined order, and outputting the created information and a sequence of extracted non-zero elements in association with each other , And a compression program is proposed.
  • FIG. 1 is an explanatory diagram showing an example of image 101 compression by the compression apparatus 100 according to the present embodiment.
  • FIG. 2 is a block diagram illustrating a hardware configuration example of the compression device 100.
  • FIG. 3 is a block diagram illustrating a functional configuration example of the compression apparatus 100.
  • FIG. 4 is an explanatory diagram illustrating an example of the first operation.
  • FIG. 5 is an explanatory diagram showing an example of the first to fourth component matrices 501 to 504 to be compressed in the second operation.
  • FIG. 6 is an explanatory diagram showing a compression example of the first to fourth component matrices 501 to 504 shown in FIG.
  • FIG. 7 is an explanatory diagram showing image data to be compressed in the third operation.
  • FIG. 1 is an explanatory diagram showing an example of image 101 compression by the compression apparatus 100 according to the present embodiment.
  • FIG. 2 is a block diagram illustrating a hardware configuration example of the compression device 100.
  • FIG. 3 is a block diagram illustrating a functional
  • FIG. 8 is a flowchart illustrating an example of a compression processing procedure of the compression device 100.
  • FIG. 9 is a flowchart (part 1) illustrating an example of the encoding processing procedure in step S810.
  • FIG. 10 is a flowchart (part 2) illustrating an example of the encoding processing procedure in step S810.
  • FIG. 11 is an explanatory diagram illustrating an example of decompression of compressed data.
  • FIG. 12 is a flowchart illustrating an example of a decompression process procedure of the compression apparatus 100.
  • FIG. 13 is an explanatory diagram illustrating an example of an index value for compression.
  • FIG. 14 is an explanatory diagram showing an example of comparison of compression rates.
  • FIG. 1 is an explanatory diagram showing an example of image 101 compression by the compression apparatus 100 according to the present embodiment.
  • the compression apparatus 100 is a computer that receives input of image data indicating the image 101 and compresses image data indicating each block when the image 101 is divided into a plurality of blocks.
  • the image data indicating the image 101 is information indicating a pixel value of a pixel included in the image 101, for example.
  • the pixel value is expressed in, for example, YCrCb format.
  • the YCrCb format is an expression format using luminance and color difference, for example.
  • the image data indicating each block is information indicating the pixel value of a pixel included in each block, for example.
  • the compression apparatus 100 frequency-decomposes and quantizes the image data representing the block 102, and a component matrix having each of the spatial frequency components of the plurality of spatial frequency components representing the block 102 in the image 101 as elements. 103 is created.
  • the compression apparatus 100 compresses compressed data obtained by compressing, from the component matrix 103, information indicating a position where the non-zero element in the component matrix 103 is present and a numerical sequence obtained by extracting the non-zero element in the component matrix 103. Create
  • the compression apparatus 100 divides the component matrix 103 into a transformation matrix 104 obtained by converting non-zero elements of the component matrix 103 into “1” and a numerical sequence 105 obtained by extracting non-zero elements of the component matrix 103.
  • the compression apparatus 100 compresses the transformation matrix 104.
  • the compression apparatus 100 sequentially selects the columns of the transformation matrix 104 from the top, and outputs “1” if there are non-zero elements, and outputs “0” if there are no non-zero elements. To do.
  • the compression apparatus 100 outputs each component of a column having non-zero elements.
  • the compression apparatus 100 outputs the first compressed data 106 “110011011100”.
  • the compression apparatus 100 compresses the sequence 105.
  • the compression apparatus 100 expresses each component of the sequence 105 with 5 bits and outputs it. Of the 5 bits, the first 1 bit indicates a positive or negative sign, and the remaining 4 bits indicate a binary representation of the absolute value of each component.
  • the compression apparatus 100 outputs the second compressed data 107 “0101100100000111001010001”.
  • the compression apparatus 100 outputs the third compressed data 108 obtained by combining the first compressed data 106 and the second compressed data 107 as the compression result of the image data.
  • the compression apparatus 100 compresses the image data representing the block 102 and extracts the information 105 indicating the position of the non-zero element in the component matrix 103 and the sequence 105 obtained by extracting the non-zero element in the component matrix 103. Can be created. For this reason, the compression apparatus 100 can reduce the amount of data used for expressing the zero elements included in the component matrix 103 in the compressed data, and improve the compression efficiency.
  • the compression apparatus 100 expresses the image data indicating the block 102 as information indicating a position where the non-zero element in the component matrix 103 is present and a sequence 105 obtained by extracting the non-zero element in the component matrix 103. To do. For this reason, the compression apparatus 100 is used when the position of the non-zero element included in the component matrix 103 is not biased, such as when the element indicating the high frequency component included in the component matrix 103 is a non-zero element. Even if it exists, a compression rate can be improved.
  • the compression apparatus 100 can reduce the compression time of the image data and improve the compression rate, for example, compared to JPEG (Joint Photographic Experts Group). Moreover, since the compression apparatus 100 can improve the compression rate and can reduce the data amount of the compressed data, the transmission time can be reduced when transmitting the compressed data.
  • JPEG Joint Photographic Experts Group
  • the compression apparatus 100 is applied to remote desktop technology
  • the first information processing apparatus having the function of the compression apparatus 100 compresses the image displayed on the own apparatus and transmits the compressed image to the second information processing apparatus having the function of the compression apparatus 100
  • the second information processing apparatus Is a case where compressed data is received and decompressed.
  • a process in which the first information processing apparatus compresses an image displayed on the own apparatus and transmits the compressed image to the second information processing apparatus, and the second information processing apparatus receives and decompresses the compressed data is sometimes referred to as “remote desktop processing”.
  • the compression apparatus 100 can reduce the transmission time while reducing the compression time as compared with JPEG, the time required for the entire remote desktop processing can be reduced.
  • the compression apparatus 100 creates compressed data including information indicating a position where a non-zero element in the component matrix 103 is present and a sequence 105 obtained by extracting the non-zero element in the component matrix 103.
  • the compression apparatus 100 includes compressed data including information indicating a position where there is a non-zero element equal to or greater than the threshold in the component matrix 103 and a numerical sequence obtained by extracting the non-zero element equal to or greater than the threshold in the component matrix 103. You may create it.
  • compressed data including information indicating a position where there is a non-zero element equal to or higher than the threshold in the component matrix 103 and a numerical sequence obtained by extracting the non-zero element equal to or higher than the threshold in the component matrix 103 is generated.
  • the operation of the compression apparatus 100 may be referred to as a “first operation”.
  • the compression apparatus 100 may collectively compress image data indicating a plurality of blocks in the image 101.
  • the operation of the compression apparatus 100 that collectively compresses a plurality of blocks in the image 101 may be referred to as a “second operation”.
  • the compression apparatus 100 compresses the image data indicating the pixel values of the pixels included in the block 102 in the image 101 has been described, but the present invention is not limited to this.
  • the compression apparatus 100 may compress image data in which the pixel value of the pixel included in the block 102 in the image 101 is expressed by a difference from the average value of the pixel value of the pixel included in the adjacent block.
  • the operation of the compression apparatus 100 that compresses the image data in which the pixel value of the pixel included in the block 102 in the image 101 is expressed by the difference from the average value of the pixel value of the pixel included in the adjacent block is described. Sometimes referred to as “third operation”.
  • FIG. 2 is a block diagram illustrating a hardware configuration example of the compression device 100.
  • the compression apparatus 100 includes a CPU (Central Processing Unit) 201, a ROM (Read Only Memory) 202, a RAM (Random Access Memory) 203, a magnetic disk drive (Hard Disk Drive) 204, and a magnetic disk 205.
  • Each component is connected by a bus 200.
  • the CPU 201 governs overall control of the compression apparatus 100.
  • the ROM 202 stores a program such as a boot program.
  • the RAM 203 is used as a work area for the CPU 201.
  • the magnetic disk drive 204 controls reading / writing of data with respect to the magnetic disk 205 according to the control of the CPU 201.
  • the magnetic disk 205 stores data written under the control of the magnetic disk drive 204.
  • the optical disc drive 206 controls reading / writing of data with respect to the optical disc 207 according to the control of the CPU 201.
  • the optical disk 207 stores data written under the control of the optical disk drive 206, or causes the computer to read data stored on the optical disk 207.
  • the display 208 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box.
  • this display 208 for example, a liquid crystal display, a plasma display, or the like can be adopted.
  • the I / F 209 is connected to a network 214 such as a LAN (Local Area Network), a WAN (Wide Area Network), or the Internet through a communication line, and is connected to another device via the network 214.
  • the I / F 209 controls an internal interface with the network 214 and controls data input / output from an external device.
  • a modem or a LAN adapter may be employed as the I / F 209.
  • the keyboard 210 includes keys for inputting characters, numbers, various instructions, and the like, and inputs data. Moreover, a touch panel type input pad or a numeric keypad may be used.
  • the mouse 211 performs cursor movement, range selection, window movement, size change, and the like. A trackball or a joystick may be used as long as they have the same function as a pointing device.
  • the scanner 212 optically reads an image and takes in the image data into the compression apparatus 100.
  • the scanner 212 may have an OCR (Optical Character Reader) function.
  • the printer 213 prints image data and document data.
  • a laser printer or an ink jet printer can be adopted. Note that at least one of the optical disk drive 206, the optical disk 207, the display 208, the keyboard 210, the mouse 211, the scanner 212, and the printer 213 may be omitted.
  • FIG. 3 is a block diagram illustrating a functional configuration example of the compression apparatus 100.
  • the compression apparatus 100 includes a calculation unit 301, an acquisition unit 302, a creation unit 303, an extraction unit 304, an output unit 305, and a decoding unit 306.
  • the calculation unit 301, the acquisition unit 302, the creation unit 303, the extraction unit 304, the output unit 305, and the decryption unit 306 are, for example, the ROM 202, the RAM 203, and the magnetic disk 205 illustrated in FIG.
  • the function is realized by causing the CPU 201 to execute a program stored in a storage device such as the optical disk 207 or by the I / F 209.
  • the calculation unit 301 performs frequency decomposition on a plurality of pixel values indicating an image to calculate each spatial frequency component.
  • the image may be, for example, the image 101 shown in FIG. 1 or the block 102 in the image 101 shown in FIG.
  • the calculation unit 301 calculates each spatial frequency component by DCT, for example. Specifically, the calculation unit 301 calculates the frequency component P ( ⁇ , ⁇ ) from the pixel value p (i, j) of the 8 ⁇ 8 pixel indicating the block 102 in the image 101 by the following equation (1). calculate.
  • the calculation unit 301 calculates the spatial frequency component by DCT is taken as an example, but the present invention is not limited to this.
  • the calculation unit 301 may calculate a spatial frequency component by wavelet transformation or may calculate a spatial frequency component by Hadamard transformation.
  • the calculation unit 301 calculates a reference value based on one of a plurality of pixel values indicating another image adjacent to the image, and each pixel of the reference value and the plurality of pixel values indicating the image Each spatial frequency component may be calculated by calculating a difference from the value and frequency-decomposing the difference.
  • the other adjacent image is, for example, another block adjacent to the block 102 in the image 101 shown in FIG.
  • data indicating a difference between a reference value and each pixel value of a plurality of pixel values indicating an image may be referred to as “difference data”.
  • the calculation unit 301 calculates, as a reference value, an average value of pixel values of pixels adjacent to the block 102 among a plurality of pixel values indicating other blocks adjacent to the block 102 in the image 101. .
  • the calculation unit 301 creates difference data by subtracting a reference value from each pixel value of a plurality of pixel values included in the image data indicating the block 102 in the image 101.
  • the calculation unit 301 calculates the frequency component P ( ⁇ , ⁇ ) by substituting each of the plurality of differences included in the difference data as p (i, j) in the above formula (1). . Processing when the calculation unit 301 calculates a difference and frequency-decomposes to calculate each spatial frequency component will be described later with reference to FIG.
  • the calculation unit 301 may calculate a value obtained by quantizing each spatial frequency component. For example, the calculation unit 301 calculates a value obtained by approximating a spatial frequency component, which is a continuous quantity, to a discrete value by quantization. Here, since quantization is a conventional technique, description thereof is omitted.
  • the calculation result is stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207, for example. Thereby, the calculation unit 301 uses a matrix having the spatial frequency component obtained from the image data as an element, a matrix having the spatial frequency component obtained from the difference data as an element, or a value obtained by quantizing the spatial frequency component as an element. Each element included in the matrix to be calculated can be calculated.
  • the acquisition unit 302 acquires a matrix having each spatial frequency component of a plurality of spatial frequency components representing an image as an element.
  • the matrix is a matrix of N rows and M columns.
  • the matrix may be a one-row matrix or a one-column matrix.
  • the acquisition unit 302 acquires a matrix having each spatial frequency component calculated by the calculation unit 301 as an element.
  • the acquisition unit 302 acquires a DCT matrix having each spatial frequency component calculated by the calculation unit 301 by DCT as an element.
  • the acquisition unit 302 may acquire a matrix whose elements are values obtained by quantizing each spatial frequency component of a plurality of spatial frequency components representing an image. For example, the acquisition unit 302 acquires a matrix having the quantized value calculated by the calculation unit 301 as an element.
  • the matrix whose elements are quantized values is, for example, the component matrix 103 whose elements are the spatial frequency components of a plurality of spatial frequency components representing the block 102 in the image 101 shown in FIG.
  • the acquisition unit 302 acquires a matrix having each spatial frequency component of a plurality of spatial frequency components representing each of the plurality of images as a row or column element.
  • the acquisition unit 302 acquires, for example, a matrix having each spatial frequency component calculated by the calculation unit 301 for the x-th block among ⁇ blocks as elements in the x-th row.
  • is a natural number
  • x is a natural number of 1 to ⁇ .
  • the processing in the case where the acquisition unit 302 acquires a matrix having the spatial frequency components of the plurality of spatial frequency components representing the images 101 of the plurality of images 101 as row or column elements is shown in FIG. This will be described later with reference to FIG.
  • the acquired data is stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207, for example. Thereby, the acquisition unit 302 can acquire a matrix obtained from image data to be compressed.
  • the creation unit 303 creates information indicating a position where there is a non-zero element whose value is not zero among the elements of the matrix acquired by the acquisition unit 302.
  • the creation unit 303 has, for example, the position of a row or column having a non-zero element in the matrix acquired by the acquisition unit 302 and the non-zero element in a row or column having a non-zero element in the matrix. Information indicating the position is created.
  • the creation unit 303 generates, from the component matrix 103 illustrated in FIG. 1, data “1100” indicating a column with a non-zero element and data indicating a position with a non-zero element in a column with a non-zero element. “11011100” is created.
  • the creation unit 303 creates the first compressed data 106 “110011011100” by combining the created data.
  • the creation unit 303 may create information indicating a position where there is a non-zero element whose absolute value is greater than or equal to a threshold value among the elements of the matrix.
  • the creation unit 303 for example, each row or column element having a non-zero element whose absolute value is greater than or equal to a threshold in the matrix and each row or column having a non-zero element whose absolute value is greater than or equal to the threshold.
  • Information indicating the position of the column is created.
  • the processing in the case where the creation unit 303 creates information indicating a position where there is a non-zero element whose absolute value is greater than or equal to the threshold value among the elements of the matrix will be described later with reference to FIG.
  • the created data is stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207, for example.
  • the creation unit 303 can create data that is a part of the compressed data obtained by compressing the matrix obtained by the obtaining unit 302.
  • the extraction unit 304 extracts non-zero elements from the matrix elements in a predetermined order. For example, the extraction unit 304 raster-scans the matrix to extract non-zero elements. For example, the extraction unit 304 may extract a non-zero element by performing a zigzag scan of the matrix, or may extract a non-zero element by performing an alternate scan of the matrix.
  • the extraction unit 304 raster scans the component matrix 103 shown in FIG. 1 to extract 11, 4, 3, -2, and -1.
  • the extraction unit 304 creates second compressed data 107 “0101100100000111001010001” that represents the sequence 105 of the extracted elements and expresses each element with 5 bits.
  • the creation unit 303 may create information indicating a position where there is a non-zero element whose absolute value is greater than or equal to a threshold value.
  • the extraction unit 304 extracts non-zero elements whose absolute value is greater than or equal to the threshold value from the matrix elements in a predetermined order. For example, the extraction unit 304 raster scans the matrix and extracts non-zero elements whose absolute value is equal to or greater than a threshold value.
  • the extracted data is stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207, for example.
  • the extraction unit 304 can create the sequence 105 that becomes a part of the compressed data obtained by compressing the matrix.
  • the process of the creation unit 303 and the process of the extraction unit 304 are described in order, but either the process of the creation unit 303 or the process of the extraction unit 304 may be executed first. Further, the process of the creation unit 303 and the process of the extraction unit 304 may be executed in parallel.
  • the output unit 305 outputs the information created by the creating unit 303 and the sequence of non-zero elements 105 extracted by the extracting unit 304 in association with each other. For example, the output unit 305 combines the first compressed data 106 “110011011100” created by the creating unit 303 and the second compressed data 107 “0101100100000111001010001” created by the extracting unit 304. Then, the output unit 305 outputs the third compressed data 108 “1100110111000101100100000111001010001” that is the combined result.
  • the output format includes, for example, display on the display 208, print output to the printer 213, and transmission to an external device via the I / F 209.
  • the data may be stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207. Thereby, the output unit 305 can notify the user of the compression apparatus 100 of the compression result of the image data.
  • the decoding unit 306 Based on the information created by the creation unit 303 and the sequence 105 of non-zero elements extracted by the extraction unit 304, the decoding unit 306 converts each spatial frequency component of the plurality of spatial frequency components representing the image 101 into element Is decoded.
  • the decoding unit 306 creates, for example, a matrix having the same size as the component matrix 103 whose elements are the spatial frequency components of the plurality of spatial frequency components representing the block 102 in the image 101. Next, the decoding unit 306 sets a non-zero element included in the sequence 105 according to a predetermined order at the position indicated by the information created by the creation unit 303 in the created matrix. In addition, the decoding unit 306 sets a zero element having a value of zero at the remaining position of the same-size matrix excluding the position indicated by the information created by the creation unit 303.
  • the decryption result is stored in a storage area such as the RAM 203, the magnetic disk 205, or the optical disk 207, for example.
  • the decoding unit 306 decodes a matrix whose elements are the spatial frequency components of the plurality of spatial frequency components representing the image.
  • FIG. 4 is an explanatory diagram showing an example of the first operation.
  • the compression apparatus 100 compares the absolute value of each element of the component matrix 103 with each element of the threshold matrix 401.
  • the compression apparatus 100 converts, from the component matrix 103, a non-zero element in which the absolute value of the component matrix 103 is equal to or greater than the threshold value to “1”, and the absolute value of the component matrix 103 is smaller than the threshold value.
  • a conversion matrix 402 in which elements are converted to “0” is created.
  • the compression apparatus 100 creates a sequence 403 in which non-zero elements whose absolute value is equal to or greater than a threshold value in the component matrix 103 are extracted from the component matrix 103.
  • the compression apparatus 100 compresses the transformation matrix 402. For example, the compression apparatus 100 sequentially selects the columns of the transformation matrix 402 from the top, and outputs “1” if there are non-zero elements, and outputs “0” if there are no non-zero elements. To do. Next, the compression apparatus 100 outputs each component of a column having non-zero elements. As a result, the compression apparatus 100 outputs the first compressed data 404 “11001101001”.
  • the compression apparatus 100 compresses the sequence 403.
  • the compression apparatus 100 expresses each component of the sequence 403 in 5 bits and outputs it.
  • the compression apparatus 100 outputs the first compressed data 405 “01011001000001110010”.
  • the compression apparatus 100 outputs the third compressed data 406 obtained by combining the first compressed data 404 and the first compressed data 405 as the image data compression result.
  • the compression apparatus 100 includes information indicating the position where the non-zero element in the component matrix 103 is present by compressing the image data, and a sequence 403 obtained by extracting the non-zero element in the component matrix 103. Compressed data can be created. As a result, the compression apparatus 100 can shorten the compression time and improve the compression rate as compared with, for example, JPEG.
  • each element of the threshold matrix 401 has the same value, but the present invention is not limited to this.
  • the threshold matrix 401 is a value in which the threshold for an element indicating a high-frequency spatial frequency component among the elements of the component matrix 103 is larger than the threshold for an element indicating a low-frequency spatial frequency component among the elements of the component matrix 103.
  • the threshold matrix 401 may be a matrix in which an element close to the lower right in FIG. 4 has a larger value than an element close to the upper left.
  • the compression apparatus 100 increases the number of zero elements that are relatively small in the amount of data used to represent the elements among the elements of the transformation matrix 402, and the amount of data that is used to represent the elements is relatively large.
  • the compression factor can be improved by reducing non-zero elements.
  • the compressed data is “10001011100001001100001110010010011010001”, which is 41-bit compressed data.
  • the compressed data compressed by the compression apparatus 100 is 32-bit compressed data as described above, and the compression rate is improved as compared with the case of compression using the run length method.
  • the compressed data is “10001011100001001000001110110010010010001”, which is 41-bit compressed data.
  • the compressed data compressed by the compression apparatus 100 is 32-bit compressed data as described above, and the compression rate is improved as compared with the case of compression using the run length method.
  • the compressed data is “10111000101110001000010010011000001111010010110010110101010010001110001110101”, which is 77-bit compressed data.
  • the compressed data compressed by the compression apparatus 100 is 32-bit compressed data as described above, and the compression rate is improved as compared with the case where compression is performed using a Huffman code.
  • FIG. 5 is an explanatory diagram showing an example of the first to fourth component matrices 501 to 504 to be compressed in the second operation. As shown in FIG. 5, the first to fourth component matrices 501 to 504 each include 4 ⁇ 4 spatial frequency components.
  • FIG. 6 is an explanatory diagram showing a compression example of the first to fourth component matrices 501 to 504 shown in FIG.
  • the compression apparatus 100 creates a component matrix 601 including first to fourth component matrices 501 to 504.
  • the compression apparatus 100 selects the spatial frequency components included in the first component matrix 501 in raster order and arranges them as the first row of the component matrix 601. Similarly, the compression apparatus 100 selects the spatial frequency components included in the second to fourth component matrices 502 to 504 in raster order and arranges them as the second to fourth rows of the component matrix 601, respectively. Accordingly, the compression apparatus 100 creates a component matrix 601 including the first to fourth component matrices 501 to 504.
  • the compression apparatus 100 compresses the created component matrix 601. For example, the compression apparatus 100 sequentially selects the columns of the component matrix 601 from the top, and outputs “1” if there are non-zero elements, and outputs “0” if there are no non-zero elements. To do. As a result, the compression apparatus 100 outputs the first compressed data 602 “1100110000001100”. Next, the compression apparatus 100 outputs each element in a column having non-zero elements after replacing the non-zero elements with 1. As a result, the compression apparatus 100 outputs the second compressed data 603 “111111101111101111010101”.
  • the compression apparatus 100 compresses a sequence obtained by extracting non-zero elements from the created component matrix 601. For example, the compression device 100 outputs each element of the sequence by expressing it in 5 bits. As a result, the compression apparatus 100 outputs the third compressed data 604 “01011001000001110010100010100100001000111000100001010000001010001000100011110010100010000110001”. Then, the compression apparatus 100 outputs the fourth compressed data 605 obtained by combining the first to third compressed data 602 to 604 as the compression result.
  • the compression apparatus 100 can reduce the amount of data used to represent the zero elements and improve the compression ratio of the compressed data, as compared with the case where the component matrices 501 to 504 are respectively compressed.
  • the compressed data is 170-bit compressed data.
  • the compressed data compressed by the compression apparatus 100 is 135-bit compressed data as described above, and the compression rate is improved as compared with the case where compression is performed using the run length method.
  • the compressed data is 170-bit compressed data.
  • the compressed data compressed by the compression apparatus 100 is 135-bit compressed data as described above, and the compression rate is improved as compared with the case where compression is performed using the run length method.
  • the compressed data is 237-bit compressed data.
  • the compressed data compressed by the compression apparatus 100 is 135-bit compressed data as described above, and the compression rate is improved as compared with the case where compression is performed using the run length method.
  • the compression apparatus 100 compresses the four image data together, but is not limited thereto.
  • the compression apparatus 100 may compress an arbitrary number of image data collectively.
  • FIG. 7 is an explanatory diagram showing image data to be compressed in the third operation.
  • the compression apparatus 100 creates difference data that expresses a pixel value included in image data 702 indicating a block 701 in an image 700 by a difference from a reference value.
  • the compression apparatus 100 extracts the pixel value 705 of each pixel in the column closest to the block 701 from the image data 704 of the adjacent block 703 adjacent above the block 701 in the image 700. Also, the compression apparatus 100 extracts each pixel value 708 in the row closest to the block 701 from the image data 707 indicating the adjacent block 706 adjacent to the left of the block 701 in the image 700.
  • the compression apparatus 100 calculates an average value of the extracted pixel value 705 and the pixel value 708 as a reference value of the pixel value included in the image data 702 indicating the block 701. Then, the compression apparatus 100 generates difference data 709 by subtracting the calculated standard value from the pixel value included in the image data 702 indicating the block 701.
  • the compression apparatus 100 frequency-decomposes and quantizes the difference data, creates a component matrix having the quantized values as elements, and compresses the component matrix.
  • the compressed content of the component matrix is the same as the compressed content described with reference to FIGS.
  • the compression apparatus 100 increases the number of zero elements that are relatively small in the amount of data used to represent the elements among the elements of the component matrix, and the amount of data that is used to represent the elements is relatively large.
  • the compression factor can be improved by reducing the zero elements.
  • the average value is calculated as the reference value of the pixel value, but is not limited thereto. For example, the maximum value, the minimum value, or the median value may be calculated as the reference value of the pixel value.
  • the compression apparatus 100 may create a component matrix including a plurality of component matrices as in the second operation, and compress using the threshold as in the first operation. Further, for example, the compression apparatus 100 may compress the component matrix obtained by frequency-resolving the image data expressed by the difference from the reference value as in the third operation using the threshold as in the first operation. Good.
  • the compression apparatus 100 creates a component matrix obtained by frequency-resolving image data expressed by a difference from the reference value as in the third operation, and includes a plurality of component matrices as in the second operation. May be created and compressed. Further, the compression apparatus 100 creates a component matrix obtained by frequency-resolving image data expressed by a difference from the reference value as in the third operation, and includes a plurality of component matrices as in the second operation. And may be compressed using a threshold value as in the first operation.
  • FIG. 8 is a flowchart showing an example of a compression processing procedure of the compression apparatus 100.
  • the compression apparatus 100 determines whether image data indicating an image to be compressed has been input (step S801). If no image data is input (step S801: NO), the compression apparatus 100 returns to the process of step S801.
  • step S801 when image data is input (step S801: Yes), the compression apparatus 100 converts the image data into image data in the YCrCb format (step S802). Next, the compression apparatus 100 performs data sampling of the image data (step S803). Then, the compression apparatus 100 divides the image data into image data indicating each block of the plurality of blocks (step S804).
  • the compression apparatus 100 selects unselected image data among the divided image data (step S805). Then, the compression apparatus 100 calculates the reference value of the pixel value included in the selected image data based on the image data indicating the adjacent block of the block indicated by the selected image data (step S806).
  • the compression apparatus 100 creates image data obtained by subtracting the calculated reference value from the pixel value included in the selected image data (step S807). Then, the compression apparatus 100 performs frequency decomposition on the created image data (step S808). Next, the compression apparatus 100 quantizes the image data (step S809). Then, the compression device 100 executes the encoding process shown in FIGS. 9 and 10 (step S810).
  • the compression apparatus 100 determines whether there is unselected image data among the divided image data (step S811). If there is unselected image data (step S811: Yes), the compression apparatus 100 returns to the process of step S805. On the other hand, when there is no unselected image data (step S811: No), the compression apparatus 100 ends the compression process.
  • step S9 and 10 are flowcharts showing an example of the encoding processing procedure in step S810.
  • the compression apparatus 100 sets 0 to a variable I (step S901).
  • the compression apparatus 100 prepares an array array having a length of BlockLength (step S902).
  • step S903 determines whether or not the variable I is smaller than BlockLength.
  • step S903: No the compression apparatus 100 proceeds to the process of step S1001 in FIG.
  • step S903 when it is small (step S903: Yes), the compression apparatus 100 determines whether or not there is a non-zero element in the I column (step S904). If there is a non-zero element (step S904: Yes), the compression apparatus 100 substitutes 1 for the array array [I] and outputs 1 (step S905). Next, the compression apparatus 100 proceeds to the process of step S907.
  • step S904 when there is no non-zero element (step S904: No), the compression apparatus 100 assigns 0 to the array array [I] and outputs 0 (step S906). Next, the compression apparatus 100 proceeds to the process of step S907. In step S907, the compression apparatus 100 adds 1 to the variable I (step S907), and returns to the process of step S903.
  • the compression apparatus 100 sets 0 to the variable J (step S1001).
  • the compression apparatus 100 determines whether or not the variable J is smaller than BlockLength (step S1002).
  • the compression apparatus 100 extracts a non-zero element, encodes and outputs it (step S1003), and ends the encoding process.
  • step S1002 determines whether or not array [J] is 1 (step S1004).
  • step S1004 No
  • the compression apparatus 100 returns to the process of step S1002.
  • step S1004 if it is 1 (step S1004: Yes), the compression apparatus 100 outputs the element in the Jth column (step S1005). Next, the compression apparatus 100 adds 1 to the variable J (step S1006), and returns to the process of step S1002.
  • FIG. 11 is an explanatory diagram showing an example of decompression of compressed data.
  • the compression apparatus 100 decodes the matrix before compression from the compressed data 1101 “1100110111000101100100000111001010001”.
  • the compression apparatus 100 acquires 4-bit data “1100” as data corresponding to the number of columns of the matrix before compression from the top of the compressed data 1101.
  • the compression apparatus 100 identifies the first column and the second column as columns having non-zero elements from the acquired data “1100”.
  • the compression apparatus 100 sets the 4-bit data “1101” corresponding to the first column and the 4 bits corresponding to the second column as data corresponding to the number of rows corresponding to each specified column from the compressed data 1101. Bit data “1100” is acquired.
  • the compression apparatus 100 sets each value of 4-bit data corresponding to the acquired first column in the first column, and sets each value of 4-bit data corresponding to the acquired second column to the second column.
  • a value is set, and a matrix 1102 in which all zero elements are set is created because there are no non-zero elements in the third and fourth columns.
  • the compression apparatus 100 performs a raster scan on the matrix 1102, and if there is an element for which 1 is set, the compression apparatus 100 obtains 5-bit data from the compressed data and uses the value indicated by the 5-bit data as the element.
  • the raster scan order is the order indicated by the dotted lines in FIG. For example, since 1 is set in the element in the first column of the first row, the compression apparatus 100 acquires 5-bit data “01011” from the compressed data, and sets the element in the first column of the first row to 5 The value “11” indicated by the bit data “01011” is set. Similarly, the compression apparatus 100 sets values for other elements in which 1 is set.
  • the compression apparatus 100 can decode the matrix 1103 before compression.
  • the compression apparatus 100 can restore the image data by multiplying the matrix 1103 before compression by a quantization value and performing inverse frequency decomposition. Since a technique for restoring image data from a matrix before compression is a conventional technique, a description thereof will be omitted.
  • FIG. 12 is a flowchart showing an example of a decompression process procedure of the compression apparatus 100.
  • the compression apparatus 100 determines whether compressed data has been input (step S1201).
  • step S1201: No when compressed data is not input (step S1201: No), the compression apparatus 100 returns to the process of step S1201.
  • step S1201 when compressed data is input (step S1201: Yes), the compression apparatus 100 reads compressed data for one block (step S1202). Next, the compression device 100 creates a matrix indicating a non-zero position (step S1203). Then, the compression apparatus 100 sets the non-zero element expanded to the non-zero position (step S1204).
  • step S1205 the compression apparatus 100 multiplies the non-zero element by the quantized value. Then, the compression apparatus 100 determines whether all the compressed data has been read (step S1206). Here, when not reading (step S1206: No), the compression apparatus 100 returns to the process of step S1202.
  • step S1206 when reading (step S1206: Yes), the compression apparatus 100 selects image data indicating blocks in raster order (step S1207). Next, a reference value of the pixel value included in the selected image data is calculated based on the image data indicating the adjacent block of the block indicated by the selected image data (step S1208). Then, the compression apparatus 100 performs inverse frequency decomposition on the selected image data (step S1209).
  • the compression apparatus 100 adds the calculated reference value to the pixel value included in the image data subjected to inverse frequency decomposition (step S1210). Then, the compression apparatus 100 determines whether there is unselected image data (step S1211).
  • step S1211: Yes when there is unselected image data (step S1211: Yes), the compression apparatus 100 returns to the process of step S1207. On the other hand, when there is no unselected image data (step S1211: No), the compression apparatus 100 ends the decompression process. Thereby, the compression apparatus 100 can expand the compressed data.
  • FIG. 13 is an explanatory diagram illustrating an example of an index value for compression.
  • the compression index values shown in FIG. 13 are, for example, a compression rate [%], a compression time [ms], an expansion time [ms], and a noise index.
  • the compression rate is, for example, the ratio of the data amount after compression to the data amount before compression.
  • the compression time is, for example, the time required for compression.
  • the extension time is, for example, the time required for extension.
  • the noise index is, for example, PSNR (Peak Signal-to-Noise Ratio).
  • PSNR is calculated by 10 ⁇ log 10 (255 ⁇ 255 / MSE).
  • MSE Mel Square Error
  • MSE Mel Square Error
  • the compression apparatus 100 can improve the compression rate even with the same noise index as compared with the case of compression by JPEG. Therefore, the compression apparatus 100 can reduce the transmission time when transmitting compressed data compared to JPEG. Further, the compression apparatus 100 can reduce the compression time and the decompression time even when the noise index is comparable to that in the case of compression by JPEG2000 or WebP. For this reason, since the compression apparatus 100 can reduce the transmission time while reducing the compression time and the expansion time as compared with the conventional technologies such as JPEG, JPEG2000, and WebP, the time required for the entire remote desktop processing is reduced. can do.
  • FIG. 14 is an explanatory diagram showing an example of comparison of compression ratios.
  • the compression rates shown in FIG. 14 are the compression rates when the five types of images are compressed by the compression device and when compressed by JPEG.
  • the image 1 is an output image of CAD used in, for example, automobile design. As a characteristic of an image, it has a fine color gradation by a complicated shape.
  • the image 2 is a simple three-dimensional image such as a cylinder. As a feature of the image, it has a small number of colors and a gentle gradation.
  • Image 3 is an image of a nebula by a telescope, for example. As a feature of the image, it is formed with almost gradation, and there is no edge representing the boundary of the object.
  • the image 4 is a map image, for example. As a feature of the image, there is no gradation, and there are many things composed of edges such as roads and buildings.
  • the image 5 is a simulation screen for fluid analysis by a computer, for example.
  • the color-coded particles are arranged so as to draw a gradation. That is, the gradation of the images 1 to 3 is uniform, while the gradation of the image 5 is discrete.
  • the compression rate varies depending on the characteristics of the image, but the compression apparatus 100 can improve the compression rate compared to the case where compression is performed by JPEG.
  • the component matrix can be divided into the information indicating the position where the non-zero element is located and the numerical sequence of the non-zero element to create the compressed data.
  • the compression apparatus 100 can compress the component matrix by reducing the amount of data used to represent the zero element of the component matrix. Accordingly, the compression apparatus 100 has no bias in the position of the non-zero element included in the component matrix 103, such as when the element indicating the high frequency component included in the component matrix 103 is a non-zero element. Even in this case, the compression rate can be improved.
  • the component matrix is divided into the position of the row or column where the non-zero element is present in the component matrix, and the position where the non-zero element is present in the row or column where the non-zero element is present in the component matrix. It is possible to divide the information into a number sequence. Thereby, the compression apparatus 100 can reduce the data amount used in order to express the zero element of a component matrix, and can improve the compression rate of a component matrix.
  • the compression apparatus 100 it is possible to create a matrix in which image data of each of a plurality of image data is set as row or column elements, and compress the created matrix. As a result, the compression apparatus 100 can reduce the amount of data used to represent the zero elements of the component matrix and improve the compression rate, as compared with the case where the image data is compressed one by one. .
  • the component matrix can be divided into information indicating a position where there is a non-zero element whose absolute value is equal to or greater than the threshold and a sequence of non-zero elements whose absolute value is equal to or greater than the threshold. it can.
  • the compression apparatus 100 approximates an element having an absolute value smaller than the threshold value in the component matrix to a zero element, increases the number of zero elements that use a relatively small amount of data to represent the element, and expresses the element. Therefore, it is possible to reduce non-zero elements that use a relatively large amount of data. And the compression apparatus 100 can improve the compression rate of a component matrix.
  • the compression apparatus 100 it is possible to convert image data indicating an image into a difference from a reference value based on image data indicating an adjacent image.
  • the compression apparatus 100 reduces the element value of the component matrix obtained from the image data to a small value, increases the number of zero elements that are relatively small in the amount of data used to represent the element, and expresses the element. Non-zero elements that use a relatively large amount of data can be reduced.
  • the compression apparatus 100 can reduce the value included in the sequence, and can reduce the amount of data used to express the value included in the sequence.
  • the compression apparatus 100 can improve the compression rate of a component matrix.
  • a component matrix having elements obtained by quantizing each spatial frequency component representing an image can be created.
  • the compression apparatus 100 increases the number of zero elements in the component matrix that have a relatively small amount of data used to represent the element, and the non-zero elements that have a relatively large amount of data that is used to represent the element. And the compression rate of the component matrix can be improved.
  • the compression method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation.
  • the compression program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer.
  • the compression program may be distributed via a network such as the Internet.

Landscapes

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

Abstract

A compression device (100) acquires image data which indicates a block (102) within an image (101). Next, the compression device (100) frequency resolves and quantizes the image data, and creates from the image data a constituent matrix (103) with each of a plurality of spatial frequency constituents which represent the block (102) within the image (101) as elements. From the constituent matrix (103), the compression device (100) creates compressed data wherein information which indicates the locations of non-zero elements in the constituent matrix (103) and a sequence wherein the non-zero elements in the constituent matrix (103) are extracted are compressed.

Description

圧縮装置、圧縮方法、および圧縮プログラムCOMPRESSION DEVICE, COMPRESSION METHOD, AND COMPRESSION PROGRAM
 本発明は、圧縮装置、圧縮方法、および圧縮プログラムに関する。 The present invention relates to a compression device, a compression method, and a compression program.
 従来、画像を複数のブロックに分け、各ブロックを示す画像データを離散コサイン変換(DCT:Discrete Cosine Transform)やウェーブレット変換などを用いて周波数分解し、周波数分解により得られた係数行列を量子化し、量子化した行列を圧縮する技術がある。また、例えば、量子化した行列の要素を、所定順序でスキャンして、連続して出現する零要素を、連続して出現する零要素の個数の情報に置き換える圧縮技術がある。 Conventionally, an image is divided into a plurality of blocks, and image data representing each block is frequency-decomposed using a discrete cosine transform (DCT) or wavelet transform, and a coefficient matrix obtained by the frequency decomposition is quantized. There is a technique for compressing a quantized matrix. In addition, for example, there is a compression technique in which elements of a quantized matrix are scanned in a predetermined order, and consecutively appearing zero elements are replaced with information on the number of consecutively appearing zero elements.
 関連する技術としては、例えば、圧縮したデータを伸長する際に、係数が零になる位置を示す情報を用いて、係数が非零の位置を選んで伸長する技術がある。また、例えば、コサイン関数の対称性を利用して、離散コサイン変換により得られたN×Nの1次元DCT行列を分解する技術がある。 As a related technique, for example, when decompressing compressed data, there is a technique in which information indicating a position where a coefficient becomes zero is used to select and expand a position where the coefficient is non-zero. Further, for example, there is a technique for decomposing an N × N one-dimensional DCT matrix obtained by discrete cosine transform using the symmetry of a cosine function.
特開平7-203439号公報JP-A-7-203439 特開2003-30174号公報JP 2003-30174 A
 しかしながら、上述した従来技術では、画像データを周波数分解して得られた係数行列の高周波の周波数成分の要素に値が零ではない非零要素があると、画像データの圧縮率が悪くなる場合がある。 However, in the above-described prior art, if there is a non-zero element whose value is not zero among the elements of the high frequency components of the coefficient matrix obtained by frequency decomposition of the image data, the compression rate of the image data may be deteriorated. is there.
 1つの側面では、本発明は、画像データの圧縮率を向上させることを目的とする。 In one aspect, the present invention aims to improve the compression rate of image data.
 本発明の一側面によれば、画像を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする行列を取得し、取得した行列の要素のうちの値が零ではない非零要素がある位置を示す情報を作成し、行列の要素のうちの非零要素を所定順序で抽出し、作成した情報と、抽出した非零要素の数列と、を対応付けて出力する圧縮装置、圧縮方法、および圧縮プログラムが提案される。 According to one aspect of the present invention, a matrix having each spatial frequency component of a plurality of spatial frequency components representing an image as an element is acquired, and a non-zero element whose value is not zero among the acquired matrix elements is Compression apparatus and compression method for creating information indicating a position, extracting non-zero elements of matrix elements in a predetermined order, and outputting the created information and a sequence of extracted non-zero elements in association with each other , And a compression program is proposed.
 本発明の一態様によれば、画像データの圧縮率を向上させることができるという効果を奏する。 According to one aspect of the present invention, there is an effect that the compression rate of image data can be improved.
図1は、本実施の形態にかかる圧縮装置100による画像101圧縮の一実施例を示す説明図である。FIG. 1 is an explanatory diagram showing an example of image 101 compression by the compression apparatus 100 according to the present embodiment. 図2は、圧縮装置100のハードウェア構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a hardware configuration example of the compression device 100. 図3は、圧縮装置100の機能的構成例を示すブロック図である。FIG. 3 is a block diagram illustrating a functional configuration example of the compression apparatus 100. 図4は、第1の動作の一例を示す説明図である。FIG. 4 is an explanatory diagram illustrating an example of the first operation. 図5は、第2の動作において圧縮対象となる第1~第4の成分行列501~504の一例を示す説明図である。FIG. 5 is an explanatory diagram showing an example of the first to fourth component matrices 501 to 504 to be compressed in the second operation. 図6は、図5に示した第1~第4の成分行列501~504の圧縮例を示す説明図である。FIG. 6 is an explanatory diagram showing a compression example of the first to fourth component matrices 501 to 504 shown in FIG. 図7は、第3の動作において圧縮対象となる画像データを示す説明図である。FIG. 7 is an explanatory diagram showing image data to be compressed in the third operation. 図8は、圧縮装置100の圧縮処理手順の一例を示すフローチャートである。FIG. 8 is a flowchart illustrating an example of a compression processing procedure of the compression device 100. 図9は、ステップS810の符号化処理手順の一例を示すフローチャート(その1)である。FIG. 9 is a flowchart (part 1) illustrating an example of the encoding processing procedure in step S810. 図10は、ステップS810の符号化処理手順の一例を示すフローチャート(その2)である。FIG. 10 is a flowchart (part 2) illustrating an example of the encoding processing procedure in step S810. 図11は、圧縮データの伸長の一例を示す説明図である。FIG. 11 is an explanatory diagram illustrating an example of decompression of compressed data. 図12は、圧縮装置100の伸長処理手順の一例を示すフローチャートである。FIG. 12 is a flowchart illustrating an example of a decompression process procedure of the compression apparatus 100. 図13は、圧縮の指標値の一例を示す説明図である。FIG. 13 is an explanatory diagram illustrating an example of an index value for compression. 図14は、圧縮率の比較の一例を示す説明図である。FIG. 14 is an explanatory diagram showing an example of comparison of compression rates.
 以下に添付図面を参照して、本発明にかかる圧縮装置、圧縮方法、および圧縮プログラムの実施の形態を詳細に説明する。 Embodiments of a compression apparatus, a compression method, and a compression program according to the present invention will be described below in detail with reference to the accompanying drawings.
(画像101圧縮の一実施例)
 図1は、本実施の形態にかかる圧縮装置100による画像101圧縮の一実施例を示す説明図である。圧縮装置100は、画像101を示す画像データの入力を受け付け、画像101を複数のブロックに分割した場合の各々のブロックを示す画像データを圧縮するコンピュータである。
(One Example of Image 101 Compression)
FIG. 1 is an explanatory diagram showing an example of image 101 compression by the compression apparatus 100 according to the present embodiment. The compression apparatus 100 is a computer that receives input of image data indicating the image 101 and compresses image data indicating each block when the image 101 is divided into a plurality of blocks.
 ここで、画像101を示す画像データとは、例えば、画像101に含まれる画素の画素値を示す情報である。画素値は、例えば、YCrCb形式で表現される。YCrCb形式とは、例えば、輝度と色差とを用いた表現形式である。各々のブロックを示す画像データとは、例えば、各々のブロックに含まれる画素の画素値を示す情報である。 Here, the image data indicating the image 101 is information indicating a pixel value of a pixel included in the image 101, for example. The pixel value is expressed in, for example, YCrCb format. The YCrCb format is an expression format using luminance and color difference, for example. The image data indicating each block is information indicating the pixel value of a pixel included in each block, for example.
 以下の説明では、圧縮装置100が画像101内のブロック102を示す画像データを圧縮する場合について説明する。まず、圧縮装置100は、ブロック102を示す画像データを周波数分解し、量子化し、画像データから画像101内のブロック102を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする成分行列103を作成する。次に、圧縮装置100は、成分行列103から、成分行列103のうちの非零要素がある位置を示す情報と、成分行列103のうちの非零要素を抽出した数列と、を圧縮した圧縮データを作成する。 In the following description, a case where the compression device 100 compresses image data indicating the block 102 in the image 101 will be described. First, the compression apparatus 100 frequency-decomposes and quantizes the image data representing the block 102, and a component matrix having each of the spatial frequency components of the plurality of spatial frequency components representing the block 102 in the image 101 as elements. 103 is created. Next, the compression apparatus 100 compresses compressed data obtained by compressing, from the component matrix 103, information indicating a position where the non-zero element in the component matrix 103 is present and a numerical sequence obtained by extracting the non-zero element in the component matrix 103. Create
 圧縮装置100は、例えば、成分行列103を、成分行列103の非零要素を「1」に変換した変換行列104と、成分行列103の非零要素を抽出した数列105と、に分割する。ここで、圧縮装置100は、変換行列104を圧縮する。圧縮装置100は、例えば、変換行列104の列を、先頭から順次選択し、非零要素のある列であれば「1」を出力し、非零要素のない列であれば「0」を出力する。次に、圧縮装置100は、非零要素のある列の各成分を出力する。結果として、圧縮装置100は、第1の圧縮データ106「110011011100」を出力する。 For example, the compression apparatus 100 divides the component matrix 103 into a transformation matrix 104 obtained by converting non-zero elements of the component matrix 103 into “1” and a numerical sequence 105 obtained by extracting non-zero elements of the component matrix 103. Here, the compression apparatus 100 compresses the transformation matrix 104. For example, the compression apparatus 100 sequentially selects the columns of the transformation matrix 104 from the top, and outputs “1” if there are non-zero elements, and outputs “0” if there are no non-zero elements. To do. Next, the compression apparatus 100 outputs each component of a column having non-zero elements. As a result, the compression apparatus 100 outputs the first compressed data 106 “110011011100”.
 一方で、圧縮装置100は、数列105を圧縮する。圧縮装置100は、例えば、数列105の各成分を5bitで表現して出力する。5bitのうち、先頭の1bitは正負の符号を示し、残余の4bitは各成分の絶対値の2進数表現を示す。結果として、圧縮装置100は、第2の圧縮データ107「0101100100000111001010001」を出力する。そして、圧縮装置100は、第1の圧縮データ106と第2の圧縮データ107とを結合した第3の圧縮データ108を、画像データの圧縮結果として出力する。 On the other hand, the compression apparatus 100 compresses the sequence 105. For example, the compression apparatus 100 expresses each component of the sequence 105 with 5 bits and outputs it. Of the 5 bits, the first 1 bit indicates a positive or negative sign, and the remaining 4 bits indicate a binary representation of the absolute value of each component. As a result, the compression apparatus 100 outputs the second compressed data 107 “0101100100000111001010001”. Then, the compression apparatus 100 outputs the third compressed data 108 obtained by combining the first compressed data 106 and the second compressed data 107 as the compression result of the image data.
 これにより、圧縮装置100は、ブロック102を示す画像データを圧縮して、成分行列103のうちの非零要素がある位置を示す情報と、成分行列103のうちの非零要素を抽出した数列105と、を含む圧縮データを作成することができる。このため、圧縮装置100は、圧縮データの中で、成分行列103に含まれる零要素の表現に用いられるデータ量を低減して、圧縮効率を向上させることができる。 As a result, the compression apparatus 100 compresses the image data representing the block 102 and extracts the information 105 indicating the position of the non-zero element in the component matrix 103 and the sequence 105 obtained by extracting the non-zero element in the component matrix 103. Can be created. For this reason, the compression apparatus 100 can reduce the amount of data used for expressing the zero elements included in the component matrix 103 in the compressed data, and improve the compression efficiency.
 また、圧縮装置100は、ブロック102を示す画像データを、成分行列103のうちの非零要素がある位置を示す情報と、成分行列103のうちの非零要素を抽出した数列105と、で表現する。このため、圧縮装置100は、成分行列103に含まれる高周波の周波数成分を示す要素が非零要素である場合などのように、成分行列103に含まれる非零要素の位置に偏りがない場合であっても、圧縮率を向上させることができる。 In addition, the compression apparatus 100 expresses the image data indicating the block 102 as information indicating a position where the non-zero element in the component matrix 103 is present and a sequence 105 obtained by extracting the non-zero element in the component matrix 103. To do. For this reason, the compression apparatus 100 is used when the position of the non-zero element included in the component matrix 103 is not biased, such as when the element indicating the high frequency component included in the component matrix 103 is a non-zero element. Even if it exists, a compression rate can be improved.
 結果として、圧縮装置100は、例えば、JPEG(Joint Photographic Experts Group)に比べて、画像データの圧縮時間を短縮するとともに圧縮率を向上させることができる。また、圧縮装置100は、圧縮率を向上させることができ、圧縮データのデータ量を低減することができるため、圧縮データを送信する場合には、送信時間を低減することができる。 As a result, the compression apparatus 100 can reduce the compression time of the image data and improve the compression rate, for example, compared to JPEG (Joint Photographic Experts Group). Moreover, since the compression apparatus 100 can improve the compression rate and can reduce the data amount of the compressed data, the transmission time can be reduced when transmitting the compressed data.
 ここで、圧縮装置100をリモートデスクトップ技術に適用した場合を例に挙げる。例えば、圧縮装置100の機能を有する第1の情報処理装置が自装置に表示された画像を圧縮して圧縮装置100の機能を有する第2の情報処理装置に送信し、第2の情報処理装置が圧縮データを受信して伸長する場合である。 Here, a case where the compression apparatus 100 is applied to remote desktop technology will be described as an example. For example, the first information processing apparatus having the function of the compression apparatus 100 compresses the image displayed on the own apparatus and transmits the compressed image to the second information processing apparatus having the function of the compression apparatus 100, and the second information processing apparatus Is a case where compressed data is received and decompressed.
 以下の説明では、第1の情報処理装置が自装置に表示された画像を圧縮して第2の情報処理装置に送信し、第2の情報処理装置が圧縮データを受信して伸長する処理を「リモートデスクトップ処理」と表記する場合がある。この場合、圧縮装置100は、JPEGと比べて、圧縮時間を低減しつつ送信時間を削減することができるため、リモートデスクトップ処理の全体にかかる時間を低減することができる。 In the following description, a process in which the first information processing apparatus compresses an image displayed on the own apparatus and transmits the compressed image to the second information processing apparatus, and the second information processing apparatus receives and decompresses the compressed data. Sometimes referred to as “remote desktop processing”. In this case, since the compression apparatus 100 can reduce the transmission time while reducing the compression time as compared with JPEG, the time required for the entire remote desktop processing can be reduced.
 ここでは、圧縮装置100が、成分行列103のうちの非零要素がある位置を示す情報と、成分行列103のうちの非零要素を抽出した数列105と、を含む圧縮データを作成する場合について説明したが、これに限らない。例えば、圧縮装置100は、成分行列103のうちの閾値以上の非零要素がある位置を示す情報と、成分行列103のうちの閾値以上の非零要素を抽出した数列と、を含む圧縮データを作成してもよい。以下の説明では、成分行列103のうちの閾値以上の非零要素がある位置を示す情報と、成分行列103のうちの閾値以上の非零要素を抽出した数列と、を含む圧縮データを作成する、圧縮装置100の動作を「第1の動作」と表記する場合がある。 Here, a case where the compression apparatus 100 creates compressed data including information indicating a position where a non-zero element in the component matrix 103 is present and a sequence 105 obtained by extracting the non-zero element in the component matrix 103. Although explained, it is not limited to this. For example, the compression apparatus 100 includes compressed data including information indicating a position where there is a non-zero element equal to or greater than the threshold in the component matrix 103 and a numerical sequence obtained by extracting the non-zero element equal to or greater than the threshold in the component matrix 103. You may create it. In the following description, compressed data including information indicating a position where there is a non-zero element equal to or higher than the threshold in the component matrix 103 and a numerical sequence obtained by extracting the non-zero element equal to or higher than the threshold in the component matrix 103 is generated. The operation of the compression apparatus 100 may be referred to as a “first operation”.
 ここでは、圧縮装置100が、画像101内の1つのブロック102を示す画像データを圧縮する場合について説明したが、これに限らない。例えば、圧縮装置100は、画像101内の複数のブロックを示す画像データを纏めて圧縮してもよい。以下の説明では、画像101内の複数のブロックを纏めて圧縮する、圧縮装置100の動作を「第2の動作」と表記する場合がある。 Here, although the case where the compression apparatus 100 compresses image data indicating one block 102 in the image 101 has been described, the present invention is not limited to this. For example, the compression apparatus 100 may collectively compress image data indicating a plurality of blocks in the image 101. In the following description, the operation of the compression apparatus 100 that collectively compresses a plurality of blocks in the image 101 may be referred to as a “second operation”.
 また、ここでは、圧縮装置100が、画像101内のブロック102に含まれる画素の画素値を示す画像データを圧縮する場合について説明したが、これに限らない。例えば、圧縮装置100は、画像101内のブロック102に含まれる画素の画素値を、隣接ブロックに含まれる画素の画素値の平均値からの差分で表現した画像データを圧縮してもよい。以下の説明では、画像101内のブロック102に含まれる画素の画素値を、隣接ブロックに含まれる画素の画素値の平均値からの差分で表現した画像データを圧縮する、圧縮装置100の動作を「第3の動作」と表記する場合がある。 Further, here, the case where the compression apparatus 100 compresses the image data indicating the pixel values of the pixels included in the block 102 in the image 101 has been described, but the present invention is not limited to this. For example, the compression apparatus 100 may compress image data in which the pixel value of the pixel included in the block 102 in the image 101 is expressed by a difference from the average value of the pixel value of the pixel included in the adjacent block. In the following description, the operation of the compression apparatus 100 that compresses the image data in which the pixel value of the pixel included in the block 102 in the image 101 is expressed by the difference from the average value of the pixel value of the pixel included in the adjacent block is described. Sometimes referred to as “third operation”.
(圧縮装置100のハードウェア構成例)
 図2は、圧縮装置100のハードウェア構成例を示すブロック図である。
(Example of hardware configuration of compression apparatus 100)
FIG. 2 is a block diagram illustrating a hardware configuration example of the compression device 100.
 図2において、圧縮装置100は、CPU(Central Processing Unit)201と、ROM(Read Only Memory)202と、RAM(Random Access Memory)203と、磁気ディスクドライブ(Hard Disk Drive)204と、磁気ディスク205と、光ディスクドライブ206と、光ディスク207と、ディスプレイ208と、インターフェース(I/F:Interface)209と、キーボード210と、マウス211と、スキャナ212と、プリンタ213と、を備えている。また、各構成部はバス200によってそれぞれ接続されている。 In FIG. 2, the compression apparatus 100 includes a CPU (Central Processing Unit) 201, a ROM (Read Only Memory) 202, a RAM (Random Access Memory) 203, a magnetic disk drive (Hard Disk Drive) 204, and a magnetic disk 205. An optical disk drive 206, an optical disk 207, a display 208, an interface (I / F: Interface) 209, a keyboard 210, a mouse 211, a scanner 212, and a printer 213. Each component is connected by a bus 200.
 ここで、CPU201は、圧縮装置100の全体の制御を司る。ROM202は、ブートプログラムなどのプログラムを記憶している。RAM203は、CPU201のワークエリアとして使用される。磁気ディスクドライブ204は、CPU201の制御にしたがって磁気ディスク205に対するデータのリード/ライトを制御する。磁気ディスク205は、磁気ディスクドライブ204の制御で書き込まれたデータを記憶する。 Here, the CPU 201 governs overall control of the compression apparatus 100. The ROM 202 stores a program such as a boot program. The RAM 203 is used as a work area for the CPU 201. The magnetic disk drive 204 controls reading / writing of data with respect to the magnetic disk 205 according to the control of the CPU 201. The magnetic disk 205 stores data written under the control of the magnetic disk drive 204.
 光ディスクドライブ206は、CPU201の制御にしたがって光ディスク207に対するデータのリード/ライトを制御する。光ディスク207は、光ディスクドライブ206の制御で書き込まれたデータを記憶したり、光ディスク207に記憶されたデータをコンピュータに読み取らせたりする。 The optical disc drive 206 controls reading / writing of data with respect to the optical disc 207 according to the control of the CPU 201. The optical disk 207 stores data written under the control of the optical disk drive 206, or causes the computer to read data stored on the optical disk 207.
 ディスプレイ208は、カーソル、アイコンあるいはツールボックスをはじめ、文書、画像、機能情報などのデータを表示する。このディスプレイ208は、例えば、液晶ディスプレイ、プラズマディスプレイなどを採用することができる。 The display 208 displays data such as a document, an image, and function information as well as a cursor, an icon, or a tool box. As this display 208, for example, a liquid crystal display, a plasma display, or the like can be adopted.
 I/F209は、通信回線を通じてLAN(Local Area Network)、WAN(Wide Area Network)、インターネットなどのネットワーク214に接続され、このネットワーク214を介して他の装置に接続される。そして、I/F209は、ネットワーク214と内部のインターフェースを司り、外部装置からのデータの入出力を制御する。I/F209には、例えば、モデムやLANアダプタなどを採用することができる。 The I / F 209 is connected to a network 214 such as a LAN (Local Area Network), a WAN (Wide Area Network), or the Internet through a communication line, and is connected to another device via the network 214. The I / F 209 controls an internal interface with the network 214 and controls data input / output from an external device. For example, a modem or a LAN adapter may be employed as the I / F 209.
 キーボード210は、文字、数字、各種指示などの入力のためのキーを備え、データの入力をおこなう。また、タッチパネル式の入力パッドやテンキーなどであってもよい。マウス211は、カーソルの移動や範囲選択、あるいはウィンドウの移動やサイズの変更などをおこなう。ポインティングデバイスとして同様に機能を備えるものであれば、トラックボールやジョイスティックなどであってもよい。 The keyboard 210 includes keys for inputting characters, numbers, various instructions, and the like, and inputs data. Moreover, a touch panel type input pad or a numeric keypad may be used. The mouse 211 performs cursor movement, range selection, window movement, size change, and the like. A trackball or a joystick may be used as long as they have the same function as a pointing device.
 スキャナ212は、画像を光学的に読み取り、圧縮装置100内に画像データを取り込む。なお、スキャナ212は、OCR(Optical Character Reader)機能を持たせてもよい。また、プリンタ213は、画像データや文書データを印刷する。プリンタ213には、例えば、レーザプリンタやインクジェットプリンタを採用することができる。なお、光ディスクドライブ206、光ディスク207、ディスプレイ208、キーボード210、マウス211、スキャナ212、およびプリンタ213の少なくともいずれか1つは、なくてもよい。 The scanner 212 optically reads an image and takes in the image data into the compression apparatus 100. The scanner 212 may have an OCR (Optical Character Reader) function. The printer 213 prints image data and document data. As the printer 213, for example, a laser printer or an ink jet printer can be adopted. Note that at least one of the optical disk drive 206, the optical disk 207, the display 208, the keyboard 210, the mouse 211, the scanner 212, and the printer 213 may be omitted.
(圧縮装置100の機能的構成例)
 次に、図3を用いて、圧縮装置100の機能的構成例について説明する。
(Functional configuration example of the compression device 100)
Next, a functional configuration example of the compression device 100 will be described with reference to FIG.
 図3は、圧縮装置100の機能的構成例を示すブロック図である。圧縮装置100は、算出部301と、取得部302と、作成部303と、抽出部304と、出力部305と、復号部306と、を含む。 FIG. 3 is a block diagram illustrating a functional configuration example of the compression apparatus 100. The compression apparatus 100 includes a calculation unit 301, an acquisition unit 302, a creation unit 303, an extraction unit 304, an output unit 305, and a decoding unit 306.
 算出部301と、取得部302と、作成部303と、抽出部304と、出力部305と、復号部306とは、具体的には、例えば、図2に示したROM202、RAM203、磁気ディスク205、光ディスク207などの記憶装置に記憶されたプログラムをCPU201に実行させることにより、または、I/F209により、その機能を実現する。 Specifically, the calculation unit 301, the acquisition unit 302, the creation unit 303, the extraction unit 304, the output unit 305, and the decryption unit 306 are, for example, the ROM 202, the RAM 203, and the magnetic disk 205 illustrated in FIG. The function is realized by causing the CPU 201 to execute a program stored in a storage device such as the optical disk 207 or by the I / F 209.
 算出部301は、画像を示す複数の画素値を周波数分解して各々の空間周波数成分を算出する。ここで、画像とは、例えば、図1に示した画像101であってもよいし、図1に示した画像101内のブロック102であってもよい。算出部301は、例えば、DCTにより各々の空間周波数成分を算出する。算出部301は、具体的には、下記式(1)により、画像101内のブロック102を示す8×8の画素の画素値p(i,j)から、周波数成分P(μ,ν)を算出する。 The calculation unit 301 performs frequency decomposition on a plurality of pixel values indicating an image to calculate each spatial frequency component. Here, the image may be, for example, the image 101 shown in FIG. 1 or the block 102 in the image 101 shown in FIG. The calculation unit 301 calculates each spatial frequency component by DCT, for example. Specifically, the calculation unit 301 calculates the frequency component P (μ, ν) from the pixel value p (i, j) of the 8 × 8 pixel indicating the block 102 in the image 101 by the following equation (1). calculate.
 P(μ,ν)=(1/4)C(μ)C(ν)Σi=0 7Σj=0 7{p(i,j)cos((2i+1)μπ/16)cos((2j+1)νπ/16)}      ・・・(1) P (μ, ν) = ( 1/4) C (μ) C (ν) Σ i = 0 7 Σ j = 0 7 {p (i, j) cos ((2i + 1) μπ / 16) cos ((2j + 1 ) Vπ / 16)} (1)
 ここで、i、j、μ、νは、各々、0~7の自然数である。C(μ)は、μ=0のとき(1/√2)、μ≠0のとき1である。C(ν)は、ν=0のとき(1/√2)、ν≠0のとき1である。 Here, i, j, μ, and ν are natural numbers of 0 to 7, respectively. C (μ) is 1 when μ = 0 (1 / √2), and 1 when μ ≠ 0. C (ν) is 1 when ν = 0 (1 / √2), and 1 when ν ≠ 0.
 ここでは、算出部301がDCTにより空間周波数成分を算出する場合を例に挙げたが、これに限らない。例えば、算出部301は、ウェーブレット変換により空間周波数成分を算出してもよいし、アダマール変換により空間周波数成分を算出してもよい。 Here, the case where the calculation unit 301 calculates the spatial frequency component by DCT is taken as an example, but the present invention is not limited to this. For example, the calculation unit 301 may calculate a spatial frequency component by wavelet transformation or may calculate a spatial frequency component by Hadamard transformation.
 また、算出部301は、画像に隣接する他の画像を示す複数の画素値のうちのいずれかの画素値に基づく基準値を算出し、基準値と画像を示す複数の画素値の各々の画素値との差分を算出し、差分を周波数分解して各々の空間周波数成分を算出してもよい。ここで、隣接する他の画像とは、例えば、図1に示した画像101内のブロック102に隣接する他のブロックである。以下の説明では、基準値と画像を示す複数の画素値の各々の画素値との差分を示すデータを「差分データ」と表記する場合がある。 In addition, the calculation unit 301 calculates a reference value based on one of a plurality of pixel values indicating another image adjacent to the image, and each pixel of the reference value and the plurality of pixel values indicating the image Each spatial frequency component may be calculated by calculating a difference from the value and frequency-decomposing the difference. Here, the other adjacent image is, for example, another block adjacent to the block 102 in the image 101 shown in FIG. In the following description, data indicating a difference between a reference value and each pixel value of a plurality of pixel values indicating an image may be referred to as “difference data”.
 算出部301は、具体的には、画像101内のブロック102に隣接する他のブロックを示す複数の画素値のうち、ブロック102に隣接する画素の画素値の平均値を、基準値として算出する。次に、算出部301は、画像101内のブロック102を示す画像データに含まれる複数の画素値の各々の画素値から基準値を減算して、差分データを作成する。そして、算出部301は、差分データに含まれる複数の差分の各々の差分を、上記式(1)のp(i,j)として代入することにより、周波数成分P(μ,ν)を算出する。算出部301が差分を算出して周波数分解して各々の空間周波数成分を算出する場合の処理については、図7を用いて後述する。 Specifically, the calculation unit 301 calculates, as a reference value, an average value of pixel values of pixels adjacent to the block 102 among a plurality of pixel values indicating other blocks adjacent to the block 102 in the image 101. . Next, the calculation unit 301 creates difference data by subtracting a reference value from each pixel value of a plurality of pixel values included in the image data indicating the block 102 in the image 101. Then, the calculation unit 301 calculates the frequency component P (μ, ν) by substituting each of the plurality of differences included in the difference data as p (i, j) in the above formula (1). . Processing when the calculation unit 301 calculates a difference and frequency-decomposes to calculate each spatial frequency component will be described later with reference to FIG.
 また、算出部301は、各々の空間周波数成分を量子化した値を算出してもよい。算出部301は、例えば、量子化により、連続量である空間周波数成分を離散値に近似した値を算出する。ここで、量子化は、従来技術であるため、説明を省略する。算出結果は、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。これにより、算出部301は、画像データから得られた空間周波数成分を要素とする行列、差分データから得られた空間周波数成分を要素とする行列、または空間周波数成分を量子化した値を要素とする行列に含まれる各々の要素を算出することができる。 Also, the calculation unit 301 may calculate a value obtained by quantizing each spatial frequency component. For example, the calculation unit 301 calculates a value obtained by approximating a spatial frequency component, which is a continuous quantity, to a discrete value by quantization. Here, since quantization is a conventional technique, description thereof is omitted. The calculation result is stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207, for example. Thereby, the calculation unit 301 uses a matrix having the spatial frequency component obtained from the image data as an element, a matrix having the spatial frequency component obtained from the difference data as an element, or a value obtained by quantizing the spatial frequency component as an element. Each element included in the matrix to be calculated can be calculated.
 取得部302は、画像を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする行列を取得する。ここで、行列は、N行M列の行列である。行列は、1行の行列であってもよいし、1列の行列であってもよい。取得部302は、例えば、算出部301によって算出された各々の空間周波数成分を要素とする行列を取得する。取得部302は、具体的には、算出部301がDCTによって算出した各々の空間周波数成分を要素とするDCT行列を取得する。 The acquisition unit 302 acquires a matrix having each spatial frequency component of a plurality of spatial frequency components representing an image as an element. Here, the matrix is a matrix of N rows and M columns. The matrix may be a one-row matrix or a one-column matrix. For example, the acquisition unit 302 acquires a matrix having each spatial frequency component calculated by the calculation unit 301 as an element. Specifically, the acquisition unit 302 acquires a DCT matrix having each spatial frequency component calculated by the calculation unit 301 by DCT as an element.
 また、取得部302は、画像を表現する複数の空間周波数成分の各々の空間周波数成分を量子化した値を要素とする行列を取得してもよい。取得部302は、例えば、算出部301によって算出された量子化した値を要素とする行列を取得する。量子化した値を要素とする行列とは、例えば、図1に示した画像101内のブロック102を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする成分行列103である。 Further, the acquisition unit 302 may acquire a matrix whose elements are values obtained by quantizing each spatial frequency component of a plurality of spatial frequency components representing an image. For example, the acquisition unit 302 acquires a matrix having the quantized value calculated by the calculation unit 301 as an element. The matrix whose elements are quantized values is, for example, the component matrix 103 whose elements are the spatial frequency components of a plurality of spatial frequency components representing the block 102 in the image 101 shown in FIG.
 また、取得部302は、複数の画像の各々の画像を表現する複数の空間周波数成分の各々の空間周波数成分を、行または列の要素とする行列を取得する。取得部302は、例えば、α個のブロックのうちのx番目のブロックについて算出部301によって算出された各々の空間周波数成分を、x番目の行の要素とする行列を取得する。ここで、αは自然数、xは1~αの自然数である。 Also, the acquisition unit 302 acquires a matrix having each spatial frequency component of a plurality of spatial frequency components representing each of the plurality of images as a row or column element. The acquisition unit 302 acquires, for example, a matrix having each spatial frequency component calculated by the calculation unit 301 for the x-th block among α blocks as elements in the x-th row. Here, α is a natural number, and x is a natural number of 1 to α.
 取得部302が、複数の画像101の各々の画像101を表現する複数の空間周波数成分の各々の空間周波数成分を、行または列の要素とする行列を取得する場合の処理については、図5および図6を用いて後述する。取得されたデータは、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。これにより、取得部302は、圧縮対象となる画像データから得られた行列を取得することができる。 The processing in the case where the acquisition unit 302 acquires a matrix having the spatial frequency components of the plurality of spatial frequency components representing the images 101 of the plurality of images 101 as row or column elements is shown in FIG. This will be described later with reference to FIG. The acquired data is stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207, for example. Thereby, the acquisition unit 302 can acquire a matrix obtained from image data to be compressed.
 作成部303は、取得部302によって取得された行列の要素のうちの値が零ではない非零要素がある位置を示す情報を作成する。作成部303は、例えば、取得部302によって取得された行列のうちの非零要素がある行または列の位置と、行列のうちの非零要素がある行または列のうちの非零要素がある位置と、を示す情報を作成する。 The creation unit 303 creates information indicating a position where there is a non-zero element whose value is not zero among the elements of the matrix acquired by the acquisition unit 302. The creation unit 303 has, for example, the position of a row or column having a non-zero element in the matrix acquired by the acquisition unit 302 and the non-zero element in a row or column having a non-zero element in the matrix. Information indicating the position is created.
 作成部303は、具体的には、図1に示した成分行列103から、非零要素がある列を示すデータ「1100」と、非零要素がある列において非零要素がある位置を示すデータ「11011100」と、を作成する。次に、作成部303は、作成したデータを結合して、第1の圧縮データ106「110011011100」を作成する。 Specifically, the creation unit 303 generates, from the component matrix 103 illustrated in FIG. 1, data “1100” indicating a column with a non-zero element and data indicating a position with a non-zero element in a column with a non-zero element. “11011100” is created. Next, the creation unit 303 creates the first compressed data 106 “110011011100” by combining the created data.
 また、作成部303は、行列の要素のうちの絶対値が閾値以上となる非零要素がある位置を示す情報を作成してもよい。作成部303は、例えば、行列のうちの絶対値が閾値以上となる非零要素がある行または列の各々の要素と、行列のうちの絶対値が閾値以上となる非零要素がある行または列の位置と、を示す情報を作成する。 Also, the creation unit 303 may create information indicating a position where there is a non-zero element whose absolute value is greater than or equal to a threshold value among the elements of the matrix. The creation unit 303, for example, each row or column element having a non-zero element whose absolute value is greater than or equal to a threshold in the matrix and each row or column having a non-zero element whose absolute value is greater than or equal to the threshold. Information indicating the position of the column is created.
 作成部303が行列の要素のうちの絶対値が閾値以上となる非零要素がある位置を示す情報を作成する場合の処理については、図4を用いて後述する。作成されたデータは、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。これにより、作成部303は、取得部302によって取得された行列を圧縮した圧縮データの一部となるデータを作成することができる。 The processing in the case where the creation unit 303 creates information indicating a position where there is a non-zero element whose absolute value is greater than or equal to the threshold value among the elements of the matrix will be described later with reference to FIG. The created data is stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207, for example. Thereby, the creation unit 303 can create data that is a part of the compressed data obtained by compressing the matrix obtained by the obtaining unit 302.
 抽出部304は、行列の要素のうちの非零要素を所定順序で抽出する。抽出部304は、例えば、行列をラスタスキャンして非零要素を抽出する。また、抽出部304は、例えば、行列をジグザグスキャンして非零要素を抽出してもよいし、行列をオルタネートスキャンして非零要素を抽出してもよい。 The extraction unit 304 extracts non-zero elements from the matrix elements in a predetermined order. For example, the extraction unit 304 raster-scans the matrix to extract non-zero elements. For example, the extraction unit 304 may extract a non-zero element by performing a zigzag scan of the matrix, or may extract a non-zero element by performing an alternate scan of the matrix.
 抽出部304は、具体的には、図1に示した成分行列103をラスタスキャンして、11,4,3,-2,-1を抽出する。次に、抽出部304は、抽出した要素の数列105を示す、各々の要素を5ビットで表現した第2の圧縮データ107「0101100100000111001010001」を作成する。 Specifically, the extraction unit 304 raster scans the component matrix 103 shown in FIG. 1 to extract 11, 4, 3, -2, and -1. Next, the extraction unit 304 creates second compressed data 107 “0101100100000111001010001” that represents the sequence 105 of the extracted elements and expresses each element with 5 bits.
 また、上述したように、作成部303によって行列の要素のうちの絶対値が閾値以上となる非零要素がある位置を示す情報を作成される場合がある。この場合には、抽出部304は、行列の要素のうちの絶対値が閾値以上となる非零要素を所定順序で抽出する。抽出部304は、例えば、行列をラスタスキャンして、絶対値が閾値以上となる非零要素を抽出する。 Also, as described above, the creation unit 303 may create information indicating a position where there is a non-zero element whose absolute value is greater than or equal to a threshold value. In this case, the extraction unit 304 extracts non-zero elements whose absolute value is greater than or equal to the threshold value from the matrix elements in a predetermined order. For example, the extraction unit 304 raster scans the matrix and extracts non-zero elements whose absolute value is equal to or greater than a threshold value.
 抽出されたデータは、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。これにより、抽出部304は、行列を圧縮した圧縮データの一部となる数列105を作成することができる。 The extracted data is stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207, for example. Thereby, the extraction unit 304 can create the sequence 105 that becomes a part of the compressed data obtained by compressing the matrix.
 ここでは、作成部303の処理と抽出部304の処理とを順番に説明したが、作成部303の処理と抽出部304の処理とはどちらが先に実行されてもよい。また、作成部303の処理と抽出部304の処理とは並列に実行されてもよい。 Here, the process of the creation unit 303 and the process of the extraction unit 304 are described in order, but either the process of the creation unit 303 or the process of the extraction unit 304 may be executed first. Further, the process of the creation unit 303 and the process of the extraction unit 304 may be executed in parallel.
 出力部305は、作成部303によって作成された情報と、抽出部304によって抽出された非零要素の数列105と、を対応付けて出力する。出力部305は、例えば、作成部303によって作成された第1の圧縮データ106「110011011100」と、抽出部304によって作成された第2の圧縮データ107「0101100100000111001010001」と、を結合する。そして、出力部305は、結合結果となる第3の圧縮データ108「1100110111000101100100000111001010001」を出力する。 The output unit 305 outputs the information created by the creating unit 303 and the sequence of non-zero elements 105 extracted by the extracting unit 304 in association with each other. For example, the output unit 305 combines the first compressed data 106 “110011011100” created by the creating unit 303 and the second compressed data 107 “0101100100000111001010001” created by the extracting unit 304. Then, the output unit 305 outputs the third compressed data 108 “1100110111000101100100000111001010001” that is the combined result.
 出力形式としては、例えば、ディスプレイ208への表示、プリンタ213への印刷出力、I/F209による外部装置への送信がある。また、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶することとしてもよい。これにより、出力部305は、画像データの圧縮結果を圧縮装置100の利用者に通知することができる。 The output format includes, for example, display on the display 208, print output to the printer 213, and transmission to an external device via the I / F 209. Alternatively, the data may be stored in a storage area such as the RAM 203, the magnetic disk 205, and the optical disk 207. Thereby, the output unit 305 can notify the user of the compression apparatus 100 of the compression result of the image data.
 復号部306は、作成部303によって作成された情報と抽出部304によって抽出された非零要素の数列105とに基づいて、画像101を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする行列を復号する。 Based on the information created by the creation unit 303 and the sequence 105 of non-zero elements extracted by the extraction unit 304, the decoding unit 306 converts each spatial frequency component of the plurality of spatial frequency components representing the image 101 into element Is decoded.
 復号部306は、例えば、画像101内のブロック102を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする成分行列103と同一の大きさの行列を作成する。次に、復号部306は、作成した行列のうちの、作成部303によって作成された情報が示す位置に所定順序に従って数列105に含まれる非零要素を設定する。また、復号部306は、同一の大きさの行列のうちの、作成部303によって作成された情報が示す位置を除いた残余の位置に値が零である零要素を設定する。 The decoding unit 306 creates, for example, a matrix having the same size as the component matrix 103 whose elements are the spatial frequency components of the plurality of spatial frequency components representing the block 102 in the image 101. Next, the decoding unit 306 sets a non-zero element included in the sequence 105 according to a predetermined order at the position indicated by the information created by the creation unit 303 in the created matrix. In addition, the decoding unit 306 sets a zero element having a value of zero at the remaining position of the same-size matrix excluding the position indicated by the information created by the creation unit 303.
 復号結果は、例えば、RAM203、磁気ディスク205、光ディスク207などの記憶領域に記憶される。これにより、復号部306は、画像を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする行列を復号する。 The decryption result is stored in a storage area such as the RAM 203, the magnetic disk 205, or the optical disk 207, for example. As a result, the decoding unit 306 decodes a matrix whose elements are the spatial frequency components of the plurality of spatial frequency components representing the image.
(第1の動作の一例)
 次に、図4を用いて、第1の動作の一例について説明する。
(Example of first operation)
Next, an example of the first operation will be described with reference to FIG.
 図4は、第1の動作の一例を示す説明図である。図4において、まず、圧縮装置100は、成分行列103の各々の要素の絶対値と、閾値行列401の各々の要素と、を比較する。次に、圧縮装置100は、成分行列103から、成分行列103のうちの絶対値が閾値以上となる非零要素を「1」に変換し、成分行列103のうちの絶対値が閾値より小さくなる要素を「0」に変換した変換行列402を作成する。また、圧縮装置100は、成分行列103から、成分行列103のうちの絶対値が閾値以上となる非零要素を抽出した数列403を作成する。 FIG. 4 is an explanatory diagram showing an example of the first operation. In FIG. 4, first, the compression apparatus 100 compares the absolute value of each element of the component matrix 103 with each element of the threshold matrix 401. Next, the compression apparatus 100 converts, from the component matrix 103, a non-zero element in which the absolute value of the component matrix 103 is equal to or greater than the threshold value to “1”, and the absolute value of the component matrix 103 is smaller than the threshold value. A conversion matrix 402 in which elements are converted to “0” is created. In addition, the compression apparatus 100 creates a sequence 403 in which non-zero elements whose absolute value is equal to or greater than a threshold value in the component matrix 103 are extracted from the component matrix 103.
 ここで、圧縮装置100は、変換行列402を圧縮する。圧縮装置100は、例えば、変換行列402の列を、先頭から順次選択し、非零要素のある列であれば「1」を出力し、非零要素のない列であれば「0」を出力する。次に、圧縮装置100は、非零要素のある列の各成分を出力する。結果として、圧縮装置100は、第1の圧縮データ404「110011001100」を出力する。 Here, the compression apparatus 100 compresses the transformation matrix 402. For example, the compression apparatus 100 sequentially selects the columns of the transformation matrix 402 from the top, and outputs “1” if there are non-zero elements, and outputs “0” if there are no non-zero elements. To do. Next, the compression apparatus 100 outputs each component of a column having non-zero elements. As a result, the compression apparatus 100 outputs the first compressed data 404 “11001101001”.
 一方で、圧縮装置100は、数列403を圧縮する。圧縮装置100は、例えば、数列403の各成分を5bitで表現して出力する。結果として、圧縮装置100は、第1の圧縮データ405「01011001000001110010」を出力する。そして、圧縮装置100は、第1の圧縮データ404と第1の圧縮データ405とを結合した第3の圧縮データ406を、画像データの圧縮結果として出力する。 On the other hand, the compression apparatus 100 compresses the sequence 403. For example, the compression apparatus 100 expresses each component of the sequence 403 in 5 bits and outputs it. As a result, the compression apparatus 100 outputs the first compressed data 405 “01011001000001110010”. Then, the compression apparatus 100 outputs the third compressed data 406 obtained by combining the first compressed data 404 and the first compressed data 405 as the image data compression result.
 これにより、圧縮装置100は、画像データを圧縮して、成分行列103のうちの非零要素がある位置を示す情報と、成分行列103のうちの非零要素を抽出した数列403と、を含む圧縮データを作成することができる。結果として、圧縮装置100は、例えば、JPEGに比べて、圧縮時間を短縮するとともに圧縮率を向上させることができる。 As a result, the compression apparatus 100 includes information indicating the position where the non-zero element in the component matrix 103 is present by compressing the image data, and a sequence 403 obtained by extracting the non-zero element in the component matrix 103. Compressed data can be created. As a result, the compression apparatus 100 can shorten the compression time and improve the compression rate as compared with, for example, JPEG.
 ここでは、閾値行列401の各々の要素は同一の値であったが、これに限らない。例えば、閾値行列401は、成分行列103の要素のうちの高周波の空間周波数成分を示す要素に関する閾値が、成分行列103の要素のうちの低周波の空間周波数成分を示す要素に関する閾値よりも大きい値である行列であってもよい。換言すれば、閾値行列401は、図4において、右下に近い要素が、左上に近い要素よりも大きい値である行列であってもよい。これにより、圧縮装置100は、変換行列402の要素のうちで、要素を表現するために用いるデータ量が相対的に少ない零要素を増やし、要素を表現するために用いるデータ量が相対的に多い非零要素を減らして、圧縮率を向上させることができる。 Here, each element of the threshold matrix 401 has the same value, but the present invention is not limited to this. For example, the threshold matrix 401 is a value in which the threshold for an element indicating a high-frequency spatial frequency component among the elements of the component matrix 103 is larger than the threshold for an element indicating a low-frequency spatial frequency component among the elements of the component matrix 103. May be a matrix. In other words, the threshold matrix 401 may be a matrix in which an element close to the lower right in FIG. 4 has a larger value than an element close to the upper left. As a result, the compression apparatus 100 increases the number of zero elements that are relatively small in the amount of data used to represent the elements among the elements of the transformation matrix 402, and the amount of data that is used to represent the elements is relatively large. The compression factor can be improved by reducing non-zero elements.
 ここで、ランレングス法を用いてラスタスキャンして画像データを圧縮した場合を例に挙げる。この場合、圧縮データは、「10001011100001001100001110010010011010001」となり、41ビットの圧縮データになる。一方で、圧縮装置100により圧縮された圧縮データは、上述した通り32ビットの圧縮データであって、ランレングス法を用いて圧縮した場合よりも圧縮率が向上する。 Here, a case where image data is compressed by raster scanning using the run-length method is taken as an example. In this case, the compressed data is “10001011100001001100001110010010011010001”, which is 41-bit compressed data. On the other hand, the compressed data compressed by the compression apparatus 100 is 32-bit compressed data as described above, and the compression rate is improved as compared with the case of compression using the run length method.
 また、ランレングス法を用いてジグザグスキャンして画像データを圧縮した場合を例に挙げる。この場合、圧縮データは、「10001011100001001000001110110010010010001」となり、41ビットの圧縮データになる。一方で、圧縮装置100により圧縮された圧縮データは、上述した通り32ビットの圧縮データであって、ランレングス法を用いて圧縮した場合よりも圧縮率が向上する。 Also, the case where image data is compressed by zigzag scanning using the run length method will be described as an example. In this case, the compressed data is “10001011100001001000001110110010010010001”, which is 41-bit compressed data. On the other hand, the compressed data compressed by the compression apparatus 100 is 32-bit compressed data as described above, and the compression rate is improved as compared with the case of compression using the run length method.
 また、ハフマン符号を用いて画像データを圧縮した場合を例に挙げる。この場合、圧縮データは、「10111000101110001000010010011000001111010010110010110101010010001110001110101」となり、77ビットの圧縮データになる。一方で、圧縮装置100により圧縮された圧縮データは、上述した通り32ビットの圧縮データであって、ハフマン符号を用いて圧縮した場合よりも圧縮率が向上する。 In addition, a case where image data is compressed using a Huffman code is taken as an example. In this case, the compressed data is “10111000101110001000010010011000001111010010110010110101010010001110001110101”, which is 77-bit compressed data. On the other hand, the compressed data compressed by the compression apparatus 100 is 32-bit compressed data as described above, and the compression rate is improved as compared with the case where compression is performed using a Huffman code.
(第2の動作の一例)
 次に、図5および図6を用いて、第2の動作の一例について説明する。
(Example of second operation)
Next, an example of the second operation will be described with reference to FIGS. 5 and 6.
 図5は、第2の動作において圧縮対象となる第1~第4の成分行列501~504の一例を示す説明図である。図5に示すように、第1~第4の成分行列501~504は、各々、4×4の空間周波数成分を含む。 FIG. 5 is an explanatory diagram showing an example of the first to fourth component matrices 501 to 504 to be compressed in the second operation. As shown in FIG. 5, the first to fourth component matrices 501 to 504 each include 4 × 4 spatial frequency components.
 図6は、図5に示した第1~第4の成分行列501~504の圧縮例を示す説明図である。図6において、まず、圧縮装置100は、第1~第4の成分行列501~504を含む成分行列601を作成する。 FIG. 6 is an explanatory diagram showing a compression example of the first to fourth component matrices 501 to 504 shown in FIG. In FIG. 6, first, the compression apparatus 100 creates a component matrix 601 including first to fourth component matrices 501 to 504.
 圧縮装置100は、例えば、第1の成分行列501に含まれる空間周波数成分を、ラスタ順に選択して、成分行列601の1行目として配列する。また、圧縮装置100は、同様に、第2~4の成分行列502~504に含まれる空間周波数成分を、ラスタ順に選択して、各々、成分行列601の2~4行目として配列する。これにより、圧縮装置100は、第1~第4の成分行列501~504を含む成分行列601を作成する。 For example, the compression apparatus 100 selects the spatial frequency components included in the first component matrix 501 in raster order and arranges them as the first row of the component matrix 601. Similarly, the compression apparatus 100 selects the spatial frequency components included in the second to fourth component matrices 502 to 504 in raster order and arranges them as the second to fourth rows of the component matrix 601, respectively. Accordingly, the compression apparatus 100 creates a component matrix 601 including the first to fourth component matrices 501 to 504.
 次に、圧縮装置100は、作成した成分行列601を圧縮する。圧縮装置100は、例えば、成分行列601の列を、先頭から順次選択し、非零要素のある列であれば「1」を出力し、非零要素のない列であれば「0」を出力する。結果として、圧縮装置100は、第1の圧縮データ602「1100110000001100」を出力する。次に、圧縮装置100は、非零要素のある列の各要素を、非零要素を1に置換してから出力する。結果として、圧縮装置100は、第2の圧縮データ603「111111101111101111010101」を出力する。 Next, the compression apparatus 100 compresses the created component matrix 601. For example, the compression apparatus 100 sequentially selects the columns of the component matrix 601 from the top, and outputs “1” if there are non-zero elements, and outputs “0” if there are no non-zero elements. To do. As a result, the compression apparatus 100 outputs the first compressed data 602 “1100110000001100”. Next, the compression apparatus 100 outputs each element in a column having non-zero elements after replacing the non-zero elements with 1. As a result, the compression apparatus 100 outputs the second compressed data 603 “111111101111101111010101”.
 一方で、圧縮装置100は、作成した成分行列601から非零要素を抽出した数列を圧縮する。圧縮装置100は、例えば、数列の各要素を5bitで表現して出力する。結果として、圧縮装置100は、第3の圧縮データ604「01011001000001110010100010100100001000111000100001010000001010001000100011110010100010000110001」を出力する。そして、圧縮装置100は、第1~第3の圧縮データ602~604を結合した第4の圧縮データ605を、圧縮結果として出力する。 On the other hand, the compression apparatus 100 compresses a sequence obtained by extracting non-zero elements from the created component matrix 601. For example, the compression device 100 outputs each element of the sequence by expressing it in 5 bits. As a result, the compression apparatus 100 outputs the third compressed data 604 “01011001000001110010100010100100001000111000100001010000001010001000100011110010100010000110001”. Then, the compression apparatus 100 outputs the fourth compressed data 605 obtained by combining the first to third compressed data 602 to 604 as the compression result.
 これにより、圧縮装置100は、成分行列501~504を各々圧縮した場合に比べて、零要素を表現するために用いるデータ量を低減して、圧縮データの圧縮率を向上させることができる。 As a result, the compression apparatus 100 can reduce the amount of data used to represent the zero elements and improve the compression ratio of the compressed data, as compared with the case where the component matrices 501 to 504 are respectively compressed.
 ここで、ランレングス法を用いてラスタスキャンして第1~第4の成分行列501~504を圧縮した場合を例に挙げる。この場合、圧縮データは、170ビットの圧縮データになる。一方で、圧縮装置100により圧縮された圧縮データは、上述した通り135ビットの圧縮データであって、ランレングス法を用いて圧縮した場合よりも圧縮率が向上する。 Here, a case where the first to fourth component matrices 501 to 504 are compressed by raster scan using the run length method will be described as an example. In this case, the compressed data is 170-bit compressed data. On the other hand, the compressed data compressed by the compression apparatus 100 is 135-bit compressed data as described above, and the compression rate is improved as compared with the case where compression is performed using the run length method.
 また、ランレングス法を用いてジグザグスキャンして第1~第4の成分行列501~504を圧縮した場合を例に挙げる。この場合、圧縮データは、170ビットの圧縮データになる。一方で、圧縮装置100により圧縮された圧縮データは、上述した通り135ビットの圧縮データであって、ランレングス法を用いて圧縮した場合よりも圧縮率が向上する。 Also, an example is given in which the first to fourth component matrices 501 to 504 are compressed by zigzag scanning using the run length method. In this case, the compressed data is 170-bit compressed data. On the other hand, the compressed data compressed by the compression apparatus 100 is 135-bit compressed data as described above, and the compression rate is improved as compared with the case where compression is performed using the run length method.
 また、ハフマン符号を用いて第1~第4の成分行列501~504を圧縮した場合を例に挙げる。この場合、圧縮データは、237ビットの圧縮データになる。一方で、圧縮装置100により圧縮された圧縮データは、上述した通り135ビットの圧縮データであって、ランレングス法を用いて圧縮した場合よりも圧縮率が向上する。ここでは、圧縮装置100は、4つの画像データを纏めて圧縮したが、これに限らない。例えば、圧縮装置100は、任意の個数の画像データを纏めて圧縮してもよい。 Also, an example in which the first to fourth component matrices 501 to 504 are compressed using the Huffman code will be described. In this case, the compressed data is 237-bit compressed data. On the other hand, the compressed data compressed by the compression apparatus 100 is 135-bit compressed data as described above, and the compression rate is improved as compared with the case where compression is performed using the run length method. Here, the compression apparatus 100 compresses the four image data together, but is not limited thereto. For example, the compression apparatus 100 may compress an arbitrary number of image data collectively.
(第3の動作の一例)
 次に、図7を用いて、第3の動作の一例について説明する。
(Example of third operation)
Next, an example of the third operation will be described with reference to FIG.
 図7は、第3の動作において圧縮対象となる画像データを示す説明図である。図7において、圧縮装置100は、画像700内のブロック701を示す画像データ702に含まれる画素値を、基準値からの差分により表現する差分データを作成する。 FIG. 7 is an explanatory diagram showing image data to be compressed in the third operation. In FIG. 7, the compression apparatus 100 creates difference data that expresses a pixel value included in image data 702 indicating a block 701 in an image 700 by a difference from a reference value.
 圧縮装置100は、例えば、画像700内のブロック701の上方に隣接する隣接ブロック703の画像データ704のうち、ブロック701に最も近い列にある各々の画素の画素値705を抽出する。また、圧縮装置100は、画像700内のブロック701の左方に隣接する隣接ブロック706を示す画像データ707のうち、ブロック701に最も近い行にある各々の画素値708を抽出する。 For example, the compression apparatus 100 extracts the pixel value 705 of each pixel in the column closest to the block 701 from the image data 704 of the adjacent block 703 adjacent above the block 701 in the image 700. Also, the compression apparatus 100 extracts each pixel value 708 in the row closest to the block 701 from the image data 707 indicating the adjacent block 706 adjacent to the left of the block 701 in the image 700.
 次に、圧縮装置100は、抽出した画素値705と画素値708との平均値を、ブロック701を示す画像データ702に含まれる画素値の基準値として算出する。そして、圧縮装置100は、ブロック701を示す画像データ702に含まれる画素値から、算出した標準値を減算して、差分データ709を作成する。 Next, the compression apparatus 100 calculates an average value of the extracted pixel value 705 and the pixel value 708 as a reference value of the pixel value included in the image data 702 indicating the block 701. Then, the compression apparatus 100 generates difference data 709 by subtracting the calculated standard value from the pixel value included in the image data 702 indicating the block 701.
 そして、圧縮装置100は、差分データを周波数分解して量子化して、量子化した値を要素とする成分行列を作成し、成分行列を圧縮する。ここで、成分行列の圧縮内容は、図4および図5を用いて説明した圧縮内容と同様のため、説明を省略する。これにより、圧縮装置100は、成分行列の要素のうちで、要素を表現するために用いるデータ量が相対的に少ない零要素を増やし、要素を表現するために用いるデータ量が相対的に多い非零要素を減らして、圧縮率を向上させることができる。ここでは、画素値の基準値として、平均値を算出したが、これに限らない。例えば、画素値の基準値として、最大値、最小値、または中央値などを算出してもよい。 Then, the compression apparatus 100 frequency-decomposes and quantizes the difference data, creates a component matrix having the quantized values as elements, and compresses the component matrix. Here, the compressed content of the component matrix is the same as the compressed content described with reference to FIGS. As a result, the compression apparatus 100 increases the number of zero elements that are relatively small in the amount of data used to represent the elements among the elements of the component matrix, and the amount of data that is used to represent the elements is relatively large. The compression factor can be improved by reducing the zero elements. Here, the average value is calculated as the reference value of the pixel value, but is not limited thereto. For example, the maximum value, the minimum value, or the median value may be calculated as the reference value of the pixel value.
 また、上述した第1~第3の動作は、組み合わせて実行されてもよい。例えば、圧縮装置100は、第2の動作のように複数の成分行列を含む成分行列を作成し、第1の動作のように閾値を用いて圧縮してもよい。また、例えば、圧縮装置100は、第3の動作のように基準値からの差分で表現された画像データを周波数分解した成分行列を、第1の動作のように閾値を用いて圧縮してもよい。 Further, the first to third operations described above may be executed in combination. For example, the compression apparatus 100 may create a component matrix including a plurality of component matrices as in the second operation, and compress using the threshold as in the first operation. Further, for example, the compression apparatus 100 may compress the component matrix obtained by frequency-resolving the image data expressed by the difference from the reference value as in the third operation using the threshold as in the first operation. Good.
 また、圧縮装置100は、第3の動作のように基準値からの差分で表現された画像データを周波数分解した成分行列を作成し、第2の動作のように複数の成分行列を含む成分行列を作成して圧縮してもよい。また、圧縮装置100は、第3の動作のように基準値からの差分で表現された画像データを周波数分解した成分行列を作成し、第2の動作のように複数の成分行列を含む成分行列を作成し、第1の動作のように閾値を用いて圧縮してもよい。 Further, the compression apparatus 100 creates a component matrix obtained by frequency-resolving image data expressed by a difference from the reference value as in the third operation, and includes a plurality of component matrices as in the second operation. May be created and compressed. Further, the compression apparatus 100 creates a component matrix obtained by frequency-resolving image data expressed by a difference from the reference value as in the third operation, and includes a plurality of component matrices as in the second operation. And may be compressed using a threshold value as in the first operation.
(圧縮処理手順)
 次に、図8を用いて、圧縮装置100の圧縮処理手順の一例について説明する。
(Compression procedure)
Next, an example of the compression processing procedure of the compression apparatus 100 will be described with reference to FIG.
 図8は、圧縮装置100の圧縮処理手順の一例を示すフローチャートである。図8において、圧縮装置100は、圧縮対象の画像を示す画像データが入力されたか否かを判定する(ステップS801)。ここで、画像データが入力されていない場合(ステップS801:No)、圧縮装置100は、ステップS801の処理に戻る。 FIG. 8 is a flowchart showing an example of a compression processing procedure of the compression apparatus 100. In FIG. 8, the compression apparatus 100 determines whether image data indicating an image to be compressed has been input (step S801). If no image data is input (step S801: NO), the compression apparatus 100 returns to the process of step S801.
 一方で、画像データが入力されている場合(ステップS801:Yes)、圧縮装置100は、画像データを、YCrCb形式の画像データに変換する(ステップS802)。次に、圧縮装置100は、画像データのデータサンプリングを実行する(ステップS803)。そして、圧縮装置100は、画像データを、複数のブロックの各々のブロックを示す画像データに分割する(ステップS804)。 On the other hand, when image data is input (step S801: Yes), the compression apparatus 100 converts the image data into image data in the YCrCb format (step S802). Next, the compression apparatus 100 performs data sampling of the image data (step S803). Then, the compression apparatus 100 divides the image data into image data indicating each block of the plurality of blocks (step S804).
 次に、圧縮装置100は、分割した画像データのうちの未選択の画像データを選択する(ステップS805)。そして、圧縮装置100は、選択した画像データが示すブロックの隣接ブロックを示す画像データに基づいて、選択した画像データに含まれる画素値の基準値を算出する(ステップS806)。 Next, the compression apparatus 100 selects unselected image data among the divided image data (step S805). Then, the compression apparatus 100 calculates the reference value of the pixel value included in the selected image data based on the image data indicating the adjacent block of the block indicated by the selected image data (step S806).
 次に、圧縮装置100は、選択した画像データに含まれる画素値から、算出した基準値を減算した画像データを作成する(ステップS807)。そして、圧縮装置100は、作成した画像データを周波数分解する(ステップS808)。次に、圧縮装置100は、画像データを量子化する(ステップS809)。そして、圧縮装置100は、図9および図10に示す符号化処理を実行する(ステップS810)。 Next, the compression apparatus 100 creates image data obtained by subtracting the calculated reference value from the pixel value included in the selected image data (step S807). Then, the compression apparatus 100 performs frequency decomposition on the created image data (step S808). Next, the compression apparatus 100 quantizes the image data (step S809). Then, the compression device 100 executes the encoding process shown in FIGS. 9 and 10 (step S810).
 次に、圧縮装置100は、分割した画像データのうちに未選択の画像データがあるか否かを判定する(ステップS811)。ここで、未選択の画像データがある場合(ステップS811:Yes)、圧縮装置100は、ステップS805の処理に戻る。一方で、未選択の画像データがない場合(ステップS811:No)、圧縮装置100は、圧縮処理を終了する。 Next, the compression apparatus 100 determines whether there is unselected image data among the divided image data (step S811). If there is unselected image data (step S811: Yes), the compression apparatus 100 returns to the process of step S805. On the other hand, when there is no unselected image data (step S811: No), the compression apparatus 100 ends the compression process.
(符号化処理手順)
 次に、図9および図10を用いて、ステップS810の符号化処理手順の一例について説明する。
(Encoding procedure)
Next, an example of the encoding processing procedure in step S810 will be described using FIG. 9 and FIG.
 図9および図10は、ステップS810の符号化処理手順の一例を示すフローチャートである。図9において、圧縮装置100は、変数Iに0を設定する(ステップS901)。次に、圧縮装置100は、BlockLengthの長さの配列arrayを用意する(ステップS902)。 9 and 10 are flowcharts showing an example of the encoding processing procedure in step S810. In FIG. 9, the compression apparatus 100 sets 0 to a variable I (step S901). Next, the compression apparatus 100 prepares an array array having a length of BlockLength (step S902).
 そして、圧縮装置100は、変数IがBlockLengthより小さいか否かを判定する(ステップS903)。ここで、小さくない場合(ステップS903:No)、圧縮装置100は、図10のステップS1001の処理に移行する。 Then, the compression apparatus 100 determines whether or not the variable I is smaller than BlockLength (step S903). Here, when it is not small (step S903: No), the compression apparatus 100 proceeds to the process of step S1001 in FIG.
 一方で、小さい場合(ステップS903:Yes)、圧縮装置100は、I列目に非零要素があるか否かを判定する(ステップS904)。ここで、非零要素がある場合(ステップS904:Yes)、圧縮装置100は、配列array[I]に1を代入するとともに、1を出力する(ステップS905)。次に、圧縮装置100は、ステップS907の処理に移行する。 On the other hand, when it is small (step S903: Yes), the compression apparatus 100 determines whether or not there is a non-zero element in the I column (step S904). If there is a non-zero element (step S904: Yes), the compression apparatus 100 substitutes 1 for the array array [I] and outputs 1 (step S905). Next, the compression apparatus 100 proceeds to the process of step S907.
 一方で、非零要素がない場合(ステップS904:No)、圧縮装置100は、配列array[I]に0を代入するとともに、0を出力する(ステップS906)。次に、圧縮装置100は、ステップS907の処理に移行する。ステップS907において、圧縮装置100は、変数Iに1を加算して(ステップS907)、ステップS903の処理に戻る。 On the other hand, when there is no non-zero element (step S904: No), the compression apparatus 100 assigns 0 to the array array [I] and outputs 0 (step S906). Next, the compression apparatus 100 proceeds to the process of step S907. In step S907, the compression apparatus 100 adds 1 to the variable I (step S907), and returns to the process of step S903.
 図10において、圧縮装置100は、変数Jに0を設定する(ステップS1001)。次に、圧縮装置100は、変数JがBlockLengthより小さいか否かを判定する(ステップS1002)。ここで、小さくない場合(ステップS1002:No)、圧縮装置100は、非零要素を抽出して符号化して出力して(ステップS1003)、符号化処理を終了する。 In FIG. 10, the compression apparatus 100 sets 0 to the variable J (step S1001). Next, the compression apparatus 100 determines whether or not the variable J is smaller than BlockLength (step S1002). Here, when not small (step S1002: No), the compression apparatus 100 extracts a non-zero element, encodes and outputs it (step S1003), and ends the encoding process.
 一方で、小さい場合(ステップS1002:Yes)、圧縮装置100は、array[J]が1か否かを判定する(ステップS1004)。ここで、0である場合(ステップS1004:No)、圧縮装置100は、ステップS1002の処理に戻る。 On the other hand, if it is smaller (step S1002: Yes), the compression apparatus 100 determines whether or not array [J] is 1 (step S1004). Here, when it is 0 (step S1004: No), the compression apparatus 100 returns to the process of step S1002.
 一方で、1である場合(ステップS1004:Yes)、圧縮装置100は、J列目の要素を出力する(ステップS1005)。次に、圧縮装置100は、変数Jに1を加算して(ステップS1006)、ステップS1002の処理に戻る。 On the other hand, if it is 1 (step S1004: Yes), the compression apparatus 100 outputs the element in the Jth column (step S1005). Next, the compression apparatus 100 adds 1 to the variable J (step S1006), and returns to the process of step S1002.
(圧縮データの伸長)
 次に、図11を用いて、圧縮データの伸長の一例について説明する。
(Decompression of compressed data)
Next, an example of decompression of compressed data will be described with reference to FIG.
 図11は、圧縮データの伸長の一例を示す説明図である。図11において、圧縮装置100は、圧縮データ1101「1100110111000101100100000111001010001」から、圧縮前の行列を復号する。 FIG. 11 is an explanatory diagram showing an example of decompression of compressed data. In FIG. 11, the compression apparatus 100 decodes the matrix before compression from the compressed data 1101 “1100110111000101100100000111001010001”.
 まず、圧縮装置100は、圧縮データ1101の先頭から、圧縮前の行列の列数分のデータとして、4ビットのデータ「1100」を取得する。圧縮装置100は、取得したデータ「1100」から、非零要素がある列として、1列目と2列目とを特定する。 First, the compression apparatus 100 acquires 4-bit data “1100” as data corresponding to the number of columns of the matrix before compression from the top of the compressed data 1101. The compression apparatus 100 identifies the first column and the second column as columns having non-zero elements from the acquired data “1100”.
 次に、圧縮装置100は、圧縮データ1101から、特定した各々の列に応じた行数分のデータとして、1列目に応じた4ビットのデータ「1101」と、2列目に応じた4ビットのデータ「1100」と、を取得する。圧縮装置100は、1列目に、取得した1列目に応じた4ビットのデータの各々の値を設定し、2列目に、取得した2列目に応じた4ビットのデータの各々の値を設定し、3列目と4列目とに、非零要素がないため全て零要素を設定した行列1102を作成する。 Next, the compression apparatus 100 sets the 4-bit data “1101” corresponding to the first column and the 4 bits corresponding to the second column as data corresponding to the number of rows corresponding to each specified column from the compressed data 1101. Bit data “1100” is acquired. The compression apparatus 100 sets each value of 4-bit data corresponding to the acquired first column in the first column, and sets each value of 4-bit data corresponding to the acquired second column to the second column. A value is set, and a matrix 1102 in which all zero elements are set is created because there are no non-zero elements in the third and fourth columns.
 次に、圧縮装置100は、行列1102をラスタスキャンして、1が設定されている要素がある場合には、圧縮データから5ビットのデータを取得して5ビットのデータが示す値を当該要素に設定する。ここで、ラスタスキャンの順序は、図11に点線で示した順序である。圧縮装置100は、例えば、1行目の1列目の要素に1が設定されているため、圧縮データから5ビットのデータ「01011」を取得し、1行目の1列目の要素を5ビットのデータ「01011」が示す値「11」に設定する。圧縮装置100は、同様にして、1が設定されている他の要素にも、値を設定する。 Next, the compression apparatus 100 performs a raster scan on the matrix 1102, and if there is an element for which 1 is set, the compression apparatus 100 obtains 5-bit data from the compressed data and uses the value indicated by the 5-bit data as the element. Set to. Here, the raster scan order is the order indicated by the dotted lines in FIG. For example, since 1 is set in the element in the first column of the first row, the compression apparatus 100 acquires 5-bit data “01011” from the compressed data, and sets the element in the first column of the first row to 5 The value “11” indicated by the bit data “01011” is set. Similarly, the compression apparatus 100 sets values for other elements in which 1 is set.
 これにより、圧縮装置100は、圧縮前の行列1103を復号することができる。そして、圧縮装置100は、圧縮前の行列1103に、量子化値を乗算して、逆周波数分解して、画像データを復元することができる。圧縮前の行列から、画像データを復元する技術は、従来技術のため、説明を省略する。 Thereby, the compression apparatus 100 can decode the matrix 1103 before compression. The compression apparatus 100 can restore the image data by multiplying the matrix 1103 before compression by a quantization value and performing inverse frequency decomposition. Since a technique for restoring image data from a matrix before compression is a conventional technique, a description thereof will be omitted.
(伸長処理手順)
 次に、図12を用いて、圧縮装置100の伸長処理手順の一例について説明する。
(Expansion procedure)
Next, an example of a decompression process procedure of the compression apparatus 100 will be described with reference to FIG.
 図12は、圧縮装置100の伸長処理手順の一例を示すフローチャートである。図12において、圧縮装置100は、圧縮データが入力されたか否かを判定する(ステップS1201)。ここで、圧縮データが入力されていない場合(ステップS1201:No)、圧縮装置100は、ステップS1201の処理に戻る。 FIG. 12 is a flowchart showing an example of a decompression process procedure of the compression apparatus 100. In FIG. 12, the compression apparatus 100 determines whether compressed data has been input (step S1201). Here, when compressed data is not input (step S1201: No), the compression apparatus 100 returns to the process of step S1201.
 一方で、圧縮データが入力されている場合(ステップS1201:Yes)、圧縮装置100は、圧縮データを1ブロック分読み込む(ステップS1202)。次に、圧縮装置100は、非零位置を示す行列を作成する(ステップS1203)。そして、圧縮装置100は、非零位置に伸長した非零要素を設定する(ステップS1204)。 On the other hand, when compressed data is input (step S1201: Yes), the compression apparatus 100 reads compressed data for one block (step S1202). Next, the compression device 100 creates a matrix indicating a non-zero position (step S1203). Then, the compression apparatus 100 sets the non-zero element expanded to the non-zero position (step S1204).
 次に、圧縮装置100は、非零要素に量子化値を乗算する(ステップS1205)。そして、圧縮装置100は、圧縮データを全て読み込んだか否かを判定する(ステップS1206)。ここで、読み込んでいない場合(ステップS1206:No)、圧縮装置100は、ステップS1202の処理に戻る。 Next, the compression apparatus 100 multiplies the non-zero element by the quantized value (step S1205). Then, the compression apparatus 100 determines whether all the compressed data has been read (step S1206). Here, when not reading (step S1206: No), the compression apparatus 100 returns to the process of step S1202.
 一方で、読み込んでいる場合(ステップS1206:Yes)、圧縮装置100は、ラスタ順にブロックを示す画像データを選択する(ステップS1207)。次に、選択した画像データが示すブロックの隣接ブロックを示す画像データに基づいて、選択した画像データに含まれる画素値の基準値を算出する(ステップS1208)。そして、圧縮装置100は、選択した画像データを逆周波数分解する(ステップS1209)。 On the other hand, when reading (step S1206: Yes), the compression apparatus 100 selects image data indicating blocks in raster order (step S1207). Next, a reference value of the pixel value included in the selected image data is calculated based on the image data indicating the adjacent block of the block indicated by the selected image data (step S1208). Then, the compression apparatus 100 performs inverse frequency decomposition on the selected image data (step S1209).
 次に、圧縮装置100は、逆周波数分解した画像データに含まれる画素値に、算出した基準値を加算する(ステップS1210)。そして、圧縮装置100は、未選択の画像データがあるか否かを判定する(ステップS1211)。 Next, the compression apparatus 100 adds the calculated reference value to the pixel value included in the image data subjected to inverse frequency decomposition (step S1210). Then, the compression apparatus 100 determines whether there is unselected image data (step S1211).
 ここで、未選択の画像データがある場合(ステップS1211:Yes)、圧縮装置100は、ステップS1207の処理に戻る。一方で、未選択の画像データがない場合(ステップS1211:No)、圧縮装置100は、伸長処理を終了する。これにより、圧縮装置100は、圧縮データを伸長することができる。 Here, when there is unselected image data (step S1211: Yes), the compression apparatus 100 returns to the process of step S1207. On the other hand, when there is no unselected image data (step S1211: No), the compression apparatus 100 ends the decompression process. Thereby, the compression apparatus 100 can expand the compressed data.
(圧縮の指標値の一例)
 次に、図13を用いて、圧縮の指標値の一例について説明する。
(Example of index values for compression)
Next, an example of a compression index value will be described with reference to FIG.
 図13は、圧縮の指標値の一例を示す説明図である。図13に示す圧縮の指標値は、例えば、圧縮率[%]、圧縮時間[ms]、伸長時間[ms]、およびノイズ指標である。圧縮率とは、例えば、圧縮前のデータ量に対する圧縮後のデータ量の割合である。圧縮時間とは、例えば、圧縮にかかる時間である。伸長時間とは、例えば、伸長にかかる時間である。ノイズ指標とは、例えば、PSNR(Peak Signal-to-Noise Ratio)である。PSNRは、10×log10(255×255/MSE)によって算出される。ここで、MSE(Mean Square Error)は、平均二乗誤差であって、Σ(圧縮元の画像-圧縮後の画像)2/画素数によって算出される。 FIG. 13 is an explanatory diagram illustrating an example of an index value for compression. The compression index values shown in FIG. 13 are, for example, a compression rate [%], a compression time [ms], an expansion time [ms], and a noise index. The compression rate is, for example, the ratio of the data amount after compression to the data amount before compression. The compression time is, for example, the time required for compression. The extension time is, for example, the time required for extension. The noise index is, for example, PSNR (Peak Signal-to-Noise Ratio). PSNR is calculated by 10 × log 10 (255 × 255 / MSE). Here, MSE (Mean Square Error) is a mean square error, and is calculated by Σ (compression source image−compressed image) 2 / number of pixels.
 図13に示すように、圧縮装置100は、JPEGにより圧縮する場合に比べて、同程度のノイズ指標であっても、圧縮率を向上させることができる。したがって、圧縮装置100は、圧縮データを送信する場合には、JPEGに比べて、送信時間を低減することができる。また、圧縮装置100は、JPEG2000やWebPにより圧縮する場合に比べて、同程度のノイズ指標であっても、圧縮時間や伸長時間を低減することができる。このため、圧縮装置100は、JPEGやJPEG2000やWebPなどの従来技術と比べて、圧縮時間や伸長時間を低減しつつ送信時間を削減することができるため、リモートデスクトップ処理の全体にかかる時間を低減することができる。 As shown in FIG. 13, the compression apparatus 100 can improve the compression rate even with the same noise index as compared with the case of compression by JPEG. Therefore, the compression apparatus 100 can reduce the transmission time when transmitting compressed data compared to JPEG. Further, the compression apparatus 100 can reduce the compression time and the decompression time even when the noise index is comparable to that in the case of compression by JPEG2000 or WebP. For this reason, since the compression apparatus 100 can reduce the transmission time while reducing the compression time and the expansion time as compared with the conventional technologies such as JPEG, JPEG2000, and WebP, the time required for the entire remote desktop processing is reduced. can do.
(圧縮率の比較の一例)
 次に、図14を用いて、圧縮率の比較の一例について説明する。
(Example of compression ratio comparison)
Next, an example of comparison of compression rates will be described with reference to FIG.
 図14は、圧縮率の比較の一例を示す説明図である。図14に示す圧縮率は、5種類の画像を、圧縮装置が圧縮した場合と、JPEGにより圧縮した場合と、の圧縮率である。画像1は、例えば自動車の設計などで用いられるCADの出力画像である。画像の特徴として、複雑な形状による細かな色彩のグラデーションを有する。画像2は、例えば円柱のようなシンプルな3次元画像である。画像の特徴として、少ない色数となだらかなグラデーションを有する。画像3は、例えば望遠鏡による星雲の画像である。画像の特徴として、ほぼグラデーションで形成されており、物体の境目を表すエッジがない。画像4は、例えば地図の画像である。画像の特徴として、グラデーションはなく、道路や建物などエッジで構成されているものが多い。画像5は、例えばコンピュータによる流体解析のシミュレーション画面である。画像の特徴として、色分けされた粒子がグラデーションを描くように配置されている。即ち、画像1~3のグラデーションが一様なのに対し、画像5のグラデーションは離散的である。一方で、画像4と異なりエッジはない。図14に示すように、画像の特徴に応じて圧縮率は異なるが、圧縮装置100は、JPEGにより圧縮する場合に比べて圧縮率を向上させることができる。 FIG. 14 is an explanatory diagram showing an example of comparison of compression ratios. The compression rates shown in FIG. 14 are the compression rates when the five types of images are compressed by the compression device and when compressed by JPEG. The image 1 is an output image of CAD used in, for example, automobile design. As a characteristic of an image, it has a fine color gradation by a complicated shape. The image 2 is a simple three-dimensional image such as a cylinder. As a feature of the image, it has a small number of colors and a gentle gradation. Image 3 is an image of a nebula by a telescope, for example. As a feature of the image, it is formed with almost gradation, and there is no edge representing the boundary of the object. The image 4 is a map image, for example. As a feature of the image, there is no gradation, and there are many things composed of edges such as roads and buildings. The image 5 is a simulation screen for fluid analysis by a computer, for example. As a feature of the image, the color-coded particles are arranged so as to draw a gradation. That is, the gradation of the images 1 to 3 is uniform, while the gradation of the image 5 is discrete. On the other hand, unlike the image 4, there is no edge. As shown in FIG. 14, the compression rate varies depending on the characteristics of the image, but the compression apparatus 100 can improve the compression rate compared to the case where compression is performed by JPEG.
 以上説明したように、圧縮装置100によれば、成分行列を、非零要素がある位置を示す情報と、非零要素の数列と、に分割して、圧縮データを作成することができる。これにより、圧縮装置100は、成分行列のうちの零要素を表現するために用いるデータ量を低減して、成分行列を圧縮することができる。また、これにより、圧縮装置100は、成分行列103に含まれる高周波の周波数成分を示す要素が非零要素である場合などのように、成分行列103に含まれる非零要素の位置に偏りがない場合であっても、圧縮率を向上させることができる。 As described above, according to the compression apparatus 100, the component matrix can be divided into the information indicating the position where the non-zero element is located and the numerical sequence of the non-zero element to create the compressed data. As a result, the compression apparatus 100 can compress the component matrix by reducing the amount of data used to represent the zero element of the component matrix. Accordingly, the compression apparatus 100 has no bias in the position of the non-zero element included in the component matrix 103, such as when the element indicating the high frequency component included in the component matrix 103 is a non-zero element. Even in this case, the compression rate can be improved.
 また、圧縮装置100によれば、成分行列を、成分行列のうちの非零要素がある行または列の位置と、成分行列のうちの非零要素がある行または列において非零要素がある位置と、を示す情報と、数列と、に分割することができる。これにより、圧縮装置100は、成分行列のうちの零要素を表現するために用いるデータ量を低減して、成分行列の圧縮率を向上させることができる。 Further, according to the compression apparatus 100, the component matrix is divided into the position of the row or column where the non-zero element is present in the component matrix, and the position where the non-zero element is present in the row or column where the non-zero element is present in the component matrix. It is possible to divide the information into a number sequence. Thereby, the compression apparatus 100 can reduce the data amount used in order to express the zero element of a component matrix, and can improve the compression rate of a component matrix.
 また、圧縮装置100によれば、行または列の要素として、複数の画像データの各々の画像データを設定した行列を作成し、作成した行列を圧縮することができる。これにより、圧縮装置100は、画像データを一つ一つ圧縮する場合と比べて、成分行列のうちの零要素を表現するために用いるデータ量を低減して、圧縮率を向上させることができる。 Further, according to the compression apparatus 100, it is possible to create a matrix in which image data of each of a plurality of image data is set as row or column elements, and compress the created matrix. As a result, the compression apparatus 100 can reduce the amount of data used to represent the zero elements of the component matrix and improve the compression rate, as compared with the case where the image data is compressed one by one. .
 また、圧縮装置100によれば、成分行列を、絶対値が閾値以上となる非零要素がある位置を示す情報と、絶対値が閾値以上となる非零要素の数列と、に分割することができる。これにより、圧縮装置100は、成分行列のうちの絶対値が閾値より小さい要素を零要素に近似して、要素を表現するために用いるデータ量が相対的に少ない零要素を増やし、要素を表現するために用いるデータ量が相対的に多い非零要素を減らすことができる。そして、圧縮装置100は、成分行列の圧縮率を向上させることができる。 Further, according to the compression device 100, the component matrix can be divided into information indicating a position where there is a non-zero element whose absolute value is equal to or greater than the threshold and a sequence of non-zero elements whose absolute value is equal to or greater than the threshold. it can. As a result, the compression apparatus 100 approximates an element having an absolute value smaller than the threshold value in the component matrix to a zero element, increases the number of zero elements that use a relatively small amount of data to represent the element, and expresses the element. Therefore, it is possible to reduce non-zero elements that use a relatively large amount of data. And the compression apparatus 100 can improve the compression rate of a component matrix.
 また、圧縮装置100によれば、画像を示す画像データを、隣接画像を示す画像データに基づく基準値との差分に変換することができる。これにより、圧縮装置100は、画像データから得られる成分行列の要素の値を小さい値にして、要素を表現するために用いるデータ量が相対的に少ない零要素を増やし、要素を表現するために用いるデータ量が相対的に多い非零要素を減らすことができる。また、これにより、圧縮装置100は、数列に含まれる値を小さくすることができ、数列に含まれる値を表現するために用いるデータ量を低減することができる。そして、圧縮装置100は、成分行列の圧縮率を向上させることができる。 Further, according to the compression apparatus 100, it is possible to convert image data indicating an image into a difference from a reference value based on image data indicating an adjacent image. Thus, the compression apparatus 100 reduces the element value of the component matrix obtained from the image data to a small value, increases the number of zero elements that are relatively small in the amount of data used to represent the element, and expresses the element. Non-zero elements that use a relatively large amount of data can be reduced. Thereby, the compression apparatus 100 can reduce the value included in the sequence, and can reduce the amount of data used to express the value included in the sequence. And the compression apparatus 100 can improve the compression rate of a component matrix.
 また、圧縮装置100によれば、画像を表現する各々の空間周波数成分を量子化した値を要素とする成分行列を作成することができる。これにより、圧縮装置100は、成分行列のうちで、要素を表現するために用いるデータ量が相対的に少ない零要素を増やし、要素を表現するために用いるデータ量が相対的に多い非零要素を減らし、成分行列の圧縮率を向上させることができる。 Further, according to the compression apparatus 100, a component matrix having elements obtained by quantizing each spatial frequency component representing an image can be created. As a result, the compression apparatus 100 increases the number of zero elements in the component matrix that have a relatively small amount of data used to represent the element, and the non-zero elements that have a relatively large amount of data that is used to represent the element. And the compression rate of the component matrix can be improved.
 なお、本実施の形態で説明した圧縮方法は、予め用意されたプログラムをパーソナル・コンピュータやワークステーション等のコンピュータで実行することにより実現することができる。本圧縮プログラムは、ハードディスク、フレキシブルディスク、CD-ROM、MO、DVD等のコンピュータで読み取り可能な記録媒体に記録され、コンピュータによって記録媒体から読み出されることによって実行される。また本圧縮プログラムは、インターネット等のネットワークを介して配布してもよい。 Note that the compression method described in this embodiment can be realized by executing a program prepared in advance on a computer such as a personal computer or a workstation. The compression program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed by being read from the recording medium by the computer. The compression program may be distributed via a network such as the Internet.
 100 圧縮装置
 301 算出部
 302 取得部
 303 作成部
 304 抽出部
 305 出力部
 306 復号部
DESCRIPTION OF SYMBOLS 100 Compression apparatus 301 Calculation part 302 Acquisition part 303 Creation part 304 Extraction part 305 Output part 306 Decoding part

Claims (11)

  1.  画像を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする行列を取得する取得部と、
     前記取得部によって取得された前記行列の要素のうちの値が零ではない非零要素がある位置を示す情報を作成する作成部と、
     前記行列の要素のうちの前記非零要素を所定順序で抽出する抽出部と、
     前記作成部によって作成された前記情報と、前記抽出部によって抽出された前記非零要素の数列と、を対応付けて出力する出力部と、
     を有することを特徴とする圧縮装置。
    An acquisition unit that acquires a matrix having each spatial frequency component of a plurality of spatial frequency components representing an image as an element;
    A creation unit that creates information indicating a position where a non-zero element whose value is not zero among the elements of the matrix obtained by the obtaining unit;
    An extraction unit that extracts the non-zero elements of the matrix elements in a predetermined order;
    An output unit that associates and outputs the information created by the creation unit and the sequence of the non-zero elements extracted by the extraction unit;
    A compression apparatus comprising:
  2.  前記作成部は、前記行列のうちの前記非零要素がある行または列の位置と、前記行列のうちの前記非零要素がある行または列において前記非零要素がある位置と、を示す情報を作成することを特徴とする請求項1に記載の圧縮装置。 The creation unit is information indicating a position of a row or a column having the non-zero element in the matrix and a position of the non-zero element in a row or column having the non-zero element in the matrix. The compression apparatus according to claim 1, wherein:
  3.  前記取得部は、複数の画像の各々の画像を表現する複数の空間周波数成分の各々の空間周波数成分を、行または列の要素とする行列を取得することを特徴とする請求項2に記載の圧縮装置。 The said acquisition part acquires the matrix which uses each spatial frequency component of each of the some spatial frequency component expressing each image of a some image as an element of a row or a column. Compression device.
  4.  前記作成部は、前記行列の要素のうちの絶対値が閾値以上となる前記非零要素がある位置を示す情報を作成し、
     前記抽出部は、前記行列の要素のうちの絶対値が前記閾値以上となる前記非零要素を所定順序で抽出することを特徴とする請求項1~3のいずれか一つに記載の圧縮装置。
    The creation unit creates information indicating a position where the non-zero element where the absolute value of the elements of the matrix is equal to or greater than a threshold value,
    The compression device according to any one of claims 1 to 3, wherein the extraction unit extracts the non-zero elements having an absolute value equal to or greater than the threshold value among the elements of the matrix in a predetermined order. .
  5.  前記画像に隣接する他の画像を示す複数の画素値のうちのいずれかの画素値に基づく基準値を算出し、算出した前記基準値と前記画像を示す複数の画素値の各々の画素値との差分を算出し、算出した前記差分を周波数分解して前記各々の空間周波数成分を算出する算出部を有し、
     前記取得部は、前記算出部によって算出された前記各々の空間周波数成分を要素とする行列を取得することを特徴とする請求項1~4のいずれか一つに記載の圧縮装置。
    Calculating a reference value based on any one of a plurality of pixel values indicating another image adjacent to the image, and calculating the reference value and each pixel value of the plurality of pixel values indicating the image; And calculating a difference between the calculated difference and performing frequency decomposition on the calculated difference to calculate each spatial frequency component,
    5. The compression apparatus according to claim 1, wherein the acquisition unit acquires a matrix having each of the spatial frequency components calculated by the calculation unit as an element.
  6.  前記算出部は、さらに、算出した前記各々の空間周波数成分を量子化した値を算出し、
     前記取得部は、前記算出部によって算出された前記量子化した値を要素とする行列を取得することを特徴とする請求項5に記載の圧縮装置。
    The calculation unit further calculates a value obtained by quantizing each calculated spatial frequency component,
    The compression device according to claim 5, wherein the acquisition unit acquires a matrix having the quantized value calculated by the calculation unit as an element.
  7.  前記画像を示す複数の画素値を周波数分解して前記各々の空間周波数成分を算出し、算出した前記各々の空間周波数成分を量子化した値を算出する算出部を有し、
     前記取得部は、前記算出部によって算出された前記量子化した値を要素とする行列を取得することを特徴とする請求項1~4のいずれか一つに記載の圧縮装置。
    Calculating a spatial frequency component by frequency-resolving a plurality of pixel values representing the image, and calculating a value obtained by quantizing each calculated spatial frequency component;
    5. The compression apparatus according to claim 1, wherein the acquisition unit acquires a matrix having the quantized value calculated by the calculation unit as an element.
  8.  前記情報と前記数列とに基づいて前記行列を復号する復号部を有することを特徴とする請求項1~7のいずれか一つに記載の圧縮装置。 8. The compression apparatus according to claim 1, further comprising a decoding unit configured to decode the matrix based on the information and the number sequence.
  9.  前記復号部は、前記行列と同一の大きさの行列のうちの前記情報が示す位置に前記所定順序に従って前記数列に含まれる前記非零要素を設定し、前記同一の大きさの行列のうちの前記情報が示す位置を除いた残余の位置に値が零である零要素を設定することにより、前記行列を復号することを特徴とする請求項8に記載の圧縮装置。 The decoding unit sets the non-zero element included in the sequence according to the predetermined order at a position indicated by the information in a matrix having the same size as the matrix, and includes the matrix having the same size. 9. The compression apparatus according to claim 8, wherein the matrix is decoded by setting a zero element having a value of zero at a remaining position excluding the position indicated by the information.
  10.  コンピュータを用いて画像を圧縮する方法であって、
     前記コンピュータが有するプロセッサが、画像を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする行列を前記コンピュータが有するメモリから取得し、
     前記プロセッサが、取得した前記行列の要素のうちの値が零ではない非零要素がある位置を示す情報を作成し、
     前記プロセッサが、前記行列の要素のうちの前記非零要素を所定順序で抽出し、
     前記プロセッサが、作成した前記情報と、抽出した前記非零要素の数列と、を対応付けて前記メモリに記録する、
     処理を実行することを特徴とする圧縮方法。
    A method of compressing an image using a computer,
    A processor included in the computer obtains a matrix having elements of spatial frequency components of a plurality of spatial frequency components representing an image from a memory included in the computer;
    The processor creates information indicating a position where there is a non-zero element whose value is not zero among the obtained elements of the matrix;
    The processor extracts the non-zero elements of the matrix elements in a predetermined order;
    The processor records the created information and the extracted sequence of non-zero elements in the memory in association with each other.
    A compression method characterized by executing processing.
  11.  コンピュータに、
     画像を表現する複数の空間周波数成分の各々の空間周波数成分を要素とする行列を取得し、
     取得した前記行列の要素のうちの値が零ではない非零要素がある位置を示す情報を作成し、
     前記行列の要素のうちの前記非零要素を所定順序で抽出し、
     作成した前記情報と、抽出した前記非零要素の数列と、を対応付けて出力する、
     処理を実行させることを特徴とする圧縮プログラム。
    On the computer,
    Obtain a matrix having each spatial frequency component of a plurality of spatial frequency components representing an image as an element,
    Create information indicating the position where there is a non-zero element whose value is not zero among the elements of the acquired matrix,
    Extracting the non-zero elements of the matrix elements in a predetermined order;
    The created information and the extracted sequence of non-zero elements are output in association with each other.
    A compression program characterized by causing processing to be executed.
PCT/JP2013/061119 2013-04-12 2013-04-12 Compression device, compression method, and compression program WO2014167730A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/061119 WO2014167730A1 (en) 2013-04-12 2013-04-12 Compression device, compression method, and compression program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2013/061119 WO2014167730A1 (en) 2013-04-12 2013-04-12 Compression device, compression method, and compression program

Publications (1)

Publication Number Publication Date
WO2014167730A1 true WO2014167730A1 (en) 2014-10-16

Family

ID=51689157

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2013/061119 WO2014167730A1 (en) 2013-04-12 2013-04-12 Compression device, compression method, and compression program

Country Status (1)

Country Link
WO (1) WO2014167730A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111010883A (en) * 2018-08-06 2020-04-14 华为技术有限公司 Matrix processing method and device and logic circuit
US11686162B2 (en) * 2016-09-07 2023-06-27 Fmc Technologies, Inc. Wireless electrical feedthrough wetmate connector

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010004284A (en) * 2008-06-19 2010-01-07 Toshiba Corp Image decoder, and image decoding method
WO2011128303A2 (en) * 2010-04-13 2011-10-20 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Coding of significance maps and transform coefficient blocks
JP2012023611A (en) * 2010-07-15 2012-02-02 Mitsubishi Electric Corp Dynamic image encoding device, dynamic image decoding device, dynamic image encoding method, and dynamic image decoding method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010004284A (en) * 2008-06-19 2010-01-07 Toshiba Corp Image decoder, and image decoding method
WO2011128303A2 (en) * 2010-04-13 2011-10-20 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Coding of significance maps and transform coefficient blocks
JP2012023611A (en) * 2010-07-15 2012-02-02 Mitsubishi Electric Corp Dynamic image encoding device, dynamic image decoding device, dynamic image encoding method, and dynamic image decoding method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11686162B2 (en) * 2016-09-07 2023-06-27 Fmc Technologies, Inc. Wireless electrical feedthrough wetmate connector
CN111010883A (en) * 2018-08-06 2020-04-14 华为技术有限公司 Matrix processing method and device and logic circuit
US11250108B2 (en) 2018-08-06 2022-02-15 Huawei Technologies Co., Ltd. Matrix processing method and apparatus, and logic circuit
CN111010883B (en) * 2018-08-06 2022-07-12 华为技术有限公司 Matrix processing method and device and logic circuit
US11734386B2 (en) 2018-08-06 2023-08-22 Huawei Technologies Co., Ltd. Matrix processing method and apparatus, and logic circuit

Similar Documents

Publication Publication Date Title
JP4480119B2 (en) Image processing apparatus and image processing method
JP3814456B2 (en) Image processing apparatus and method
CN101653004A (en) Decoder for selectively decoding predetermined data units from a coded bit stream
Marlapalli et al. A review on image compression techniques
JP4781198B2 (en) Image processing apparatus and method, computer program, and computer-readable storage medium
WO2014167730A1 (en) Compression device, compression method, and compression program
JP4633576B2 (en) Data compression apparatus and data compression program
JP4726040B2 (en) Encoding processing device, decoding processing device, encoding processing method, decoding processing method, program, and information recording medium
JP4173498B2 (en) Data compression apparatus and data compression program
KR100412176B1 (en) Document segmentation compression, reconstruction system and method
JP4377351B2 (en) Data compression apparatus and data compression program
Kumar et al. Aggrandize Bit Plane Coding using Gray Code Method
JP4579793B2 (en) Data compression apparatus and data compression program
JP4741317B2 (en) Data compression apparatus and data compression program
Mukherjee et al. Predictive lossless color image compression using arithmetic operation
JP4131969B2 (en) Data compression apparatus and data compression program
JP4629512B2 (en) Data compression apparatus and data compression program
JP4753007B2 (en) Image encoding apparatus, image decoding apparatus, and programs thereof
JP4753006B2 (en) Image encoding apparatus, image decoding apparatus, and programs thereof
Paxton Optimum Implementation of Compound Compression of a Computer Screen for Real-Time Transmission in Low Network Bandwidth Environments
Babu et al. Lossy compression algorithm using advanced quantization technique for color image
JP4633577B2 (en) Data compression apparatus and data compression program
JP4377352B2 (en) Data compression apparatus and data compression program
JP4743883B2 (en) Image coding apparatus and control method thereof
JP2006279207A (en) Data compression apparatus, and data compression program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13881939

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13881939

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP