JP2000244922A - Method for compressing picture data - Google Patents

Method for compressing picture data

Info

Publication number
JP2000244922A
JP2000244922A JP32838199A JP32838199A JP2000244922A JP 2000244922 A JP2000244922 A JP 2000244922A JP 32838199 A JP32838199 A JP 32838199A JP 32838199 A JP32838199 A JP 32838199A JP 2000244922 A JP2000244922 A JP 2000244922A
Authority
JP
Japan
Prior art keywords
data
bits
bit
effective
image data
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
JP32838199A
Other languages
Japanese (ja)
Other versions
JP4196039B2 (en
Inventor
Sadami Okada
貞実 岡田
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 JP32838199A priority Critical patent/JP4196039B2/en
Priority to US09/466,869 priority patent/US6744929B1/en
Publication of JP2000244922A publication Critical patent/JP2000244922A/en
Application granted granted Critical
Publication of JP4196039B2 publication Critical patent/JP4196039B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To obtain a method for compressing picture data by which acquired picture data with high definition can be compressed at a high compression rate. SOLUTION: Picture data (source data) acquired by a CCD 1 a 12-bit data are divided into high-order bit data in high-order 8 bits and low-order bit data in low-order 4 bits. A JPEG lossless coding is applied to the high-order bit data and a valid bit number (4 bits or below) of the low-order bit data is decided on the basis of a size (digit number) of the source data. The low-order bit data within a bit width of the valid bit number are extracted and stored in a storage medium 2 together with the compressed high-order bit data.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、画像データ圧縮方
法に関し、特に、多数の階調を持つ多値中間調画像デー
タの圧縮/復元に適用して有用な画像データ圧縮方法に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for compressing image data, and more particularly to a method for compressing image data useful for compressing / decompressing multi-level halftone image data having a large number of gradations.

【0002】[0002]

【従来の技術】画像入力機器(例えば、ディジタル・カ
メラに用いられるCCD)の発達に伴い、画像データの
取り込みが高精細に行われるようになった。このように
高精細に得られた元データ(RAWデータ)に対して
は、パーソナルコンピュータ等でユーザによる画像処理
が施され、その後、出力機器(例えば、CRT、プリン
タ)で所望の画像が得られるようになっている。
2. Description of the Related Art With the development of image input devices (for example, CCDs used in digital cameras), image data has been taken in with high definition. The original data (RAW data) thus obtained with high definition is subjected to image processing by a user using a personal computer or the like, and thereafter, a desired image is obtained on an output device (for example, a CRT or a printer). It has become.

【0003】CCDからの信号(信号電荷)で表される
画像データは、例えばA/Dコンバータによって、1画
素当り10ビット〜12ビットのディジタル信号に変換
される。12ビットのディジタル信号に変換された場
合、最大階調は、「4096」である。このように10
ビット〜12ビットで高精細に取り込まれた画像データ
は、1画素当り8ビット程度の画像データに変更され、
出力機器で画像の再現が行われる。
Image data represented by a signal (signal charge) from a CCD is converted into a digital signal of 10 to 12 bits per pixel by, for example, an A / D converter. When converted into a 12-bit digital signal, the maximum gradation is "4096". Thus 10
The image data captured in high definition with bits to 12 bits is changed into image data of about 8 bits per pixel,
The image is reproduced on the output device.

【0004】上記のように取り込み時に1画素当りの画
像データのビット数を10ビット〜12ビットで表すの
は、取り込み時は、撮影環境が著しく明るい場合から著
しく暗い場合まで幅広く変化し、この広い範囲で満遍な
く画像データを得る必要があるからである。一方、再現
時は、1コマ(画面)内で実際に表される明度差が撮影
環境に比べて小さいため、8ビット程度の画像データで
1コマ内の画像の明暗を十分に表現できる。
As described above, the reason why the number of bits of image data per pixel is represented by 10 bits to 12 bits at the time of capturing is as follows. This is because it is necessary to obtain image data evenly in the range. On the other hand, at the time of reproduction, since the brightness difference actually represented in one frame (screen) is smaller than that in the shooting environment, the brightness of the image in one frame can be sufficiently expressed by image data of about 8 bits.

【0005】ところで、CCDによって取り込まれた画
像データは、記憶媒体に記憶され、この記憶媒体から適
宜、画像データの読み出しが行われるが、従来は、記憶
媒体には1画素当り8ビットに変更された画像データが
記憶されていた。
The image data captured by the CCD is stored in a storage medium, and the image data is read out from the storage medium as appropriate. Conventionally, the storage medium is changed to 8 bits per pixel. Image data is stored.

【0006】ここで、1画素当り8ビットの画像データ
をそのまま記憶したのでは、1コマ(1画面)当りのデ
ータ量が膨大となるため、画像データを圧縮処理した
後、記憶媒体に記憶するようにしている。一般的な、画
像データの圧縮処理としては、元データ(RAWデー
タ)に対するDPCM処理、ハフマン符号化、算術符号
化、これらを適宜用いたJPEGロスレス符号化、Ziv-
Lempel法に代表されるユニバーサル符号化等が知られて
いる。
Here, if the image data of 8 bits per pixel is stored as it is, the amount of data per frame (one screen) becomes enormous. Therefore, after compressing the image data, the image data is stored in the storage medium. Like that. General image data compression processing includes DPCM processing on original data (RAW data), Huffman coding, arithmetic coding, JPEG lossless coding using these as appropriate, Ziv-
Universal coding and the like represented by the Lempel method are known.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、記憶媒
体に1画素当り8ビットの画像データを元データとして
記憶したのでは、この1画素当り8ビットの元データに
対してユーザが所望の加工/修正を加える場合、加工/
修正後の画像データが1画素当り8ビット以下となっ
て、その画質が低下する。
However, when the image data of 8 bits per pixel is stored as the original data in the storage medium, the user can process / modify the original data of 8 bits per pixel as desired. When adding
The corrected image data becomes 8 bits or less per pixel, and the image quality deteriorates.

【0008】しかして、記憶媒体に、CCDにより得ら
れた高精細な画像データ(10ビット〜12ビット)を
元データとしてそのまま保存しておき、この元データを
読み出し、これに対して加工/修正を行うことで、加工
/修正後の画像データの画質を高めることができる。こ
の高精細な元データを記憶媒体に記憶する際にも、上記
した圧縮処理(好ましくは、可逆符号化処理)を施す必
要があるが、10ビット〜12ビットの画像データに、
8ビットの画像データと同様の圧縮処理を施しても、高
い圧縮率を達成することができない。これは、画像デー
タを圧縮する場合(特に、DPCM符号化の場合)、近
接する画素間の画素データに相関性があればある程に高
い圧縮率が得られるが、例えば、12ビット程度の画像
データであれば、画素間の画像データの相関性は、上位
の6ビット〜8ビットでは顕著であるが、下位の3〜4
ビットに関しては相関性がほとんどないからである。従
って、10ビット〜12ビットの画像データに対して、
そのまま圧縮を施しても高い圧縮率は得られず、圧縮後
であっても、依然、データが大きく、容量の大きな記憶
媒体が必要になる。
Thus, the high-definition image data (10 to 12 bits) obtained by the CCD is stored as it is in the storage medium as the original data, and the original data is read and processed / corrected. Is performed, the image quality of the processed / corrected image data can be improved. When the high-definition original data is stored in a storage medium, it is necessary to perform the above-described compression processing (preferably, lossless encoding processing).
Even if the same compression processing is performed on 8-bit image data, a high compression ratio cannot be achieved. This is because when image data is compressed (particularly in the case of DPCM encoding), the higher the correlation between pixel data between adjacent pixels, the higher the compression ratio can be obtained. In the case of data, the correlation of image data between pixels is remarkable in the higher 6 bits to 8 bits, but lower 3 to 4 bits.
This is because the bits have little correlation. Therefore, for 10-bit to 12-bit image data,
Even if compression is performed as it is, a high compression ratio cannot be obtained, and even after compression, a storage medium with large data and large capacity is still required.

【0009】本発明は、かかる事情に鑑みてなされたも
ので、高精細で取得された画像データを高い圧縮率で圧
縮することができる画像データ圧縮方法を提供すること
を目的とする。
The present invention has been made in view of such circumstances, and has as its object to provide an image data compression method capable of compressing image data obtained with high definition at a high compression ratio.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するた
め、請求項1に記載の発明は、画像入力手段(1)によ
って1画素当り一定ビット数(12ビット)で取得され
た画像データを圧縮するに当り、前記一定ビット数の画
素毎の元データを上位の所定ビット数(8ビット)で表
される上位側ビットデータと下位の所定ビット数(4ビ
ット)で表される下位側ビットデータとに分離するステ
ップと、前記上位側ビットデータに可逆的な符号化(J
PEGロスレス符号化)を施すステップと、前記一定ビ
ット数(12ビット)の画素毎の元データに基づいて前
記下位側ビットデータ(4ビット)の有効ビット数を決
定するステップと、前記有効ビット数の幅で前記下位側
ビットデータの所定ビット(4ビット)のうち上位のデ
ータを抽出するステップと、前記可逆的な符号化(JP
EGロスレス符号化)が施された上位側ビットデータと
前記抽出された有効ビット数の幅の下位側ビットデータ
とを、個別に管理するための管理データを生成するステ
ップと、前記可逆的な符号化(JPEGロスレス符号
化)が施された上位側ビットデータと前記抽出された有
効ビット数の幅の下位側ビットデータと前記生成された
管理データとを記憶媒体(2)に記憶するステップとに
よって、当該圧縮処理を行なうものである。
In order to achieve the above object, the invention according to claim 1 compresses image data obtained by the image input means (1) with a fixed number of bits (12 bits) per pixel. In doing so, the original data for each pixel having the predetermined number of bits is converted into upper bit data represented by a predetermined upper bit number (8 bits) and lower bit data represented by a lower predetermined bit number (4 bits). And reversible encoding (J
PEG lossless coding); determining the number of effective bits of the lower-order bit data (4 bits) based on the original data of each pixel having the fixed number of bits (12 bits); Extracting higher-order data from predetermined bits (4 bits) of the lower-order bit data with a width of
Generating management data for individually managing upper bit data subjected to EG lossless encoding) and lower bit data having a width of the extracted number of effective bits, and the reversible code. Storing the higher-order bit data subjected to encoding (JPEG lossless encoding), the lower-order bit data having a width of the extracted effective number of bits, and the generated management data in a storage medium (2). Perform the compression processing.

【0011】又、請求項2に記載の発明は、請求項1に
記載の画像データ圧縮方法において、前記有効ビット数
を、前記画素毎の元データの有効ビット幅に応じて決定
するようにしたものである。又、請求項3に記載の発明
は、請求項1又は請求項2に記載の画像データ圧縮方法
において、前記画素毎の有効ビット幅を前記画像入力手
段の検出精度に応じた値で決定し、前記上位の所定ビッ
ト数を、近傍の画素との間で相関が生じる傾向の強い上
位のビット数とすると共にその値を経験則より求めるよ
うにしたものである。
According to a second aspect of the present invention, in the image data compression method according to the first aspect, the number of effective bits is determined according to an effective bit width of original data for each pixel. Things. According to a third aspect of the present invention, in the image data compression method according to the first or second aspect, the effective bit width of each pixel is determined by a value corresponding to the detection accuracy of the image input unit. The upper predetermined number of bits is set to an upper bit number that has a strong tendency to cause a correlation with a neighboring pixel, and the value is obtained by empirical rules.

【0012】(作用)上記請求項1の発明によれば、高
精細に得られた元データについて、近傍画素との相関性
の高い上位側ビットデータに関しては高い圧縮での可変
長符号化が可能になり、相関性が低くなる下位側ビット
データに関しては、有効ビット数の幅から外れたデータ
を切り捨てることで復元画素の画質劣化を伴うことなく
更に高い圧縮率が得られ、かつ高速に処理を行なうこと
ができる。
(Operation) According to the first aspect of the present invention, variable-length encoding with high compression of high-order bit data having high correlation with neighboring pixels is possible for original data obtained with high definition. For lower-order bit data with low correlation, data with a width outside the range of the effective number of bits is truncated to obtain a higher compression ratio without deteriorating the image quality of the restored pixels and perform high-speed processing. Can do it.

【0013】又、請求項2の発明によれば、元データの
有効ビット幅(例えば、9ビット)が、下位側ビットデ
ータの全部又は一部に含まれている場合に、当該全部又
は一部のみが記録されるため、効率の良い画像データの
記憶が行われる。又、請求項3の発明によれば、可逆符
号化が施される上位側ビットデータのビット数が相関性
の高い値に経験則によって求められるため、DPCM符
号化等により、高い圧縮率での画像データの圧縮が可能
になる。
According to the second aspect of the present invention, when the effective bit width (for example, 9 bits) of the original data is included in all or a part of the lower-order bit data, the whole or a part of the lower-order bit data is included. Since only image data is recorded, efficient storage of image data is performed. According to the third aspect of the present invention, the number of bits of the upper bit data to be subjected to lossless encoding is determined by a rule of thumb to a value having a high correlation, so that DPCM encoding or the like achieves a high compression ratio. Image data can be compressed.

【0014】[0014]

【発明の実施の形態】(第1の実施の形態)以下、本発
明の第1の実施の形態について、添付図面を参照して説
明する。尚、この第1の実施の形態は、請求項1から請
求項3に対応する。図1は、本発明の画像データ圧縮方
法が適用される符号化処理装置10の構成を示すブロッ
ク図である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (First Embodiment) A first embodiment of the present invention will be described below with reference to the accompanying drawings. Note that the first embodiment corresponds to claims 1 to 3. FIG. 1 is a block diagram showing a configuration of an encoding processing device 10 to which the image data compression method of the present invention is applied.

