JP2011023926A - Image compression apparatus, imaging apparatus, program and image decompression apparatus - Google Patents

Image compression apparatus, imaging apparatus, program and image decompression apparatus Download PDF

Info

Publication number
JP2011023926A
JP2011023926A JP2009166519A JP2009166519A JP2011023926A JP 2011023926 A JP2011023926 A JP 2011023926A JP 2009166519 A JP2009166519 A JP 2009166519A JP 2009166519 A JP2009166519 A JP 2009166519A JP 2011023926 A JP2011023926 A JP 2011023926A
Authority
JP
Japan
Prior art keywords
image
code
encoding
value
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009166519A
Other languages
Japanese (ja)
Other versions
JP5413007B2 (en
Inventor
Akihiko Utsuki
暁彦 宇津木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2009166519A priority Critical patent/JP5413007B2/en
Publication of JP2011023926A publication Critical patent/JP2011023926A/en
Application granted granted Critical
Publication of JP5413007B2 publication Critical patent/JP5413007B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a means for performing compression/decompression of an image without referring to an LUT. <P>SOLUTION: This image compression apparatus includes: a difference calculation part which obtains predicted difference of pixels of an image to be processed; an encoding processing part which obtains a predetermined value by size of the predicted difference of the pixels, and obtains a first variable-length code showing a remainder obtained by dividing an absolute value of the predicted difference by the predetermined value, a second variable-length code showing a quotient obtained by dividing the absolute value of the predicted difference by the predetermined value, and a third fixed-length code showing positive and negative of the predicted difference; and a compression information generation part which arranges the first code, the second code, and the third code in a predetermined order to generate compression information of the image to be processed. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、画像圧縮装置、撮像装置、プログラムおよび画像伸張装置に関する。   The present invention relates to an image compression apparatus, an imaging apparatus, a program, and an image expansion apparatus.

従来から、一例として特許文献1に示すように、デジタル画像の圧縮処理では、画像の画素値を隣接画素差分やDCT係数などに置換した後にハフマン符号化する手法が公知である。なお、ハフマン符号化による画像の圧縮/伸長処理の場合、一般的に圧縮前後の符号の対応関係を示すLUT(ハフマンテーブル)が必要となる。   Conventionally, as shown in Patent Document 1 as an example, in digital image compression processing, a method of performing Huffman coding after replacing pixel values of an image with adjacent pixel differences, DCT coefficients, or the like is known. Note that in the case of image compression / decompression processing by Huffman coding, an LUT (Huffman table) indicating the correspondence between codes before and after compression is generally required.

特開2000−244744号公報JP 2000-244744 A

しかし、従来の技術では、画像の圧縮/伸長処理においてLUTを参照する機能が必要となってコストがかかる点でなお改善の余地があった。   However, in the conventional technique, there is still room for improvement in that the function of referring to the LUT is required in the image compression / decompression processing, which is costly.

そこで、本発明は、LUTを参照せずに画像の圧縮/伸長を行う手段を提供することを目的とする。   Therefore, an object of the present invention is to provide a means for compressing / decompressing an image without referring to an LUT.

一の態様の画像圧縮装置は、処理対象画像の画素の予測差分を求める差分演算部と、画素の予測差分の大きさにより所定の値を求め、予測差分の絶対値を所定の値で除した余を示す可変長の第1符号と、予測差分の絶対値を所定の値で除した商を示す可変長の第2符号と、予測差分の正負を示す固定長の第3符号とを求める符号化処理部と、第1符号、第2符号および第3符号を所定順に配置して、処理対象画像の圧縮情報を生成する圧縮情報生成部と、を備える。   An image compression apparatus according to an aspect includes a difference calculation unit that calculates a prediction difference of a pixel of a processing target image, a predetermined value based on a size of the prediction difference of the pixel, and an absolute value of the prediction difference divided by the predetermined value A code for obtaining a variable-length first code indicating the remainder, a variable-length second code indicating the quotient obtained by dividing the absolute value of the prediction difference by a predetermined value, and a fixed-length third code indicating whether the prediction difference is positive or negative And a compression information generation unit that arranges the first code, the second code, and the third code in a predetermined order to generate compression information of the processing target image.

一の態様の画像圧縮装置において、符号化処理部は、画素の予測差分の大きさにより符号化番号nを求め、2nを所定の値としてもよい。圧縮情報生成部は、第1符号、第2符号および第3符号を所定順に配置した画素情報と符号化番号nとを対応付けしてもよい。また、処理対象画像を複数の領域に分割する領域分割部をさらに備え、符号化処理部は、領域内の複数の画素の予測差分の絶対値の平均値に基づいて、領域ごとに符号化番号nを求めてもよい。また、処理対象画像を複数の領域に分割する領域分割部をさらに備え、符号化処理部は、領域内の複数の画素の予測差分の絶対値の平均値に基づいて、領域ごとに符号化番号nを求めてもよい。例えば、符号化処理部は、予測差分の絶対値の平均値をMとしたときに、「((M+0.5)/2N)+N」の値を最小にする0以上の整数である変数Nの値を符号化番号nとしてもよい。 In the image compression apparatus according to one aspect, the encoding processing unit may obtain the encoding number n based on the size of the pixel prediction difference and set 2 n as a predetermined value. The compressed information generation unit may associate pixel information in which the first code, the second code, and the third code are arranged in a predetermined order with the encoding number n. Further, the image processing apparatus further includes a region dividing unit that divides the processing target image into a plurality of regions, and the encoding processing unit encodes an encoding number for each region based on an average absolute value of prediction differences of a plurality of pixels in the region. n may be obtained. Further, the image processing apparatus further includes a region dividing unit that divides the processing target image into a plurality of regions, and the encoding processing unit encodes an encoding number for each region based on an average absolute value of prediction differences of a plurality of pixels in the region. n may be obtained. For example, when the average value of the absolute values of the prediction differences is M, the encoding processing unit sets a variable N that is an integer of 0 or more that minimizes the value of “((M + 0.5) / 2 N ) + N”. May be the encoding number n.

一の態様において、符号化処理部は、予測差分の絶対値を2nで除した商の値まで2進数の一方の符号を連続させるとともに、一方の符号の末尾に2進数の他方の符号を付して第2符号を生成してもよい。 In one aspect, the encoding processing unit continues one binary code up to a quotient value obtained by dividing the absolute value of the prediction difference by 2 n , and adds the other binary code to the end of one code. The second code may be generated by attaching.

なお、一の態様の画像圧縮装置を備える撮像装置や、コンピュータを一の態様の画像圧縮装置として動作させるプログラムや、前記プログラムを記憶した記憶媒体や、一の態様における画像圧縮装置の動作を方法のカテゴリで表現したものも、本発明の具体的態様として有効である。   An image pickup apparatus including an image compression apparatus according to one aspect, a program that causes a computer to operate as an image compression apparatus according to one aspect, a storage medium that stores the program, and an operation of the image compression apparatus according to one aspect Those expressed in the above category are also effective as specific embodiments of the present invention.

さらに、一の態様の画像圧縮装置によって生成された処理対象画像の圧縮情報を伸張する画像伸張装置や、コンピュータを上記の画像伸長装置として動作させるプログラムや、前記プログラムを記憶した記憶媒体や、上記の画像伸長装置の動作を方法のカテゴリで表現したものも、本発明の具体的態様として有効である。   Furthermore, an image expansion device that expands the compression information of the processing target image generated by the image compression device of one aspect, a program that causes a computer to operate as the image expansion device, a storage medium that stores the program, A representation of the operation of the image expansion apparatus in the method category is also effective as a specific aspect of the present invention.

本発明では、第1符号、第2符号および第3符号を所定順に配置して、処理対象画像の圧縮情報を生成することによって、LUTを参照せずに画像の圧縮/伸長が可能となる。   In the present invention, the first code, the second code, and the third code are arranged in a predetermined order and the compression information of the processing target image is generated, so that the image can be compressed / decompressed without referring to the LUT.

第1実施形態に係る画像処理装置の構成例を示すブロック図1 is a block diagram showing a configuration example of an image processing apparatus according to a first embodiment. 第1実施形態での画像圧縮処理の動作例を説明する流れ図A flowchart for explaining an operation example of image compression processing in the first embodiment 第1実施形態での画像内予測差分の演算例を示す図The figure which shows the example of a calculation of the prediction difference in a picture in 1st Embodiment. 処理対象画像の圧縮ファイルのデータ構造例を示す模式図Schematic diagram showing an example of the data structure of the compressed file of the image to be processed 符号化する値の絶対値と圧縮時の符号長との関係をプロットした図A plot of the relationship between the absolute value of the value to be encoded and the code length when compressed 図5に式(3)の近似式の直線を追加した図FIG. 5 is a diagram in which a straight line of the approximate expression of Expression (3) is added. 第1実施形態での画像伸長処理の動作例を説明する流れ図A flowchart for explaining an operation example of image decompression processing in the first embodiment 第2実施形態における電子カメラの構成例を示すブロック図The block diagram which shows the structural example of the electronic camera in 2nd Embodiment.

<第1実施形態の説明>
図1は、第1実施形態に係る画像処理装置の構成例を示すブロック図である。一の実施形態の画像処理装置は、プログラムがインストールされたパーソナルコンピュータである。この画像処理装置を構成するコンピュータ11は、プログラムの実行によって、処理対象のデジタル画像(処理対象画像)に圧縮処理を施す。また、コンピュータ11は、プログラムの実行によって、圧縮処理によって生成された処理対象画像の圧縮情報(後述の圧縮ファイル)を伸張することもできる。
<Description of First Embodiment>
FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus according to the first embodiment. The image processing apparatus according to one embodiment is a personal computer in which a program is installed. The computer 11 constituting the image processing apparatus performs compression processing on a digital image to be processed (processing target image) by executing a program. The computer 11 can also decompress the compression information (compressed file described later) of the processing target image generated by the compression process by executing the program.

ここで、上記の処理対象画像は、電子カメラやスキャナ等の撮像装置で被写体を撮像して得た画像であってもよく、あるいはコンピュータ11上で描画された画像であってもよい。   Here, the processing target image may be an image obtained by imaging a subject with an imaging device such as an electronic camera or a scanner, or may be an image drawn on the computer 11.

図1に示すコンピュータ11は、データ読込部12、記憶装置13、CPU14、メモリ15および入出力I/F16、バス17を有している。データ読込部12、記憶装置13、CPU14、メモリ15および入出力I/F16は、バス17を介して相互に接続されている。さらに、コンピュータ11には、入出力I/F16を介して、入力デバイス18(キーボード、ポインティングデバイスなど)とモニタ19とがそれぞれ接続されている。なお、入出力I/F16は、入力デバイス18からの各種入力を受け付けるとともに、モニタ19に対して表示用のデータを出力する。   A computer 11 illustrated in FIG. 1 includes a data reading unit 12, a storage device 13, a CPU 14, a memory 15, an input / output I / F 16, and a bus 17. The data reading unit 12, the storage device 13, the CPU 14, the memory 15, and the input / output I / F 16 are connected to each other via a bus 17. Further, an input device 18 (keyboard, pointing device, etc.) and a monitor 19 are connected to the computer 11 via an input / output I / F 16. The input / output I / F 16 receives various inputs from the input device 18 and outputs display data to the monitor 19.

データ読込部12は、上記の処理対象画像や、プログラムを外部から読み込むときに用いられる。例えば、データ読込部12は、着脱可能な記憶媒体からデータを取得する読込デバイス(光ディスク、磁気ディスク、光磁気ディスクの読込装置など)や、公知の通信規格に準拠して外部の装置と通信を行う通信デバイス(USBインターフェース、LANモジュール、無線LANモジュールなど)で構成される。   The data reading unit 12 is used when reading the processing target image or the program from the outside. For example, the data reading unit 12 communicates with a reading device (such as an optical disk, a magnetic disk, or a magneto-optical disk reading device) that acquires data from a removable storage medium, or an external device in accordance with a known communication standard. It consists of communication devices (USB interface, LAN module, wireless LAN module, etc.) to be performed.

記憶装置13は、例えば、ハードディスクや、不揮発性の半導体メモリなどの記憶媒体で構成される。この記憶装置13には、上記のプログラムと、プログラムの実行に必要となる各種のデータとが記録されている。なお、記憶装置13には、データ読込部12から読み込んだ処理対象画像の情報や、処理対象画像の圧縮情報(後述の圧縮ファイル)などを記憶しておくこともできる。   The storage device 13 is configured by a storage medium such as a hard disk or a nonvolatile semiconductor memory. The storage device 13 stores the above program and various data necessary for executing the program. Note that the storage device 13 can also store information on the processing target image read from the data reading unit 12, compression information (a compressed file described later) of the processing target image, and the like.

CPU14は、コンピュータ11の各部を統括的に制御するプロセッサである。このCPU14は、プログラムの実行によって、差分演算部21と、領域分割部22と、番号取得部23と、符号化処理部24と、圧縮情報生成部25として機能する(なお、CPU14に含まれる各部の動作については後述する)。   The CPU 14 is a processor that comprehensively controls each unit of the computer 11. The CPU 14 functions as a difference calculation unit 21, a region division unit 22, a number acquisition unit 23, an encoding processing unit 24, and a compression information generation unit 25 by executing the program (in addition, each unit included in the CPU 14). Will be described later).