【0015】符号化処理装置10は、画像入力機器(C
CD)1から入力された画像信号を、ディジタル化した
のち、DPCM符号化とハフマン符号化とが併用された
JPEGロスレス符号化により、当該画像データを圧縮
して記憶媒体2に記憶するものである。ここで、符号化
処理装置10は、CCD1と一体に(例えば、ディジタ
ルカメラ内に)設けられる。又、記憶媒体2に記憶され
た圧縮画像データは、後述するように、パーソナルコン
ピュータ等の復号化処理装置20(図6)にて復号化さ
れ、その後、ユーザによる加工/修正が加えられて、画
像が復元される。
The encoding processing device 10 includes an image input device (C
After the image signal input from the CD 1 is digitized, the image data is compressed and stored in the storage medium 2 by JPEG lossless encoding using both DPCM encoding and Huffman encoding. . Here, the encoding processing device 10 is provided integrally with the CCD 1 (for example, in a digital camera). Also, the compressed image data stored in the storage medium 2 is decoded by a decoding processing device 20 (FIG. 6) such as a personal computer, as described later, and then processed / corrected by the user, The image is restored.

【0016】この符号化処理装置10の入力側に接続さ
れるCCD1は、画素(セル)がm行×n列のマトリッ
クス状に配置され、図2に示すように、その受光面に3
色(図示例では、「R」「G」「B」)のカラーフィル
タが配置されている。符号化処理装置10は、CCD1
からの信号(信号電荷)を4096階調のディジタル信
号(12ビット)に変換するA/D変換器11、ディジ
タル化された信号(元データ)を一時的に記憶する入力
データバッファ12、入力データバッファ12に一時的
に記憶された信号(元データ)を符号化するCPU1
3、CPU13が実行するプログラム等を記憶する主メ
モリ14、CPU13にて符号化された信号(圧縮画像
データ)を一時的に記憶し、所定のタイミングで記憶媒
体2側に出力し、記憶させるための出力データバッファ
15等により構成されている。
The CCD 1 connected to the input side of the encoding processor 10 has pixels (cells) arranged in a matrix of m rows.times.n columns. As shown in FIG.
Color filters (in the illustrated example, “R”, “G”, and “B”) are arranged. The encoding processing device 10 includes a CCD 1
A / D converter 11 for converting a signal (signal charge) from the A / D into a digital signal (12 bits) of 4096 gradations, an input data buffer 12 for temporarily storing a digitized signal (original data), and an input data CPU 1 that encodes a signal (original data) temporarily stored in buffer 12
3. A main memory 14 for storing a program executed by the CPU 13, etc., for temporarily storing a signal (compressed image data) encoded by the CPU 13, outputting the signal to the storage medium 2 at a predetermined timing, and storing the signal. And the like.

【0017】このうち入力データバッファ12は、CC
D1によって得られた画素毎の画素データ(m×n個)
を、各行(ライン)毎に記憶するもので、符号化の対象
となる1行分のデータ(n個の画素データ)をひとまと
めにして記憶する対象ライン用バッファ12A、対象ラ
イン用バッファ12Aからシフトされた1行前のデータ
を記憶する1ライン前用バッファ12B、1ライン前用
バッファ12Bからシフトされた2行前のデータを記憶
する2ライン前用バッファ12Cを構成する。
The input data buffer 12 includes a CC
Pixel data for each pixel obtained by D1 (m × n)
Is stored for each row (line), and is shifted from the target line buffer 12A and the target line buffer 12A which collectively store data (n pixel data) for one row to be encoded. The buffer for one line before 12B that stores the data of one line before that is stored and the buffer 12C for two lines before that stores the data of two lines before shifted from the buffer for one line 12B.

【0018】又、出力データバッファ15には、アドレ
スバッファ15A、ハイバッファ15B、ロウバッファ
15Cが構成され、このうちアドレスバッファ15Aに
後述する「圧縮データブロック位置情報」、ハイバッフ
ァ15Bに後述する「上位側圧縮データ」及び「下位側
データブロック位置情報」、ロウバッファ15Cに「下
位側データ」が、各々、記憶される。尚、アドレスバッ
ファ15Aに、予め1行の画像データの位置情報として
2バイト、又は、4バイトを割り当てるようにしておく
ことで、任意の行の位置情報を、より速く得ることがで
きる。
The output data buffer 15 includes an address buffer 15A, a high buffer 15B, and a low buffer 15C, of which "compressed data block position information" described later in the address buffer 15A and "compressed data block position information" described later in the high buffer 15B. “Upper compressed data” and “lower data block position information” and “lower data” are stored in the row buffer 15C, respectively. By assigning 2 bytes or 4 bytes to the address buffer 15A in advance as the position information of one line of image data, position information of an arbitrary line can be obtained more quickly.

【0019】次に、符号化処理装置10のCPU13に
て実行される、1コマ(画面)分の画像データの符号化
処理について、図3のプログラムフローチャートを用い
て説明する。この符号化処理が開始されると(スター
ト)、先ず、ステップS1において、入力データバッフ
ァ12の対象ライン用バッファ12Aに1行毎にn個宛
記憶される画素データ(12ビットの元データ)から、
注目画素の画素データが読み込まれる。
Next, an encoding process of image data for one frame (screen) executed by the CPU 13 of the encoding processing device 10 will be described with reference to a program flowchart of FIG. When the encoding process is started (start), first, in step S1, n pieces of pixel data (12-bit original data) stored in the target line buffer 12A of the input data buffer 12 for each row are n. ,
The pixel data of the target pixel is read.

【0020】ステップS2では、上記読み込まれた注目
画素の画素データ(12ビット)が上位の8ビット(上
位側ビットデータ)と下位の4ビット(下位側ビットデ
ータ)に分離される。このように12ビットの画素デー
タ(元データ)を上位8ビットと下位4ビットとに分離
するのは、12ビットで得られる画像データにおいて
は、一般に、上位6ビット〜上位8ビットまでのデータ
に関しては、近傍の他の画素データとの間に高い相関性
が見られ、高い圧縮率での符号化が可能であるのに対
し、下位4ビットになると他の近傍画素の下位4ビット
との間での相関性が著しく低下するからである。
In step S2, the read pixel data (12 bits) of the target pixel is separated into upper 8 bits (upper bit data) and lower 4 bits (lower bit data). Separating the 12-bit pixel data (original data) into the upper 8 bits and the lower 4 bits in this way, in the image data obtained by 12 bits, generally, the data from the upper 6 bits to the upper 8 bits is used. Has a high correlation with other neighboring pixel data, and can be encoded at a high compression rate. On the other hand, when the lower 4 bits become, the lower 4 bits of other neighboring pixels Is significantly reduced.

【0021】ステップS3では、8ビットの上位側ビッ
トデータがJPEGロスレス符号化によって可逆的に符
号化され、この符号化されたデータが「上位側圧縮デー
タ」として、ハイバッファ15Bに記憶される。このス
テップS3でのJPEGロスレス符号化は、この第1の
実施の形態では、DPCM符号化とハフマン符号化を併
用して、概ね、以下の手順に従って行われる。
In step S3, the upper 8 bits of data are reversibly encoded by JPEG lossless encoding, and the encoded data is stored in the high buffer 15B as "upper compressed data". In the first embodiment, the JPEG lossless encoding in step S3 is generally performed according to the following procedure using both DPCM encoding and Huffman encoding.

【0022】先ず、注目画素の予測値が、近傍の同色カ
ラーフィルタの画素(同色画素)の画素値(上位側ビッ
トデータの値)又は隣接画素の画素値(上位側ビットデ
ータの値)を基に所定の予測式に従って算出される。こ
こで、近傍の画素の画素値としては、注目画素(例え
ば、図2のR44)に対して同一ラインの同色画素(2画
素前のR42)又は2ライン前の同色画素(R24,R2
2)、又は隣接画素(G43,B33,G34)のうち最も予
測誤差が小さくなる画素値が用いられる。
First, the predicted value of the pixel of interest is based on the pixel value (value of higher-order bit data) of a neighboring pixel of the same color filter (same color pixel) or the pixel value of an adjacent pixel (value of higher-order bit data). Is calculated according to a predetermined prediction formula. Here, as the pixel value of the neighboring pixel, the same color pixel (R42 before two pixels) or the same color pixel (R24, R2 two lines before) on the same line with respect to the target pixel (for example, R44 in FIG. 2).
2) or the pixel value of the adjacent pixel (G43, B33, G34) with the smallest prediction error is used.

【0023】実際の予測値の算出に何れの画素値を用い
るか、換言すれば、何れの画素値を変数とした予測式を
用いるかは(最適予測式)、具体的には、2画素前の画
素値、及びその近傍の同色画素又は2画素前の隣接画素
の画素値(何れも上位側ビットデータの値)に基づいて
決定される。即ち、注目画素の2画素前において、この
2画素前の画素値と、その近傍の同色画素又は隣接画素
値の画素値を用いた複数の予測式を用意し、これら予測
式にて複数の仮の予測値を求め、2画素前の画素値と上
記複数の仮の予測値とを各々比較し、その予測誤差が最
も小さくなる予測式を最適予測式として記憶しておく。
そして、この記憶された最適予測式を用いて、今回ルー
プでの注目画素の予測値が算出される。
Which pixel value is used for calculating the actual predicted value, in other words, which prediction value is used as a variable (optimal prediction formula), specifically, two pixels before And the pixel value of the same color pixel in the vicinity thereof or the neighboring pixel two pixels before (all the values of the upper bit data). That is, a plurality of prediction formulas using the pixel value two pixels before the pixel of interest and the pixel value of the same color pixel or the neighboring pixel value in the vicinity of the pixel value two pixels before the target pixel are prepared. Is calculated, and the pixel value two pixels before is compared with each of the plurality of temporary predicted values, and the prediction formula that minimizes the prediction error is stored as the optimal prediction formula.
Then, the predicted value of the target pixel in the current loop is calculated using the stored optimal prediction formula.

【0024】このようにして算出された上位側ビットデ
ータの予測値は、前記ステップS2で分離された上位側
ビットデータ(8ビット)の画素値と比較されてその予
測誤差Δが求められる(DPCM符号化)。そして、こ
の予測誤差Δについて、その発生分布に従ったハフマン
符号化が行われて上位側ビットデータが符号化される
(可逆符号化、可変長符号化)。
The predicted value of the upper bit data calculated in this way is compared with the pixel value of the upper bit data (8 bits) separated in step S2 to obtain a prediction error Δ (DPCM Coding). The prediction error Δ is subjected to Huffman encoding according to the occurrence distribution, and the upper bit data is encoded (lossless encoding, variable length encoding).

【0025】ここで、予測値の算出に当り、同色画素と
して、同一行の同色画素の画素値と、2行前の同色画素
の画素値を用いた予測式が用いられるが、これは、図2
に示すように、3原色CCDの場合、「R」、「B」に
ついては、同じ色成分のカラーフィルタが配置されてい
る画素は、1行前(1ライン前)には存在せず、2行前
に同色の近傍画素が存在するからである。
Here, in calculating the prediction value, a prediction formula using the pixel value of the same color pixel in the same row and the pixel value of the same color pixel two rows before is used as the same color pixel. 2
As shown in the figure, in the case of a three-primary color CCD, for “R” and “B”, the pixel in which the color filter of the same color component is arranged does not exist one line before (one line before), and This is because there is a neighboring pixel of the same color before the row.