メモリ15は、プログラムの演算結果などを一時的に記憶する。このメモリ15は、例えば揮発性のSDRAMなどで構成される。   The memory 15 temporarily stores the calculation result of the program. The memory 15 is composed of, for example, a volatile SDRAM.

(画像圧縮処理の動作例)
次に、図2の流れ図を参照しつつ、第1実施形態の画像処理装置による画像圧縮処理の動作例を説明する。図2の処理は、ユーザによるプログラム実行指示に応じて、CPU14がプログラムを実行することで開始される。
(Operation example of image compression processing)
Next, an operation example of image compression processing by the image processing apparatus according to the first embodiment will be described with reference to the flowchart of FIG. The processing in FIG. 2 is started when the CPU 14 executes a program in response to a program execution instruction from the user.

ステップS101:CPU14は、データ読込部12または記憶装置13から処理対象画像を取得する。なお、第1実施形態では、簡単のため、色情報を含まないグレースケール画像を処理対象画像とする例を説明する。   Step S101: The CPU 14 acquires a processing target image from the data reading unit 12 or the storage device 13. In the first embodiment, for the sake of simplicity, an example will be described in which a grayscale image that does not include color information is a processing target image.

ステップS102:差分演算部21は、処理対象画像の各画素で画像内予測差分を求める。例えば、差分演算部21は、画像内予測差分として、隣接画素との画素値の差分や、数画素離れた画素との画素値の差分を公知の手法により各画素で求めればよい。なお、差分演算部21は、処理対象画像を解析して画像構造(画像内での画素値の相関)を求め、各画素についてそれぞれ画素値の相関が高くなる方向で画素の差分を求めるようにしてもよい。   Step S102: The difference calculation unit 21 obtains an intra-image prediction difference at each pixel of the processing target image. For example, the difference calculation unit 21 may obtain a pixel value difference with an adjacent pixel or a pixel value difference with a pixel several pixels away from each pixel as an intra-picture prediction difference by a known method. The difference calculation unit 21 analyzes the processing target image to obtain an image structure (correlation of pixel values in the image), and obtains a pixel difference in a direction in which the correlation of pixel values increases for each pixel. May be.

一例として、第1実施形態での画像内予測差分の演算例を図3に示す。図3の例での差分演算部21は、処理対象画像の一番上の行において、左側に隣接する画素との画素値の差分を、画素の画像内予測差分とする。なお、差分演算部21は、処理対象画像における左上隅の画素では、当該画素の画素値をそのまま用いるものとする。また、差分演算部21は、処理対象画像の一番上の行を除く他の行では、上側に隣接する画素との画素値の差分を、画素の画像内予測差分とする。   As an example, FIG. 3 shows a calculation example of the intra-picture prediction difference in the first embodiment. The difference calculation unit 21 in the example of FIG. 3 sets the difference in pixel value from the pixel adjacent to the left side in the top row of the processing target image as the intra-picture prediction difference of the pixel. Note that the difference calculation unit 21 uses the pixel value of the pixel in the upper left corner of the processing target image as it is. Moreover, the difference calculation part 21 makes the difference of a pixel value with the pixel adjacent on the upper side the prediction difference in a pixel of a pixel in other lines except the uppermost line of a process target image.

ステップS103:領域分割部22は、処理対象画像を複数の領域に分割する領域分割処理を行う。一例として、領域分割部22は、4×4画素サイズのブロックによって処理対象画像を格子状に分割する。   Step S103: The area dividing unit 22 performs an area dividing process for dividing the processing target image into a plurality of areas. As an example, the area dividing unit 22 divides the processing target image into a grid pattern by blocks of 4 × 4 pixel size.

ステップS104:番号取得部23は、各々のブロック(S103)において、ブロック内の画像内予測差分の大きさに基づく符号化番号nをそれぞれ求める。   Step S104: The number acquisition unit 23 obtains an encoding number n based on the size of the intra-picture prediction difference in each block in each block (S103).

一例として、番号取得部23は、ブロック内における画像内予測差分の絶対値の平均値Mを各ブロックで求める。次に、番号取得部23は、以下の式(1)による値(予測される符号長)を最小にする変数Nの値を各ブロックで求める。なお、式(1)の予測される符号長は、ブロック内での画素の平均符号長に対応する。そして、番号取得部23は各ブロックにおいて、変数Nを符号化番号nとしてそれぞれ設定する(N=n)。   As an example, the number acquisition unit 23 obtains the average value M of the absolute values of intra-picture prediction differences in each block in each block. Next, the number acquisition unit 23 obtains the value of the variable N that minimizes the value (predicted code length) according to the following equation (1) for each block. Note that the predicted code length of Equation (1) corresponds to the average code length of the pixels in the block. The number acquisition unit 23 sets the variable N as the encoding number n in each block (N = n).

Figure 2011023926
Figure 2011023926

但し、式(1)において変数Nは0以上の整数である。また、第1実施形態の例では、変数Nは1−8の範囲に制限されるものとする。   However, in the formula (1), the variable N is an integer of 0 or more. In the example of the first embodiment, the variable N is limited to a range of 1-8.

ステップS105:CPU14は、処理対象画像に含まれる複数のブロックのうちから、符号化を行うブロックBを指定する。一例として、S105でのCPU14は、符号化を行うブロックBの位置を変更するときに、処理対象画像の左上隅を起点として1行ずつ左から右に順次走査でブロックBをシフトさせるものとする。   Step S105: The CPU 14 designates a block B to be encoded from among a plurality of blocks included in the processing target image. As an example, when changing the position of the block B to be encoded, the CPU 14 in S105 shifts the block B by sequentially scanning from left to right one row at a time starting from the upper left corner of the processing target image. .

ステップS106:CPU14は、符号化を行うブロックB(S105)のうちから、符号化を行う画素Pを指定する。一例として、S106でのCPU14は、符号化を行う画素Pの位置を変更するときに、ブロックBの左上隅を起点として1行ずつ左から右に順次走査で画素Pをシフトさせるものとする。   Step S106: The CPU 14 designates the pixel P to be encoded from the block B (S105) to be encoded. As an example, when changing the position of the pixel P to be encoded, the CPU 14 in S106 shifts the pixel P by sequentially scanning from left to right one row at a time from the upper left corner of the block B.

ステップS107:符号化処理部24は、画素Pが属するブロックBに対応した符号化番号nの値を用いて、以下の規則による符号化処理を行う。   Step S107: The encoding processing unit 24 performs an encoding process according to the following rule using the value of the encoding number n corresponding to the block B to which the pixel P belongs.

≪nが最大値以外(第1実施形態では1−7)の場合≫
(A)第1に、符号化処理部24は、画素Pの画像内予測差分の絶対値を2nで除した余を求める。そして、符号化処理部24は、求めた余の値を2進数符号化して可変長の第1符号を生成する。ここで、上記の余の値は0から2n−1の範囲となるのでnビットで表現できる。よって、第1符号の符号長は、画素Pに対応する符号化番号nの値に応じたビット数で一義的に決定できる。
<< When n is other than the maximum value (1-7 in the first embodiment) >>
(A) First, the encoding processing unit 24 obtains a remainder obtained by dividing the absolute value of the intra-picture prediction difference of the pixel P by 2 n . Then, the encoding processing unit 24 generates a variable-length first code by binary encoding the obtained remainder value. In this case, the remainder value is in the range of 0 to 2 n −1 and can be expressed by n bits. Therefore, the code length of the first code can be uniquely determined by the number of bits corresponding to the value of the encoding number n corresponding to the pixel P.

(B)第2に、符号化処理部24は、画素Pの画像内予測差分の絶対値を2nで除した商を求める。そして、符号化処理部24は、求めた商の値まで2進数の「1」の符号を連続させるとともに、末尾に終端を示す2進数の「0」の符号を付して可変長の第2符号を生成する。なお、符号化処理部24は、上記の「0」および「1」を反転させて第2符号を生成してもよい。 (B) Secondly, the encoding processing unit 24 obtains a quotient obtained by dividing the absolute value of the intra-picture prediction difference of the pixel P by 2 n . Then, the encoding processing unit 24 continues the binary “1” code up to the obtained quotient value, and adds a binary “0” code indicating the end to the end of the variable length second. Generate a code. The encoding processing unit 24 may generate the second code by inverting the above “0” and “1”.