【0026】このようにステップS3で上位側ビットデ
ータの符号化が行われると、次のステップS4で、下位
側ビットデータ(4ビット)の有効ビット数(1〜4ビ
ット)が、元データの大きさ(桁数)に応じて決定され
る。ここで、有効ビット数とは、下位側ビットデータ
(4ビット)のうち、記憶しておくべき(画像データの
復元に用いるべき)ビットを上位側から数えたビット数
である(図4中、右下がり斜線部分)。
After the upper bit data is encoded in step S3, the effective bit number (1 to 4 bits) of the lower bit data (4 bits) is changed to the original data in the next step S4. It is determined according to the size (number of digits). Here, the number of effective bits is the number of bits of lower-order bit data (four bits) that are to be stored (to be used for restoring image data) and counted from the upper side (in FIG. 4, (Sloping part to the right).

【0027】この第1の実施の形態では、下位側ビット
データの有効ビット数は、12ビットの元データの有効
ビット幅を、原則として9ビット確保するものとして
(図4(a)〜(d))、その値が求められている。
尚、上記した有効ビット幅は、本実施の形態では、CC
Dの検出精度に応じて決定される。即ち、12ビットの
元データの大きさが12桁のときには、上位側ビットデ
ータ(8ビット)で表しきれない1ビット分が下位側ビ
ットデータで表されるので、有効ビット数は1ビットと
なる(図4(a)の右下がり斜線部分)。又、元データ
の大きさが11桁のときには、上位側ビットデータ(8
ビットのうち下位7ビットで表される)で表しきれない
2ビット分が下位側ビットデータで表されるので、有効
ビット数は2ビットとなる(図4(b)の右下がり斜線
部分)。同様に、元データの大きさが10桁のときには
3ビット分が表しきれないので有効ビット数は3ビッ
ト、元データの大きさが9桁のときには4ビット分が表
しきれないので有効ビット数は4ビットとなる(図4
(c),(d)の右下がり斜線部分)。
In the first embodiment, the effective bit number of the lower-order bit data is such that the effective bit width of the 12-bit original data is, in principle, 9 bits (FIGS. 4A to 4D). )), Its value is required.
In this embodiment, the effective bit width is CC
It is determined according to the D detection accuracy. That is, when the size of the original 12-bit data is 12 digits, one bit that cannot be represented by the higher-order bit data (8 bits) is represented by the lower-order bit data, so that the number of effective bits is 1 bit. (A hatched portion falling rightward in FIG. 4A). When the size of the original data is 11 digits, the upper bit data (8
Since two bits that cannot be represented by the lower 7 bits of the bits are represented by the lower bit data, the number of effective bits is 2 bits (the lower right hatched portion in FIG. 4B). Similarly, when the size of the original data is 10 digits, the number of effective bits cannot be represented because 3 bits cannot be represented, and when the size of the original data is 9 digits, the number of valid bits cannot be represented. 4 bits (FIG. 4
(C), (d), a hatched portion falling to the right.

【0028】尚、元データの大きさが4ビット〜8ビッ
トのときには、有効ビット幅を9ビット確保することが
できないため、元データの有効ビット幅は当該元データ
の大きさ(桁数)と一致させるが、このとき、下位側ビ
ットデータの有効ビット数は4ビットとなる(図4
(e),(f)の右下がり斜線部分)。更に、元データ
の大きさが4ビットより小さいときには、有効ビット数
を4ビットに固定する(図4(g)の右下がり斜線部
分)。
When the size of the original data is between 4 bits and 8 bits, 9 bits of effective bit width cannot be ensured. Therefore, the effective bit width of the original data depends on the size (number of digits) of the original data. At this time, the number of effective bits of the lower bit data is 4 bits (FIG. 4).
(E), (f), the hatched portion falling to the right. Further, when the size of the original data is smaller than 4 bits, the number of effective bits is fixed to 4 bits (a lower right hatched portion in FIG. 4G).

【0029】しかして、元データの有効ビット幅に応じ
て、4ビットの下位側ビットデータのうちデータを保存
すべきビットの数(有効ビット数)と、データを切り捨
てることができる無効ビット(図4中、左下がり斜線部
分)とが決定される。この下位側ビットデータの有効ビ
ット数の幅のデータは、下位側データ用のロウバッファ
15Cに記憶される。
According to the effective bit width of the original data, the number of bits (valid bits) of the lower 4 bits of the data to be stored and the number of invalid bits (see FIG. 4, the lower left diagonal line) is determined. The data having the width of the effective bit number of the lower bit data is stored in the lower data row buffer 15C.

【0030】ステップS5では、上記したステップS1
〜ステップS4の処理が1行分、即ち、今回対象となっ
ている1行に含まれるn個の画素の全てについて行われ
たか否かが判別され、1行分の処理が終了した時点で
(判別結果が“Yes”)、次のステップS6に進む。
ステップS6では、1行分(n個の画素)について得ら
れた上位側圧縮データが上位側圧縮データブロックとし
てブロック化され、下位側データが下位側データブロッ
クとしてブロック化され、互いに結合される。
In step S5, step S1 described above is performed.
It is determined whether or not the processing of Step S4 has been performed for one row, that is, all of the n pixels included in the current target row, and when the processing for one row has been completed ( The determination result is “Yes”, and the process proceeds to the next step S6.
In step S6, the upper compressed data obtained for one row (n pixels) is blocked as an upper compressed data block, and the lower data is blocked as a lower data block and combined with each other.

【0031】ステップS7では、上位側圧縮データブロ
ックの先頭位置に、同じ行の下位側データブロックの位
置情報が付加される。ステップS8では、アドレスバッ
ファ15Aに、各行の圧縮データブロックの先頭位置を
示す位置情報が、1コマ分の画像データの最先位置に付
加される。このようにして、アドレスバッファ15Aに
記憶された「圧縮データブロック位置情報」、「下位側
データブロック位置情報」が付加された1行分の「上位
側圧縮データ」、「下位側データ」は、記憶媒体2に所
定のタイミングで記憶される。
In step S7, the position information of the lower data block in the same row is added to the head position of the upper compressed data block. In step S8, position information indicating the head position of the compressed data block of each row is added to the address buffer 15A at the earliest position of one frame of image data. In this manner, the “upper side compressed data” and “lower side data” for one row to which “compressed data block position information” and “lower side data block position information” stored in the address buffer 15A are: It is stored in the storage medium 2 at a predetermined timing.

【0032】今回対象となっている1行分の画像データ
の符号化が終了すると、次のステップS9では、上記し
たステップS1〜ステップS8の処理が、1コマ(1画
面)を構成するm行全てについて行われたか否かが判別
される。未だ、1コマ分の処理(m行の処理)が終了し
ていない場合には、ステップS9の判別結果が“No”
となって、上記したステップS1〜ステップS8が繰り
返し実行される。
When the encoding of the image data for one row which is the subject of this time is completed, in the next step S9, the processing of the above-described steps S1 to S8 is performed in the m rows constituting one frame (one screen). It is determined whether or not all the operations have been performed. If the processing for one frame (processing for m rows) has not been completed yet, the determination result of step S9 is “No”.
Then, the above-described steps S1 to S8 are repeatedly executed.

【0033】一方、ステップS9の判別結果が“Ye
s”のとき、即ち、1コマの全ての行(m行)について
の処理が終了したときには、そのまま本プログラムを終
了する。ところで、上記したように1画素当り12ビッ
トで得られた画像データについて、元データの有効ビッ
ト幅を原則的に9ビットとするのは、12ビットで表さ
れているCCD1の出力信号には、一般に、CCD1の
固有のノイズ、CCD1から符号化処理装置10に至る
信号の伝達経路にて生じるノイズ等が含まれており、経
験則からノイズ成分は、12ビットで表される飽和レベ
ルの信号において3ビット程度生じることが知られてい
るからである。
On the other hand, if the result of the determination in step S9 is "Ye
In the case of s ", that is, when the processing for all rows (m rows) of one frame is completed, the present program is terminated as it is. As described above, the image data obtained with 12 bits per pixel is used. The reason why the effective bit width of the original data is set to 9 bits in principle is that the output signal of the CCD 1 represented by 12 bits generally includes a noise inherent in the CCD 1 and a signal from the CCD 1 to the encoding processing device 10. This is because it is known from empirical rules that a noise component occurs about 3 bits in a signal having a saturation level represented by 12 bits.

【0034】表1は、12ビットの元データと、元デー
タの有効ビット幅と、復元されるべき信号のビット位置
(有効ビット位置)と、下位側ビットデータの有効ビッ
ト数との関係を示すものである。表1中“1”は有効成
分の先頭位置を示し、“x”は有効ビット、“y”は無
効ビットを示す。尚、有効ビット位置は、上位側からBi
t1〜Bit12で表される。
Table 1 shows the relationship among the original data of 12 bits, the effective bit width of the original data, the bit position (effective bit position) of the signal to be restored, and the number of effective bits of the lower bit data. Things. In Table 1, "1" indicates the head position of the effective component, "x" indicates a valid bit, and "y" indicates an invalid bit. The effective bit position is Bi from the upper side.
It is represented by t1 to Bit12.

【表1】 例えば、元データが12桁のときには、有効ビット幅は
9ビット、有効ビット位置はBit1〜Bit9である。従っ
て、下位側ビットデータのうち上位1ビット(Bit9)の
みが有効ビット“x”となり、残余の下位3ビット(Bit
10〜Bit12)は無効ビット“y”となる。次に、上記した
画像符号化処理(図3)による符号化が行われた圧縮画
像データ(1コマ分)のデータフォーマット(図5)に
ついて説明する。
[Table 1] For example, when the original data has 12 digits, the effective bit width is 9 bits, and the effective bit positions are Bit1 to Bit9. Therefore, only the upper 1 bit (Bit 9) of the lower bit data becomes a valid bit “x” and the remaining lower 3 bits (Bit 9)
10 to Bit 12) are invalid bits “y”. Next, the data format (FIG. 5) of the compressed image data (for one frame) encoded by the above-described image encoding process (FIG. 3) will be described.

【0035】この図に示すように、1コマ分の画像デー
タは、その最先位置に1コマ分(m行分)の各行毎の圧
縮データブロックの位置を示す「圧縮データブロック位
置情報」が記憶され、その後に、各行毎の画像データブ
ロックが1行目からm行目まで繰り返しパターンで記憶
されている。各行の画像データブロックには、各々の先
頭位置に各行の「下位側データブロック位置情報」が、
各々付加され、これに続いて1行分の「上位側圧縮デー
タブロック」、1行分の「下位側データブロック」が順
次記憶されている。
As shown in this figure, the image data for one frame has "compressed data block position information" indicating the position of the compressed data block for each line of one frame (m lines) at the earliest position. After that, the image data block for each row is stored in a repeating pattern from the first row to the m-th row. In the image data block of each row, the “lower side data block position information” of each row is provided at each head position.
Following this, one row of “upper side compressed data block” and one row of “lower side data block” are sequentially stored.

【0036】ここで、1コマ分の画像データの最先位置
に設けられた「圧縮データブロック位置情報」は、1コ
マ分(m行分)の画像データの各行の画像データブロッ
クの位置情報(図4中↓)を示すものである。又、各行
の画像データブロックの先頭位置に設けられた「下位側
データブロック位置情報」は、各行の画像データブロッ
ク内での「下位側データブロック」の位置情報(図4中
↑)を示すものである。
Here, the "compressed data block position information" provided at the earliest position of one frame of image data is the position information of the image data block of each row of one frame (m lines) of image data. 4 in FIG. 4). The “lower data block position information” provided at the head position of the image data block of each row indicates the position information (↑ in FIG. 4) of the “lower data block” within the image data block of each row. It is.

【0037】具体的には、図5に一部を拡大して示すよ
うに(図では2行目の画像データブロックが拡大されて
いる)、2行目の「下位側データブロック位置情報」に
続く「上位側圧縮データブロック」では、2行目に含ま
れる画素全て(n画素分)の「上位側圧縮データ」がブ
ロック化されている。又、この「上位側圧縮データブロ
ック」に続く「下位側圧縮データブロック」では、2行
目に含まれる画素全て(n画素分)の「下位側データ」
がブロック化されている。
More specifically, as shown in a partially enlarged manner in FIG. 5 (the image data block in the second row is enlarged in FIG. 5), the “lower side data block position information” in the second row is In the subsequent “upper side compressed data block”, “upper side compressed data” of all the pixels (for n pixels) included in the second row are divided into blocks. In the “lower side compressed data block” following the “upper side compressed data block”, the “lower side data” of all the pixels (for n pixels) included in the second row
Is blocked.

【0038】上記のように1コマ分の画像データの最先
位置に、各行毎の「圧縮データブロック位置情報」を記
憶しておくことによって、1コマの画像のうち特定の行
の「上位側圧縮データ」を、ランダムに読み出すことが
可能になる。ここで、「圧縮データブロック位置」は、
「上位側圧縮データブロック」の先頭位置を示すと同時
に、各行の画像データブロックの位置を示すことにな
る。従って、特定の行の「上位側圧縮データ」と「下位
側データ」を、共にランダムに読み出すことも可能であ
る。
As described above, the "compressed data block position information" for each line is stored at the earliest position of the image data for one frame, so that the "higher side""Compresseddata" can be read at random. Here, the “compressed data block position” is
This indicates the position of the image data block in each row at the same time as indicating the head position of the “upper side compressed data block”. Therefore, it is also possible to randomly read out both “upper side compressed data” and “lower side data” of a specific row.

【0039】又、上記のように各行の画像データブロッ
クの先頭位置に「下位側データブロック位置情報」を付
加しておくのは、上記したように「上位側圧縮データブ
ロック」の長さが、JPEGロスレス符号化により可変
長符号化されて行毎にそのデータ長が異なるからであ
る。図6は、「上位側圧縮データブロック」と「下位側
データブロック」とを記憶媒体2に記憶する際の、他の
データフォーマット例を示すものである。
As described above, the "lower data block position information" is added to the head position of the image data block of each row because the length of the "higher compressed data block" is as described above. This is because the data length is variable-length coded by JPEG lossless coding and the data length is different for each row. FIG. 6 shows another example of a data format when the “upper side compressed data block” and the “lower side data block” are stored in the storage medium 2.

【0040】この図に示すデータフォーマットでは、1
コマ分の画像データを圧縮して記憶するに当って、その
最先位置に、「圧縮データブロック位置情報」、「下位
側データブロック位置情報」を、各行毎に、交互に記憶
している点が、図5に示すデータフォーマットと異なっ
ている。
In the data format shown in FIG.
In compressing and storing image data for one frame, “compressed data block position information” and “lower-order data block position information” are alternately stored for each row at the earliest position. Is different from the data format shown in FIG.

【0041】このように1画面分の画像データの最先部
分に、「圧縮データブロック位置情報」、「下位側デー
タブロック位置情報」を、交互に記憶することで、特定
の行の画像データのみを抽出する際に、他の行の画像デ
ータを読み込む必要がなく、処理速度が高められる。次
に、上記手順に従って符号化がなされた画像データの復
号化について説明する。
As described above, the "compressed data block position information" and the "lower data block position information" are alternately stored in the foremost part of the image data for one screen, so that only the image data of a specific row is stored. It is not necessary to read the image data of another row when extracting the image data, and the processing speed is increased. Next, decoding of image data encoded according to the above-described procedure will be described.

【0042】図7は、記憶媒体2に記憶されている圧縮
画像データを復号化するための復号化処理装置20を示
すブロック図である。復号化処理装置20は、記憶媒体
2からの圧縮画像データを復号化すると共に復号化した
画像データ(12ビットの元データ)を、画像加工/修
正装置30に出力するもので、記憶媒体2から圧縮画像
データを読み込む入力データバッファ21、記憶媒体2
からの圧縮画像データを復元するCPU22、復元され
た画像データ(元データ)を各行毎に一時的に記憶する
と共に出力する復元データバッファ23、CPU22が
実行するプログラム等が記憶されている主メモリ24と
によって構成されている。
FIG. 7 is a block diagram showing a decoding processing device 20 for decoding the compressed image data stored in the storage medium 2. The decoding processing device 20 decodes the compressed image data from the storage medium 2 and outputs the decoded image data (12-bit original data) to the image processing / correction device 30. Input data buffer 21 for reading compressed image data, storage medium 2
CPU for restoring the compressed image data from the CPU, a restored data buffer 23 for temporarily storing and outputting the restored image data (original data) for each row, and a main memory 24 for storing programs executed by the CPU 22, etc. And is constituted by.

【0043】又、復号化処理装置20には、その復元デ
ータバッファ23に画像加工/修正装置30が接続され
ている。この画像加工/修正装置30は、外部から入力
された加工/修正情報(ユーザのキーボード操作等で入
力された情報)に基づいて、復元された画像データ(1
2ビットの元データ)に加工/修正を施すものである。
加工/修正された後の画像データ(例えば、8ビットの
画像データ)は、画像出力機器(例えば、CRT、プリ
ンタ)40に出力され、所望の画像が得られるようにな
っている。尚、前述した復号化処理装置10がディジタ
ルカメラに用いられる場合には、この復号化処理装置2
0、画像加工/修正装置30は、主としてパーソナルコ
ンピュータによって構成される。
An image processing / correction device 30 is connected to the decoded data buffer 23 of the decoding processing device 20. The image processing / correction device 30 restores image data (1) based on processing / correction information (information input by a user's keyboard operation or the like) input from outside.
2 bits (original data) is processed / corrected.
The processed / modified image data (for example, 8-bit image data) is output to an image output device (for example, a CRT or a printer) 40 so that a desired image can be obtained. When the above-described decoding device 10 is used in a digital camera, the decoding device 2
0, the image processing / correcting device 30 is mainly configured by a personal computer.

【0044】ここで、復号化処理装置20の入力データ
バッファ21は、アドレスバッファ21A、ハイバッフ
ァ21B、ロウバッファ21Cを構成している。そし
て、アドレスバッファ21Aに記憶媒体2からの「圧縮
データブロック位置情報」が一時的に記憶され、記憶媒
体2からの「上位側圧縮データ」及び「下位側データブ
ロック位置情報」がハイバッファ21Bに一時的に記憶
される。又、ロウバッファ21Cに記憶媒体2からの
「下位側データ」が一時的に記憶される。
Here, the input data buffer 21 of the decoding processor 20 comprises an address buffer 21A, a high buffer 21B, and a low buffer 21C. The “compressed data block position information” from the storage medium 2 is temporarily stored in the address buffer 21A, and the “upper side compressed data” and “lower side data block position information” from the storage medium 2 are stored in the high buffer 21B. Stored temporarily. The “lower data” from the storage medium 2 is temporarily stored in the row buffer 21C.

【0045】又、復号化処理装置20の復元データバッ
ファ23は、対象ライン用バッファ23A、1ライン前
用バッファ23B、2ライン前用バッファ23Cを構成
している。そして、対象ライン用バッファ23Cに、今
回の復元対象となっている行(復元対象ライン)の復元
された画像データ(12ビットの元データ)が一時的に
記憶される。1ライン前用バッファ23Bには対象ライ
ン用バッファ23Aからシフトされた1行前の画像デー
タ(12ビットの元データ)が一時的に記憶され、2ラ
イン前用バッファ23Cには1ライン前用バッファ23
Bからシフトされた2行前の画像データ(12ビットの
元データ)が一時的に記憶される。
The restored data buffer 23 of the decoding processor 20 constitutes a buffer 23A for the target line, a buffer 23B for the previous line, and a buffer 23C for the previous line. Then, the restored image data (12-bit original data) of the current line to be restored (restoration target line) is temporarily stored in the target line buffer 23C. The one-line preceding buffer 23B temporarily stores the one-line preceding image data (12-bit original data) shifted from the target line buffer 23A, and the one-line preceding buffer 23C stores the one-line preceding buffer 23C. 23
The image data (the original data of 12 bits) two rows before shifted from B is temporarily stored.

【0046】図8は、上記した復号化処理装置20のC
PU22にて実行される画像復号化処理を示すプログラ
ムフローチャートである。この画像復号化処理のプログ
ラムが開始されると、先ず、ステップS21において、
記憶媒体2から入力データバッファ21に取り込まれた
位置情報(圧縮データブロック位置情報、下位側データ
ブロック位置情報)が、CPU22に読み込まれる。
FIG. 8 is a diagram showing the C of the above-described decoding processing device 20.
It is a program flowchart which shows the image decoding process performed by PU22. When the image decoding program is started, first, in step S21,
The position information (compressed data block position information, lower data block position information) taken into the input data buffer 21 from the storage medium 2 is read by the CPU 22.

【0047】ステップS22では、読み込まれた「圧縮
データブロック位置情報(図4の↓の位置を示す情
報)」に基づいて、今回ループで対象となっている行
(1行分)の画像データブロック内の全てのデータの読
み込みが行われる。ステップS23では、ステップS2
1で読み込まれた「下位側データブロック位置情報(図
4の↑の位置を示す情報)」に基づいて、ステップS2
2で読み込まれたデータを、上位側圧縮データブロック
と下位側データブロックとに分離する処理が行われる。
In step S22, based on the read “compressed data block position information (information indicating the position of ↓ in FIG. 4)”, the image data block of the line (one line) targeted in the current loop The reading of all data in is performed. In step S23, step S2
Step S2 based on the “lower-side data block position information (information indicating the position of ↑ in FIG. 4)” read in step S1.
A process is performed to separate the data read in 2 into an upper compressed data block and a lower data block.

【0048】ステップS24では、上記分離された上位
側圧縮データブロックに記憶されている上位側圧縮デー
タに対して、周知のJPEGロスレス復号化が行われ
る。このJPEGロスレス復号化は、前述した画像符号
化処理(図3)のステップS3で施された符号化の手順
の逆の手順で行われる。即ち、注目画素の上位側ビット
データ(8ビット)を復号化する場合には、先ず、2ル
ープ前で復号化されている2画素前(同色画素)の画素
値を求めておく。次いで、この2画素前の画素につい
て、その近傍の同色画素の画素、又は隣接画素の画素値
を用いた複数の予測式に基づいて、予測値(仮の予測
値)を複数求めておく。更に、2画素前の画素値とこれ
ら仮の予測値とを各々比較してその予測誤差Δを求め、
これが最小となる予測式(最適予測式)を選択してお
く。そして、2ループ前に記憶されたこの最適予測式を
用いて、今回ループでの注目画素の予測値を求め、記憶
されている予測誤差Δとこの予測値から、注目画素の上
位側ビットデータ(8ビット)の復号を行う。
In step S24, well-known JPEG lossless decoding is performed on the upper compressed data stored in the separated upper compressed data block. The JPEG lossless decoding is performed in a procedure reverse to the coding procedure performed in step S3 of the above-described image coding processing (FIG. 3). That is, when decoding the upper bit data (8 bits) of the target pixel, first, the pixel value of the pixel two pixels before (same color pixel) decoded two loops before is obtained. Next, a plurality of predicted values (temporary predicted values) are obtained for the pixel two pixels before, based on a plurality of prediction formulas using pixel values of neighboring pixels of the same color or neighboring pixels. Further, the pixel value two pixels before and the tentative predicted values are respectively compared to obtain a prediction error Δ,
A prediction formula (optimal prediction formula) that minimizes this is selected in advance. Then, using the optimal prediction formula stored two loops ago, the prediction value of the target pixel in the current loop is obtained, and the upper bit data of the target pixel (from the stored prediction error Δ and this prediction value) (8 bits).

【0049】ステップS25では、前述した画像符号化
処理(図3)のステップS4で有効ビット数の幅で記憶
された下位側ビットデータを、4ビットのデータに復元
する処理が行われる。この際、符号化時に記憶した下位
側ビットデータを用いて復元する下位側4ビットデータ
の上位側から埋めていく。そして、符号化時に無効ビッ
トとして切り捨てられた残りの部分については、ノイズ
部分を復元させると考えてランダムに“0”と“1”で
埋めてもよいし、残り部分のビット数で表現できる数の
2分の1となる数で埋めるようにすればよい。このよう
にして、当該下位側ビットデータの復元ができる。
In step S25, the process of restoring the lower-order bit data stored with the width of the effective number of bits in step S4 of the above-described image encoding process (FIG. 3) to 4-bit data is performed. At this time, the lower 4-bit data to be restored using the lower bit data stored at the time of encoding is filled in from the upper side. The remaining portion truncated as invalid bits during encoding may be randomly filled with “0” and “1” in order to restore the noise portion, or may be a number that can be represented by the number of bits of the remaining portion. May be filled with a number that is half of the number. In this way, the lower bit data can be restored.

【0050】ステップS26では、上記ステップS24
で復元された上位側ビットデータ(8ビット)と、上記
ステップS25で復元された下位側ビットデータ(4ビ
ット)とによって、12ビットの画像データ(元デー
タ)を得る。ステップS27では、上記したステップS
24〜ステップS26の処理が1行分、即ち、同一行に
含まれるn個の画素について全て行われたか否かが判別
され、1行分の復号処理が終了した時点で、次のステッ
プS28に進む。
In step S26, the above-mentioned step S24
The 12-bit image data (original data) is obtained from the high-order bit data (8 bits) restored in step S25 and the low-order bit data (4 bits) restored in step S25. In step S27, the above-described step S
It is determined whether or not the processing from step S24 to step S26 has been performed for one row, that is, all the n pixels included in the same row. When the decoding processing for one row is completed, the process proceeds to step S28. move on.

【0051】ステップS28では、上記したステップS
22〜ステップS27の処理が、1コマ(1画面)を構
成する全ての行(m行)について行われたか否かが判別
され、未だ、1コマ分の処理が終了していない場合に
は、上記したステップS22に戻り、処理を繰り返す。
1コマの全ての行(m行)についての処理が終了したと
きには(ステップS28の判別結果が“Yes”)、そ
のまま本プログラムを終了する(エンド)。尚、この画
像復号化処理では、処理を効率よく行うために、ステッ
プS27の判別結果が“No”であるうちはステップS
24に戻って、ステップS28の判別結果が“No”で
あるうちはステップS22に戻って、処理を繰り返すよ
うにしているが、図9に示すように、ステップS27の
判別結果が“No”であるとき、又は、ステップS28
の判別結果が“No”であるときに、ステップS21の
位置情報の読み込みから、その処理を繰り返すようにし
てもよい。
In step S28, the above-described step S
It is determined whether or not the processing from step 22 to step S27 has been performed for all rows (m rows) constituting one frame (one screen). If the processing for one frame has not been completed yet, Returning to step S22, the process is repeated.
When the processing has been completed for all the rows (m rows) of one frame (the determination result in step S28 is "Yes"), the program is terminated as it is (END). In this image decoding process, in order to perform the process efficiently, as long as the determination result in step S27 is “No”, step S27 is performed.
Returning to 24, while the determination result of step S28 is "No", the process returns to step S22 to repeat the process. However, as shown in FIG. 9, the determination result of step S27 is "No". If there is, or step S28
When the determination result is "No", the processing may be repeated from the reading of the position information in step S21.

【0052】次に、圧縮された画像データの記憶媒体2
への記憶時のデータフォーマットの変形例について、図
10、図11を用いて説明する。この変形例は、上位側
圧縮データブロックと下位側データブロックとを記憶媒
体2に記憶するに当って、1コマ分の画像データについ
て、全ての行(m行)の上位側圧縮データブロックと、
全ての行(m行)の下位側データブロックとを、分離し
て記憶するものである。
Next, the storage medium 2 for the compressed image data
A modified example of the data format at the time of storage in the storage device will be described with reference to FIGS. In this modification, the upper compressed data block and the lower data block are stored in the storage medium 2 and, for one frame of image data, the upper compressed data blocks of all rows (m rows)
The lower-order data blocks of all rows (m rows) are stored separately.

【0053】この場合のデータフォーマットを図10に
示す。この変形例では、図に示すように、「圧縮データ
ブロック位置情報」、「下位側データブロック位置情
報」を共に1コマ分の画像データの最先位置に記憶し、
その後に、m行分まとめて「上位側データブロック」を
記憶し、次いでm行分まとめて「下位側データブロッ
ク」を記憶している。
FIG. 10 shows a data format in this case. In this modification, as shown in the figure, both "compressed data block position information" and "lower data block position information" are stored at the earliest position of one frame of image data.
After that, “upper data blocks” are stored collectively for m rows, and then “lower data blocks” are stored collectively for m rows.

【0054】このように、m行分の「上位側データブロ
ック」をまとめ、m行分の「下位側データブロック」を
まとめ、分離した状態で記憶媒体2に記憶することで、
画像データの再現時に、例えば、上位側8ビットのデー
タのみ復号化して出力する場合(8ビットの粗い画像の
みを再現する場合)、最先位置に記憶された「圧縮デー
タブロック位置情報(図10中↓で示す位置の情報)」
に基づいて「上位側圧縮データ」のみを復号すればよ
く、画像を再現する際の処理速度が高められる。
As described above, m rows of “upper data blocks” are collected, and m rows of “lower data blocks” are collected and stored in the storage medium 2 in a separated state.
At the time of reproducing the image data, for example, when decoding and outputting only the high-order 8-bit data (when reproducing only the coarse 8-bit image), the “compressed data block position information (FIG. Information on the position indicated by the middle ↓) "
, Only the “higher-side compressed data” needs to be decoded, and the processing speed when reproducing an image can be increased.

【0055】上位側圧縮データのみを復号化して、粗い
画像(上位8ビット)を高速に再現する場合の具体的な
手順について、図11に示すプログラムフローチャート
に従って説明する。尚、このプログラムは、復号化処理
装置20(図6)のCPU22において実行される。先
ず、ステップS31では、「圧縮データブロック位置情
報」の読み込みが行われる。
A specific procedure for decoding only the upper compressed data and reproducing a coarse image (upper 8 bits) at a high speed will be described with reference to a program flowchart shown in FIG. This program is executed by the CPU 22 of the decryption processing device 20 (FIG. 6). First, in step S31, "compressed data block position information" is read.

【0056】ステップS32では、「圧縮データブロッ
ク位置情報(図10中↓で示す位置の情報)」を用いて
1行分の上位側圧縮データブロック内のデータ(上位側
圧縮データ)の読み込みが行われる。ステップS33で
は、符号化処理において実行されるJPEGロスレス符
号化とは逆の手順によるJPEGロスレス復号化によ
り、上記読み込まれた上位側圧縮データの1画素分の復
号化が行われる。このステップS33での復号化は、図
8のステップS24と同一の手順で行われる。
In step S32, the data (upper-side compressed data) in the upper-side compressed data block for one row is read using “compressed data block position information (position information indicated by ↓ in FIG. 10)”. Will be In step S33, decoding of the read high-order side compressed data for one pixel is performed by JPEG lossless decoding in a procedure reverse to the JPEG lossless coding executed in the encoding process. The decoding in step S33 is performed in the same procedure as in step S24 in FIG.

【0057】ステップS34では、上記したステップS
33の処理が1行分、即ち、同一行に含まれるn個の画
素について行われたか否かが判別され、1行分の処理が
終了した時点で、次のステップS35に進む。ステップ
S35では、上記したステップS32〜ステップS34
の処理が1コマ(1画面)を構成する全ての行(m行)
について行われたか否かが判別され、未だ、1コマ分の
処理が終了していない場合には、上記したステップS3
2に戻り、処理を繰り返す。
In step S34, the above-described step S
It is determined whether or not the processing of 33 is performed for one row, that is, n pixels included in the same row. When the processing of one row is completed, the process proceeds to the next step S35. In step S35, steps S32 to S34 described above are performed.
All lines (m lines) that make up one frame (one screen)
Is determined, and if the processing for one frame has not yet been completed, the above-described step S3
2 and the process is repeated.

【0058】一方、ステップS35において、1コマの
全てのラインについての復号化処理が終了したと判別さ
れたときには、そのまま本プログラムを終了する(エン
ド)。この変形例によれば、1画素当り12ビットで表
される高精細な元データ(RAWデータ)が圧縮して記
憶された記憶媒体2から、当該画像データを復元するに
当たり、相関性の強い上位8ビットのみを復元すること
で、粗い画像を高速に再現することができる。尚、この
画像復号化処理でも、処理を効率よく行うために、ステ
ップS34の判別結果が“No”であるうちはステップ
S33に戻って、ステップS35の判別結果が“No”
であるうちはステップS32に戻って、処理を繰り返す
ようにしているが、図12に示すように、ステップS3
4の判別結果が“No”であるとき、又は、ステップS
35の判別結果が“No”であるときに、共にステップ
S31から、その処理を繰り返すようにしてもよい。
On the other hand, when it is determined in step S35 that the decoding process has been completed for all the lines of one frame, the present program is terminated as it is (END). According to this modified example, when restoring the image data from the storage medium 2 in which the high-definition original data (RAW data) represented by 12 bits per pixel is compressed and stored, the higher-order highly correlated data is obtained. By restoring only 8 bits, a coarse image can be reproduced at high speed. In this image decoding process, in order to perform the process efficiently, the process returns to step S33 while the determination result in step S34 is “No”, and the determination result in step S35 is “No”.
Is returned to step S32 and the process is repeated. However, as shown in FIG.
No. 4 is “No” or in step S
When the determination result of 35 is “No”, the processing may be repeated from step S31.

【0059】以上説明した第1の実施の形態の画像デー
タの符号化方法及び復号化方法によれば、高精細に得ら
れた12ビットの元データについて、近傍画素との相関
性の高い上位8ビット(上位側ビットデータ)に関して
は高い圧縮でのJPEGロスレス符号化が可能になり、
相関性が低くなる下位側ビットデータに関しては、有効
ビット数の幅から外れたデータを切り捨てることで高速
に処理を行なうことができる。この結果、12ビットの
元データ全体としては、高い圧縮率を確保しつつ、処理
速度を高めることができる。
According to the image data encoding and decoding methods of the first embodiment described above, the high-order 8 bits of the original data of 12 bits, which have a high correlation with the neighboring pixels, are obtained. JPEG lossless encoding with high compression for bits (high-order bit data) becomes possible,
For lower-order bit data having low correlation, high-speed processing can be performed by truncating data out of the range of the number of effective bits. As a result, the processing speed of the entire 12-bit original data can be increased while securing a high compression rate.

【0060】又、12ビットの元データ全体に対する有
効ビット幅を、9ビットとしているので、この9ビット
の有効ビット幅のデータは、下位側ビットデータの全部
又は一部をも用いて、確実に符号化/復号化されるた
め、効率の良い画像データの記憶が行われる。
Further, since the effective bit width for the entire 12-bit original data is set to 9 bits, the data of the 9-bit effective bit width can be obtained by using all or a part of the lower bit data without fail. Since encoding / decoding is performed, efficient storage of image data is performed.

【0061】(第2の実施の形態)次に、本発明の第2
の実施の形態について、表2〜表4を用いて説明する。
この第2の実施の形態では、下位側ビットデータ(下位
4ビット)の有効ビット数を、CCD1の飽和レベルに
おける有効信号レベルに応じた値に決定するものであ
る。この第2の実施の形態における画像データ圧縮は、
第1の実施の形態と同一の符号化処理装置及び復号化処
理装置によって実行される。表2は、飽和レベルが10
万(1.0×105)エレクトロンのCCD1の信号電
荷数、CCD1からの信号値、有効信号レベル、ノイズ
成分の各々の関係を示すものである。
(Second Embodiment) Next, a second embodiment of the present invention will be described.
Will be described with reference to Tables 2 to 4.
In the second embodiment, the number of effective bits of the lower bit data (lower 4 bits) is determined to a value corresponding to the effective signal level of the saturation level of the CCD 1. The image data compression in the second embodiment is as follows.
It is executed by the same encoding processing device and decoding processing device as in the first embodiment. Table 2 shows that the saturation level is 10
It shows the relationship among the number of signal charges of the 10,000 (1.0 × 10 5 ) electrons of the CCD 1, the signal value from the CCD 1, the effective signal level, and the noise component.

【表2】 今仮に、飽和レベルでの信号電荷数が1.0×10
5(エレクトロン)のCCD1において、その明るさ
(エレクトロン)の1/2乗を求めて、これを有効信号
レベルの階調とする場合について考える。CCD1の飽
和レベルでの信号電荷数1.0×105(エレクトロ
ン)の1/2乗は約316.2であり、従って、飽和レ
ベルでの有効信号レベルは、316.2の階調で表すこ
とができる。
[Table 2] Now suppose that the number of signal charges at the saturation level is 1.0 × 10
In 5 CCD 1 of (electrons), seeking 1/2 square of its brightness (electrons), consider the case of this a valid signal level tone. The half of the number of signal charges 1.0 × 10 5 (electrons) at the saturation level of the CCD 1 is about 316.2, and the effective signal level at the saturation level is represented by 316.2 gray levels. be able to.

【0062】従って、CCD1の出力が、飽和レベルで
あっても、その明るさを9ビット(29=512)で十
分に表現できる。計算上、飽和レベルでの信号電荷数
は、316.2階調で表されるのであるから、下位側の
階調12.95をノイズ成分として処理できる。この下
位の階調12.95は、3ビット(23=8)より大き
いのであるから、飽和レベルでは、12ビットで表され
たデータの少なくとも下位3ビットのデータを切り捨て
る(無視する)ことができる。
Therefore, even if the output of the CCD 1 is at the saturation level, its brightness can be sufficiently represented by 9 bits (2 9 = 512). In calculation, the number of signal charges at the saturation level is represented by 316.2 gradations, so that the lower gradation 12.95 can be processed as a noise component. Since this lower gradation 12.95 is larger than 3 bits (2 3 = 8), at the saturation level, at least the lower 3 bits of the data represented by 12 bits may be discarded (ignored). it can.

【0063】ここで飽和レベル(316.2階調)にお
いて、ノイズ成分として除去できる下位ビット数が1
2.95階調であることに着目し、ノイズ成分として、
丁度3ビットをノイズ成分とすることができる信号の大
きさ(信号値S1)を演算にて求める。ノイズ成分が丁
度3ビットとなるときに、飽和レベル(1.0×105
エレクトロン)に対してX1(0<X1<1)の割合の信
号電荷数(X1×105エレクトロン)が生じていたと考
えるならば、その有効信号レベルは、(X1×1051/
2の階調で表される。
Here, at the saturation level (316.2 gradations), the number of lower bits that can be removed as a noise component is 1
Focusing on 2.95 gradations, as a noise component,
The magnitude (signal value S 1 ) of a signal that can make just three bits a noise component is calculated. When the noise component has just 3 bits, the saturation level (1.0 × 10 5
If it is considered that a signal charge number (X 1 × 10 5 electrons) having a ratio of X 1 (0 <X 1 <1) is generated with respect to the electrons, the effective signal level is (X 1 × 10 5 ). 1 /
It is represented by two tones.

【0064】前述したように12ビットで表される飽和
レベルでの(4096階調のときの)ノイズ成分は「1
2.95(階調)」である。ここで、ノイズ成分が「8
(階調)」のときに12ビットで表される信号値S1
「4096×X1」とする。又、信号電荷数(X1×10
5エレクトロン)の有効信号レベルの階調は(X1×10
51/2であるから、「X1×4096」は、線形的な関
係より「23」に(X1×1051/2を乗じた値に一致す
る。
As described above, the noise component at the saturation level represented by 12 bits (at the time of 4096 gradations) is “1”.
2.95 (gradation) ". Here, the noise component is “8
(Gradation) ", the signal value S 1 represented by 12 bits is set to“ 4096 × X 1 ”. Also, the number of signal charges (X 1 × 10
The gradation of the effective signal level of ( 5 electrons) is (X 1 × 10
5 ) Since it is 1/2 , “X 1 × 4096” matches a value obtained by multiplying “2 3 ” by (X 1 × 10 5 ) 1/2 from a linear relationship.

【0065】 X1×4096=8×(X1×1051/2…[1] 上記[1]式より、X1≒0.38147が得られる。
従って、ノイズ成分が丁度「8(階調)」となる信号値
1は「4096×X1≒1563」となる。
X 1 × 4096 = 8 × (X 1 × 10 5 ) 1/2 ... [1] From the above formula [1], X 1 ≒ 0.38147 is obtained.
Therefore, the signal value S 1 at which the noise component is exactly “8 (gradation)” is “4096 × X 1 631563”.

【0066】同様に、ノイズ成分が丁度「4(階調)」
となる信号電荷数に対応する信号値S2を求めると、
「X2×4096」が、「4」と(X2×1051/2とを
乗じた値に一致することから、その線形的な関係より
[2]式が成立する。 X2×4096=4×(X2×1051/2…[2] 上記[2]式より、X2≒0.09537が得られる。
Similarly, the noise component is just “4 (gradation)”.
When a signal value S 2 corresponding to the number of signal charges is obtained,
Since “X 2 × 4096” matches the value obtained by multiplying “4” by (X 2 × 10 5 ) 1/2 , Equation [2] is established from the linear relationship. X 2 × 4096 = 4 × (X 2 × 10 5 ) 1/2 ... [2] From the above formula [2], X 2上 記 0.09537 is obtained.

【0067】従って、ノイズ成分が丁度4(階調)とな
る信号値S2は「4096×X2≒391」となる。同様
に、ノイズ成分が2(階調)となる信号電荷数に対応す
る信号値S3を求めると、「X3×4096」が、「2」
と(X3×1051/2とを乗じた値に一致するはずであ
るから、[3]式が成立する。
Therefore, the signal value S 2 at which the noise component becomes exactly 4 (gradation) is “4096 × X 2 ≒ 391”. Similarly, when the signal value S 3 corresponding to the number of signal charges at which the noise component is 2 (gradation) is obtained, “X 3 × 4096” becomes “2”.
And (X 3 × 10 5 ) 1/2 , which should be equal to the value.

【0068】 X3×4096=2×(X3×1051/2…[3] 上記[3]式より、X3≒0.02384であるから、
ノイズ成分が丁度2(階調)となる信号値S3は「40
96×X3=98」となる。このようにして得られた信
号値S1,S2,S3を閾値として用いた例を表3に示
す。
X 3 × 4096 = 2 × (X 3 × 10 5 ) 1/2 [3] According to the above formula [3], X 3 ≒ 0.02384.
The signal value S 3 at which the noise component is exactly 2 (gradation) is “40
96 × X 3 = 98 ”. Table 3 shows an example in which the thus obtained signal values S 1 , S 2 , and S 3 are used as threshold values.

【表3】 この表3では、上記した「S1(=1563)」「S2
(391)」「S3(=98)」に代えて、「155
2」「384」「96」が閾値として用いられて第1〜
第4の範囲が設定されている(「4095〜1552
(第1の範囲)」「1551〜384(第2の範囲)」
「383〜96(第3の範囲)」「95〜0(第4の範
囲))。
[Table 3] In Table 3, "S 1 (= 1563)" and "S 2 =
(391) ”instead of“ S 3 (= 98) ”
2 ”,“ 384 ”and“ 96 ”are used as thresholds,
A fourth range is set (“4095 to 1552”).
(1st range) "" 1551-384 (2nd range) "
"383-96 (third range)""95-0 (fourth range)".

【0069】ここで、「S1(=1563)」「S2
(391)」「S3(=98)」に代えて、「155
2」「384」「96」を閾値とするのは、以下の理由
による。即ち、この第2の実施の形態では、12ビット
の元データが上位8ビット(上位側ビットデータ)と下
位4ビット(下位側ビットデータ)とに分離され、第1
の実施の形態と同じ手順で、上位8ビットがJPEGロ
スレス符号化/復号化される。しかして、下位側ビット
データの有効ビット数を認識するためには、上位側ビッ
トデータのみが用いられる。
Here, “S 1 (= 1563)” and “S 2 =
(391) ”instead of“ S 3 (= 98) ”
The thresholds of “2”, “384”, and “96” are used for the following reasons. That is, in the second embodiment, 12-bit original data is separated into upper 8 bits (upper bit data) and lower 4 bits (lower bit data),
The upper 8 bits are JPEG lossless-encoded / decoded in the same procedure as in the embodiment. In order to recognize the number of effective bits of the lower bit data, only the upper bit data is used.

【0070】ここで、「S1(=1563)」は2進法
では、“1,1,0,0,0,0,1,1,0,1,1”、「S2(=39
1)」は“1,1,0,0,0,0,1,1,1”、「S3(=98)」は
“1,1,0,0,0,1,0”である。従って、これらのうち上位
8ビットにのみに着目し、下位4ビットに関しては、そ
の値を“0,0,0,0”と仮定して、“1,1,0,0,0,0,1,0,0,
0,0”=1552、“1,1,0,0,0,0,0,0,0”=384、
“1,1,0,0,0,0,0”=96を、各々、閾値として用いる
ようにしている。
Here, “S 1 (= 1563)” is “1,1,0,0,0,0,1,1,0,1,1” and “S 2 (= 39) in the binary system.
“1)” is “1,1,0,0,0,0,1,1,1”, and “S 3 (= 98)” is “1,1,0,0,0,1,0” . Therefore, focusing on only the upper 8 bits of these, and regarding the lower 4 bits, assuming that the value is “0,0,0,0”, “1,1,0,0,0,0, 1,0,0,
“0,0” = 1552, “1,1,0,0,0,0,0,0,0” = 384,
“1,1,0,0,0,0,0” = 96 is used as the threshold value.

【0071】ところで、CCD1によって取得された信
号電荷数を示す信号値(12ビットのデータ)が、上記
した第1の範囲内にあるときには、Bit1が“1”のとき
とBit1が“0”のときがある。従って、Bit1が“1”のと
きには9ビット、Bit1が“0”のときには8ビットが、
各々、元データの有効ビット幅となる。このとき、下位
側ビットデータの有効ビット数は、共に1ビットとな
り、下位4ビットのうち3ビットはノイズ成分として切
り捨てられる。
By the way, when the signal value (12-bit data) indicating the number of signal charges acquired by the CCD 1 is within the above-mentioned first range, when Bit 1 is “1”, when Bit 1 is “0”, There are times. Therefore, when Bit1 is "1", 9 bits, when Bit1 is "0", 8 bits,
Each becomes the effective bit width of the original data. At this time, the number of effective bits of the lower bit data is 1 bit, and 3 bits of the lower 4 bits are discarded as noise components.

【0072】同様に、CCD1によって取得された信号
電荷数を示す信号値が、上記した第2の範囲内にあると
きは、Bit1が“0”、Bit2が“1”のときと、Bit1、Bit2
が共に“0”のときがある。従って、元データの有効ビ
ット幅は8又は7であり、下位側ビットデータの有効ビ
ット数は共に2ビット(上位2ビット)であり、残り2
ビットがノイズ成分として切り捨てられる。
Similarly, when the signal value indicating the number of signal charges acquired by the CCD 1 is within the above-mentioned second range, Bit 1 is “0”, Bit 2 is “1”, and Bit 1 and Bit 2
Are both “0”. Therefore, the effective bit width of the original data is 8 or 7, the number of effective bits of the lower bit data is 2 bits (upper 2 bits), and the remaining 2
Bits are truncated as noise components.

【0073】更に、信号電荷数を示す信号値が、上記し
た第3の範囲内にあるときには、元データの有効ビット
幅は、7又は6であり、下位側ビットデータ(4ビッ
ト)の有効ビット数は共に3ビットであり、上位3ビッ
トが有効なものとして記憶される。
When the signal value indicating the number of signal charges is within the third range, the effective bit width of the original data is 7 or 6, and the effective bit width of the lower bit data (4 bits) is The numbers are both 3 bits, and the upper 3 bits are stored as valid.

【0074】又、信号電荷数を示す信号値が、上記した
第4の範囲内に各々あるときには、元データの有効ビッ
ト幅は、6〜1の値であり、このとき下位側ビットデー
タの有効ビット数は4ビット、即ち、下位側ビットデー
タは、全て有効なものとして扱われる。表4は、上記し
た12ビットの元データの上位側ビットデータ(8ビッ
ト)で下位側ビットデータの有効ビット数を決定する手
法において、これを16進数で処理したものである。
When the signal value indicating the number of signal charges is within the above-described fourth range, the effective bit width of the original data is a value of 6-1. The number of bits is 4 bits, that is, the lower bit data is all treated as valid. Table 4 shows the method of determining the number of effective bits of the lower-order bit data from the higher-order bit data (8 bits) of the 12-bit original data, which is processed in hexadecimal.

【表4】 表4では、“2748”“812”“156”“76”
を16進数で表す例をあげている(“2748=0,x,A,
B,C”“812=0,x,3,2,C”“156=0,x,9,C”“7
6=0,x,4,C”)。ここで、4桁目、5桁目の“0,x”は
16進数表示であることを示している。上記したよう
に、2進数で表された元データ(12ビット)のうち上
位側ビットデータ(8ビット)で下位側ビットデータの
何ビットを有効データとして扱うかが決定されるのであ
るから、上記した16進数表示のうち最下位(1桁目、
4ビット分)の値以外(“0,x,A,B”“0,x,3,2”“0,x,
9”“0,x,4”)に基づいて、1桁目をどのように扱うか
が決定される。
[Table 4] In Table 4, "2748""812""156""76"
In hexadecimal notation (“2748 = 0, x, A,
B, C "" 812 = 0, x, 3,2, C "" 156 = 0, x, 9, C "" 7
6 = 0, x, 4, C ”), where“ 0, x ”in the fourth and fifth digits indicates hexadecimal notation. As described above, it is expressed in binary notation. In the original data (12 bits), the higher-order bit data (8 bits) determines how many bits of the lower-order bit data are to be handled as valid data. Digit,
4 bits) (“0, x, A, B” “0, x, 3,2” “0, x,
9 ”“ 0, x, 4 ”), how to handle the first digit is determined.

【0075】上記した例“2748=0,x,A,B,C”“8
12=0,x,3,2,C”“156=0,x,9,C”“76=0,x,4,
C”では、16進数で表されたときの1桁目の値が全て
“C”=0,b,1,1,0,0”(“0,b”は2進数表示であるこ
とを示す)となっている。従って、この2進数で表され
た“1,1,0,0”の上位何ビットを有効データとするか
が、16進数で表された値の2桁目と3桁目、又は2桁
目(“A,B”“3,2”“9”“4”)に基づいて決定され
る。
The above example "2748 = 0, x, A, B, C""8
12 = 0, x, 3,2, C "" 156 = 0, x, 9, C "" 76 = 0, x, 4,
In “C”, the first digit value when expressed in hexadecimal is “C” = 0, b, 1,1,0,0 ”(“ 0, b ”indicates that the value is expressed in binary. ). Therefore, how many significant bits of the binary number “1,1,0,0” are valid data is determined by the second and third digits or the second digit of the hexadecimal value. ("A, B""3,2""9""4").

【0076】(第3の実施の形態)次に、本発明の第3
の実施の形態について、図13及び表5を用いて説明す
る。この第3の実施の形態では、12ビットの元データ
の下位側ビットデータ(4ビット)の有効ビット数を、
CCD1からの信号レベル(信号電荷数)に基づいて、
各信号毎に決定するものである。尚、この第3の実施の
形態における画像データ圧縮も、第1の実施の形態と同
一の符号化処理装置及び復号化処理装置によって実行さ
れる。
(Third Embodiment) Next, a third embodiment of the present invention will be described.
The embodiment will be described with reference to FIG. 13 and Table 5. In the third embodiment, the number of effective bits of lower-order bit data (4 bits) of the original 12-bit data is
Based on the signal level (the number of signal charges) from the CCD 1,
It is determined for each signal. Note that the image data compression in the third embodiment is also executed by the same encoding device and decoding device as in the first embodiment.

【0077】図13(a)〜(h)は、12ビットの元
データと、上位側ビットデータ(8ビット)、下位側ビ
ットデータ(4ビット)、元データの大きさ(桁数)、
有効ビット幅の各々の関係を示すものである。又、表5
は、12ビットの元データ、信号の有効ビット幅、有効
ビット位置の関係を示すものである。尚、表5中“1”
は有効成分の先頭位置を示し、“x”は有効ビット、
“y”は無効ビットを示す。又、有効ビット位置は、上
位側からBit1〜Bit12で表されている。
FIGS. 13A to 13H show the original data of 12 bits, the upper bit data (8 bits), the lower bit data (4 bits), the size (number of digits) of the original data,
This shows the relationship between the effective bit widths. Table 5
Shows the relationship between the original data of 12 bits, the effective bit width of the signal, and the effective bit position. In Table 5, "1"
Indicates the start position of the effective component, “x” indicates the effective bit,
“Y” indicates an invalid bit. The effective bit position is represented by Bit 1 to Bit 12 from the upper side.

【表5】 表5に示すように、12ビットの元データの大きさが1
2桁(Bit1〜Bit12)のときには、この12桁で表示可
能なデータの大きさは「4095(階調)」、このとき
飽和レベルであるから1.0×105(エレクトロ
ン)、このときの有効信号レベルは(1.0×105
1/2≒316.2(階調)である(図13(a))。こ
の階調は、9ビットで表示可能であるから、12ビット
の元データのBit1〜Bit9までの上位9ビットを有効ビッ
ト幅とし、Bit10〜Bit12までの残り3ビットを無効ビッ
トとすることができる。従って、下位側ビットデータ
(Bit9〜Bit12)に関しては、上位1ビット(Bit9)の
み有効ビットとなる(有効ビット数=1ビット)。
[Table 5] As shown in Table 5, the size of the 12-bit original data is 1
In the case of two digits (Bit 1 to Bit 12), the size of the data that can be displayed with these 12 digits is “4095 (gradation)”, which is 1.0 × 10 5 (electrons) because of the saturation level at this time. The effective signal level is (1.0 × 10 5 )
1/2 ≒ 316.2 (gradation) (FIG. 13A). Since this gradation can be displayed by 9 bits, the upper 9 bits from Bit 1 to Bit 9 of the original 12-bit data can be set as an effective bit width, and the remaining 3 bits from Bit 10 to Bit 12 can be set as invalid bits. . Therefore, for the lower bit data (Bit9 to Bit12), only the upper one bit (Bit9) becomes a valid bit (the number of valid bits = 1 bit).

【0078】以下、12ビットの元データの大きさが1
1桁以下の場合にも、有効信号レベルから、データを切
り捨て可能なノイズ成分を求め、これを基に、元データ
の有効ビット幅、下位側ビットデータの有効ビット数を
求めると以下のようになる。即ち、12ビットの元デー
タの大きさが11桁(Bit2〜Bit12)のときには、11
桁で表示可能なデータの大きさは「2047」、これは
飽和レベルの1/2であるから0.5×105(エレク
トロン)、このときの有効信号レベルは(0.5×10
51/2≒223.6(階調)である(図13(b))。
この階調は、8ビットで表示可能であるから、12ビッ
トのBit2〜Bit9までの8ビットを有効ビット幅とし、Bi
t10〜Bit12までの残り3ビットを無効ビットとすること
ができる。従って、この場合にも、下位側ビットデータ
(Bit9〜Bit12)に関しては、上位1ビット(Bit9)の
み有効ビットとなる(有効ビット数=1ビット)。
Hereinafter, the size of the 12-bit original data is 1
Even in the case of one digit or less, a noise component capable of truncating data is obtained from the effective signal level, and based on this, the effective bit width of the original data and the number of effective bits of the lower bit data are obtained as follows. Become. That is, when the size of the 12-bit original data is 11 digits (Bit 2 to Bit 12), 11
The size of the data that can be displayed by the digit is “2047”, which is の of the saturation level, and is therefore 0.5 × 10 5 (electrons).
5 ) 1/2 ≒ 223.6 (gradation) (FIG. 13B).
Since this gray scale can be displayed in 8 bits, the effective bit width is set to 8 bits from Bit 2 to Bit 9 of 12 bits, and Bi
The remaining three bits from t10 to Bit12 can be set as invalid bits. Therefore, also in this case, with regard to the lower bit data (Bit9 to Bit12), only the upper one bit (Bit9) becomes a valid bit (the number of valid bits = 1 bit).

【0079】又、12ビットの元データの大きさが10
桁(Bit3〜Bit12)のときには、10桁で表示可能なデ
ータの大きさは「1023」、これは飽和レベルの1/
4であるから0.25×105(エレクトロン)、この
ときの有効信号レベルは(0.25×1051/2≒15
8.1(階調)である(図13(c))。この階調も、
8ビットで表示可能であるから、12ビットの元データ
のBit3〜Bit10までの8ビットを有効ビット幅とし、Bit
11〜Bit12までの残りの2ビットを無効ビットとするこ
とができる。従って、この場合、下位側ビットデータ
(Bit9〜Bit12)に関しては、上位2ビット(Bit9,Bit
10)が有効ビットとなる(有効ビット数=2ビット)。
The size of the original 12-bit data is 10
In the case of digits (Bit3 to Bit12), the size of data that can be displayed with 10 digits is “1023”, which is 1/1 of the saturation level.
Since it is 4, 0.25 × 10 5 (electrons), the effective signal level at this time is (0.25 × 10 5 ) 1/2 ≒ 15
8.1 (gradation) (FIG. 13C). This gradation also
Since it can be displayed in 8 bits, 8 bits from Bit 3 to Bit 10 of the 12-bit original data are set as the effective bit width, and
The remaining two bits from 11 to Bit 12 can be set as invalid bits. Therefore, in this case, with respect to the lower bit data (Bit9 to Bit12), the upper two bits (Bit9, Bit9)
10) becomes effective bits (the number of effective bits = 2 bits).

【0080】同様に、元データが9桁(Bit4〜Bit12)
のときには(図13(d))、有効信号レベルは7ビッ
トで表示可能であるから、12ビットの元データのBit4
〜Bit10までの7ビットを有効ビット幅とし、Bit11,Bi
t12の2ビットを無効ビットとすることができる。従っ
て、この場合にも、下位側ビットデータ(Bit9〜Bit1
2)に関しては、上位2ビット(Bit9,Bit10)が有効ビ
ットとなる(有効ビット数=2ビット)。
Similarly, the original data is 9 digits (Bit 4 to Bit 12)
In the case of (FIG. 13D), since the effective signal level can be displayed by 7 bits, Bit 4 of the 12-bit original data
7 bits from Bit 10 to Bit 10 are the effective bit width, and Bit11, Bi
Two bits of t12 can be set as invalid bits. Therefore, also in this case, the lower bit data (Bit9 to Bit1)
Regarding 2), the upper two bits (Bit9, Bit10) are effective bits (the number of effective bits = 2 bits).

【0081】又、元データが8桁(Bit5〜Bit12)のと
きには(図13(e))、有効信号レベルは7ビットで
表示可能であるから、12ビットの元データのBit5〜Bi
t11までの7ビットを有効ビット幅とし、Bit12のみを無
効ビットとすることができる。従って、この場合には、
下位側ビットデータ(Bit9〜Bit12)に関しては、上位
3ビット(Bit9〜Bit11)が有効ビットとなる(有効ビ
ット数=3ビット)。
When the original data has 8 digits (Bit 5 to Bit 12) (FIG. 13 (e)), the effective signal level can be displayed with 7 bits, so that Bit 5 to Bi of the 12-bit original data can be displayed.
7 bits up to t11 can be set as an effective bit width, and only Bit 12 can be set as an invalid bit. Therefore, in this case,
As for the lower bit data (Bit9 to Bit12), the upper three bits (Bit9 to Bit11) are effective bits (the number of effective bits = 3 bits).

【0082】又、元データが7桁(Bit6〜Bit12)のと
きには(図13(f))、有効信号レベルは6ビットで
表示可能であるから、12ビットの元データのBit6〜Bi
t11までの6ビットを有効ビット幅とし、Bit12のみを無
効ビットとすることができる。従って、この場合にも、
下位側ビットデータ(Bit9〜Bit12)に関しては、上位
3ビット(Bit9〜Bit11)が有効ビットとなる(有効ビ
ット数=3ビット)。
When the original data has 7 digits (Bit 6 to Bit 12) (FIG. 13 (f)), the effective signal level can be displayed with 6 bits, so that the 6-bit Bi of the 12-bit original data can be displayed.
Six bits up to t11 can be set as an effective bit width, and only Bit 12 can be set as an invalid bit. Therefore, also in this case,
As for the lower bit data (Bit9 to Bit12), the upper three bits (Bit9 to Bit11) are effective bits (the number of effective bits = 3 bits).

【0083】更に、元データが6桁以下のときには、有
効信号レベルは、少なくとも6ビットあれば表示可能で
あり、このとき12桁全てが有効ビットとなる。従っ
て、この場合には、下位側ビットデータ(Bit9〜Bit1
2)に関しては4ビット(Bit9〜Bit12)全てが有効ビッ
トとなる(有効ビット数=4ビット)。以上説明したよ
うに、この第3の実施の形態によれば、各々の有効信号
レベルに応じて、下位側ビットデータの有効ビット数が
決定されるため、当該信号値に応じた効率の良い画像デ
ータの圧縮が行われる。
Further, when the original data has 6 digits or less, the valid signal level can be displayed if it has at least 6 bits. At this time, all 12 digits are valid bits. Therefore, in this case, the lower bit data (Bit9 to Bit1)
Regarding 2), all 4 bits (Bit 9 to Bit 12) are valid bits (the number of valid bits = 4 bits). As described above, according to the third embodiment, the number of effective bits of the lower-order bit data is determined according to each effective signal level, so that an efficient image corresponding to the signal value is obtained. Data compression is performed.

【0084】尚、上記した第1〜第3の実施の形態で
は、共に画像の元データ(RAWデータ)が12ビット
の場合について説明したが、12ビットより大きい画像
データ、12ビットより小さい画像データの何れであっ
ても、本発明は適用可能であり、この場合にも、高い圧
縮率を確保しつつ、処理速度を高めることができる。
又、上記した第1〜第3の実施の形態では、12ビット
の元データ(RAWデータ)を上位8ビット、下位4ビ
ットに分離する例をあげて説明したが、相関性の強い上
位ビット(12ビット画像データであれば、一般に6ビ
ット〜9ビットの範囲であることが経験的に知られてい
る。)であれば、8ビット以外のビット数に設定可能で
ある。この場合、上位何ビットを上位側ビットデータと
するかは、1コマ(1画面)毎に決定してもよい。
In the first to third embodiments, the case where the original data (RAW data) of an image is 12 bits has been described. However, image data larger than 12 bits and image data smaller than 12 bits are described. In any case, the present invention is applicable, and in this case, the processing speed can be increased while securing a high compression ratio.
In the first to third embodiments described above, an example is described in which the 12-bit original data (RAW data) is separated into upper 8 bits and lower 4 bits. In the case of 12-bit image data, it is generally empirically known that the range is from 6 bits to 9 bits.), However, the number of bits other than 8 bits can be set. In this case, the number of upper bits to be used as upper bit data may be determined for each frame (one screen).

【0085】又、上記した第1〜第3の実施の形態で
は、予測誤差Δ(又は量子化予測誤差δ)をハフマン符
号化テーブル等を用いて符号化する例をあげて説明した
が、予測誤差Δ(又は量子化予測誤差δ)を、Ziv-Lemp
elのようなユニバーサル符号化によって符号化してもよ
い。又、上記した第1〜第3の実施の形態では、1コマ
の画像を部分的に再現することを考慮して、圧縮画像デ
ータに位置情報(データブロック位置情報)を付加して
いるが、常に、1コマ分を完全に復元するのであれば、
位置情報を省くこともできる。
In the first to third embodiments, an example has been described in which the prediction error Δ (or the quantization prediction error δ) is encoded using a Huffman encoding table or the like. Error Δ (or quantization prediction error δ) is calculated as Ziv-Lemp
It may be encoded by universal encoding such as el. In the above-described first to third embodiments, the position information (data block position information) is added to the compressed image data in consideration of partially reproducing the image of one frame. If you always want to completely restore one frame,
Location information can also be omitted.

【0086】又、上記した第1〜第3の実施の形態で
は、共に、符号化処理装置と復号化処理装置が、別個に
構成されている例(例えば、符号化処理装置がディジタ
ルカメラ側、復号化処理装置がパーソナルコンピュータ
側)で説明したが、これら2つの装置を1つの装置に内
蔵してもよい(例えば、ディジタルカメラ等に双方を内
蔵してもよい)。
In each of the first to third embodiments described above, an example in which the encoding processing device and the decoding processing device are separately configured (for example, the encoding processing device is a digital camera side, Although the decoding device has been described on the personal computer side, these two devices may be incorporated in one device (for example, both may be incorporated in a digital camera or the like).

【0087】又、上記した第1〜第3の実施の形態で
は、画像データを上位側と下位側に分離する処理、上位
側ビットデータのDPCM符号化による符号化処理を、
共に、符号化処理装置10内のCPU13で行なう例を
あげて説明したが、これに限らず、DPCM符号化によ
る符号化を外付けのチップにまとめられた専用LSIに
行わせ、符号化処理装置10内のCPU13に上位側と
下位側の分離のみ行わせるようにしてもよい。この場
合、外付けの専用LSIには、DPCM符号化に代えて
Ziv-Lempel等による符号化を行うLSIを使用してもよ
い。又、復号化に当っては、復号化処理装置20に同様
に専用LSIをまとめたチップを外付けし、チップ内の
専用LSIで上位側ビットデータのDPCM復号化(又
は、Ziv-Lempel等による復号化)を行わせてもよい。こ
の場合には、復号化後の上位側ビットデータと下位側ビ
ットデータの結合を復号化処理装置20のCPU22に
行わせればよい。
In the first to third embodiments, the process of separating the image data into the upper side and the lower side, and the encoding process by the DPCM encoding of the upper bit data,
In both cases, an example has been described in which the processing is performed by the CPU 13 in the encoding processing apparatus 10. However, the present invention is not limited to this, and the encoding by the dedicated LSI integrated on an external chip is performed by performing the DPCM encoding. The CPU 13 in 10 may be configured to separate only the upper side and the lower side. In this case, the external dedicated LSI is replaced with DPCM encoding.
An LSI that performs encoding by Ziv-Lempel or the like may be used. Also, for decoding, a chip in which dedicated LSIs are similarly integrated is externally attached to the decoding processing device 20, and DPCM decoding of higher-order bit data is performed by a dedicated LSI in the chip (or by Ziv-Lempel or the like). (Decoding). In this case, the CPU 22 of the decoding processing device 20 may combine the upper bit data and the lower bit data after decoding.

【0088】又、上記した第1〜第3の実施の形態をデ
ィジタルカメラに適用する場合においては、CCDから
出力される信号を増幅するアンプのゲインに基づいて、
下位側ビットデータの無効ビット部分であるノイズ量を
計算で求めてもよい。更には、ディジタルカメラにおい
てアンプのゲインを決定する基となるISO感度の設定
に基づいて、下位側ビットデータの無効ビット部分を求
めてもよい。又、ディジタルカメラにおいては、CCD
出力信号を増幅するアンプのゲインに応じてノイズ量が
変化するため、このアンプのゲイン若しくはISO感度
に応じて有効ビット長を変化させてもよい。これによ
り、ディジタルカメラにおいて、如何なる感度設定、ゲ
イン設定がなされていても、適切な有効ビット長の信号
を得ることができ、その結果、圧縮効率を高くすること
が可能になる。
In the case where the above-described first to third embodiments are applied to a digital camera, based on the gain of an amplifier that amplifies a signal output from a CCD,
The noise amount, which is an invalid bit portion of the lower bit data, may be obtained by calculation. Furthermore, the invalid bit portion of the lower-order bit data may be obtained based on the ISO sensitivity setting that is the basis for determining the gain of the amplifier in the digital camera. In digital cameras, CCD
Since the amount of noise changes according to the gain of the amplifier that amplifies the output signal, the effective bit length may be changed according to the gain of this amplifier or the ISO sensitivity. As a result, a signal having an appropriate effective bit length can be obtained regardless of the sensitivity setting and gain setting in the digital camera, and as a result, the compression efficiency can be increased.

【0089】又、上記した第1〜第3の実施の形態で
は、有効ビット長を、入力デバイスの特性に基づいて決
定したビット長で説明したが、実際には、このビット長
から1〜2ビット小さいビット長を有効ビットとして
も、画質に与える影響はほとんどない。従って、有効ビ
ット長は、撮影条件や利用分野等に基づいて変更するよ
うにしてもよい。
Further, in the above-described first to third embodiments, the effective bit length is described as the bit length determined based on the characteristics of the input device. Even if a bit length smaller than a bit is used as an effective bit, there is almost no influence on image quality. Therefore, the effective bit length may be changed based on the shooting conditions, the field of use, and the like.

【0090】又、上記した第1〜第3の実施の形態で
は、ディジタルカメラ等によって、静止画を取得した場
合を想定して説明したが、動画を取得した場合にも、本
発明は適用可能である。
Although the first to third embodiments have been described on the assumption that a still image is obtained by a digital camera or the like, the present invention is also applicable to the case of obtaining a moving image. It is.

【0091】[0091]

【発明の効果】以上説明した請求項1の発明によれば、
高精細に取得された画像データを、上位側ビットデータ
と、下位側ビットデータとに分離し、分離前の元データ
に基づいて下位側ビットデータの有効ビット数を決定し
て下位側ビットデータの上位のデータを抽出するため、
画像データに含まれるノイズ成分を除いた圧縮処理を行
なうことができ、効率的な圧縮を行なうことができる。
According to the first aspect of the present invention described above,
The image data obtained with high definition is separated into upper bit data and lower bit data, and the number of effective bits of the lower bit data is determined based on the original data before separation to determine the lower bit data. To extract the top data,
It is possible to perform compression processing excluding noise components included in image data, and to perform efficient compression.

【0092】又、請求項2の発明によれば、画像データ
のうち、真に意味のある有効なデータを確実に保存しつ
つ、高い圧縮率で画像データの圧縮が行われる。又、請
求項3の発明によれば、相関性の強い上位側ビットデー
タの幅を実験等によって求めることで、各々の画像に応
じて高い圧縮率で、画像データの圧縮が行われることに
なる。
According to the second aspect of the present invention, image data is compressed at a high compression rate while reliably storing valid data that is truly significant. According to the third aspect of the present invention, the width of the higher-order bit data having a strong correlation is obtained by an experiment or the like, so that the image data is compressed at a high compression rate according to each image. .

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施の形態の符号化処理装置の
構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of an encoding processing device according to a first embodiment of this invention.

【図2】画像入力機器2の受光面に配置されたカラーフ
ィルタのレイアウトを示す図である。
FIG. 2 is a diagram showing a layout of a color filter arranged on a light receiving surface of the image input device 2.

【図3】第1の実施の形態の画像符号化処理を示すフロ
ーチャートである。
FIG. 3 is a flowchart illustrating an image encoding process according to the first embodiment.

【図4】第1の実施の形態における元データと上位側ビ
ットデータ、下位側ビットデータ、元データの大きさ、
有効ビット幅の各々の関係を示す図である。
FIG. 4 shows the original data, the upper bit data, the lower bit data, the size of the original data,
It is a figure showing each relation of effective bit width.

【図5】第1の実施の形態により得られる圧縮画像デー
タのフォーマットの第1の例を示す図である。
FIG. 5 is a diagram showing a first example of a format of compressed image data obtained according to the first embodiment.

【図6】第1の実施の形態により得られる圧縮画像デー
タのフォーマットの第2の例を示す図である。
FIG. 6 is a diagram illustrating a second example of the format of the compressed image data obtained according to the first embodiment.

【図7】本発明の第1の実施の形態の復号化処理装置の
構成を示すブロック図である。
FIG. 7 is a block diagram illustrating a configuration of a decoding processing device according to the first embodiment of this invention.

【図8】第1の実施の形態の画像復号化処理を示すフロ
ーチャートである。
FIG. 8 is a flowchart illustrating an image decoding process according to the first embodiment.

【図9】図8の画像復号化処理の他の態様を示すフロー
チャートである。
9 is a flowchart showing another mode of the image decoding process in FIG.

【図10】第1の実施の形態の変形例における圧縮画像
データのフォーマットを示す図である。
FIG. 10 is a diagram showing a format of compressed image data in a modification of the first embodiment.

【図11】他の画像復号化処理を示すフローチャートで
ある。
FIG. 11 is a flowchart illustrating another image decoding process.

【図12】図11の画像復号化処理の他の態様を示すフ
ローチャートである。
12 is a flowchart showing another mode of the image decoding process in FIG.

【図13】第2の実施の形態における元データと上位側
ビットデータ、下位側ビットデータ、元データの大き
さ、有効ビット幅の各々の関係を示す図である。
FIG. 13 is a diagram illustrating a relationship among original data, upper bit data, lower bit data, the size of the original data, and effective bit width according to the second embodiment.

【符号の説明】[Explanation of symbols]

1 画像入力機器(CCD) 2 記憶媒体 10 符号化処理装置 12 入力データバッファ 13 CPU 15 出力データバッファ 20 復号化処理装置 21 入力データバッファ 22 CPU 23 復元データバッファ DESCRIPTION OF SYMBOLS 1 Image input apparatus (CCD) 2 Storage medium 10 Encoding processing unit 12 Input data buffer 13 CPU 15 Output data buffer 20 Decoding processing unit 21 Input data buffer 22 CPU 23 Restoration data buffer

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 画像入力手段によって1画素当り一定ビ
ット数で取得された画像データを圧縮する画像データ圧
縮方法において、 前記一定ビット数の画素毎の元データを上位の所定ビッ
ト数で表される上位側ビットデータと下位の所定ビット
数で表される下位側ビットデータとに分離するステップ
と、 前記上位側ビットデータに可逆的な符号化を施すステッ
プと、 前記一定ビット数の画素毎の元データに基づいて前記下
位側ビットデータの有効ビット数を決定するステップ
と、 前記有効ビット数の幅で前記下位側ビットデータの所定
ビットのうち上位のデータを抽出するステップと、 前記可逆的な符号化が施された上位側ビットデータと前
記抽出された有効ビット数の幅の下位側ビットデータと
を、個別に管理するための管理データを生成するステッ
プと、 前記可逆的な符号化が施された上位側ビットデータと前
記抽出された有効ビット数の幅の下位側ビットデータと
前記生成された管理データとを記憶媒体に記憶するステ
ップとからなることを特徴とする画像データ圧縮方法。
1. An image data compression method for compressing image data obtained with a fixed number of bits per pixel by an image input means, wherein the original data for each pixel having the fixed number of bits is represented by a higher order predetermined number of bits. Separating upper-order bit data into lower-order bit data represented by a predetermined lower-order bit number; applying reversible encoding to the upper-order bit data; Determining the number of effective bits of the lower-order bit data based on data; extracting the higher-order data among predetermined bits of the lower-order bit data with a width of the effective bit number; Management data for individually managing the high-order bit data subjected to the conversion and the low-order bit data having the width of the extracted effective number of bits. And storing the high-order bit data subjected to the reversible encoding, the low-order bit data having a width of the extracted number of effective bits, and the generated management data in a storage medium. A method of compressing image data.
【請求項2】 請求項1に記載の画像データ圧縮方法に
おいて、 前記有効ビット数は、前記画素毎の元データの有効ビッ
ト幅に応じて決定されることを特徴とする画像データ圧
縮方法。
2. The image data compression method according to claim 1, wherein the number of effective bits is determined according to an effective bit width of original data for each pixel.
【請求項3】 請求項1又は請求項2に記載の画像デー
タ圧縮方法において、 前記画素毎の有効ビット幅は前記画像入力手段の検出精
度に応じた値であり、 前記上位の所定ビット数は、近傍の画素との間で相関が
生じる傾向の強い上位のビット数であり、その値は経験
則により求められることを特徴とする画像データ圧縮方
法。
3. The image data compression method according to claim 1, wherein the effective bit width of each pixel is a value corresponding to a detection accuracy of the image input unit, and the upper predetermined number of bits is , A high-order bit number that has a strong tendency to cause a correlation with neighboring pixels, the value of which is obtained by an empirical rule.
JP32838199A 1998-12-21 1999-11-18 Image data compression method Expired - Lifetime JP4196039B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP32838199A JP4196039B2 (en) 1998-12-21 1999-11-18 Image data compression method
US09/466,869 US6744929B1 (en) 1999-11-18 1999-12-20 Image data compression method image data compression apparatus and recording medium and data signal for providing image data compression program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP36237698 1998-12-21
JP10-362376 1998-12-21
JP32838199A JP4196039B2 (en) 1998-12-21 1999-11-18 Image data compression method

Publications (2)

Publication Number Publication Date
JP2000244922A true JP2000244922A (en) 2000-09-08
JP4196039B2 JP4196039B2 (en) 2008-12-17

Family

ID=26572853

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32838199A Expired - Lifetime JP4196039B2 (en) 1998-12-21 1999-11-18 Image data compression method

Country Status (1)

Country Link
JP (1) JP4196039B2 (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006262161A (en) * 2005-03-17 2006-09-28 Ricoh Co Ltd Image processor, image processing method, and storage medium with the method stored therein
JP2006303690A (en) * 2005-04-18 2006-11-02 Sony Corp Image signal processing apparatus, camera system, and image signal processing method
JP2006303689A (en) * 2005-04-18 2006-11-02 Sony Corp Image signal processing apparatus, camera system, and image signal processing method
JP2007060206A (en) * 2005-08-24 2007-03-08 Fujifilm Corp Data compression apparatus and data compression program
US7446782B2 (en) 2004-07-07 2008-11-04 Olympus Corporation Image processing device
JP2010503254A (en) * 2006-08-30 2010-01-28 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Apparatus and method for encoding data signal, and apparatus and method for decoding data signal
JP2014143655A (en) * 2013-01-25 2014-08-07 Fuji Xerox Co Ltd Image encoder, image decoder and program
WO2019167673A1 (en) * 2018-03-01 2019-09-06 ソニー株式会社 Image processing device and method, imaging element, and imaging device
CN110896483A (en) * 2018-09-12 2020-03-20 阿诺德和里克特电影技术公司 Method for compressing and decompressing image data
JP2020123954A (en) * 2019-01-30 2020-08-13 スノー コーポレーション Method and system for improving compressibility using pixel conversion of image file
JP2020145518A (en) * 2019-03-04 2020-09-10 日本放送協会 Encoder and decoder
US11823418B2 (en) 2019-01-30 2023-11-21 Snow Corporation Method and system for improving compression ratio by difference between blocks of image file

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7446782B2 (en) 2004-07-07 2008-11-04 Olympus Corporation Image processing device
JP2006262161A (en) * 2005-03-17 2006-09-28 Ricoh Co Ltd Image processor, image processing method, and storage medium with the method stored therein
JP4627670B2 (en) * 2005-03-17 2011-02-09 株式会社リコー Image forming apparatus, image forming method, and computer-readable storage medium storing program for executing the method
JP2006303690A (en) * 2005-04-18 2006-11-02 Sony Corp Image signal processing apparatus, camera system, and image signal processing method
JP2006303689A (en) * 2005-04-18 2006-11-02 Sony Corp Image signal processing apparatus, camera system, and image signal processing method
JP4687216B2 (en) * 2005-04-18 2011-05-25 ソニー株式会社 Image signal processing apparatus, camera system, and image signal processing method
JP4687215B2 (en) * 2005-04-18 2011-05-25 ソニー株式会社 Image signal processing apparatus, camera system, and image signal processing method
US8031958B2 (en) 2005-04-18 2011-10-04 Sony Corporation Image signal processing apparatus, camera system and image signal processing method
JP2007060206A (en) * 2005-08-24 2007-03-08 Fujifilm Corp Data compression apparatus and data compression program
JP4579793B2 (en) * 2005-08-24 2010-11-10 富士フイルム株式会社 Data compression apparatus and data compression program
JP2010503254A (en) * 2006-08-30 2010-01-28 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ Apparatus and method for encoding data signal, and apparatus and method for decoding data signal
JP2014143655A (en) * 2013-01-25 2014-08-07 Fuji Xerox Co Ltd Image encoder, image decoder and program
WO2019167673A1 (en) * 2018-03-01 2019-09-06 ソニー株式会社 Image processing device and method, imaging element, and imaging device
JPWO2019167673A1 (en) * 2018-03-01 2021-03-04 ソニー株式会社 Image processing devices and methods, image sensors, and image pickup devices
JP7259836B2 (en) 2018-03-01 2023-04-18 ソニーグループ株式会社 IMAGE PROCESSING APPARATUS AND METHOD, IMAGE SENSOR, AND IMAGING DEVICE
US11765468B2 (en) 2018-03-01 2023-09-19 Sony Corporation Image processing device and method thereof, imaging element, and imaging device
CN110896483A (en) * 2018-09-12 2020-03-20 阿诺德和里克特电影技术公司 Method for compressing and decompressing image data
CN110896483B (en) * 2018-09-12 2023-10-24 阿诺德和里克特电影技术公司 Method for compressing and decompressing image data
JP2020123954A (en) * 2019-01-30 2020-08-13 スノー コーポレーション Method and system for improving compressibility using pixel conversion of image file
JP7106587B2 (en) 2019-01-30 2022-07-26 スノー コーポレーション Method and system for improving compression rate using pixel conversion of image file
US11539955B2 (en) 2019-01-30 2022-12-27 Snow Corporation Method and system for improving compression ratio through pixel conversion of image file
US11823418B2 (en) 2019-01-30 2023-11-21 Snow Corporation Method and system for improving compression ratio by difference between blocks of image file
JP2020145518A (en) * 2019-03-04 2020-09-10 日本放送協会 Encoder and decoder
JP7216575B2 (en) 2019-03-04 2023-02-01 日本放送協会 Encoding device and decoding device

Also Published As

Publication number Publication date
JP4196039B2 (en) 2008-12-17

Similar Documents

Publication Publication Date Title
US6744929B1 (en) Image data compression method image data compression apparatus and recording medium and data signal for providing image data compression program
KR100347508B1 (en) Photo Image Pick-Up Device
JP3069455B2 (en) Quantization and dequantization circuits in image data compression and decompression equipment
MXPA02010002A (en) Enhanced compression of gray level images.
JP2007036566A (en) Digital signal coding and decoding apparatus, and method thereof
US9525880B2 (en) Lossless video data compressor with very high data rate
JP4196039B2 (en) Image data compression method
US20110200263A1 (en) Image encoder and image decoder
JP2000244935A (en) Method for compressing picture data
US11677932B2 (en) Image processing device
US6396955B1 (en) Image compression and expansion device
US8462377B2 (en) Method, apparatus, and system for reduction of line processing memory size used in image processing
US8428381B2 (en) Image compression method with variable quantization parameter
JP4092830B2 (en) Image data compression method
JP3231800B2 (en) Image encoding apparatus and image encoding method
US7450769B2 (en) Image processing method for facilitating data transmission
JPH1175183A (en) Image signal processing method and device and storage medium
JP2008017472A (en) Compression method of ultrasonic imaging
JP2004040300A (en) Image processing apparatus
US8229236B2 (en) Method for progressive JPEG image decoding
JP4729913B2 (en) Image processing apparatus and method
JP3845206B2 (en) Image compression apparatus and image expansion apparatus
TWI795480B (en) Image processing device for performing data decompression and image processing device for performing data compression
JP3845208B2 (en) Image compression apparatus and image expansion apparatus
JP2006502673A (en) In-stream lossless compression of digital image sensor data

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060919

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080522

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080617

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080804

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: 20080902

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080915

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111010

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4196039

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111010

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141010

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141010

Year of fee payment: 6

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141010

Year of fee payment: 6

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

EXPY Cancellation because of completion of term