(C)第3に、符号化処理部24は、画素Pの画像内予測差分の正負を示す1ビット固定長の第3符号を生成する。例えば、符号化処理部24は、画素Pの画像内予測差分が正であれば第3符号を「0」とし、画素Pの画像内予測差分が負であれば第3符号を「1」とする。なお、画素Pの画像内予測差分が「0」である場合、符号化処理部24は第3符号の生成を省略する。   (C) Thirdly, the encoding processing unit 24 generates a third code having a 1-bit fixed length indicating whether the intra prediction prediction difference of the pixel P is positive or negative. For example, the encoding processing unit 24 sets the third code to “0” if the intra-picture prediction difference of the pixel P is positive, and sets the third code to “1” if the intra-picture prediction difference of the pixel P is negative. To do. When the intra-picture prediction difference of the pixel P is “0”, the encoding processing unit 24 omits the generation of the third code.

(D)そして、符号化処理部24は、上記の第1符号、第2符号および第3符号を所定順に配置した画素Pの画素情報を生成する。例えば、第1実施形態での符号化処理部24は、第1符号、第2符号および第3符号の順に符号を繋げて画素情報を生成する(図4参照)。勿論、符号化処理部24は、画素情報における第1符号、第2符号および第3符号の配置順を適宜変更してもよい。   (D) And the encoding process part 24 produces | generates the pixel information of the pixel P which has arrange | positioned said 1st code | symbol, 2nd code | symbol, and 3rd code | symbol in predetermined order. For example, the encoding processing unit 24 in the first embodiment generates pixel information by connecting the codes in the order of the first code, the second code, and the third code (see FIG. 4). Of course, the encoding processing unit 24 may appropriately change the arrangement order of the first code, the second code, and the third code in the pixel information.

ここで、上記の場合における画素情報の生成例を説明する。一例として、画素Pの画像内予測差分が−29であり、符号化番号nが3である場合を考える。   Here, an example of generating pixel information in the above case will be described. As an example, let us consider a case where the intra-picture prediction difference of the pixel P is −29 and the encoding number n is 3.

この場合、画像内予測差分の絶対値(29)を23(8)で除した余は5であり、第1符号は2進数3ビットで「101」となる。また、画像内予測差分の絶対値(29)を23(8)で除した商は3であるので、第2符号は「1110」となる。また、画像内予測差分は負の値であるので、第3符号は「1」となる。よって、上記の場合の画素情報は「10111101」となる。なお、第1符号から第3符号の配置順と、符号化番号nとが既知であれば、上記の画素情報の上位nビットが第1符号であると識別できる。同様に、上記の画素情報に含まれる第2符号は、終端を示す「0」の符号によって識別できる。 In this case, the remainder obtained by dividing the absolute value (29) of the intra-picture prediction difference by 2 3 (8) is 5, and the first code is “101” in binary 3 bits. Further, since the quotient obtained by dividing the absolute value (29) of the intra-picture prediction difference by 2 3 (8) is 3, the second code is “1110”. Further, since the intra-picture prediction difference is a negative value, the third code is “1”. Therefore, the pixel information in the above case is “10111101”. If the arrangement order of the first code to the third code and the encoding number n are known, the upper n bits of the pixel information can be identified as the first code. Similarly, the second code included in the pixel information can be identified by the code “0” indicating the end.

また、他の例として、画素Pの画像内予測差分が「0」であり、符号化番号nが3である場合を考える。   As another example, consider a case where the intra-picture prediction difference of the pixel P is “0” and the encoding number n is 3.

この場合、画像内予測差分の絶対値(0)を23(8)で除した余は0であり、第1符号は2進数3ビットで「000」となる。また、画像内予測差分の絶対値(0)を23(8)で除した商も0であるので、第2符号は終端を示す「0」のみとなる。また、画像内予測差分は0であるので、第3符号は省略される。よって、上記の場合の画素情報は「0000」となる。このように、上記の画素情報の第1符号(上位nビット)の直後に「0」が続く場合には、画像内予測差分の絶対値が「0」であると判断できるので、1画素分の画素情報を識別することが可能となる。 In this case, the remainder obtained by dividing the absolute value (0) of the intra-picture prediction difference by 2 3 (8) is 0, and the first code is “000” in binary 3 bits. Further, since the quotient obtained by dividing the absolute value (0) of the intra-picture prediction difference by 2 3 (8) is also 0, the second code is only “0” indicating the end. In addition, since the intra-picture prediction difference is 0, the third code is omitted. Therefore, the pixel information in the above case is “0000”. Thus, when “0” follows immediately after the first code (upper n bits) of the pixel information, it can be determined that the absolute value of the intra-picture prediction difference is “0”. It is possible to identify the pixel information.

≪nが最大値(第1実施形態では8)の場合≫
この場合、符号化処理部24は、上記(A)および(B)の処理の代わりに、画素Pの画像内予測差分の絶対値を2進数符号化する。そして、符号化処理部24は、上記(C)と同様に画素Pの画像内予測差分の正負を示す1ビット固定長の第3符号を末尾に付与して、画素Pの画素情報を生成する。
<< When n is the maximum value (8 in the first embodiment) >>
In this case, the encoding processing unit 24 performs binary encoding on the absolute value of the intra-picture prediction difference of the pixel P instead of the processes (A) and (B). And the encoding process part 24 produces | generates the pixel information of the pixel P by giving the 3rd code | symbol of 1 bit fixed length which shows the positive / negative of the prediction difference in the image of the pixel P to the end similarly to said (C). .

ステップS108:CPU14は、現在の画素PがブロックBの最後の画素(ブロックBの右下隅の画素)であるか否かを判定する。上記要件を満たす場合(YES側)にはS109に処理が移行する。この場合、ブロックBの全画素で画素情報が生成された状態にある。   Step S108: The CPU 14 determines whether or not the current pixel P is the last pixel of the block B (pixel at the lower right corner of the block B). If the above requirement is satisfied (YES side), the process proceeds to S109. In this case, pixel information is generated in all the pixels of the block B.

一方、上記要件を満たさない場合(NO側)には、CPU14はS106に戻って画素Pを再指定して上記動作を繰り返す。なお、S108でのNO側のループにより、ブロックBに含まれる各画素の画素情報が順次生成されることとなる。   On the other hand, if the above requirement is not satisfied (NO side), the CPU 14 returns to S106 to re-specify the pixel P and repeat the above operation. Note that pixel information of each pixel included in the block B is sequentially generated by the NO-side loop in S108.

ステップS109:圧縮情報生成部25は、ブロックBの各画素の画素情報とブロックBの符号化番号nとを対応付けして、ブロックBの圧縮情報を生成する。   Step S109: The compression information generation unit 25 associates the pixel information of each pixel of the block B with the encoding number n of the block B, and generates the compression information of the block B.

一例として、S109での圧縮情報生成部25は、圧縮情報の先頭に符号化番号nを所定ビット数(3ビット)で記録する。そして、圧縮情報生成部25は、画素Pの指定順に従って16画素分の画素情報を記録する(図4参照)。なお、符号化番号nを示す符号の位置およびビット数と、1ブロック分の画素情報の数とが既知であれば、上記の圧縮情報に含まれる個々の情報はそれぞれ識別可能である。   As an example, the compression information generation unit 25 in S109 records the encoding number n in the predetermined number of bits (3 bits) at the head of the compression information. Then, the compression information generation unit 25 records pixel information for 16 pixels in accordance with the designation order of the pixels P (see FIG. 4). If the position and the number of bits of the code indicating the encoding number n and the number of pieces of pixel information for one block are known, each piece of information included in the compressed information can be identified.

ステップS110:CPU14は、現在のブロックBが最後のブロック(処理対象画像の右下隅のブロック)であるか否かを判定する。上記要件を満たす場合(YES側)にはS111に処理が移行する。この場合、処理対象画像の全ブロックで圧縮情報が生成された状態にある。   Step S110: The CPU 14 determines whether or not the current block B is the last block (the block at the lower right corner of the processing target image). If the above requirement is satisfied (YES side), the process proceeds to S111. In this case, compression information is generated in all blocks of the processing target image.

一方、上記要件を満たさない場合(NO側)には、CPU14はS105に戻ってブロックBを再指定して上記動作を繰り返す。なお、S110でのNO側のループにより、処理対象画像に含まれる各ブロックの圧縮情報が順次生成されることとなる。   On the other hand, if the above requirement is not satisfied (NO side), the CPU 14 returns to S105, redesignates the block B, and repeats the above operation. Note that the compression information of each block included in the processing target image is sequentially generated by the NO-side loop in S110.

ステップS111:圧縮情報生成部25は、ヘッダ情報と各ブロックの圧縮情報とを対応付けして処理対象画像の圧縮ファイルを生成する。そして、CPU14は、記憶装置13に圧縮ファイルを記録する。   Step S111: The compression information generation unit 25 generates a compressed file of the processing target image by associating the header information with the compression information of each block. Then, the CPU 14 records the compressed file in the storage device 13.

一例として、処理対象画像の圧縮ファイルのデータ構造を図4に模式的に示す。圧縮ファイルの先頭部にはヘッダ情報が記録され、ヘッダ情報の後にはブロックBの指定順に従って各ブロックの圧縮情報が記録される。   As an example, FIG. 4 schematically shows the data structure of the compressed file of the processing target image. Header information is recorded at the head of the compressed file, and the compressed information of each block is recorded after the header information in accordance with the designation order of block B.

また、上記のヘッダ情報は、例えば、処理対象画像の画像サイズ情報(縦横の画素数)、1ブロックのサイズ情報(縦横の画素数)、ブロックの配列情報(縦横のブロック数)、符号化番号nの記録ビット数の情報を含む。なお、ヘッダ情報は、圧縮情報生成部25によって生成される。以上で、図2の流れ図の説明を終了する。   The header information includes, for example, image size information (number of vertical and horizontal pixels) of a processing target image, size information of one block (number of vertical and horizontal pixels), block arrangement information (number of vertical and horizontal blocks), and encoding number. Information on the number of recording bits of n is included. The header information is generated by the compressed information generation unit 25. Above, description of the flowchart of FIG. 2 is complete | finished.

第1実施形態の画像圧縮装置は、符号化番号nに基づいて各画素の符号化を行う。そのため、ハフマン符号化とは異なり、LUTを参照せずに画像の符号化を行うことができる。   The image compression apparatus according to the first embodiment encodes each pixel based on an encoding number n. Therefore, unlike Huffman coding, an image can be coded without referring to the LUT.

また、第1実施形態の符号化においても、ハフマン符号化と同様に小さな値は短い符号となる。一般に、画像の隣接画素差分は小さな値となる確率が高いので、圧縮後の符号は平均的に短くなる傾向を示す。よって、第1実施形態の画像圧縮装置は、画像の情報を効率的に圧縮できる。   Also in the encoding of the first embodiment, a small value becomes a short code as in the Huffman encoding. In general, since the adjacent pixel difference of an image has a high probability of being a small value, the code after compression tends to be shorter on average. Therefore, the image compression apparatus of the first embodiment can efficiently compress image information.

ところで、ハフマン符号化で領域別に異なる符号化を実施する場合、各領域でそれぞれ異なるLUTが必要となり、領域ごとに異なった符号化処理を行うことが比較的に困難である。一方、第1実施形態の画像圧縮装置は、各々のブロックで符号化番号nを変化させることで、領域ごとに異なった符号化処理を極めて容易に実行できる。なお、発明者が実験したところ、画像全体を同じハフマン符号化処理で圧縮する場合よりも、第1実施形態の画像圧縮装置によってブロック毎に符号化番号nを変化させて画像の圧縮を行う方が高い圧縮率を得ることができた。なお、第1実施形態において、符号化番号nを小さく設定すれば小さな値の符号化が有利となり、符号化番号nを大きく設定すれば大きな値の符号化が有利となる。   By the way, when different encoding is performed for each region in Huffman encoding, a different LUT is required for each region, and it is relatively difficult to perform different encoding processing for each region. On the other hand, the image compression apparatus according to the first embodiment can very easily execute different encoding processes for each region by changing the encoding number n in each block. In addition, when the inventor conducted an experiment, the image compression apparatus according to the first embodiment compresses an image by changing the encoding number n for each block, rather than compressing the entire image by the same Huffman encoding process. Was able to obtain a high compression ratio. In the first embodiment, if the encoding number n is set small, encoding of a small value is advantageous, and if the encoding number n is set large, encoding of a large value is advantageous.

また、第1実施形態の画像圧縮装置は、上記の式(1)によって、非常に圧縮効率の高い符号化番号nを各ブロックで容易に求めることができる。ここで、第1実施形態において、1画素分の符号化する値(隣接画素差分)から符号化で得られる符号長は、以下の式(2)で求めることができる。   In addition, the image compression apparatus according to the first embodiment can easily obtain the encoding number n with very high compression efficiency for each block by the above equation (1). Here, in the first embodiment, the code length obtained by encoding from the value to be encoded for one pixel (adjacent pixel difference) can be obtained by the following equation (2).

Figure 2011023926
Figure 2011023926

式(2)の「INT(x)」はxを超えない最大の整数を返す関数を示す。また、第1実施形態では符号化する値が0の場合には正負の符号(第3符号)を省略するので、式(2)の演算結果よりも実際は1ビット分符号長が短くなる。図5は、符号化番号1−4において、式(2)により、符号化する値(隣接画素差分)の絶対値と圧縮時の符号長との関係をプロットした図である。   “INT (x)” in Expression (2) indicates a function that returns the maximum integer not exceeding x. Further, in the first embodiment, when the value to be encoded is 0, the positive and negative codes (third code) are omitted, so that the code length is actually shorter by one bit than the calculation result of Expression (2). FIG. 5 is a diagram in which the relationship between the absolute value of the value to be encoded (adjacent pixel difference) and the code length at the time of compression is plotted using the expression (2) in the encoding numbers 1-4.

上記の式(2)の符号長は、以下の式(3)で近似的に求めることができる。図6は、図5に式(3)の近似式の直線を追加した図である。図6によれば、式(3)の演算結果は、式(2)の演算結果をよく近似していることが分かる。   The code length of the above equation (2) can be approximately obtained by the following equation (3). FIG. 6 is a diagram in which a straight line of the approximate expression of Expression (3) is added to FIG. According to FIG. 6, it can be seen that the calculation result of Expression (3) closely approximates the calculation result of Expression (2).

Figure 2011023926
Figure 2011023926

なお、上記の式(3)は一次式であることから、上記の「符号長」を複数の符号長の平均(予測される符号長)とし、上記の「符号化する値の絶対値」を複数の符号化する値の絶対値の平均と置き替えることもでき、これにより、上記の式(1)を得ることができる。以上の説明から、上記の式(1)で求まる符号化番号nは、各ブロックで符号長の平均値を最小化できることが分かる。   In addition, since said Formula (3) is a linear formula, said "code length" is made into the average (predicted code length) of several code length, said above "absolute value of the value to encode" It is also possible to replace the average of the absolute values of a plurality of values to be encoded, thereby obtaining the above equation (1). From the above description, it can be seen that the encoding number n obtained by the above equation (1) can minimize the average code length in each block.

(画像伸長処理の動作例)
次に、図7の流れ図を参照しつつ、第1実施形態の画像処理装置による画像伸長処理の動作例を説明する。図7の処理は、ユーザによるプログラム実行指示に応じて、CPU14がプログラムを実行することで開始される。
(Example of image expansion processing)
Next, an operation example of image decompression processing by the image processing apparatus according to the first embodiment will be described with reference to the flowchart of FIG. The process of FIG. 7 is started when the CPU 14 executes a program in response to a program execution instruction from the user.

ステップS201:CPU14は、データ読込部12または記憶装置13から処理対象画像の圧縮ファイル(上記のS111で生成されたもの)を取得する。   Step S201: The CPU 14 acquires a compressed file of the processing target image (generated in S111 above) from the data reading unit 12 or the storage device 13.

ステップS202:CPU14は、圧縮ファイルに含まれるヘッダ情報を参照し、処理対象画像の画像サイズ情報、1ブロックのサイズ情報、ブロックの配列情報、符号化番号nの記録ビット数の情報を取得する。   Step S202: The CPU 14 refers to the header information included in the compressed file, and acquires the image size information of the processing target image, the size information of one block, the arrangement information of the block, and the number of recording bits of the encoding number n.

ステップS203:CPU14は、圧縮ファイルに含まれる各ブロックの圧縮情報を順次伸長する。   Step S203: The CPU 14 sequentially decompresses the compression information of each block included in the compressed file.

具体的には、CPU14は、符号化番号nの記録ビット数の情報に基づいて、各ブロックの圧縮情報の先頭部から、そのブロックに対応する符号化番号nを取得する。次に、CPU14は、上記のS107の符号化規則に基づいてブロック内の各画素情報を順次伸長し、各画素の画像内予測差分の値を取得する。なお、CPU14は、1ブロックのサイズ情報を参照することで、各画素の画像内予測差分の値を正しく再配置できる。   Specifically, the CPU 14 acquires the encoding number n corresponding to the block from the head of the compression information of each block based on the information on the number of recording bits of the encoding number n. Next, the CPU 14 sequentially expands each piece of pixel information in the block based on the above-described encoding rule of S107, and acquires the value of the intra-picture prediction difference of each pixel. Note that the CPU 14 can correctly rearrange the values of the intra-picture prediction differences of each pixel by referring to the size information of one block.

そして、CPU14は、各ブロックで上記の動作を繰り返すことで、処理対象画像の全画素で画像内予測差分の値を取得できる。なお、CPU14は、処理対象画像の画像サイズ情報またはブロックの配列情報を参照することで、各ブロックを正しく再配置できる。   And CPU14 can acquire the value of the prediction difference in a picture in all the pixels of a process target picture by repeating said operation | movement by each block. The CPU 14 can correctly rearrange each block by referring to the image size information of the processing target image or the block arrangement information.

ステップS204:CPU14は、S203で取得した画像内予測差分の値から、処理対象画像の各画素値を求める。これにより、CPU14は、圧縮ファイルから処理対象画像を復元できる。なお、CPU14は、復元した処理対象画像をモニタ19に表示出力してもよく、復元した処理対象画像を記憶装置13に記録してもよい。   Step S204: The CPU 14 obtains each pixel value of the processing target image from the value of the intra-picture prediction difference acquired in S203. Thereby, the CPU 14 can restore the processing target image from the compressed file. The CPU 14 may display and output the restored processing target image on the monitor 19, or may record the restored processing target image in the storage device 13.

<第2実施形態の説明>
図8は、第2実施形態における電子カメラの構成例を示すブロック図である。電子カメラ31は、撮像光学系32と、撮像素子33と、画像処理エンジン34と、ROM35と、メインメモリ36と、記録I/F37と、ユーザの操作を受け付ける操作部38とを有している。ここで、撮像素子33、ROM35、メインメモリ36、記録I/F37および操作部38は、それぞれ画像処理エンジン34に接続されている。
<Description of Second Embodiment>
FIG. 8 is a block diagram illustrating a configuration example of the electronic camera according to the second embodiment. The electronic camera 31 includes an imaging optical system 32, an imaging element 33, an image processing engine 34, a ROM 35, a main memory 36, a recording I / F 37, and an operation unit 38 that receives user operations. . Here, the image sensor 33, the ROM 35, the main memory 36, the recording I / F 37, and the operation unit 38 are connected to the image processing engine 34, respectively.

撮像素子33は、撮像光学系32によって結像される被写体の像を撮像し、撮像した画像の画像信号を生成する撮像デバイスである。なお、撮像素子33から出力された画像信号は、A/D変換回路(不図示)を介して制御部に入力される。   The imaging element 33 is an imaging device that captures an image of a subject formed by the imaging optical system 32 and generates an image signal of the captured image. The image signal output from the image sensor 33 is input to the control unit via an A / D conversion circuit (not shown).

画像処理エンジン34は、電子カメラ31の動作を統括的に制御するプロセッサである。例えば、画像処理エンジン34は、撮像した画像のデータに対して各種の画像処理(色補間処理、階調変換処理、輪郭強調処理、ホワイトバランス調整、色変換処理など)を施す。また、画像処理エンジン34は、プログラムの実行により、画像圧縮装置(第1実施形態の差分演算部21、領域分割部22、番号取得部23、符号化処理部24、圧縮情報生成部25)として機能する。   The image processing engine 34 is a processor that comprehensively controls the operation of the electronic camera 31. For example, the image processing engine 34 performs various types of image processing (color interpolation processing, gradation conversion processing, contour enhancement processing, white balance adjustment, color conversion processing, etc.) on the captured image data. Further, the image processing engine 34 is configured as an image compression device (difference calculation unit 21, area division unit 22, number acquisition unit 23, encoding processing unit 24, and compression information generation unit 25 of the first embodiment) by executing a program. Function.

ROM35には、画像処理エンジン34によって実行されるプログラムが記憶されている。また、メインメモリ36は、画像処理の前工程や後工程で画像のデータを一時的に記憶する。   The ROM 35 stores a program executed by the image processing engine 34. The main memory 36 temporarily stores image data in the pre-process and post-process of image processing.

記録I/F37は、不揮発性の記憶媒体39を接続するためのコネクタを有している。そして、記録I/F37は、コネクタに接続された記憶媒体39に対してデータの書き込み/読み込みを実行する。上記の記憶媒体39は、ハードディスクや、半導体メモリを内蔵したメモリカードなどで構成される。なお、図8では記憶媒体39の一例としてメモリカードを図示する。   The recording I / F 37 has a connector for connecting a nonvolatile storage medium 39. The recording I / F 37 executes data writing / reading with respect to the storage medium 39 connected to the connector. The storage medium 39 includes a hard disk, a memory card incorporating a semiconductor memory, or the like. In FIG. 8, a memory card is illustrated as an example of the storage medium 39.

第2実施形態の電子カメラ31は、ユーザの撮像指示をトリガとする撮像処理において、撮像素子33で撮像された画像に対して第1実施形態の画像圧縮処理(図2の流れ図の処理)を施す。そして、電子カメラ31は撮像画像の圧縮ファイルを記憶媒体39へ記録する。これにより、第2実施形態の電子カメラ31では、より多くの画像の情報を記憶媒体39へ効率的に記録することが可能となる。   The electronic camera 31 according to the second embodiment performs the image compression process according to the first embodiment (the process illustrated in the flowchart of FIG. 2) on the image captured by the image sensor 33 in the imaging process triggered by the user's imaging instruction. Apply. Then, the electronic camera 31 records the compressed file of the captured image on the storage medium 39. As a result, the electronic camera 31 of the second embodiment can efficiently record more image information on the storage medium 39.

<実施形態の補足事項>
上記の各実施形態では、差分演算部21、領域分割部22、番号取得部23、符号化処理部24、圧縮情報生成部25の機能をプログラムによってソフトウエア的に実現する例を説明したが、ASICによって上記の各部をハードウエア的に実現しても勿論かまわない。
<Supplementary items of the embodiment>
In each of the above embodiments, an example has been described in which the functions of the difference calculation unit 21, the region division unit 22, the number acquisition unit 23, the encoding processing unit 24, and the compression information generation unit 25 are realized by software. Of course, the above-described units may be realized by hardware using an ASIC.

また、上記の第1実施形態ではグレースケール画像を処理対象画像とする例を説明したが、カラー画像に本発明の画像圧縮処理を施しても勿論かまわない。例えば、カラー画像に本発明の画像圧縮処理を施す場合、RGBの各チャネルでそれぞれ上記の画像圧縮処理を実行すればよい。あるいはYCbCrの各チャネルでそれぞれ上記の画像圧縮処理を実行してもよい。   In the first embodiment described above, an example in which a grayscale image is a processing target image has been described. However, a color image may be subjected to the image compression processing of the present invention as a matter of course. For example, when the image compression processing of the present invention is performed on a color image, the above-described image compression processing may be executed for each of the RGB channels. Alternatively, the above-described image compression processing may be executed on each YCbCr channel.

また、上記の第1実施形態において、符号化番号nの範囲(1−8)や1ブロックのサイズ(4×4画素)はあくまで一例にすぎず、本発明の実施時にはこれらのパラメータは適宜変更してもよい。   In the first embodiment, the range of the encoding number n (1-8) and the size of one block (4 × 4 pixels) are merely examples, and these parameters are appropriately changed when the present invention is implemented. May be.

また、上記の第1実施形態において、1ブロックのサイズや符号化番号nの記録ビット数が規格化されて一義的に定まっている場合には、ヘッダ情報から上記の情報を省略してもよい。   In the first embodiment, when the size of one block and the number of recording bits of the encoding number n are standardized and uniquely determined, the above information may be omitted from the header information. .

なお、本発明の撮像装置は、例えば、携帯電話などの電子機器に内蔵されるカメラモジュールや、一眼レフ型の電子カメラや、スキャナ等の撮像装置にも広く適用できる。   Note that the imaging device of the present invention can be widely applied to imaging devices such as camera modules incorporated in electronic devices such as mobile phones, single-lens reflex electronic cameras, and scanners.

以上の詳細な説明により、実施形態の特徴点および利点は明らかになるであろう。これは、特許請求の範囲が、その精神および権利範囲を逸脱しない範囲で前述のような実施形態の特徴点および利点にまで及ぶことを意図するものである。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良および変更に容易に想到できるはずであり、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物および均等物によることも可能である。   From the above detailed description, features and advantages of the embodiments will become apparent. It is intended that the scope of the claims extend to the features and advantages of the embodiments as described above without departing from the spirit and scope of the right. Further, any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and modifications, and there is no intention to limit the scope of the embodiments having the inventive features to those described above. It is also possible to use appropriate improvements and equivalents within the scope disclosed in.

11…コンピュータ、12…データ読込部、13…記憶装置、14…CPU、21…差分演算部、22…領域分割部、23…番号取得部、24…符号化処理部、25…圧縮情報生成部、31…電子カメラ、33…撮像素子、34…画像処理エンジン、35…ROM、37…記録I/F、39…記憶媒体 DESCRIPTION OF SYMBOLS 11 ... Computer, 12 ... Data reading part, 13 ... Memory | storage device, 14 ... CPU, 21 ... Difference calculating part, 22 ... Area division part, 23 ... Number acquisition part, 24 ... Encoding process part, 25 ... Compression information generation part 31 ... Electronic camera, 33 ... Image sensor, 34 ... Image processing engine, 35 ... ROM, 37 ... Recording I / F, 39 ... Storage medium

Claims (9)

処理対象画像の画素の予測差分を求める差分演算部と、
前記画素の前記予測差分の大きさにより所定の値を求め、前記予測差分の絶対値を前記所定の値で除した余を示す可変長の第1符号と、前記予測差分の絶対値を前記所定の値で除した商を示す可変長の第2符号と、前記予測差分の正負を示す固定長の第3符号とを求める符号化処理部と、
前記第1符号、前記第2符号および前記第3符号を所定順に配置して、前記処理対象画像の圧縮情報を生成する圧縮情報生成部と、
を備える画像圧縮装置。
A difference calculation unit for obtaining a prediction difference of pixels of the processing target image;
A predetermined value is obtained based on the magnitude of the prediction difference of the pixel, a variable-length first code indicating a remainder obtained by dividing the absolute value of the prediction difference by the predetermined value, and the absolute value of the prediction difference is the predetermined value An encoding processing unit that obtains a variable-length second code indicating a quotient divided by the value and a fixed-length third code indicating the sign of the prediction difference;
A compression information generating unit that arranges the first code, the second code, and the third code in a predetermined order to generate compression information of the processing target image;
An image compression apparatus comprising:
請求項1に記載の画像圧縮装置において、
前記符号化処理部は、前記画素の前記予測差分の大きさにより符号化番号nを求め、2nを前記所定の値とし、
前記圧縮情報生成部は、前記第1符号、前記第2符号および前記第3符号を所定順に配置した画素情報と前記符号化番号nとを対応付けする画像圧縮装置。
The image compression apparatus according to claim 1.
The encoding processing unit obtains an encoding number n based on the size of the prediction difference of the pixel, 2 n is set as the predetermined value,
The compression information generation unit is an image compression device that associates pixel information in which the first code, the second code, and the third code are arranged in a predetermined order with the encoding number n.
請求項2に記載の画像圧縮装置において、
前記処理対象画像を複数の領域に分割する領域分割部をさらに備え、
前記符号化処理部は、前記領域内の複数の前記画素の前記予測差分の絶対値の平均値に基づいて、前記領域ごとに前記符号化番号nを求める画像圧縮装置。
The image compression apparatus according to claim 2,
An area dividing unit that divides the processing target image into a plurality of areas;
The image compression device, wherein the encoding processing unit obtains the encoding number n for each region based on an average value of absolute values of the prediction differences of the plurality of pixels in the region.
請求項3に記載の画像圧縮装置において、
前記符号化処理部は、前記予測差分の絶対値の平均値をMとしたときに、
「((M+0.5)/2N)+N」の値を最小にする0以上の整数である変数Nの値を前記符号化番号nとする画像圧縮装置。
The image compression apparatus according to claim 3.
When the average value of the absolute values of the prediction differences is M, the encoding processing unit,
An image compression apparatus in which the value of a variable N that is an integer of 0 or more that minimizes the value of “((M + 0.5) / 2 N ) + N” is the encoding number n.
請求項2から請求項4のいずれか1項に記載の画像圧縮装置において、
前記符号化処理部は、前記予測差分の絶対値を2nで除した商の値まで2進数の一方の符号を連続させるとともに、前記一方の符号の末尾に2進数の他方の符号を付して前記第2符号を生成する画像圧縮装置。
The image compression apparatus according to any one of claims 2 to 4,
The encoding processing unit continues one binary code up to a quotient value obtained by dividing the absolute value of the prediction difference by 2 n , and attaches the other binary code to the end of the one code. An image compression apparatus for generating the second code.
被写体を撮像して処理対象画像を取得する撮像部と、
請求項1から請求項5のいずれか1項に記載の画像圧縮装置と、を備える撮像装置。
An imaging unit that captures a subject and obtains a processing target image;
An image pickup apparatus comprising: the image compression apparatus according to any one of claims 1 to 5.
コンピュータを、請求項1から請求項5のいずれか1項に記載の画像圧縮装置として動作させるプログラム。   A program for causing a computer to operate as the image compression apparatus according to any one of claims 1 to 5. 請求項1から請求項5のいずれか1項に記載の画像圧縮装置で生成された処理対象画像の圧縮情報、または請求項7に記載の前記プログラムをコンピュータに実行させることで生成された処理対象画像の圧縮情報を伸張する画像伸張装置。   The processing target generated by causing the computer to execute the compression information of the processing target image generated by the image compression apparatus according to any one of claims 1 to 5, or the program according to claim 7. An image expansion device that expands image compression information. コンピュータを、請求項8に記載の画像伸長装置として動作させるプログラム。
A program that causes a computer to operate as the image expansion device according to claim 8.
JP2009166519A 2009-07-15 2009-07-15 Image compression apparatus, imaging apparatus, program, and image expansion apparatus Active JP5413007B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009166519A JP5413007B2 (en) 2009-07-15 2009-07-15 Image compression apparatus, imaging apparatus, program, and image expansion apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009166519A JP5413007B2 (en) 2009-07-15 2009-07-15 Image compression apparatus, imaging apparatus, program, and image expansion apparatus

Publications (2)

Publication Number Publication Date
JP2011023926A true JP2011023926A (en) 2011-02-03
JP5413007B2 JP5413007B2 (en) 2014-02-12

Family

ID=43633617

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009166519A Active JP5413007B2 (en) 2009-07-15 2009-07-15 Image compression apparatus, imaging apparatus, program, and image expansion apparatus

Country Status (1)

Country Link
JP (1) JP5413007B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760481A (en) * 2022-04-29 2022-07-15 北京淳中科技股份有限公司 Video coding method, device, equipment and storage medium
CN116957524A (en) * 2023-09-21 2023-10-27 青岛阿斯顿工程技术转移有限公司 Talent information intelligent management method and system in technology transfer process

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000022960A (en) * 1998-07-03 2000-01-21 Canon Inc Device and method for image processing and storage medium
JP2000308059A (en) * 1999-04-19 2000-11-02 Sharp Corp Method for compressing digital image, method for storing and retrieving reference frame in and from digital animation decoder, and digital animation decoder
JP2009105838A (en) * 2007-10-25 2009-05-14 Sony Corp Encoding method, device, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000022960A (en) * 1998-07-03 2000-01-21 Canon Inc Device and method for image processing and storage medium
JP2000308059A (en) * 1999-04-19 2000-11-02 Sharp Corp Method for compressing digital image, method for storing and retrieving reference frame in and from digital animation decoder, and digital animation decoder
JP2009105838A (en) * 2007-10-25 2009-05-14 Sony Corp Encoding method, device, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114760481A (en) * 2022-04-29 2022-07-15 北京淳中科技股份有限公司 Video coding method, device, equipment and storage medium
CN114760481B (en) * 2022-04-29 2023-05-30 北京淳中科技股份有限公司 Video coding method, device, equipment and storage medium
CN116957524A (en) * 2023-09-21 2023-10-27 青岛阿斯顿工程技术转移有限公司 Talent information intelligent management method and system in technology transfer process
CN116957524B (en) * 2023-09-21 2024-01-05 青岛阿斯顿工程技术转移有限公司 Talent information intelligent management method and system in technology transfer process

Also Published As

Publication number Publication date
JP5413007B2 (en) 2014-02-12

Similar Documents

Publication Publication Date Title
US8509547B2 (en) Scan conversion apparatus, image encoding apparatus, and control method therefor
JP4682102B2 (en) Image coding apparatus and image coding method
US8457428B2 (en) Image coding apparatus, control method thereof, and storage medium
JP4641892B2 (en) Moving picture encoding apparatus, method, and program
US8600183B2 (en) Optimized method and system for entropy coding
US10051276B2 (en) Image encoding apparatus, method and imaging apparatus
JP2008543203A (en) Temporary image buffer for image processor using compressed raw image
CN107105208A (en) A kind of lossless coding and coding/decoding method of Bayer images
JP2011233972A (en) Image encoder, image encoding method, image decoder, and image decoding method
WO2009087783A1 (en) Data generator for coding, method of generating data for coding, decoder and decoding method
JP2012129888A (en) Image encoding apparatus and image encoding method
JP2016021731A (en) Image capturing apparatus, method for controlling the same, and program
JP5413007B2 (en) Image compression apparatus, imaging apparatus, program, and image expansion apparatus
JP2007267123A (en) Moving image encoding apparatus
JP2005124001A (en) Apparatus, method, and program for motion picture encoding apparatus, method and program for motion picture decoding
US9020289B2 (en) Image processing apparatus and image processing method for compressing image data by combining spatial frequency conversion, quantization, and entropy coding
JP2009159303A (en) Imaging apparatus
JP2009117998A (en) Data compression device and data compression program
JP4706567B2 (en) Image processing method, image processing method program, recording medium storing image processing method program, and image processing apparatus
US9591332B2 (en) Image processing apparatus performing preprocessing to prevent boundary positions of divided rectangular regions of image data from being separated into dense and sparse portions
JP2007295319A (en) Image processing apparatus and image forming apparatus equipped therewith
JP2023154574A (en) Image processing apparatus and method for controlling the same and program
JP4161312B2 (en) Image quality evaluation value calculation method and image quality evaluation value calculation device
JP4490051B2 (en) Image coding apparatus and image coding method
JP4939460B2 (en) Image processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120703

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130319

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130326

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130524

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131015

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131028

R150 Certificate of patent or registration of utility model

Ref document number: 5413007

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250