JP3192133B2 - Electronic camera device - Google Patents

Electronic camera device

Info

Publication number
JP3192133B2
JP3192133B2 JP37182199A JP37182199A JP3192133B2 JP 3192133 B2 JP3192133 B2 JP 3192133B2 JP 37182199 A JP37182199 A JP 37182199A JP 37182199 A JP37182199 A JP 37182199A JP 3192133 B2 JP3192133 B2 JP 3192133B2
Authority
JP
Japan
Prior art keywords
quantization
code amount
data
image
quantization width
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.)
Expired - Lifetime
Application number
JP37182199A
Other languages
Japanese (ja)
Other versions
JP2000152172A (en
Inventor
秀俊 山田
千尋 中川
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.)
Olympus Corp
Original Assignee
Olympus Optic Co Ltd
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 Olympus Optic Co Ltd filed Critical Olympus Optic Co Ltd
Priority to JP37182199A priority Critical patent/JP3192133B2/en
Publication of JP2000152172A publication Critical patent/JP2000152172A/en
Application granted granted Critical
Publication of JP3192133B2 publication Critical patent/JP3192133B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は電子カメラ装置に関
する。
The present invention relates to relates to an electronic camera equipment.

【0002】[0002]

【従来の技術】CCDに代表される個体撮像装置等によ
り撮像された画像信号をメモリカード、磁気ディスク、
あるいは磁気テープ等の記憶媒体にディジタルデータと
して記録する場合、そのデータ量は膨大なものとなるた
め、多くのフレーム画像を限られた記録容量の範囲で記
録しようとするには、得られた画像信号のデータに対
し、何らかの圧縮を行うことが必要となる。例えば、デ
ィジタル電子スチルカメラなどにおいては、撮影した画
像を銀塩フィルムの代わりに、メモリカードや磁気ディ
スク等のデータ記憶媒体にディジタルデータとして保存
するので、1枚のメモリカードあるいは磁気ディスク装
置に記録できる画像の枚数は、保証されなければならな
い。
2. Description of the Related Art An image signal picked up by a solid-state image pickup device represented by a CCD or the like is transferred to a memory card, magnetic disk,
Alternatively, when recording digital data on a storage medium such as a magnetic tape, the amount of data is enormous. It is necessary to perform some kind of compression on the signal data. For example, in a digital electronic still camera, a photographed image is stored as digital data on a data storage medium such as a memory card or a magnetic disk instead of a silver halide film, so that the image is recorded on a single memory card or a magnetic disk device. The number of possible images must be guaranteed.

【0003】同様に、ディジタルVTR(ビデオテープ
レコーダ)等の場合もフレーム当たりの画像のデータ量
に影響されることなく、所定量のフレームを記録できな
ければならない。すなわち、スチル像であっても、動画
像であっても、必要なコマ数分を確実に記録できる必要
がある。
Similarly, in the case of a digital VTR (video tape recorder) or the like, a predetermined amount of frames must be recorded without being affected by the amount of image data per frame. That is, it is necessary to reliably record the required number of frames, whether a still image or a moving image.

【0004】このような条件に対処するための画像デー
タの圧縮方法として、直交変換符号化とエントロピー符
号化を組み合わせた符号化方法が広く知られている。
As a method for compressing image data to cope with such a condition, a coding method combining orthogonal transform coding and entropy coding is widely known.

【0005】その代表的なものとして、静止画符号化国
際標準化において検討されている方式について次に概略
を説明する。
[0005] As a representative example, a scheme which is being studied in international standardization of still picture coding will be briefly described below.

【0006】この方式はまず、画像データを所定の大き
さのブロックに分割し、分割されたブロック毎に直交変
換として2次元のDCT(離散コサイン変換)を行う。
次に各周波数成分に応じた線形量子化を行い、この量子
化された値に対しエントロピー(単位通報当りの情報
量)符号化としてハフマン符号化を行う。この時、直流
成分に関しては近傍ブロックの直流成分との差分値をハ
フマン符号化する。交流成分はジグザグスキャンと呼ば
れる低い周波数成分から高い周波数成分へのスキャンを
行い、無効(値が0)の成分の連続する個数とそれに続
く有効な成分の値とから2次元のハフマン符号化を行
う。
In this method, first, image data is divided into blocks of a predetermined size, and two-dimensional DCT (discrete cosine transform) is performed as orthogonal transformation for each of the divided blocks.
Next, linear quantization according to each frequency component is performed, and Huffman coding is performed on the quantized value as entropy (information amount per unit report) coding. At this time, the difference value between the DC component and the DC component of the neighboring block is Huffman-coded. The AC component scans from a low frequency component to a high frequency component called a zigzag scan, and performs two-dimensional Huffman coding from the continuous number of invalid (value 0) components and the value of the valid components that follow. .

【0007】以上がこの方式の基本部分である。The above is the basic part of this system.

【0008】この基本部分だけでは、エントロピー符号
化であるハフマン符号化を用いているために符号量が画
像毎に一定ではなくなってしまう。
[0008] With this basic part alone, the code amount is not constant for each image because Huffman coding, which is entropy coding, is used.

【0009】そこで、符号量の制御の方法として次の方
式が提案されている。まず、前記基本部分の処理を行う
と同時に全画面の発生した総符号量を求める。この総符
号量と目的とする符号量とからDCT係数に対する目的
とする符号量に近づけるのに最適な量子化幅を予測す
る。次にこの量子化幅を用いて前記基本部分の量子化以
降の処理を繰り返す。そして、今回発生した総符号量
と、前回発生した総符号量と、目的とする符号量とから
再び目的の符号量に近づけるのに最適な量子化幅を予測
する。そして、この予測した量子化幅と前回の量子化幅
が一致し、かつ目的の符号量よりも今回発生した総符号
量の方が少ない場合には処理を終了し、符号を出力す
る。そうでない場合には新しい量子化幅を用いて処理を
繰り返す。
Therefore, the following method has been proposed as a method of controlling the code amount. First, the processing of the basic portion is performed, and at the same time, the total code amount of the entire screen is obtained. From the total code amount and the target code amount, an optimal quantization width for approaching the target code amount for the DCT coefficient is predicted. Next, processing after the quantization of the basic portion is repeated using this quantization width. Then, from the total code amount generated this time, the total code amount generated last time, and the target code amount, an optimum quantization width for approaching the target code amount again is predicted. If the predicted quantization width matches the previous quantization width and the total code amount generated this time is smaller than the target code amount, the process is terminated and a code is output. Otherwise, the process is repeated using the new quantization width.

【0010】以上の動作を図10を参照して具体的に説
明すると、まず、(2)に示すように、1フレームの画
像データ(国際標準化案で提示されている1フレームの
画像は720×575画素)を所定の大きさのブロック
(例えば、8×8の画素よりなるブロックA,B,C
…)に分割し、(b)に示すように、この分割されたブ
ロック毎に直交変換として2次元のDCT(離散コサイ
ン変換)を行い、8×8のマトリックス上に順次格納す
る。画像データは二次元平面で眺めてみると、濃淡情報
の分布に基づく周波数情報である空間周波数を有してい
る。
The above operation will be described in detail with reference to FIG. 10. First, as shown in (2), one frame of image data (one frame image presented in the international standardization plan is 720 × 575 pixels) into blocks of a predetermined size (for example, blocks A, B, and C composed of 8 × 8 pixels).
..), And two-dimensional DCT (discrete cosine transform) is performed as an orthogonal transform for each of the divided blocks as shown in (b), and the blocks are sequentially stored on an 8 × 8 matrix. When viewed on a two-dimensional plane, the image data has a spatial frequency which is frequency information based on the distribution of density information.

【0011】従って、上記DCTを行うことにより、画
像データは直流成分DCと交流成分ACに変換され、8
×8のマトリックス上には原点位置(0,0位置)に直
流成分DCの値を示すデータが、そして、0,7位置に
は横軸方向の交流成分ACの最大周波数値を示すデータ
が、そして、7,0位置には縦軸方向の最大交流成分A
Cの周波数値を示すデータが、さらに7,7位置には斜
め方向の交流成分ACの最大周波数値を示すデータが、
それぞれ格納され、中間位置ではそれぞれの座標位置に
より関係付けられる方向における周波数データが、原点
側より順次高い周波数のものが出現する形で格納される
ことになる。
Therefore, by performing the DCT, the image data is converted into a DC component DC and an AC component AC.
On the × 8 matrix, data indicating the value of the DC component DC is located at the origin position (0, 0 position), and data indicating the maximum frequency value of the AC component AC in the horizontal axis direction is located at the 0, 7 position. The maximum AC component A in the vertical axis direction is located at the 7,0 position.
Data indicating the frequency value of C, and data indicating the maximum frequency value of the AC component AC in the oblique direction are further provided at positions 7 and 7.
At the intermediate position, the frequency data in the direction associated with each coordinate position is stored in such a manner that the frequency data having higher frequency than the origin side appears.

【0012】次にこのマトリックスにおける各座標位置
の格納データを、定められた量子化マトリックスと量子
化幅係数αを掛け合わせて得られる各周波数成分毎の量
子化幅により割ることにより、各周波数成分に応じた線
形量子化を行い(c)、この量子化された値に対しエン
トロピー符号化としてハフマン符号化を行う。この時、
直流成分DCに関しては近隣ブロックの直流成分との差
分値をグループ番号(付加ビット数)と付加ビットで表
現し、そのグループ番号をハフマン符号化し、得られた
符号語と付加ビットを合わせて符号化データとする(d
1,d2,e1,e2)。
Next, the data stored at each coordinate position in the matrix is divided by a quantization width for each frequency component obtained by multiplying a predetermined quantization matrix by a quantization width coefficient α, thereby obtaining each frequency component. (C), and Huffman encoding is performed on the quantized value as entropy encoding. At this time,
Regarding the DC component DC, the difference value between the DC component of the neighboring block and the DC component is expressed by a group number (number of additional bits) and additional bits, the group number is Huffman-coded, and the obtained code word and additional bits are coded together. Data (d
1, d2, e1, e2).

【0013】交流成分ACに関しても有効である(値が
“0”でない)係数は、グループ番号と付加ビットで表
現する。
Coefficients that are also effective for the AC component AC (values are not "0") are represented by group numbers and additional bits.

【0014】そのため、交流成分ACはジグザグスキャ
ンと呼ばれる低い周波数成分から高い周波数成分へのス
キャンを行い、無効(値が“0”)の成分の連続する個
数(零のラン数)と、それに続く有効な成分の値のグル
ープ番号とから2次元のハフマン符号化を行い、得られ
た符号語と付加ビットを合わせて符号化データとする。
For this reason, the AC component AC performs a scan from a low frequency component to a high frequency component called a zigzag scan, and the continuous number of invalid (value is “0”) components (zero run number) and the succeeding number. Two-dimensional Huffman coding is performed from the group number of the value of the effective component, and the obtained code word and additional bits are combined to obtain coded data.

【0015】ハフマン符号化はフレーム画像あたりの上
記直流成分DCおよび交流成分ACの各々のデータ分布
における発生頻度のピークのものを中心として、この中
心のものほど、データビットを少なくし、周辺になるほ
どビット数を多くするようにしてビット割り当てをした
形でデータを符号化して符号語を得ることで行う。
The Huffman coding is centered on the peak of the frequency of occurrence in the data distribution of each of the DC component DC and AC component AC per frame image. The more the center, the smaller the number of data bits and the closer to the periphery. This is performed by encoding data in a form where bits are allocated so as to increase the number of bits to obtain a codeword.

【0016】以上がこの方式の基本部分である。The above is the basic part of this system.

【0017】この基本部分だけでは、エントロピー符号
化であるハフマン符号化を用いているために符号量が画
像毎に一定ではなくなってしまうから、符号量の制御の
方法として例えば、次のように処理する。
With this basic part alone, the code amount is not constant for each image because Huffman coding, which is entropy coding, is used. Therefore, as a method of controlling the code amount, for example, the following processing is performed. I do.

【0018】まず、暫定的な量子化幅係数αを用いて前
記基本部分の処理を行うと同時に、全画面の発生した総
符号量(総ビット数)を求める(g)。この総符号量
と、目的とする符号量と、用いた暫定的な量子化幅係数
αの3者とからDCT係数に対する目的とする符号量に
近づけるのに最適な量子化幅係数αをニュートン‐ラプ
ソン‐イタレーション(Newton Raphson Iteration)に
より予測する(h)。
First, the basic portion is processed using the provisional quantization width coefficient α, and at the same time, the total code amount (total number of bits) generated for the entire screen is obtained (g). From the total code amount, the target code amount, and the tentative quantization width coefficient α used, the optimum quantization width coefficient α for approaching the target code amount for the DCT coefficient is calculated using Newton- Predicted by Newton Raphson Iteration (h).

【0019】次にこの量子化幅係数αを用い(i)、前
述の基本部分の量子化以降の処理を繰り返す。そして、
今回発生した総符号量と、前回発生した総符号量と、目
的とする符号量と、今回用いた量子化幅係数αと、前回
用いた量子化幅係数αとから、再び目的の符号量に近づ
けるのに最適な量子化幅係数αを予測する。そして、こ
の予測した量子化幅係数αと前回の量子化幅係数αが一
致し、かつ目的の符号量よりも今回発生した総符号量の
方が少ない場合には処理を終了し、今回発生した符号化
データを出力してメモリカードに記憶する(f)。そう
でない場合には量子化幅係数αを変更し、この新しい量
子化幅αを用いて処理を繰り返す。
Next, using the quantization width coefficient α (i), the above-described processing after quantization of the basic portion is repeated. And
From the total code amount generated this time, the total code amount generated last time, the target code amount, the quantization width coefficient α used this time, and the quantization width coefficient α used last time, The quantization width coefficient α that is optimal for approaching is predicted. Then, if the predicted quantization width coefficient α matches the previous quantization width coefficient α, and the total code amount generated this time is smaller than the target code amount, the process ends, and the current The encoded data is output and stored in the memory card (f). If not, the quantization width coefficient α is changed, and the process is repeated using the new quantization width α.

【0020】[0020]

【発明が解決しようとする課題】上述したように、例え
ば、ディジタル電子スチルカメラなどにおいては、1枚
のメモリカードあるいは磁気ディスク装置あるいは1本
の磁気テープに記録できる画像の枚数が保証されていな
ければならず、そのため、画像データを圧縮して記録す
るが、高能率で画像データの圧縮が行える事が望まれ
る。これらはディジタル電子スチルカメラに限らず、他
のアプリケーションにおいても、少なからず要求される
項目である。
As described above, for example, in a digital electronic still camera, the number of images that can be recorded on one memory card, magnetic disk device, or one magnetic tape must be guaranteed. Therefore, the image data is compressed and recorded, and it is desired that the image data can be compressed with high efficiency. These are not only items required for digital electronic still cameras but also for other applications.

【0021】しかしながら、上述の国際標準案方式によ
る圧縮方法は、画像データをブロック化して離散コサイ
ン変換に代表されるような直交変換を行う符号化また
は、予測符号化(DPCM)等の画像情報圧縮により前
処理の圧縮を行い、その結果を得て量子化した後、その
量子化出力をハフマン符号化に代表される可変長符号化
によって符号化する方法であることから、このような可
変長符号化を組み合わせた画像データ圧縮方式は高能率
圧縮が可能であるものの、可変長符号化を用いているが
故に、実際に符号化を終了するまで、その符号量がわか
らず、符号量を制御することが難しいと云う問題があっ
た。
However, the above-mentioned compression method based on the international standard scheme employs image information compression such as coding for performing orthogonal transformation typified by discrete cosine transformation by dividing image data or predictive coding (DPCM). This is a method of performing pre-processing compression, obtaining the result, quantizing the result, and encoding the quantized output by variable-length coding represented by Huffman coding. Although the image data compression method that combines the encoding is capable of high-efficiency compression, it uses variable-length coding, so the code amount is not known until the coding is actually finished, and the code amount is controlled. There was a problem that it was difficult.

【0022】一方、限られた容量の記録媒体に記録でき
る画像の枚数を増やすため、データの圧縮率を変えるよ
うにする提案がある。例えば、特開昭63−28607
8号公報に見られるように、データをそのまま記録する
モードと、圧縮して記録するモードとを切換えて使用す
ることが、また、特開平1−292987号公報には圧
縮の度合いを切換えることで、複数の画質モードを選択
できるようにすることが提案されている。これは一般
に、圧縮率を高くすると画質は低下することになるた
め、記録枚数を優先するモード(低画質モード)と、画
質を重視する高画質モードをユーザの希望や用途に応
じ、選択切換えできるようにするためである。
On the other hand, there is a proposal to change the data compression ratio in order to increase the number of images that can be recorded on a recording medium having a limited capacity. For example, JP-A-63-28607
As disclosed in Japanese Unexamined Patent Publication No. 8 (1994) -208, it is possible to switch between a mode in which data is recorded as it is and a mode in which data is compressed and recorded, and in Japanese Patent Application Laid-Open No. 1-292987, the degree of compression is switched. It has been proposed that a plurality of image quality modes can be selected. Generally, when the compression ratio is increased, the image quality is reduced. Therefore, a mode in which the number of recorded images is prioritized (a low image quality mode) and a high image quality mode in which the image quality is emphasized can be selectively switched according to a user's desire or application. That's why.

【0023】これらの先行技術では複数の画質モードに
応じた圧縮率の圧縮回路を各別に設け、これらを画質モ
ードに応じて切換えて使用するようにしているため、ハ
ードウェア構成が複雑となり、カメラの大型化、コスト
アップをもたらす。また、これらの先行例は無圧縮モー
ドと、圧縮モードとの切換え、あるいは数種類の固定圧
縮率の中のいずれかを選択するものであり、圧縮率を任
意の値に設定することや、一定容量の記録媒体に記録で
きる画像枚数をユーザの希望に応じて自由に設定できる
ようにすることは出来ない。
In these prior arts, a compression circuit having a compression ratio corresponding to a plurality of image quality modes is separately provided, and these are switched and used according to the image quality mode. The size and cost increase. In these prior examples, switching between the non-compression mode and the compression mode, or selecting one of several types of fixed compression ratios, the compression ratio can be set to an arbitrary value, and a fixed capacity can be set. It is not possible to freely set the number of images that can be recorded on the recording medium according to the user's request.

【0024】また、高画質モードと低画質モードを選択
できたとしても、このモードの違いにより、当然、画像
当り(コマ当り)の目的符号量も変り、これに合わせて
圧縮符号化する必要が生じるが、画像はその内容によ
り、空間周波数の分布状態がまちまちであり、従って、
選択した圧縮率が固定では、空間周波数の分布状態に応
じて圧縮後のデータ容量がまちまちになってしまう。こ
れでは一定容量の記録媒体に対し、何枚記録できるかは
常に不確定であり、実際に記録して見ないとわからない
ことから、使い勝手の上で極めて不都合である。
Even if the high image quality mode and the low image quality mode can be selected, the target code amount per image (per frame) naturally changes due to the difference between these modes, and it is necessary to perform compression encoding in accordance with this. However, depending on the content of the image, the spatial frequency distribution varies, and
If the selected compression ratio is fixed, the data capacity after compression will vary depending on the spatial frequency distribution state. In this case, it is always uncertain how many sheets can be recorded on a recording medium of a fixed capacity, and it is inconvenient in terms of usability because it cannot be known unless actually recorded.

【0025】また、人間が知覚する色信号の帯域幅は輝
度信号のそれに比較して狭くても良いので、画像の輝度
信号成分と色信号成分を分離して量子化幅を制御し、色
信号の情報量を輝度信号に比較して少なくすることによ
り、再生画像の画質を劣化させることなく、情報量を削
減することが可能となる。
Since the bandwidth of the color signal perceived by humans may be narrower than that of the luminance signal, the luminance signal component and the color signal component of the image are separated to control the quantization width, and the color signal Is reduced as compared with the luminance signal, it is possible to reduce the information amount without deteriorating the image quality of the reproduced image.

【0026】しかしながら、上記従来の技術において
は、輝度信号と色信号を区別せずに量子化幅αを制御し
ていたため、情報量が多くなるという問題があった。
However, in the above-described conventional technique, since the quantization width α is controlled without distinguishing the luminance signal and the chrominance signal, there is a problem that the information amount increases.

【0027】また、情報量が多くなると情報の記録に時
間がかかり、特に速写性の要求される電子カメラにおい
ては、問題となっていた。また、1コマ当たりの画像の
情報量が多くなると、記録媒体に記録可能な撮影可能枚
数が少なくなるという問題もあった。また、電子カメラ
等の圧縮された画像信号を復号化して再生表示する機能
を有する装置では、再生画像の画質が劣化したり、再生
に時間がかかるという問題があった。
Further, when the amount of information increases, it takes time to record the information, and this has been a problem particularly in an electronic camera that requires quick shooting. Further, when the amount of information of an image per frame increases, the number of recordable images that can be recorded on a recording medium also decreases. Further, in an apparatus such as an electronic camera having a function of decoding and reproducing and displaying a compressed image signal, there is a problem that the image quality of a reproduced image is deteriorated and that it takes time to reproduce.

【0028】[0028]

【0029】本発明の目的は、記録媒体に記録された可
変長符号化画像信号データを復号化し、この復号化され
たデータを上記記録媒体から読み出された輝度信号成分
と色信号成分に対する各々の量子化幅の情報に基づいて
逆量子化することにより、色信号成分の帯域幅が輝度信
号成分の帯域幅に比較して狭くとも、画質を損なうこと
なく、迅速な再生ができるようにした電子カメラ再生装
置を提供することにある。
An object of the present invention is to decode variable-length coded image signal data recorded on a recording medium, and to decode the decoded data with respect to a luminance signal component and a chrominance signal component read from the recording medium. By performing inverse quantization based on the information on the quantization width of, even if the bandwidth of the color signal component is narrower than the bandwidth of the luminance signal component, it is possible to quickly reproduce the image without deteriorating the image quality. An electronic camera playback device is provided.

【0030】[0030]

【課題を解決するための手段】上記目的を達成するた
め、本発明は次のように構成する。すなわち、映像信号
を生成する撮影系を有し、この撮影系により得た画像信
号を、直交変換もしくは予測符号化等を行う画像情報圧
縮手段により画像データを前処理した後、量子化手段に
より量子化し、この量子化出力を可変長符号化手段によ
りハフマン符号化し、このハフマン符号化した画像信号
データを、読出し可能に記録する記録媒体に記録して保
存し、この保存された画像信号データを復号化手段によ
り復号化して画像の再生信号として得るようにした電子
カメラ再生装置であって、前記量子化手段は、前記前処
理済み画像データについて与えられる量子化幅を以て輝
度信号成分、色信号成分別に量子化した成分別量子化画
像データを出力する機能を持たせ、また、 所望の圧縮率
に対応する情報を入力する入力手段と、 可変長符号化手
段の出力を受け、画面単位の総符号量を求めてこれを算
出符号量情報として出力する符号量算出手段と、 前記入
力手段により入力された圧縮率対応情報より、画像当り
の収めるべき総符号量の情報を与えると共に初めに統計
処理指令を発令し、統計処理が終わると符号化処理指令
を発令する制御手段と、 前記統計処理指令による実行開
始時には前記制御手段からの総符号量の情報に基づき、
該総符号量の枠に対応した量子化幅の予測を行って該予
測した量子化幅の情報を前記量子化手段に与え、符号化
処理指令による実行開始時には入力される前記算出符号
量情報に基づき前回予測した量子化幅の情報に対して前
記総符号量の枠に収まるよう補正した量子化幅の情報を
得て、この補正量子化幅情報を前記量子化手段に与える
量子化幅予測手段と、 前記量子化幅予測手段の予測した
量子化幅の情報を、輝度信号に対応した量子化幅情報と
色信号成分に対応した量子化幅情報に分けて前記記録媒
体に読出し可能に記録すると共に、前記与えられた補正
量子化幅情報での前記量子化手段による量子化された輝
度信号成分、色信号成分別画像データを更に前記可変長
符号化 手段にてハフマン符号化した画像信号データにつ
いてこれを入力として受けて前記記録媒体に読出し可能
に記録する記録手段と、前記記録媒体に記録された可変
長符号化画像信号データとこの可変長符号化画像信号デ
ータに関連する輝度信号成分と色信号成分に対応する各
々の量子化幅の情報を読み出す読取手段と、この読み出
された画像信号データを復号するハフマン復号手段と、
このハフマン復号手段により復号されたデータを前記読
取手段により読み出された輝度信号成分と色信号成分に
対する各々の量子化幅の情報に基づいて当該量子化幅で
逆量子化する逆量子化手段と、この逆量子化されたデー
タをブロック毎に逆直交変換し、画像信号に変換して出
力する出力手段とを具備し、出力手段からの出力画像信
号を画像の再生信号として得るようにしたことを特徴と
する。
In order to achieve the above object, the present invention is configured as follows. That is, the video signal
And an image signal obtained by this imaging system.
Image information pressure for performing orthogonal transform or predictive coding
After preprocessing the image data by the compression means,
And quantized output by the variable length coding means.
Huffman-encoded image signal
Data is recorded and recorded on a recording medium that can be read
The stored image signal data is decoded by the decoding means.
That is decoded and obtained as a reproduced signal of the image.
A camera playback device, wherein the quantization means includes the preprocessing
With the quantization width given for the processed image data
Quantized image for each component quantized for each degree signal component and color signal component
It has a function to output image data, and has a desired compression ratio.
Input means for inputting the information corresponding to the variable length code catheter
Receives the output of the stage, calculates the total code amount for each screen, and calculates
A code amount calculating means for outputting as the code amount information output, the entering
From the compression ratio correspondence information input by the force
Information on the total amount of code to be stored
Issue a processing instruction, and when the statistical processing is completed, an encoding processing instruction
Control means for issuing an instruction, and execution execution by the statistical processing command.
At the beginning, based on the information of the total code amount from the control means,
The quantization width corresponding to the frame of the total code amount is predicted, and the prediction is performed.
The information of the measured quantization width is given to the quantization means,
The calculation code input at the start of execution according to the processing command
Before the quantization width information predicted previously based on the amount information,
Information on the quantization width corrected to fit within the total code amount
Obtaining the corrected quantization width information to the quantization means.
A quantization width estimating means, and the prediction of the quantization width estimating means
The quantization width information is combined with the quantization width information corresponding to the luminance signal.
The recording medium is divided into quantization width information corresponding to color signal components.
Record readable on the body and the given correction
Brightness quantized by the quantization means in quantization width information
Image data for each of the degree signal component and the color signal
One Huffman encoded image signal data by encoding means
And receive it as input and read it to the recording medium
Recording means for recording the variable-length encoded image signal data recorded on the recording medium, and information on the respective quantization widths corresponding to the luminance signal component and the chrominance signal component related to the variable-length encoded image signal data. Reading means for reading the image signal data, Huffman decoding means for decoding the read image signal data ,
Inverse quantization means for inversely quantizing the data decoded by the Huffman decoding means with the quantization width based on information of each quantization width for the luminance signal component and the chrominance signal component read by the reading means; Output means for performing an inverse orthogonal transform of the dequantized data on a block- by- block basis, converting the data into an image signal and outputting the image signal, and obtaining an output image signal from the output means as a reproduced signal of the image. It is characterized by.

【0031】すなわち、本発明は、所望の圧縮率で撮影
画像を記録することのできる電子カメラ装置により撮影
され、記録媒体に記録された可変長符号化画像信号デー
タを再生するための再生技術に関するものであり、記録
媒体には可変長符号化(ハフマン符号化)画像信号デー
タとこの画像信号データに関連する輝度信号成分と色信
号成分に対応する各々の量子化幅の情報が記録されてい
るので、読取手段は記録媒体が装着されることによりこ
れらのデータを読出すことができる。読取手段により読
み出しを行うと、読み出された可変長符号化画像信号デ
ータは復号化手段により復号化され、逆量子化手段に与
えられる。一方、読取手段により読み出された量子化幅
の情報は逆量子化手段に与えられるので、逆量子化手段
は復号化手段により復号化されたデータを前記読取手段
により読み出された量子化幅の情報に基づいて当該量子
化幅で逆量子化する。そして、出力手段はこの逆量子化
されたデータを画像信号に変換して出力する。この出力
手段からの出力画像信号を画像の再生信号として得、モ
ニタ装置に表示して画像として再生したり、プリンタ等
でプリントして出力させることにより鑑賞することがで
きるようになる。
That is, the present invention relates to a reproducing technique for reproducing variable-length coded image signal data which is photographed by an electronic camera device capable of recording a photographed image at a desired compression ratio and recorded on a recording medium. In the recording medium, variable-length coded (Huffman coded) image signal data and information on quantization widths corresponding to luminance signal components and chrominance signal components related to the image signal data are recorded. Therefore, the reading means can read these data by mounting the recording medium. When reading is performed by the reading means, the read variable-length coded image signal data is decoded by the decoding means and supplied to the inverse quantization means. On the other hand, since the information of the quantization width read by the reading means is given to the inverse quantization means, the inverse quantization means outputs the data decoded by the decoding means to the quantization width read by the reading means. Is inversely quantized with the quantization width based on the information of (1). The output means converts the inversely quantized data into an image signal and outputs the image signal. The output image signal from the output means is obtained as an image reproduction signal and displayed on a monitor device to be reproduced as an image, or printed and output by a printer or the like so that the image can be appreciated.

【0032】[0032]

【0033】特に本発明では、記録媒体に記録された可
変長符号化画像信号データを復号化し、この復号化され
たデータを上記記録媒体から読み出された輝度信号成分
と色信号成分に対する各々の量子化幅の情報に基づいて
逆量子化するようにしている。このことにより、色信号
成分の帯域幅が輝度信号成分のそれに比較して狭くても
画質を損なうことなく、迅速な再生が可能となる。
In particular, in the present invention, the variable-length coded image signal data recorded on the recording medium is decoded, and the decoded data is used for each of the luminance signal component and the chrominance signal component read from the recording medium. Inverse quantization is performed based on information on the quantization width. As a result, even if the bandwidth of the color signal component is narrower than that of the luminance signal component, quick reproduction is possible without deteriorating the image quality.

【0034】[0034]

【発明の実施の形態】以下、本発明の実施例を図面に基
づいて説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0035】初めに本発明を分かり易くするために、本
発明の基本的な考え方を説明しておく。
First, in order to make the present invention easy to understand, a basic concept of the present invention will be described.

【0036】すなわち、本発明は最初に1パス目の処理
として目的符号量に対応して計算した暫定的な量子化幅
係数により補正した量子化幅で量子化および符号化して
統計処理を行い、最適な量子化幅係数を予測すると共
に、ブロック毎の割り当て符号量を決定する。そして、
2パス目の処理として最終的な符号化処理を実施する。
2パス目は各ブロック毎に前記予測量子化幅係数により
量子化すると共に、これを符号化し、この符号化により
得られる符号量がブロック毎の割り当て符号量に収まる
ように、そのブロックについて符号量を監視しながら、
符号化を進め、EOB符号を含め、符号量が割当符号量
に達するとそのブロックの符号化は終了させて次のブロ
ックの符号化に移って行く。また、目的符号量に近い値
に早く収束させるために、低画質モード、高画質モード
と云った撮影モードにより変わる目的の符号量に応じ、
その符号量に近い符号量が得られる標準の量子化幅係数
αを上記第1パス目に与える機能を前記統計処理の系統
に予め持たせると云うものである。
That is, according to the present invention, as the first pass processing, statistical processing is performed by quantizing and encoding with the quantization width corrected by the provisional quantization width coefficient calculated corresponding to the target code amount, The optimal quantization width coefficient is predicted, and the code amount to be allocated for each block is determined. And
A final encoding process is performed as a process of the second pass.
In the second pass, while quantizing the prediction quantization width coefficient for each block and encoding the same, the code amount of the block is set so that the code amount obtained by this encoding falls within the allocated code amount for each block. While monitoring
The coding is advanced, and when the code amount including the EOB code reaches the allocated code amount, the coding of the block is terminated and the coding of the next block is started. Also, in order to quickly converge to a value close to the target code amount, according to the target code amount that changes depending on the shooting mode such as the low image quality mode and the high image quality mode,
The function of giving a standard quantization width coefficient α that can obtain a code amount close to the code amount in the first pass is previously provided in the statistical processing system.

【0037】統計処理は最適な量子化幅を予測すると共
に、ブロック毎の割当符号量を決定するものであり、最
適符号量の予測は符号化を行った時の符号量を粗く(し
かし、かなりの精度で)近付けるための処理である。こ
の最適化された量子幅を符号化処理で使用することで、
ほぼ目的の符号量に近付けることができるようになる。
そして、この時点で符号量が目的の符号量内に収まれ
ば、この処理だけで十分であるあ、1画像のデータ量の
上限が規定されている場合、1バイトはおろか、1ビッ
トでも目的の符号量をオーバーすることはできない。そ
こで、オーバーしたときの処理法が必要になる。
The statistical processing predicts the optimum quantization width and determines the amount of code to be allocated to each block. The prediction of the optimum code amount coarsely (but considerably) This is a process for approaching (with the accuracy of). By using this optimized quantum width in the encoding process,
It becomes possible to approximate the target code amount.
At this point, if the code amount falls within the target code amount, this process is sufficient. If the upper limit of the data amount of one image is specified, let alone one byte, let alone one byte. The code amount cannot be exceeded. Therefore, a processing method when the overrun is required is required.

【0038】それがブロック毎の割当符号量の決定であ
る。これは符号化を行ったときの符号量が目的の符号量
をオーバーした時の微調整に使用するデータを決定する
ためのものである。実際に符号化処理を統計処理におい
て予測した最適な量子化幅で実行した結果を見て、オー
バーしなかったときは終了、オーバーしたときは後処理
と云うようにしても良いが、その場合、統計処理、符号
化処理、後処理の3ステップとなり、時間がかかるばか
りでなく、符号化処理と後処理の間で、長さの異なる符
号を繋ぎ合わせることなく区別がつくように、保存する
必要が生じ、問題であるから、符号化処理の最中に微調
整を行うことが望まれる。しかし、無闇にデータを落と
すことは画質の劣化に繋がるので、避けねばならない。
That is the determination of the allocated code amount for each block. This is for determining data to be used for fine adjustment when the code amount at the time of encoding exceeds the target code amount. Looking at the result of actually executing the encoding process at the optimal quantization width predicted in the statistical process, if it does not exceed, it may end, and if it does, it may be called post-processing. There are three steps: statistical processing, encoding processing, and post-processing. Not only is it time-consuming, but it is also necessary to save the encoding processing and post-processing so that codes of different lengths can be distinguished without joining them. Occurs, which is a problem, and it is desired to perform fine adjustment during the encoding process. However, dropping data indiscriminately leads to deterioration of image quality, and therefore must be avoided.

【0039】そこで、本発明では各ブロックの高い周波
数成分から省略して行くことにより、視覚的な影響を最
小にする。ところが、符号量がオーバーするか否かは符
号化を終了してみないと分からないので、本発明ではそ
れを各ブロック毎に判定させるようにする。
Therefore, in the present invention, visual effects are minimized by omitting high frequency components of each block. However, it is impossible to determine whether or not the code amount is exceeded until the coding is completed. Therefore, in the present invention, it is determined for each block.

【0040】これは最適な量子化幅あるいは統計処理に
より予測された量子化幅を用いて符号化を行ったときに
発生する各ブロックの符号量において、各ブロックの発
生符号量の相対的な比率が、あまり変化しないことが実
験により確認されているので、これを利用する。すなわ
ち、統計処理で暫定的な量子化幅(これは目的の符号量
によって、ごく粗く予測することが可能)を用いて、符
号化を行うときに、「これを越えない限り画像全体の符
号量が目的の符号量を越えない」と云うガイドラインを
設定し、このガイドラインを各ブロック毎の割当符号量
として監視の基準にする。
This is the relative ratio of the generated code amount of each block to the code amount of each block generated when encoding is performed using the optimum quantization width or the quantization width predicted by statistical processing. However, since it has been confirmed by experiments that it does not change much, this is used. In other words, when performing encoding using a tentative quantization width (which can be estimated very coarsely depending on the target code amount) in the statistical processing, the code amount of the entire image is calculated as long as it does not exceed this. Do not exceed the target code amount ", and this guideline is used as a reference for monitoring as the allocated code amount for each block.

【0041】このようにして量子化幅と各ブロック毎の
割当符号量が決まったならば、これに基づき符号化処理
を実施し、最終的な符号化を行う。
When the quantization width and the assigned code amount for each block are determined in this way, an encoding process is performed based on the determined quantization width and final encoding is performed.

【0042】本発明においては、符号化処理では各ブロ
ックにおいて、そのブロックの割当符号量を越えないよ
うに各ブロックにおいて符号化を打ち切る。
According to the present invention, in the encoding process, the encoding is discontinued in each block so as not to exceed the allocated code amount of the block.

【0043】各ブロックの符号化において、低い周波数
成分から高い周波数成分に順次、符号化しながら、ガイ
ドライン(割当符号量)を越えないようにチェックす
る。オーバーしなかったブロックは問題なく符号化を終
了、つまりEOBを出力する。途中でオーバーしてしま
ったブロックはそれ以上の高周波成分は符号化せず、符
号化を打ち切り、そのブロックの符号化を終了、つま
り、EOBを出力する。このとき、EOBもハフマン符
号の一つであるから、EOBも含めて割当符号量内に収
まるようにする必要がある。
In the coding of each block, it is checked so as not to exceed the guideline (the amount of code to be allocated) while sequentially coding from low frequency components to high frequency components. The block that has not exceeded ends coding without any problem, that is, outputs EOB. In the block that has been exceeded in the middle, the high-frequency component beyond that is not coded, the coding is discontinued, and the coding of the block is terminated, that is, the EOB is output. At this time, since the EOB is also one of the Huffman codes, it is necessary to include the EOB within the allocated code amount.

【0044】このようにして、例えば、半数のブロック
は打ち切る必要無く符号化を終了し、残りの半数はごく
高い周波数の一部が省略されて、符号化を終了したとす
れば、欠落する情報は極めてわずかであり、しかも、欠
落するのは視覚的に影響の少ない高い周波数成分の情報
にとどめることができる。そして、この方式により統計
処理、符号化処理の2ステップで必ず符号化を終了する
ことができ、総符号量を規定値内に収めることができる
ようになり、しかも、指定される総符号量の範囲内で画
質の劣化も抑制できる。
In this way, for example, if the coding is completed without cutting off half of the blocks and half of the blocks are omitted with a part of the very high frequency being omitted and the coding is completed, the information missing will be lost. Is extremely small, and the missing information can be limited to information of high frequency components which have little visual influence. With this method, encoding can be always terminated in two steps of statistical processing and encoding processing, so that the total code amount can be kept within a specified value. Deterioration of image quality can be suppressed within the range.

【0045】以上の原理を用いた装置の実施例を説明す
る。
An embodiment of the apparatus using the above principle will be described.

【0046】図1に本発明による画像データの符号化装
置を内蔵したディジタル電子カメラの一実施例を、ま
た、図2には本発明による画像データの符号化装置の構
成をそれぞれブロック図で示す。なお、本発明とは直接
関係のないディジタル電子カメラの機構は図示および説
明を省略する。
FIG. 1 is a block diagram showing one embodiment of a digital electronic camera having a built-in image data encoding apparatus according to the present invention, and FIG. 2 is a block diagram showing the configuration of the image data encoding apparatus according to the present invention. . The illustration and description of the mechanism of the digital electronic camera that is not directly related to the present invention is omitted.

【0047】図1に示すように、電子カメラ本体1は画
像を撮像する撮像系40と、この撮影系40の出力に対
し、所定の信号処理を行う信号処理回路60と、前処
理、線形量子化、エントロピー符号化機能を持ち、前記
信号処理回路60の出力を圧縮符号化して出力する符号
化回路80と、この符号化回路80により符号化された
画像データおよび量子化幅(またはこれに対応した情
報)を記録媒体71に記録する記録系70と、所望のデ
ータ圧縮率を設定入力するスイッチ30、システム全体
の制御を司る制御回路90とから構成される。
As shown in FIG. 1, the electronic camera body 1 includes an image pickup system 40 for picking up an image, a signal processing circuit 60 for performing predetermined signal processing on the output of the image pickup system 40, a pre-processing unit and a linear quantum An encoding circuit 80 which has an encoding and entropy encoding function, and compresses and outputs the output of the signal processing circuit 60; an image data encoded by the encoding circuit 80; ) On a recording medium 71, a switch 30 for setting and inputting a desired data compression ratio, and a control circuit 90 for controlling the entire system.

【0048】電子カメラ本体1の操作部には画像の圧縮
率を設定するスイッチ30が設けられており、スイッチ
30は制御回路90に接続されている。
The operation unit of the electronic camera body 1 is provided with a switch 30 for setting a compression ratio of an image, and the switch 30 is connected to a control circuit 90.

【0049】前記撮像系40は光学増を結像するための
レンズ40aと、CCD等の撮像素子40bとを備え
る。前記信号処理回路60は増幅およびノイズ除去等を
行うアンプ60aと、アナログ信号をディジタル信号に
変換A/D変換器60bと、RAM等からなるバッファ
メモリ60cと、色信号形成等をプロセス回路60dと
を備える。符号化回路80は例えば、DCT(離散コサ
イン変換)等の直交変換を行う直交変換部4、線形量子
化を行う量子化部6、エントロピー符号化としてハフマ
ン符号化を行うハフマン符号化部8を備え、更に量子化
幅予測部12、符号量算出部14、符号量割当部20、
符号打切り部16および符号化回路80内の制御処理を
行う制御回路18とを有している。
The image pickup system 40 includes a lens 40a for forming an image of an optical amplifier and an image pickup device 40b such as a CCD. The signal processing circuit 60 includes an amplifier 60a for performing amplification and noise removal, an A / D converter 60b for converting an analog signal into a digital signal, a buffer memory 60c such as a RAM, and a process circuit 60d for forming a color signal. Is provided. The encoding circuit 80 includes, for example, an orthogonal transformation unit 4 that performs orthogonal transformation such as DCT (discrete cosine transformation), a quantization unit 6 that performs linear quantization, and a Huffman encoding unit 8 that performs Huffman encoding as entropy encoding. , A quantization width prediction unit 12, a code amount calculation unit 14, a code amount allocation unit 20,
It has a code truncation unit 16 and a control circuit 18 for performing control processing in the encoding circuit 80.

【0050】前記記録系70はインタフェース回路70
aおよび記録媒体として用いられるICメモリを内蔵し
たメモリカード71とからなる。メモリカード71は電
子カメラ本体1に対し、着脱可能となっている。制御回
路90はマイクロプロセッサ(MPU)により実現され
ている。
The recording system 70 includes an interface circuit 70
a and a memory card 71 containing an IC memory used as a recording medium. The memory card 71 is detachable from the electronic camera body 1. The control circuit 90 is realized by a microprocessor (MPU).

【0051】図6に電子カメラ本体1の外観を斜視図で
示す。図は双眼鏡形のものを示しており、48は操作部
におけるLCD(液晶)表示器、30は操作部における
スイッチ30であり、その他、テレ・ワイド切り替えス
イッチ、シャッタ操作ボタン50等が設けられている。
また、49はファインダである。LCD表示器48には
制御回路90の制御のもとに撮影モードやコマ数、日
付、時間等、種々の値や状態が表示される。本電子カメ
ラでは、電子カメラ本体1の操作部に設けられたスイッ
チ30を操作することにより、画像の圧縮率を所望の値
に設定することができる。すなわち、制御回路90には
予め標準的な複数種の圧縮率情報が設定されており、こ
れがスイッチ30の操作により設定される撮影可能枚数
の値をもとに、装着されているメモリカード(記録媒
体)の容量から、適用する圧縮率を求め、この求めた圧
縮率の値およびメモリカードに記録できる画像の枚数の
値に換算されて操作部のLCD表示器48に表示させる
ようになっている。そして、ユーザがスイッチ30を押
すと、制御回路90はスイッチ30が押される毎に、こ
れらの値を変更する。
FIG. 6 is a perspective view showing the external appearance of the electronic camera body 1. The figure shows a binocular type, in which 48 is an LCD (liquid crystal) display in the operation unit, 30 is a switch 30 in the operation unit, and a tele-wide switch, a shutter operation button 50 and the like are provided. I have.
Reference numeral 49 denotes a finder. Under the control of the control circuit 90, the LCD display 48 displays various values and states such as a shooting mode, the number of frames, date and time. In this electronic camera, the image compression ratio can be set to a desired value by operating the switch 30 provided on the operation unit of the electronic camera body 1. That is, standard plural kinds of compression ratio information are set in the control circuit 90 in advance, and based on the value of the number of recordable images set by the operation of the switch 30, the information is set in the attached memory card (recording). The compression rate to be applied is obtained from the capacity of the medium, and is converted into a value of the obtained compression rate and a value of the number of images that can be recorded on the memory card and displayed on the LCD display 48 of the operation unit. . When the user presses the switch 30, the control circuit 90 changes these values each time the switch 30 is pressed.

【0052】ユーザは表示される変更値を見ながら、所
望の値のところでスイッチ30を押すのを止めることに
より、制御回路90はその時点での撮影可能画像枚数指
示値に対応する指示圧縮率を設定するようになってい
る。これは圧縮率に応じて定まる画像当り標準的な総符
号量を制御回路90が求めてこれを目的符号量設定情報
として符号化回路80に与えることで行う。また、トリ
ガスイッチであるシャッタ操作ボタン50が押されるこ
とにより、シャッタ機能が作動して撮像素子40bには
被写体像が結像され、撮像素子40bにはこの像に対応
して電荷像が蓄積されるので、これを読出し制御するこ
とで撮像素子40bから映像信号を得ることができる。
これらの制御も制御回路90が司る。
The user stops pressing the switch 30 at the desired value while watching the displayed change value, so that the control circuit 90 sets the designated compression ratio corresponding to the designated photographable image number designation value at that time. To be set. This is performed by the control circuit 90 obtaining a standard total code amount per image determined according to the compression ratio, and providing this to the encoding circuit 80 as target code amount setting information. When the shutter operation button 50, which is a trigger switch, is pressed, a shutter function is activated to form a subject image on the image sensor 40b, and a charge image is accumulated in the image sensor 40b in accordance with this image. Therefore, a video signal can be obtained from the image sensor 40b by reading and controlling this.
These controls are also controlled by the control circuit 90.

【0053】図1における撮像系40は、撮影レンズ4
0aやCCD等の撮像デバイスよりなる撮像素子40b
を有し、前記撮影レンズ40aにより撮像素子40b上
に結像された光学像を画像信号に変換して信号処理回路
60に出力するものである。信号処理回路60は増幅器
60a、A/D変換器60b、バッファメモリ60c、
プロセス回路60dが含まれ、このプロセス回路60d
により前記撮像素子40bにより得られた画像信号をカ
ラー信号のY、R−Y(以下、このR−YをCr(クロ
マレッド)と略称する)、B−Y(以下、このB−Yを
Cb(クロマブルー)と略称する)の各色成分に分離さ
せると共にガンマ補正やホワイトバランス処理等を行う
ようにしてある。
The image pickup system 40 shown in FIG.
Imaging device 40b composed of an imaging device such as Oa or CCD
And converts the optical image formed on the image sensor 40b by the photographing lens 40a into an image signal and outputs the image signal to the signal processing circuit 60. The signal processing circuit 60 includes an amplifier 60a, an A / D converter 60b, a buffer memory 60c,
A process circuit 60d is included.
The image signals obtained by the imaging device 40b are converted into color signals of Y, RY (hereinafter, RY is abbreviated as Cr (chroma red)), and BY (hereinafter, BY is represented by Cb). (Abbreviated as chroma blue), and gamma correction, white balance processing, and the like are performed.

【0054】A/D変換器60bによりディジタル変換
された撮像系40の出力映像信号は、例えば、1フレー
ム分の容量を有するバッファメモリ60cに画像データ
を格納され、読み出されてプロセス回路60dに与えら
れることにより、輝度信号系であるY成分とクロマ
(C:色差信号)系であるCr、Cb成分に分離され
る。バッファメモリ60cに格納された画像データは、
例えば最初に輝度系の信号について統計処理を行うべ
く、プロセス回路によりプロセス処理して画像信号のY
成分データを得、これを符号化回路80に与えて、Y成
分データについての符号化処理を行い、該処理が終った
ならば、次にクロマ系Cr、Cb成分のデータについて
プロセス処理した後、符号化処理を行う。
The output video signal of the imaging system 40, which has been digitally converted by the A / D converter 60b, is stored in a buffer memory 60c having a capacity of one frame, for example, and is read out to the process circuit 60d. By being given, it is separated into a Y component which is a luminance signal system and Cr and Cb components which are a chroma (C: color difference signal) system. The image data stored in the buffer memory 60c is
For example, in order to first perform statistical processing on a luminance signal, the processing circuit performs a process processing on the Y signal of the image signal.
The component data is obtained and supplied to an encoding circuit 80 to perform an encoding process on the Y component data. When the process is completed, next, a process process is performed on the chroma Cr and Cb component data. Perform encoding processing.

【0055】信号処理回路60にはブロック化機能があ
り、バッファメモリ60cより読み出され、プロセス処
理されて得たY成分用およびCr、Cb成分用の画像デ
ータ(1フレーム分、若しくは1フィールド分)を、所
定の大きさのブロックに分割するブロック化処理を行う
ことができる。ここでは例としてブロックサイズは8×
8とするが、このブロックサイズは8×8に限るもので
はなく、またYとC(クロマ系)でブロックサイズが異
なっても良い。
The signal processing circuit 60 has a blocking function. The Y component and Cr and Cb component image data (for one frame or one field) read from the buffer memory 60c and processed. ) Can be divided into blocks of a predetermined size. Here, as an example, the block size is 8 ×
8, the block size is not limited to 8 × 8, and the block size may be different between Y and C (chroma system).

【0056】本実施例では、輝度系Yのデータを読出し
てブロック化し、後段の処理系に与えて、このY成分デ
ータについての統計処理を行わせ、該統計処理が終了し
たならば、次にクロマ系Cr、Cb成分のデータについ
ての統計処理に入るべく該クロマ系Cr、Cb成分のデ
ータの読出しとブロック化に入る。クロマ系のブロック
化は、最初にCr成分の画像データについてすべてのブ
ロック化を行い、その後に、Cb成分の画像データをブ
ロック化して行くものとする。
In this embodiment, the data of the luminance system Y is read out and divided into blocks, which are provided to a subsequent processing system to perform statistical processing on the Y component data. In order to enter the statistical processing for the data of the chroma Cr and Cb components, the reading and blocking of the data of the chroma Cr and Cb components are started. In the chroma-based blocking, it is assumed that all the image data of the Cr component are first blocked, and then the image data of the Cb component is blocked.

【0057】符号化回路80は図2に示す構成となって
いる。図2において、4は直交変換回路であり、ブロッ
ク化されて入力された各画像データを受けて、この画像
データに対し、各ブロック毎に2次元の直交変換を行う
ものである。直交変換としてはコサイン変換、サイン変
換、フーリエ変換、アダマール変換などが使用できる。
直交変換を行うことにより、変換係数としての画像デー
タが得られる。
The encoding circuit 80 has the configuration shown in FIG. In FIG. 2, reference numeral 4 denotes an orthogonal transformation circuit, which receives each image data which has been input as a block, and performs two-dimensional orthogonal transformation on the image data for each block. As the orthogonal transform, cosine transform, sine transform, Fourier transform, Hadamard transform and the like can be used.
By performing the orthogonal transform, image data as a transform coefficient is obtained.

【0058】6は量子化回路であり、前記直交変換回路
4の出力する画像データ(変換係数)を受けると、第1
回目の量子化では予め設定された各周波数成分毎の量子
化幅に、撮影モードに応じて予め設定された量子化幅係
数αを掛けて補正した量子化幅で、変換係数の量子化を
行い、第2回目では前回の処理により決定された最適量
子化幅係数αを用いて量子化を行う構成としてある。
Reference numeral 6 denotes a quantization circuit which receives the image data (transformation coefficient) output from the orthogonal transformation circuit 4 and outputs the first data.
In the first quantization, the transform coefficient is quantized with a quantization width corrected by multiplying a preset quantization width for each frequency component by a preset quantization width coefficient α according to the shooting mode. In the second time, the quantization is performed using the optimum quantization width coefficient α determined by the previous processing.

【0059】8はエントロピー符号化回路であり、エン
トロピー符号化回路8は量子化回路6の出力する前記量
子化出力をエントロピー符号化(可変長符号化)するも
のである。エントロピー符号化としてはハフマン符号
化、算術符号化などを利用する。エントロピー符号化は
可変長符号化であるために、ブロック毎の符号量画像全
体の符号量などが画像毎に変化する。どのようなエント
ロピー符号化を用いるかは本発明とは直接関係が無い
が、ここではハフマン符号化を使用した一例を示すこと
とする。
Reference numeral 8 denotes an entropy coding circuit. The entropy coding circuit 8 performs entropy coding (variable length coding) on the quantized output output from the quantization circuit 6. Huffman coding, arithmetic coding and the like are used as entropy coding. Since entropy coding is variable-length coding, the code amount of the entire code amount image for each block changes for each image. Although what kind of entropy coding is used is not directly related to the present invention, an example using Huffman coding will be described here.

【0060】エントロピー符号化回路8では、入力した
量子化された変換係数を図9に示す順序でスキャンする
ジグザグ・スキャンと呼ばれる手法により、低い周波数
成分から高い周波数成分への走査を行う。図9の走査順
序の1番目の直流成分[DC]のデータは、直前にエン
トロピー符号化を行ったブロックの直流成分との差分値
をハフマン符号化して出力する。交流成分[AC]につ
いては図9の走査順序の2番目から64番目まで順番に
変換係数を見て行き、変換係数が0でない(すなわち、
(ゼロラン)とその有効係数の値とで2次元のハフマン
符号化して出力すると云った動作をする。また、ある係
数以降64番目の係数まで連続して無効係数が続く場合
はブロックの終りを示すEOB(エンド・オブ・ブロッ
ク)の符号を出力する。また、打ち切り信号が入力され
ると符号化を終了し、EOBを付加して出力する。そし
て、そのブロックについて発生した符号量を符号量算出
回路14に出力する。
The entropy coding circuit 8 scans from a low frequency component to a high frequency component by a technique called zigzag scanning in which the input quantized transform coefficients are scanned in the order shown in FIG. The data of the first DC component [DC] in the scanning order in FIG. 9 outputs a difference value from the DC component of the block on which entropy coding has been performed immediately before, by performing Huffman coding. Regarding the AC component [AC], the conversion coefficients are sequentially checked from the second to the 64th in the scanning order in FIG.
(Zero run) and the value of the effective coefficient perform two-dimensional Huffman encoding and output. Further, when an invalid coefficient continues from a certain coefficient to the 64th coefficient, an EOB (end of block) code indicating the end of the block is output. When the censoring signal is input, the encoding is terminated, and EOB is added and output. Then, the code amount generated for the block is output to the code amount calculation circuit 14.

【0061】符号量算出回路14は入力されたY、C
r、Cb各成分の各ブロック毎の符号量とその符号量の
積算を行い、Y、Cr、Cb各成分の各ブロック毎の符
号量データの収集と画像全体の符号量を計算し、この画
像全体の符号量のデータについて量子化幅予測回路12
に出力すると共に、各ブロック毎の符号量と画像全体の
符号量のデータについては符号量割当て回路20に出力
する構成としてある。
The code amount calculation circuit 14 receives the input Y, C
The code amount of each block of each r and Cb component and the integration of the code amount are performed, the code amount data of each block of each of Y, Cr and Cb components are collected, and the code amount of the entire image is calculated. For data of the entire code amount, the quantization width prediction circuit 12
And the data of the code amount of each block and the code amount of the entire image are output to the code amount allocating circuit 20.

【0062】量子化幅予測回路12は第1パス目の開始
にあたり制御回路18から目的とする符号量の情報を受
け、この符号量情報から後述する式(1)の関係を用い
て量子化幅係数αの初期値を設定し、量子化回路6に出
力し、第2パス目の開始に先駆けて、符号量算出回路1
4から入力された画像全体の符号量と、1画像当りの許
容される最大のデータ量である目標符号量とから、例え
ば、ニュートン‐ラプソン法(Newton-Raphson iteratio
n)を用いて、目標符号量に近づけるのに最適な量子化幅
係数αを、今回実際に使用した量子化幅係数を勘案して
予測するものである。
At the start of the first pass, the quantization width prediction circuit 12 receives information on the target code amount from the control circuit 18 and uses the code amount information to calculate the quantization width using the relationship of equation (1) described later. The initial value of the coefficient α is set and output to the quantization circuit 6, and prior to the start of the second pass, the code amount calculation circuit 1
For example, the Newton-Raphson method (Newton-Raphson iteratio) is used to calculate the code amount of the entire image input from the step 4 and the target code amount which is the maximum allowable data amount per image.
Using n), the quantization width coefficient α that is optimal for approaching the target code amount is predicted in consideration of the quantization width coefficient actually used this time.

【0063】また、符号量割当回路20は符号量算出回
路14から入力された各ブロック毎の画像データの符号
量、画像全体の符号量と、目標符号量とから各ブロック
の割当符号量を算出して符号化打切回路16に出力する
ものである。
The code amount allocating circuit 20 calculates the allocated code amount of each block from the code amount of the image data for each block input from the code amount calculating circuit 14, the code amount of the entire image, and the target code amount. And outputs the result to the encoding termination circuit 16.

【0064】ここでの算出の方法は、例えば、各ブロッ
ク毎の符号量の比で、目標符号量を比例配分する。例え
ば、あるブロックの符号量と目標符号量との乗算を行
い、それを画像全体の符号量で割ることにより、そのブ
ロックの割当符号量を決定する。この結果、各ブロック
の割り当て符号量は、そのブロックでの実際の符号量に
応じて符号量が少ない場合はそれ相応に、間に合う程度
に抑えられ、符号量の多いブロックにはそれ相応に多く
割り当てられる。
In this calculation method, the target code amount is proportionally distributed, for example, by the ratio of the code amount for each block. For example, the code amount of a certain block is multiplied by the target code amount, and the result is divided by the code amount of the entire image to determine the allocated code amount of the block. As a result, the code amount allocated to each block is appropriately suppressed when the code amount is small according to the actual code amount in the block, and the code amount allocated to the block with a large code amount is correspondingly large. Can be

【0065】符号量割当回路20は符号量情報テーブル
とブロック割当符号量データテーブルとを持ち、符号量
情報テーブルにおける該当ブロック位置の符号量情報を
符号量算出回路14から入力された符号量情報に書き替
える一方、符号量算出回路14から入力された各ブロッ
ク毎の符号量および画像全体の符号量と、目標符号量と
から各ブロックの割当符号量を算出し、この算出した各
ブロックの割当符号量のデータをブロック割当符号量デ
ータテーブルに格納する。
The code amount allocating circuit 20 has a code amount information table and a block allocated code amount data table, and converts the code amount information of the corresponding block position in the code amount information table into the code amount information input from the code amount calculating circuit 14. On the other hand, the assigned code amount of each block is calculated from the code amount of each block, the code amount of the entire image, and the target code amount input from the code amount calculation circuit 14, and the allocated code of each block is calculated. The amount data is stored in the block allocation code amount data table.

【0066】このブロック割当符号量データテーブルの
各ブロック別割当符号量は、該当のブロックがエントロ
ピー符号化処理される際に符号化打切回路16に与えら
れる。
The allocated code amount for each block in the block allocated code amount data table is given to the coding truncation circuit 16 when the corresponding block is subjected to entropy coding processing.

【0067】符号化打切回路16は、符号量割当回路2
0からの各ブロックの符号量を割当符号量から減算し、
割当符号量の残りが送出すべき符号量とEOBの符号と
の合計符号量より小さくなった場合には打切り信号を出
力してエントロピー符号化回路8に与え、そのブロック
の符号化を終了させると云った機能を有する。
The encoding termination circuit 16 is provided with a code amount allocating circuit 2
Subtract the code amount of each block from 0 from the allocated code amount,
When the remainder of the allocated code amount becomes smaller than the total code amount of the code amount to be transmitted and the EOB code, a truncation signal is output and given to the entropy coding circuit 8, and the coding of the block is terminated. It has the functions described above.

【0068】従って、符号化打切回路16ではこの割当
符号量を参照し、入力された送出すべき符号量およびE
OBの符号を送出しても割当符号量を越えない場合は、
打切りは行われず、そのブロックは符号化を終了し、該
ブロックの割当符号量から送出すべき符号量を減ずると
云った動作を行う。
Therefore, the coding truncation circuit 16 refers to the allocated code amount, and inputs the code amount to be transmitted and E
If the allocated code amount does not exceed even if the OB code is transmitted,
The truncation is not performed, the coding of the block is completed, and an operation of reducing the code amount to be transmitted from the allocated code amount of the block is performed.

【0069】10は符号出力回路であり、この符号出力
回路10はエントロピー符号化回路8より入力される可
変長の符号をつなぎ合わせるもので、この繋ぎ合わせた
符号をメモリカード等の記録媒体にて構成される記録系
22に書き込むように機能する。
Reference numeral 10 denotes a code output circuit. The code output circuit 10 connects variable-length codes input from the entropy coding circuit 8, and transfers the connected codes to a recording medium such as a memory card. It functions to write to the recording system 22 configured.

【0070】本システムでは撮影モードに応じて定めた
所期時用標準の量子化幅係数αを使用して最初に統計処
理を行い(第1パス)、最適化するに必要なブロック毎
の情報量や画像全体の情報量等を調べ、次にこの統計処
理により得た情報をもとに最適化された符号化を行うた
めの処理に入る(第2パス)。
In the present system, statistical processing is first performed by using a predetermined standard quantization width coefficient α determined according to the shooting mode (first pass), and information for each block necessary for optimization is obtained. The amount, the information amount of the entire image, and the like are checked, and then processing for performing optimized coding based on the information obtained by the statistical processing is started (second pass).

【0071】そのため、最初に画像のブロック化、この
ブロック化された画像の要素に対する標準の量子化幅係
数αを使用しての量子化、量子化により得られた変換係
数のエントロピー符号化、そして、このエントロピー符
号化により得られる各ブロックの各要素の符号量情報と
画像全体の符号量情報より最適な符号量にするに必要な
符号化幅係数αの予測、各ブロックの各要素における割
当符号量の決定、これらに基づく処理対象画像への最適
符号化の処理モードへの移行、この処理モードの実施に
おける画像のブロック化処理、このブロック化された画
像の要素に対する前記予測量子化幅αを使用しても量子
化処理、この量子化により得られた変換係数のエントロ
ピー符号化、処理対象画像の全符号の保存のための出力
処理と云った手順を実施させるが、その全体の制御管理
は図における制御回路18により行うようにしてあるも
のとする。尚、制御回路18のような機能はマイクロプ
ロセッサ(CPU)を使用することで容易に実現でき
る。
Therefore, first, image blocking, quantization using the standard quantization width coefficient α for the elements of the blocked image, entropy coding of the transform coefficients obtained by quantization, and , Prediction of the coding width coefficient α required for obtaining the optimum code amount from the code amount information of each element of each block obtained by this entropy coding and the code amount information of the entire image, and the assigned code in each element of each block. Determination of the amount, transition to the processing mode of the optimal coding for the image to be processed based on these, the blocking processing of the image in the execution of this processing mode, the predicted quantization width α for the elements of the blocked image Even if it is used, a procedure such as quantization processing, entropy coding of a transform coefficient obtained by this quantization, and output processing for storing all codes of an image to be processed is performed. Thereby subjected, but it is assumed that the entire control management are to perform by the control circuit 18 in FIG. Note that functions such as the control circuit 18 can be easily realized by using a microprocessor (CPU).

【0072】以上が符号化回路80の構成である。The above is the configuration of the encoding circuit 80.

【0073】図1における記録系70はインタフェース
回路70aとこれに着脱自在に接続される記録媒体71
があり、符号化回路80により符号化されて出力された
画像データおよび量子化幅(またはこれに対応した情
報)はインタフェース回路70aを介して記録媒体71
に記録される構成となっている。
The recording system 70 in FIG. 1 includes an interface circuit 70a and a recording medium 71 detachably connected thereto.
The image data encoded and output by the encoding circuit 80 and the quantization width (or information corresponding thereto) are stored in the recording medium 71 via the interface circuit 70a.
It is configured to be recorded in.

【0074】次に上記構成の本装置の作用を説明する
が、全体の概要を掴むために初めに動作遷移図である図
8を参照して基本動作を説明する。カメラの使用者がカ
メラを使用するにあたり、スイッチ30を操作して所望
とする撮影可能枚数を設定する。これにより設定撮影可
能枚数に応じ、制御回路90が最適符号量を求めて、こ
れを目的符号量設定情報として符号化回路80に与える
ことで実現している。
Next, the operation of the present apparatus having the above-described configuration will be described. First, the basic operation will be described with reference to FIG. When the camera user uses the camera, the user operates the switch 30 to set a desired number of recordable images. Thus, the control circuit 90 obtains the optimum code amount in accordance with the set number of recordable images and supplies the optimum code amount to the encoding circuit 80 as target code amount setting information.

【0075】このようにして撮影可能枚数が設定され
る。
In this way, the number of recordable images is set.

【0076】次に撮影を行うと、撮影レンズ40aの後
方に置かれた撮像素子40b上に、複写体像が光学像と
して結像される。そして、この撮像素子40bはこの結
像された光学像を画像信号に変換して出力する。撮像素
子40bにより得られた画像信号は信号処理回路60入
力されここで信号処理回路60内の増幅回路60aによ
る増幅、A/D変換器60bによるA/D変換後、バッ
ファメモリ60cに一時保持される。そして、この後、
バッファメモリ60cから読み出され、信号処理回路6
0内のプロセス回路60dにより帯域補正、色信号形成
等の処理が行われる。
Next, when photographing is performed, a copy body image is formed as an optical image on the image pickup device 40b placed behind the photographing lens 40a. The imaging device 40b converts the formed optical image into an image signal and outputs the image signal. The image signal obtained by the imaging element 40b is input to the signal processing circuit 60, where it is temporarily stored in the buffer memory 60c after being amplified by the amplifier circuit 60a in the signal processing circuit 60 and A / D converted by the A / D converter 60b. You. And after this,
The signal processing circuit 6 is read from the buffer memory 60c.
Processing such as band correction and color signal formation is performed by the process circuit 60d within 0.

【0077】ここで、後の符号化処理がY(輝度)、C
r、Cb(いずれも色差)信号の順序で行われるため、
色信号形成もこれに合わせて行われる。すなわち、画像
信号は8×8のマトリックスでブロック化されて読み出
され、プロセス回路ではこのブロック化された画像信号
データからY成分、Cr成分(R−Y成分)、Cb成分
(B−Y成分)の順序でこれら各色成分の信号を分離さ
せると共にガンマ補正やホワイトバランス処理等を行
う。
Here, the following encoding processing is performed for Y (luminance), C
r, Cb (both color difference) signals are performed in this order,
Color signal formation is also performed in accordance with this. That is, the image signal is read out by being blocked in an 8 × 8 matrix, and the process circuit extracts a Y component, a Cr component (RY component), and a Cb component (BY component) from the blocked image signal data. ), The signals of these color components are separated, and gamma correction and white balance processing are performed.

【0078】プロセス回路60dにより分離された8×
8のマトリックスのブロック化画像信号における各色成
分の画像信号データは、符号化回路80に入力される。
これにより、1フレーム分(若しくは1フィールド分)
の画像データは、上記所定の大きさのブロックに分割さ
れて順次、符号化回路80に入力される。尚、プロセス
回路60dにより処理された各色成分の画像信号は、
Y、Cr、Cbの各成分別にバッファメモリに記憶させ
後の処理において、読出して使用するようにしても良
い。
The 8 × separated by the process circuit 60d
The image signal data of each color component in the block image signal of the matrix of 8 is input to the encoding circuit 80.
Thereby, one frame (or one field)
Are divided into blocks having the predetermined size and sequentially input to the encoding circuit 80. The image signal of each color component processed by the process circuit 60d is
The Y, Cr, and Cb components may be stored in the buffer memory for each component, and read and used in subsequent processing.

【0079】本実施例では、信号処理回路60からは1
画像分の画像信号データにおけるY成分(輝度成分)に
ついて出力が行われ、これについての後段での処理(統
計処理)が済んだ後に、次にCr成分の画像データにつ
いて総てのブロック化を行い、これについて後段での統
計処理を行い、その後に、Cb成分の画像をブロック化
し、これについて後段での統計処理を行ってゆくと云っ
た処理を行う。
In this embodiment, the signal processing circuit 60 outputs 1
Output is performed on the Y component (luminance component) of the image signal data for the image, and after the subsequent processing (statistical processing) is completed, all the image data of the Cr component is divided into blocks. , A statistical process is performed in the latter stage, and then, a process of dividing the image of the Cb component into blocks and performing the statistical process in the subsequent stage is performed.

【0080】符号化回路80では信号処理回路60より
受けたこの入力データを直交変換回路4に与える。
The encoding circuit 80 supplies the input data received from the signal processing circuit 60 to the orthogonal transformation circuit 4.

【0081】すると、直交変換回路4はブロック化され
た入力画像データ(以下、ブロック画像データと呼ぶ)
に対し、各ブロック毎に例えば、離散コサイン変換(D
CT)による2次元の直交変換を行う。このDCTによ
る直交変換と云うのは、ある波形を周波数成分に分割
し、これを入力サンプル数と同じ数だけのコサイン波で
表現すると云った処理である。
Then, the orthogonal transformation circuit 4 performs block-wise input image data (hereinafter, referred to as block image data).
For each block, for example, a discrete cosine transform (D
CT) to perform a two-dimensional orthogonal transformation. The orthogonal transform by DCT is a process of dividing a certain waveform into frequency components and expressing this by the same number of cosine waves as the number of input samples.

【0082】そして、直交変換されたブロック画像デー
タ(変換係数)は図示しないバッファメモリにおける8
×8のマトリックス上の対応する周波数成分位置に格納
され(マトリックスの原点位置が直流成分、それ以外は
交流成分で原点位置より離れるに従い周波数が高くなる
ような関係を持たせたマトリックスに格納する)、これ
が量子化回路6に入力される。
The orthogonally transformed block image data (transform coefficients) is stored in a buffer memory (not shown) in the buffer memory.
It is stored in the corresponding frequency component position on the × 8 matrix (the matrix origin position is a DC component, and the other components are AC components, and are stored in a matrix that has a relationship such that the frequency increases with distance from the origin position) Are input to the quantization circuit 6.

【0083】すると量子化回路6はこのブロック画像デ
ータ(変換係数)に対して1パス目(第1回目)の量子
化を行う。この第1回目の量子化では、予め設定された
各周波数成分毎(周波数成分はブロックの各マトリック
ス位置に対応して決まる)の量子化マトリックスに対
し、撮影に当り使用者が設定した画質設定値に対応して
制御回路18より与えられる標準(暫定)の量子化幅係
数αを掛けた量子化幅で、変換係数の量子化を行う(図
8(h1,i))。この時の量子化マトリックスは輝度
系とクロマ系とでそれぞれで同じであっても良いが、そ
れぞれに適した量子化マトリックスを設定する方が良い
結果が得られる。
Then, the quantization circuit 6 performs the first pass (first pass) on the block image data (transform coefficients). In the first quantization, an image quality set value set by a user upon photographing is applied to a predetermined quantization matrix for each frequency component (frequency components are determined corresponding to each matrix position of a block). , The transform coefficient is quantized with the quantization width multiplied by the standard (temporary) quantization width coefficient α given by the control circuit 18 (FIG. 8 (h1, i)). The quantization matrix at this time may be the same for each of the luminance system and the chroma system. However, better results can be obtained by setting appropriate quantization matrices.

【0084】量子化されたブロック画像データ(変換係
数)はエントロピー符号化回路8に入力され、ここで、
エントロピー符号化される。エントロピー符号化回路8
では量子化されて入力された変換係数を図8に示す順序
でジグザグスキャンし、低い周波数成分から高い周波数
成分への走査を行う。すなわち、変換係数は8×8のマ
トリックスに周波数成分に対応して格納されており、原
点に近いほど、周波数が低いので、ジグザグスキャンす
ることで低い周波数成分から高い周波数成分へと走査で
きる。
The quantized block image data (transformation coefficient) is input to an entropy encoding circuit 8, where
Entropy coded. Entropy coding circuit 8
Then, the quantized and inputted transform coefficients are zigzag-scanned in the order shown in FIG. 8 to scan from low frequency components to high frequency components. That is, the transform coefficients are stored in a 8.times.8 matrix corresponding to the frequency components. Since the frequency is lower as the position is closer to the origin, zigzag scanning enables scanning from lower frequency components to higher frequency components.

【0085】図9の走査順序の1番目のデータは直流成
分DCであるから、この直流成分DCのデータは直前に
エントロピー符号化を行ったブロック(一つ前のブロッ
ク)の直流成分DCとの差分値diff−DCをハフマ
ン符号化する(図8(d1),(e1))。
Since the first data in the scanning order in FIG. 9 is the DC component DC, the data of the DC component DC is the same as the DC component DC of the immediately preceding entropy-encoded block (the immediately preceding block). The difference value diff-DC is Huffman-coded (FIGS. 8 (d1) and (e1)).

【0086】交流成分ACについては図9の走査順序の
2番目から64番目まで順番に変換係数を見て行き、変
換係数が0でない(すなわち、有効な)係数が出て来た
らその直前に存在した連続した0(無効)の係数の数
(ゼロラン)とその有効係数の値とで2次元のハフマン
符号化を行う((d2),(e2))。
For the AC component AC, the conversion coefficients are looked up in order from the second to the 64th in the scanning order in FIG. 9, and if a conversion coefficient that is not 0 (ie, a valid coefficient) comes out, it exists immediately before that. Two-dimensional Huffman coding is performed using the number of consecutive 0 (invalid) coefficients (zero run) and the value of the effective coefficient ((d2), (e2)).

【0087】また、エントロピー符号化回路8は、ある
係数以降64番目の係数まで連続して無効係数が続く場
合はブロックの終りを示すEOB(エンド・オブ・ブロ
ック)の符号を与える。
Further, the entropy coding circuit 8 gives an EOB (end of block) code indicating the end of a block when an invalid coefficient continues from a certain coefficient up to the 64th coefficient.

【0088】そして、そのブロックについて発生した符
号量を符号量算出回路14に出力する(g1)。そし
て、1画像分の全ブロックについてこのような処理を実
行して行く。
Then, the code amount generated for the block is output to the code amount calculation circuit 14 (g1). Then, such processing is executed for all blocks of one image.

【0089】Y成分についてのこのような処理が終了し
たなら、次にCr、Cb各成分についても同様の処理を
行う。
When such processing for the Y component is completed, similar processing is performed for each of the Cr and Cb components.

【0090】一方、符号量算出回路14は入力された
Y、Cr、Cb各成分の1画像全体の符号量の計算をす
べく、Y、Cr、Cb各成文の各ブロック毎の符号量の
算出とその符号量の積算を行う(g2)と共に、各ブロ
ック毎の符号量のデータは符号量割当回路20に出力す
る。符号量割当回路20はこの各ブロック毎の符号量の
データを符号量情報テーブルにおける該当ブロック位置
の符号量情報として書き込む。
On the other hand, the code amount calculating circuit 14 calculates the code amount of each block of the Y, Cr, and Cb sentences in order to calculate the code amount of the whole of the input Y, Cr, and Cb components. (G2), and the code amount data for each block is output to the code amount allocation circuit 20. The code amount allocating circuit 20 writes the code amount data of each block as code amount information of the corresponding block position in the code amount information table.

【0091】そして、1画像分の全ブロックについて
Y、Cr、Cb各成分すべてのハフマン符号化処理を終
了した段階で、制御回路18の制御により符号量算出回
路14は、この画像全体の符号量のデータを量子化幅予
測回路12に出力すると共に、画像全体の符号量のデー
タを、符号量割当回路20に出力する。
When the Huffman encoding process for all the Y, Cr, and Cb components for all blocks of one image is completed, the code amount calculating circuit 14 controls the code amount of the entire image under the control of the control circuit 18. Is output to the quantization width prediction circuit 12, and the code amount data of the entire image is output to the code amount allocation circuit 20.

【0092】量子化幅予測回路12はこの入力された画
像全体の符号量データと目標符号量データとから、例え
ば、Newton-Raphson iteration法を用いて、目標符号量
の値に近づけるのに最適な量子化幅係数αを、実際に使
用した量子化幅係数に基づいて予測する(図8(h
2))。
The quantization width prediction circuit 12 uses the input code amount data of the entire image and the target code amount data, for example, by using the Newton-Raphson iteration method, to obtain an optimal code amount close to the target code amount. The quantization width coefficient α is predicted based on the actually used quantization width coefficient (see FIG. 8 (h
2)).

【0093】また、符号量割当回路20は入力された各
ブロック毎の符号量および画像全体の符号量と、目標符
号量とから各ブロックの割当符号量を、例えば各ブロッ
ク毎の符号量の比で、目標符号量を比例配分する等して
算出する(図8(h3))。具体的には、あるブロック
の割当符号量を決定するには、当該ブロックの符号量と
目標符号量とを乗算し、それを画像全体の符号量で割る
ことで得た結果を以て割当符号量とする。そして、この
算出した各ブロックの割当符号量のデータをブロック割
当符号量データテーブルに格納する。このブロック割当
符号量データテーブルの各ブロック別割当符号量のデー
タは、該当のブロックがエントロピー符号化処理される
際に符号化打切回路16に与えられることになる。
The code amount allocating circuit 20 determines the allocated code amount of each block from the input code amount of each block, the code amount of the entire image, and the target code amount, for example, the ratio of the code amount of each block. The target code amount is calculated by, for example, proportional distribution (FIG. 8 (h3)). Specifically, to determine the allocated code amount of a block, the code amount of the block is multiplied by the target code amount, and the result obtained by dividing the result by the code amount of the entire image is used as the allocated code amount. I do. Then, the data of the calculated allocated code amount of each block is stored in the block allocated code amount data table. The data of the allocated code amount for each block in the block allocated code amount data table is supplied to the coding truncation circuit 16 when the corresponding block is subjected to entropy coding processing.

【0094】以上で1パス目、すなわち、各ブロックの
割当符号量の決定及び量子化幅の最適化のための第1の
符号化(統計処理)を終了する。
Thus, the first pass, that is, the first encoding (statistical processing) for determining the amount of code to be allocated to each block and optimizing the quantization width is completed.

【0095】次に2パス目の処理に入る。この2パス目
の処理は第2の符号化(符号化処理)であり、目標符号
量に収まるように最適化した最終の符号化出力を得る処
理である。
Next, the process enters the second pass. The processing of the second pass is the second encoding (encoding processing), and is the processing of obtaining the final encoded output optimized to be within the target code amount.

【0096】この処理はまず、Y成分について行い、Y
成分が終了した後にCr,Cb成分について行うように
する。すなわち、初めに画像データをブロック化して読
出し、これについて抽出されて信号処理回路60から出
力されるY成分(輝度系)の画像信号データを符号化回
路80に入力する(a)。入力されたブロック化画像デ
ータは符号化回路80における直交変換回路4に入力さ
れ、再び直交変換が行われる(b)。この直交変換によ
り得られた変換係数は量子化回路6に入力され、再び量
子化が行われる(c)。ただし、このとき使用する量子
化幅係数αは前回のパスにおいて量子化幅予測回路12
が算出した予測の最適量子化幅係数αである。
This processing is first performed for the Y component.
After the completion of the components, the process is performed on the Cr and Cb components. That is, first, the image data is divided into blocks and read, and the Y component (luminance) image signal data extracted and output from the signal processing circuit 60 is input to the encoding circuit 80 (a). The input block image data is input to the orthogonal transformation circuit 4 in the encoding circuit 80, and the orthogonal transformation is performed again (b). The transform coefficient obtained by this orthogonal transform is input to the quantization circuit 6, where the quantization is performed again (c). However, the quantization width coefficient α used at this time is determined by the quantization width prediction circuit 12 in the previous pass.
Is the calculated optimal quantization width coefficient α.

【0097】次に、量子化したブロック画像データの変
換係数は、エントロピー符号化回路8に入力される。エ
ントロピー符号化は統計処理の時と同様、このブロック
画像データの変換計数のうち、まず直流成分DCの差分
値diff−DCをハフマン符号化し((d1),(e
1))、次に交流成分ACをジグザグスキャンで順次デ
ータ抽出して2次元のハフマン符号化を行う((d
2),(e2))。
Next, the quantized transform coefficients of the block image data are input to the entropy encoding circuit 8. In the entropy coding, as in the case of the statistical processing, of the conversion counts of the block image data, first, the difference value diff-DC of the DC component DC is Huffman-coded ((d1), (e1)).
1)) Then, the AC component AC is sequentially extracted by zigzag scanning to perform two-dimensional Huffman coding ((d
2), (e2)).

【0098】但し、一つの要素(マトリックス内の一つ
の位置)に対するハフマン符号が発生する度に符号量割
当回路20から、そのブロック割当符号量データテーブ
ルに格納されている当該要素位置における送出すべき割
当符号量を符号化打切回路16に出力し、一方、符号化
打切回路16ではこの各ブロックの割当符号量をもと
に、送出すべき符号量およびEOBの符号を送出しても
割当符号量を越えない場合は、打切り信号を発生せず、
該ブロックの割当符号量から送出すべき符号量を減ずる
処理を行う。そして、送出すべき該ブロックの符号量と
EOBの符号との合計の符号量が割当符号量の残りの符
号量を上まわったときに、符号化打切回路16はエント
ロピー符号化回路8に打切り信号を出力し、そのブロッ
クのハフマン符号化を終了させる。そして、エントロピ
ー符号化回路8は量子化回路6より得られる次のブロッ
クのハフマン符号化に移る。
However, every time a Huffman code for one element (one position in the matrix) is generated, the code amount allocating circuit 20 should transmit the data at the element position stored in the block allocated code amount data table. The allocated code amount is output to the coding truncation circuit 16. On the other hand, the coding truncation circuit 16 outputs the code amount to be transmitted and the EOB code even if the code amount of the EOB is transmitted based on the allocated code amount of each block. If it does not exceed, no truncation signal is generated,
A process of subtracting the code amount to be transmitted from the allocated code amount of the block is performed. Then, when the total code amount of the code amount of the block to be transmitted and the code of the EOB exceeds the remaining code amount of the allocated code amount, the coding cutoff circuit 16 sends the cutoff signal to the entropy coding circuit 8. Is output, and Huffman coding of the block is terminated. Then, the entropy coding circuit 8 shifts to the Huffman coding of the next block obtained from the quantization circuit 6.

【0099】従って、エントロピー符号化回路8は符号
化打切回路16から打切り信号が入力されるまで、変換
されたハフマン符号を、符号出力回路10に出力し、打
切り信号発生前にマトリックスのすべての要素に対する
ハフマン符号化が終わった場合には、エントロピー符号
化回路8はEOBの符号を符号出力回路10に出力す
る。また、エントロピー符号化回路8はマトリックスの
全ての要素に対するハフマン符号化が終わらない前に打
切り信号が入力された場合には、その符号の代りにEO
Bの符号を符号出力回路10に出力することになる。
Accordingly, the entropy encoding circuit 8 outputs the converted Huffman code to the code output circuit 10 until the truncation signal is input from the encoding truncation circuit 16, and outputs all the elements of the matrix before the truncation signal is generated. Is completed, the entropy encoding circuit 8 outputs the EOB code to the code output circuit 10. If the truncation signal is input before Huffman coding for all elements of the matrix is not completed, the entropy coding circuit 8 replaces the code with EO.
The code B is output to the code output circuit 10.

【0100】符号出力回路10ではこの符号化されたデ
ータを一時記憶する。
The code output circuit 10 temporarily stores the coded data.

【0101】そして、エントロピー符号化回路8は量子
化回路6より得られる次のブロックのハフマン符号化に
移る。
Then, the entropy coding circuit 8 shifts to the Huffman coding of the next block obtained from the quantization circuit 6.

【0102】このような動作を繰り返し、1画面の画像
の全ブロックの処理が終わることにより、全ての符号化
処理を終了する。Y成分に対するこのような処理が終る
と、次に同様の手法でクロマ系成分(Cr、Cb)の処
理に入る。クロマ系成分の処理でも量子化回路6は前回
のパスにおいて量子化幅予測回路12が算出した予測の
最適量子化幅係数αを使用する。
By repeating such an operation, the processing of all the blocks of the image of one screen is completed, and the entire encoding processing is completed. After such processing for the Y component is completed, processing for chroma-based components (Cr, Cb) is started in a similar manner. The quantization circuit 6 uses the optimum quantization width coefficient α of the prediction calculated by the quantization width prediction circuit 12 in the previous pass also in the processing of the chroma component.

【0103】クロマ系成分について、1画面分の画像の
全ブロックの上記2パス目の処理が終わることにより、
全ての符号化処理を終了する。
As for the chroma components, the processing of the second pass for all the blocks of the image for one screen is completed.
All encoding processing ends.

【0104】この終了にあたり、符号出力回路10では
最適化された1画像分のハフマン符号化データを記録系
22に出力し、記録系22におけるメモリカードと云っ
た記憶媒体71に書き込む(f)。これは、符号出力回
路10の出力により行われるが、符号出力回路10はエ
ントロピー符号化回路8からの可変長のハフマン符号を
つなぎ合わせ、記憶媒体71であるメモリカードに与え
ることで書き込む。
At the end of this, the code output circuit 10 outputs the optimized Huffman coded data for one image to the recording system 22 and writes it on a storage medium 71 such as a memory card in the recording system 22 (f). This is performed by the output of the code output circuit 10. The code output circuit 10 writes the data by connecting the variable-length Huffman codes from the entropy coding circuit 8 to the memory card as the storage medium 71.

【0105】この符号出力回路10の出力による記憶媒
体71への書き込みは、第2パスが終わった段階でまと
めて行うようにしても良いが、第1パスが終わって第2
パス実行に入った段階で可変長のハフマン符号をつなぎ
合わせた結果が、1バイト若しくは数バイト単位、まと
まり次第、順次、記憶媒体へ書き込むようにしても良
い。
The writing to the storage medium 71 by the output of the code output circuit 10 may be performed at the end of the second pass, but may be performed at the end of the second pass.
The result of joining variable-length Huffman codes at the stage of entering the path may be written to a storage medium sequentially in units of one byte or several bytes as soon as they are collected.

【0106】尚、これに先立ち、符号出力回路10では
符号化に使用した最適量子化幅係数αを当該符号化した
画像の記憶データにおけるヘッダ部分に書き込み、再生
時の手掛かりとして残す。
Prior to this, the code output circuit 10 writes the optimum quantization width coefficient α used for coding into the header portion of the storage data of the coded image and leaves it as a clue at the time of reproduction.

【0107】以上、本装置においては、撮影可能枚数の
選択により画質を指定すると、この指定画質に応じて定
まる記録画像一枚当りの総符号量(目的符号量)に対応
して暫定的な量子化幅を算出し、この算出した暫定的な
量子化幅を用いて統計処理を行い(第1パス目)、その
データをもとに最適な量子化幅を予測して次にこの予測
した量子化幅を使用し、量子化してこれを符号化し、最
終的な符号化画像データを得るようにする(第2パス)
ことにより、符号化処理における符号量を目標の符号量
に近づけると共に、更に各ブロックの割当符号量を決定
することにより符号化処理における符号量が目的の符号
量を越えないようにしたものであり、この点が本発明の
重要なポイントとなっている。
As described above, in the present apparatus, when the image quality is designated by selecting the number of recordable images, the provisional quantum amount corresponding to the total code amount (target code amount) per recorded image determined according to the designated image quality is determined. The calculated quantization width is calculated, statistical processing is performed using the calculated provisional quantization width (first pass), an optimum quantization width is predicted based on the data, and then the predicted quantization width is calculated. Using the quantization width, quantize and encode it to obtain the final encoded image data (second pass)
Thereby, the code amount in the encoding process is made closer to the target code amount, and the code amount in the encoding process is prevented from exceeding the target code amount by further determining the assigned code amount of each block. This is an important point of the present invention.

【0108】よって、本実施例で使用したブロックサイ
ズ、直交変換の種類、エントロピー符号化の種類などに
限定されるものではない。また画像データバッファメモ
リは直交変換回路4と量子化回路6との間にあっても良
く、むしろこのようにすると符号化処理におけるブロッ
ク化と直交変換のプロセスを省略できる。しかし、精度
を保つためには、この場合、画像メモリのサイズが大き
くなる。また、プロセス処理もA/D変換の前に行うよ
うにし、その後にディジタル化するようにしても構わな
い。また、本装置においては、ブロック毎のエントロピ
ー符号化を低周波成分側より行い、画質への影響の比較
的小さい高周波成分は割り当て符号量に余裕のある範囲
で符号化して利用するようにしているので、画質の劣化
を最小限に抑えて、しかも、高圧縮で符号化できるよう
になる。
Therefore, the present invention is not limited to the block size, the type of orthogonal transform, the type of entropy coding, and the like used in this embodiment. Further, the image data buffer memory may be provided between the orthogonal transformation circuit 4 and the quantization circuit 6, and in this case, the processes of blocking and orthogonal transformation in the encoding process can be omitted. However, in order to maintain accuracy, the size of the image memory is increased in this case. Further, the processing may be performed before the A / D conversion, and may be digitized thereafter. Further, in the present apparatus, entropy coding for each block is performed from the low-frequency component side, and high-frequency components having a relatively small effect on image quality are coded and used within a range where the allocated code amount has a margin. Therefore, it is possible to perform encoding with high compression while minimizing deterioration of image quality.

【0109】以上、詳述した図1および図2の構成の本
発明は、要するに、第1パスの暫定的な量子化幅として
目的符号量から設定した最適な量子化幅に近い量子化幅
を用いて第1パスの量子化を行い、その結果、得られた
符号量データを用いてさらに最適な量子化幅を予測し、
これを最終処理である第2パスにおける符号化に使用す
ると云うものである。これは、目的符号量に近い符号量
が得られる量子化幅係数αを用いて統計処理すると、早
く、しかも、より精度良く、最適量子化幅係数αを見付
けることができることを利用したものであり、暫定的な
量子化幅係数として、目的符号量に基づいて設定した最
適な量子化幅に近い量子化幅係数を用いて第1パスの量
子化を行い、これにより得た総符号量から目的符号量に
収めることができる量子化幅係数を知って、これを第2
パス目で使用して最終的な符号化を行うようにしたもの
である。
In the present invention having the configurations shown in FIGS. 1 and 2 described above, the quantization width close to the optimum quantization width set from the target code amount is used as the provisional quantization width for the first pass. To perform a first pass quantization, and as a result, further optimize a quantization width using the obtained code amount data,
This is used for the encoding in the second pass which is the final processing. This is based on the fact that, when statistical processing is performed using a quantization width coefficient α that provides a code amount close to the target code amount, the optimum quantization width coefficient α can be found quickly and more accurately. The first pass quantization is performed using a quantization width coefficient close to the optimum quantization width set based on the target code amount as a provisional quantization width coefficient, and the target code amount is calculated based on the total code amount thus obtained. Knowing the quantization width coefficient that can be contained in the code amount,
This is used in the pass to perform final encoding.

【0110】そして、これにより、撮影することにより
撮像系で得た画面データを短い時間で、精度良く目的符
号量の枠一杯に符号化し、これによって、許される符号
量に目一杯近付けることができることで、失うデータを
最小限にとどめ、画質も維持できるようにすると云うも
のであり、予測精度が高く、符号化による画質劣化の少
ない、すなわち、高画質の量子化を行うことができる。
また、目的符号量が変わっても、同じハードウェアで対
処でき、従って、目的符号量別(圧縮率別)のハードウ
ェアを用意する必要がないから、装置のコストダウンと
小形化が図れる。
[0110] Thus, the screen data obtained by the imaging system by shooting can be accurately encoded in a short time to fill the frame of the target code amount, thereby bringing the code amount close to the allowable code amount. Thus, lost data is kept to a minimum and the image quality can be maintained, so that the prediction accuracy is high and the image quality is hardly degraded due to encoding, that is, high-quality quantization can be performed.
In addition, even if the target code amount changes, the same hardware can cope with the change. Therefore, it is not necessary to prepare hardware for each target code amount (for each compression ratio), so that the cost and size of the apparatus can be reduced.

【0111】ここで、暫定的な量子化幅係数を如何にし
て最適な値にするかが、重要な課題となるので、この点
について少し説明する。
Here, how to set the provisional quantization width coefficient to an optimum value is an important issue, and this point will be briefly described.

【0112】画像データを前処理し、この出力を量子化
し、この量子化出力を可変長符号化する場合、この量子
化の量子化幅を変化させることにより、発生する符号量
が変化することは周知の事実である。これは、ハフマン
符号化に代表される可変長符号化は、符号化するデータ
の発生確率の偏りを利用してそのデータを表現するのに
必要な符号量を減少させると云うものであることから、
前記「量子化幅を変化させる」と云うことは、量子化値
の発生確率を変化させることでもあるので、量子化幅を
変化させることにより発生符号量も変化することがわか
る。
When image data is preprocessed, its output is quantized, and this quantized output is subjected to variable-length encoding, the amount of code generated can be changed by changing the quantization width of this quantization. This is a well-known fact. This is because variable-length coding represented by Huffman coding reduces the amount of code necessary to represent data using the bias in the probability of occurrence of the data to be coded. ,
Since "changing the quantization width" also means changing the probability of occurrence of the quantization value, it can be seen that changing the quantization width also changes the generated code amount.

【0113】ところで、同じ量子化幅で同一の符号化を
行っても、そのときの画像データによって発生符号量は
異なる。しかし、1つの画像データに対して量子化幅を
変化させて同一の符号化を行った場合は量子化幅と、発
生符号量との間には一定の関係が得られる。また、多く
の画像データで量子化幅と発生符号量の関係を求める
と、最も発生頻度の高い関係が統計的に得られることが
明らかになった。
Incidentally, even if the same encoding is performed with the same quantization width, the generated code amount differs depending on the image data at that time. However, when the same encoding is performed by changing the quantization width for one image data, a fixed relationship is obtained between the quantization width and the generated code amount. In addition, when the relationship between the quantization width and the generated code amount is obtained for many pieces of image data, it has been found that the relationship having the highest frequency of occurrence can be obtained statistically.

【0114】具体的には多くの場合、次の関係が得られ
た。すなわち、ある量子化幅に対する相対的な比をSF
とし、発生符号量1画素あたりのビット数(ビットレー
ト)で表わしてこれをBRとすると、 log BR=a ×log SF+b …(1) なる関係になる。aは同一の符号化であれば、画像によ
らず略一定であり、bは画像に依存する。このbの値は
画像により、一定の分布を持ち、この発生頻度分布から
代表的なbが得られる。
Specifically, in many cases, the following relationship was obtained. That is, the relative ratio to a certain quantization width is SF
If the generated code amount is represented by the number of bits (bit rate) per pixel (BR) and this is BR, the following relationship is obtained: log BR = a × log SF + b (1) If a is the same encoding, it is substantially constant regardless of the image, and b depends on the image. The value of b has a certain distribution depending on the image, and a typical b is obtained from the occurrence frequency distribution.

【0115】以上、一例をあげて説明をしたが、いずれ
にせよ、本発明の特徴は量子化幅と符号量との関係を利
用して目的の符号量に応じて量子化幅を設定すると云う
ところにある。
Although the above has been described with reference to an example, in any case, the feature of the present invention is that the quantization width is set in accordance with the target code amount by utilizing the relationship between the quantization width and the code amount. There.

【0116】上述した図2の構成の符号化回路80は、
圧縮符号化において、一連の処理を目的符号量に基づき
算出した暫定的な量子化幅で第1パスの処理を行い、そ
の結果、を元に最適量子化幅を求めてこの最適量子化幅
により第2パスを実施し、最終的な圧縮符号化データを
得ると云った二回の処理で完成させるもので、第1パス
により最適αを見付けるようにするものである。図3に
おいては符号化回路80の処理の流れをわかりやすくす
るために、第1パスでの信号の流れを点線の矢印P1
で、また、第2パスでの信号の流れを実線の矢印P2で
それぞれ図示してある。この信号の流れに沿ってざっと
動作を追ってみると次のようになる。
The encoding circuit 80 having the configuration shown in FIG.
In the compression coding, a series of processes is performed in the first pass with a provisional quantization width calculated based on the target code amount, and as a result, an optimum quantization width is obtained based on the obtained result. The second pass is performed to complete the process by two processes of obtaining the final compressed and encoded data, and the optimum α is found by the first pass. In FIG. 3, in order to make the flow of processing of the encoding circuit 80 easy to understand, the signal flow in the first pass is indicated by a dotted arrow P1.
Further, the signal flow in the second path is shown by a solid arrow P2. The following is a brief description of the operation following the flow of this signal.

【0117】画像データの符号化が行われるに当り、目
的とする総符号量が符号化回路80の制御回路18内に
設定される。これはスイッチ30の操作により、使用者
が所望の撮影可能枚数を設定することにより、この設定
した撮影可能枚数に応じて制御回路90が最適符号量を
選択し、これを目的符号量の情報として符号化回路80
に与えることで実現している。尚、初期状態ではあらか
じめ定めた標準的な撮影可能枚数に設定される。
When the image data is encoded, the target total code amount is set in the control circuit 18 of the encoding circuit 80. The user sets the desired number of recordable images by operating the switch 30, and the control circuit 90 selects the optimum code amount according to the set number of recordable images. Encoding circuit 80
Is realized by giving Note that in the initial state, the standard number of recordable images is set in advance.

【0118】撮影が行われると、これにより撮像系40
内の撮像素子から画像信号が出力される。この出力され
た画像信号は信号処理回路60内においてディジタル信
号に変換され、バッファメモリに記憶された後、8×8
画素ブロック単位で読み出され、Y成分、次にCr成
分、次にCb成分に分離される。この分離は最初にY成
分について行われ、8×8画素のブロック単位で出力さ
れるY成分の画像データは直交変換回路4に入力され
て、ブロック毎に直交変換(本例ではDCT:離散コサ
イン変換(Discrete Cosine Transform):尚、予測符号
化(DPCM)を使用しても良い)が行われる。直交変
換回路4で得られたDCT変換変換係数は量子化回路6
に入力され、一方、制御回路18から目的とする符号量
が量子化幅予測回路12に出力され、量子化幅予測回路
12では目的の符号量から式(1)の関係を用いて量子
化幅係数αの初期値を設定し、量子化回路6に出力す
る。量子化回路6では、入力された量子化幅係数αを用
いて、変換係数を線形量子化する。量子化された変換係
数はエントロピー符号化回路8に入力され、可変長符号
化(本例ではハフマン符号化)が行われる。
When the photographing is performed, the photographing system 40
An image signal is output from the image sensor in the inside. The output image signal is converted into a digital signal in the signal processing circuit 60 and stored in the buffer memory.
The data is read out in pixel block units, and is separated into a Y component, then a Cr component, and then a Cb component. This separation is first performed for the Y component, and the Y component image data output in units of 8 × 8 pixels is input to the orthogonal transform circuit 4 and orthogonally transformed for each block (in this example, DCT: discrete cosine Transform (Discrete Cosine Transform): predictive coding (DPCM) may be used). The DCT transform coefficient obtained by the orthogonal transform circuit 4 is
On the other hand, the target code amount is output from the control circuit 18 to the quantization width prediction circuit 12, and the quantization width prediction circuit 12 calculates the quantization width from the target code amount using the relationship of the equation (1). The initial value of the coefficient α is set and output to the quantization circuit 6. The quantization circuit 6 linearly quantizes the transform coefficient using the input quantization width coefficient α. The quantized transform coefficients are input to the entropy coding circuit 8, where variable length coding (Huffman coding in this example) is performed.

【0119】ここで入力された量子化係数は、ジグザグ
スキャンと呼ばれる低周波数成分から高周波数成分への
走査が行われ、一番目の直流成分のデータは直前に可変
長符号化を行ったブロックの直流成分との差分値がハフ
マン符号化されて出力される。
The input quantized coefficients are scanned from a low-frequency component to a high-frequency component called zigzag scan, and the first DC component data is the data of the block immediately before the variable-length coding. The difference value from the DC component is Huffman-coded and output.

【0120】交流成分については走査順序の2番目から
64番目まで順番に変換係数を見てゆき、変換係数が0
でない(すなわち、有効な)係数が出てきたら、その直
前に存在した連続した0(零;無効)の係数の数(ゼロ
ラン)とその有効係数との値で、2次元のハフマン符号
化が行われる。また、ある係数以降、64番目の係数ま
で、連続して無効出力が続く場合には、ブロックの終り
を示すEOF(エンド・オブ・ファイル)の符号を出力
する。可変長符号化回路8は、以上のような符号化が各
ブロックで終了する毎に、そのブロックで発生した符号
量を符号量算出回路14に出力する。
For the AC component, the conversion coefficients are examined in order from the second to the 64th in the scanning order, and the conversion coefficient becomes 0.
If a non-valid (ie, valid) coefficient comes out, two-dimensional Huffman coding is performed by the number of consecutive 0 (zero; invalid) coefficients that existed immediately before (zero run) and the value of the valid coefficient. Will be If the invalid output continues to the 64th coefficient after a certain coefficient, an EOF (end of file) code indicating the end of the block is output. The variable-length encoding circuit 8 outputs the code amount generated in each block to the code amount calculation circuit 14 each time the above-described encoding is completed in each block.

【0121】Y成分についてのこのような処理が終了す
ると、次にCr成分、そしてCb成分についても同様の
処理を行う。
When such a process for the Y component is completed, a similar process is performed for the Cr component and the Cb component.

【0122】一画像について、符号化が終了すると、符
号量算出回路14は入力されたブロック毎の符号量を累
積して画像全体の符号量を総符号量値として算出する。
この総符号量値は量子化幅予測回路12に出力され、ま
た、各ブロック毎の符号量及び画像全体の符号量割当回
路20に出力される。
When the coding of one image is completed, the code amount calculating circuit 14 accumulates the input code amount of each block and calculates the code amount of the entire image as a total code amount value.
The total code amount value is output to the quantization width prediction circuit 12, and is output to the code amount allocation circuit 20 for each block and the entire image.

【0123】以上の第1パスの符号化処理が終了する
と、続いて同じ画像データに対して第2パスの符号化処
理が行われる。第2パスでは信号処理回路60内のメモ
リから読み出された画像データは、最初にY成分、次に
Cr成分、次にCb成分に分離され、それぞれの成分の
画像データは8×8画素のブロック化等の処理が行われ
た後、直交変換回路4に入力され、ブロック毎に直交変
換(DCT変換)され、これにより、直交変換回路4で
得られたDCT変換係数は量子化回路6に入力される。
When the first pass encoding process is completed, a second pass encoding process is performed on the same image data. In the second pass, the image data read from the memory in the signal processing circuit 60 is first separated into a Y component, then a Cr component, and then a Cb component, and the image data of each component is 8 × 8 pixels. After processing such as blocking is input to the orthogonal transform circuit 4, the orthogonal transform (DCT transform) is performed for each block, whereby the DCT transform coefficients obtained by the orthogonal transform circuit 4 are transmitted to the quantization circuit 6. Is entered.

【0124】一方、量子化幅予測回路12では第1パス
での符号化により求められた総画像符号量と、制御回路
18から与えられた目的符号量とから、より適した量子
化幅係数αを予測し、量子化回路6に出力する。量子化
回路6においては与えられたこの予測による新たな量子
化幅係数αによる補正済み量子化幅を用いて、DCT変
換係数を線形量子化する。量子化された係数は可変長符
号化回路8に入力され、第1パスの符号化時と同様の方
式でハフマン符号化される。
On the other hand, the quantization width prediction circuit 12 obtains a more suitable quantization width coefficient α from the total image code amount obtained by the encoding in the first pass and the target code amount given from the control circuit 18. And outputs the result to the quantization circuit 6. The quantization circuit 6 linearly quantizes the DCT transform coefficient using the corrected quantization width based on the given new quantization width coefficient α based on the prediction. The quantized coefficients are input to the variable length coding circuit 8, and are subjected to Huffman coding in the same manner as in the first pass coding.

【0125】ここで符号化時に発生した符号量は第1パ
スの符号化時に求められ、符号量割当回路20に記憶さ
れている各ブロックの割当符号量との比較が行われ、こ
れを越えた場合には符号打切回路16の働きにより、そ
のブロック内でそれ以降の符号化が打ち切られる。以上
の方法により目的符号量に制御された符号化データは順
次、符号出力回路10を経由して記録系70に出力さ
れ、記録される。
Here, the code amount generated at the time of coding is obtained at the time of the first pass coding, and is compared with the allocated code amount of each block stored in the code amount allocating circuit 20, and exceeds the amount. In such a case, the subsequent coding is terminated in the block by the function of the code discontinuing circuit 16. The coded data controlled to the target code amount by the above method is sequentially output to the recording system 70 via the code output circuit 10 and recorded.

【0126】次に記録系70にて記録された記録媒体7
1の圧縮符号化記録画像データの再生について説明す
る。
Next, the recording medium 7 recorded by the recording system 70
The reproduction of the first compression-encoded recording image data will be described.

【0127】図4に再生機の構成を示す。図において、
100は再生機本体であり、この再生機本体100は読
取部102、復号化回路104および処理回路106お
よび制御回路108を備える。読取部102は記憶媒体
71を着脱でき、記憶媒体71の内容をインタフェース
回路110を介して読出すようになっている。
FIG. 4 shows the structure of the reproducing apparatus. In the figure,
Reference numeral 100 denotes a playback device main body. The playback device main body 100 includes a reading unit 102, a decoding circuit 104, a processing circuit 106, and a control circuit 108. The reading unit 102 can attach and detach the storage medium 71, and reads the contents of the storage medium 71 via the interface circuit 110.

【0128】復号化回路104は図5のような機能ブロ
ックを有する。すなわち、112はハフマン符号化デー
タを復号化するハフマン復号部、114はこのハフマン
復号されて得られたデータを、記憶媒体71から読み出
されて設定入力された量子化幅の情報に基づいて逆量子
化する逆量子化部、116はこの逆量子化されて得られ
たデータを逆DCT変換して映像信号データとして出力
するIDCT(逆DCT変換)部、そして、118はこ
れらの制御を司る制御部である。
The decoding circuit 104 has functional blocks as shown in FIG. That is, reference numeral 112 denotes a Huffman decoding unit for decoding Huffman encoded data, and 114 denotes data obtained by Huffman decoding, which is read out from the storage medium 71 based on the quantization width information set and input. An inverse quantization unit for quantizing 116, an IDCT (inverse DCT transform) unit for inverse DCT transforming the data obtained by the inverse quantization and outputting it as video signal data, and 118 a control for controlling these Department.

【0129】処理回路106はバッファメモリ120、
エンコーダ122およびD/A変換器124を備える。
バッファメモリ120は復号化回路104から出力され
た映像信号データを一時保持するメモリであり、エンコ
ーダ122はこのバッファメモリ120から読み出され
る映像信号データをNTSC方式の映像信号に変換する
ものであり、D/A変換器124はこのNTSC方式の
映像信号をアナログ変換してテレビ用の映像信号として
出力するためのものである。
The processing circuit 106 includes a buffer memory 120,
An encoder 122 and a D / A converter 124 are provided.
The buffer memory 120 is a memory that temporarily holds the video signal data output from the decoding circuit 104, and the encoder 122 converts the video signal data read from the buffer memory 120 into an NTSC video signal. The / A converter 124 converts the NTSC video signal into an analog signal and outputs it as a TV video signal.

【0130】前記制御回路108は再生機本体100全
体の制御を司るものであり、再生機本体100の読取部
102に対し、符号化時の量子化幅の情報を読み出すべ
く制御して、その結果、記録媒体71から読み出された
符号化時の量子化幅の情報を復号化回路104の逆量子
化部114に設定させ、続いて制御回路108は記録媒
体71から圧縮符号化された映像信号データを読出すべ
く、読取部102を制御すると云った制御を行う。ま
た、図示しないが再生機本体100には、コマ送りスイ
ッチ等があり、このスイッチにより指定されたコマ位置
の映像を再生したりすることができる。このような制御
も制御回路108が行う。
The control circuit 108 controls the entire reproduction apparatus main body 100. The control circuit 108 controls the reading section 102 of the reproduction apparatus main body 100 to read the information of the quantization width at the time of encoding. Then, the information of the quantization width at the time of encoding read from the recording medium 71 is set in the inverse quantization unit 114 of the decoding circuit 104, and then the control circuit 108 controls the video signal compressed and encoded from the recording medium 71. In order to read data, control for controlling the reading unit 102 is performed. Although not shown, the playback device main body 100 has a frame feed switch and the like, and can reproduce a video at a frame position designated by the switch. The control circuit 108 also performs such control.

【0131】次に上記構成の再生機の動作を説明する。
圧縮符号化された映像信号データが記録された記録媒体
(メモリカード)71が再生機本体100の読取部10
2に装着されると、まず、制御回路108は読取部10
2に対し、符号化時の量子化幅の情報を読み出すべく制
御する。その結果、読取部102において記録媒体71
から符号化時の量子化幅の情報が読み出され、この情報
は復号化回路104の逆量子化部114に設定される。
続いて制御回路108は記録媒体71から映像信号を読
出すべく、読取部102を制御するので、読取部102
は記録媒体71から映像信号を順次読み出し、復号化回
路104に入力する。これを受けた復号化回路104で
は、ハフマン復号部112においてハフマン符号を復号
し、量子化係数を得る。こうして得られた量子化係数は
逆量子化回路114に与えて逆量子化とする。ここでの
逆量子化は先に設定されている前記量子化幅の情報を用
いて行われる。
Next, the operation of the reproducing apparatus having the above configuration will be described.
The recording medium (memory card) 71 on which the compression-encoded video signal data is recorded is the reading unit 10 of the main unit 100 of the reproducing apparatus.
2, the control circuit 108 first reads the reading unit 10
2 is controlled so as to read out information on the quantization width at the time of encoding. As a result, in the reading unit 102, the recording medium 71
The information of the quantization width at the time of encoding is read out from, and this information is set in the inverse quantization unit 114 of the decoding circuit 104.
Subsequently, the control circuit 108 controls the reading unit 102 to read the video signal from the recording medium 71.
Reads the video signal sequentially from the recording medium 71 and inputs the video signal to the decoding circuit 104. In the decoding circuit 104 receiving this, the Huffman decoding unit 112 decodes the Huffman code to obtain a quantized coefficient. The quantized coefficients obtained in this way are supplied to the inverse quantization circuit 114 for inverse quantization. Here, the inverse quantization is performed by using the information of the quantization width set previously.

【0132】逆量子化により得られた変換係数は、ID
CT部116においてブロック毎に逆DCT変換され、
元の映像信号に復元される。このようにしてY、Cr、
Cbの順で映像信号が復元されて復号化回路14から出
力され、処理回路106内のバッファメモリ120に書
き込まれる。1画面の映像信号データの書き込みが終了
すると、バッファメモリ120から通常のテレビ信号の
走査順で映像信号データが読み出され、エンコーダ12
2においてNTSC方式の映像信号に変換される。更に
D/A変換器124によりアナログ信号に変換され、出
力される。この映像信号をテレビモニタに入力すること
により、画像がテレビ映像として再生され、映像として
鑑賞でき、また、ビデオプリンタ等のプリント装置に与
えてプリントすることにより、ハードコピーが得られる
ので、写真等と同様な形で鑑賞することができるように
なる。
The transform coefficient obtained by the inverse quantization has the ID
The inverse DCT is performed for each block in the CT unit 116,
The original video signal is restored. In this way, Y, Cr,
The video signal is restored in the order of Cb, output from the decoding circuit 14, and written into the buffer memory 120 in the processing circuit 106. When the writing of the video signal data for one screen is completed, the video signal data is read out from the buffer memory 120 in the normal TV signal scanning order, and
2, the video signal is converted into an NTSC video signal. The signal is further converted into an analog signal by the D / A converter 124 and output. By inputting this video signal to a television monitor, the image is reproduced as a television video and can be viewed as a video, and a hard copy can be obtained by giving it to a printing device such as a video printer and printing it. It can be viewed in the same way as.

【0133】以上説明したように、カメラは所望の撮影
可能枚数を設定でき、撮影可能枚数を設定することでカ
メラではこれに対応する圧縮率を自動設定すると共に、
この設定圧縮率に応じて定まる暫定的な量子化幅を用い
て、1画面分の撮影画像データを量子化し、エントロピ
ー符号化し、その結果得られるその1画面分の撮影画像
データの符号量より最適量子化幅を予測し、この予測し
た最適量子化幅により前記1画面分の撮影画像データを
量子化し、エントロピー符号化するようにし、符号化さ
れた映像信号の再生時には撮影時に使用した前記最適量
子化幅を用いて復号することにより、所望の圧縮率での
符号化を圧縮率別にハードウェアを設けることなく、共
通の一つのハードウェアで実現でき、同様に所望の圧縮
率で符号化された画像データの復号化を圧縮率別にハー
ドウェハを設けることなく、共通の一つのハードウェア
で実現できる。
As described above, the camera can set a desired number of recordable images, and by setting the number of recordable images, the camera automatically sets the corresponding compression ratio,
Using the provisional quantization width determined according to the set compression ratio, the captured image data for one screen is quantized and entropy-encoded, and the optimal code amount is obtained from the code amount of the captured image data for one screen obtained as a result. A quantization width is predicted, the captured image data for one screen is quantized by the predicted optimal quantization width, and entropy encoding is performed. When reproducing an encoded video signal, the optimal quantization used at the time of photographing is reproduced. By decoding using the compression width, encoding at a desired compression rate can be realized with one common hardware without providing hardware for each compression rate, and similarly, encoding at a desired compression rate can be performed. Decoding of image data can be realized with one common hardware without providing a hardware wafer for each compression ratio.

【0134】実施例では符号化の過程が第1パス、第2
パスの2回の処理で終了する2パス方式としたが、これ
に限るものではなく、圧縮率から設定した量子化幅を用
いて1回のパスで符号化する方式でも実用上、十分に圧
縮率制御できる。また、記録媒体にメモりカードを用い
た例を示したが、その他、フロッピディスク、光ディス
ク、磁気テープ等を利用することもできる。また、カメ
ラと再生機が別体となっているものを示したが、カメラ
が再生機の機能を合せ持つ一体型のものでも良い。量子
化幅の値そのものを記録媒体に記録するようにしたが、
量子化幅値を変換あるいは符号化して記録するようにし
ても良い。前処理符号化はKL変換、DPCM変換等で
も良い。エントロピー符号化は算術符号化、ランレング
ス符号化等でも良い。
In the embodiment, the encoding process is performed in the first pass and the second pass.
Although the two-pass method is adopted in which the processing is completed in two passes, the present invention is not limited to this, and a method in which encoding is performed in one pass using a quantization width set from the compression ratio is sufficiently compressed for practical use. Rate control. In addition, although an example using a memory card as a recording medium has been described, a floppy disk, an optical disk, a magnetic tape, or the like can also be used. Although the camera and the playback device are shown as being separated from each other, the camera and the playback device may be of an integrated type having the functions of the playback device. The value of the quantization width itself is recorded on the recording medium.
The quantization width value may be converted or encoded and recorded. The preprocessing encoding may be KL conversion, DPCM conversion, or the like. The entropy coding may be arithmetic coding, run-length coding, or the like.

【0135】本発明は撮影可能枚数等の設定により、画
像の最終的な目的符号量が自動可変されるようにし、最
終的な目的符号量が設定されると、その符号量を得るに
必要な量子化幅係数αを該目的符号量から算出して、符
号化に使用する点にあり、これによって最初から目的符
号量に近い符号量が得られることに着目して、1回のバ
スで略最適値にすることもできる。この例を示す。
According to the present invention, the final target code amount of an image is automatically varied by setting the number of images that can be taken, and when the final target code amount is set, it is necessary to obtain the code amount. The point is that the quantization width coefficient α is calculated from the target code amount and is used for encoding. By paying attention to the fact that a code amount close to the target code amount is obtained from the beginning, approximately one bus It can be an optimal value. This example is shown.

【0136】本例は第1パスの符号化処理を1回のみ行
うもので、第1パスのみで最適値にするものである。図
7に構成を示す。本例では前述の実施例と同一の構成要
素については、同一符号で示し、説明は省略する。
In this example, the encoding process of the first pass is performed only once, and the optimum value is obtained only in the first pass. FIG. 7 shows the configuration. In this example, the same components as those in the above-described embodiment are denoted by the same reference numerals, and description thereof will be omitted.

【0137】本システムでは任意の画質設定値を制御回
路18aに与えると、これに応じて定まる標準の量子化
幅係数αを使用して符号化を行うもので、画像データは
直交変換(DCPMでも可)による前処理がなされ、一
方、制御回路18aから与えられる目的符号量から量子
化幅予測回路12は標準の量子化幅係数αを算出してこ
れを量子化回路6に与え、量子化回路6はこの設定され
た量子化幅係数αで補正した量子化幅で線形量子化を行
う。この量子化された変換係数はエントロピー符号化回
路8でエントロピー符号化され、符号出力回路10に出
力される。そして、この符号化された出力は符号出力回
路10より記録系に送られて記録媒体に記録される。
In the present system, when an arbitrary image quality setting value is given to the control circuit 18a, encoding is performed using a standard quantization width coefficient α determined in accordance with the image quality setting value. A), the quantization width prediction circuit 12 calculates a standard quantization width coefficient α from the target code amount provided from the control circuit 18a, and supplies the standard quantization width coefficient α to the quantization circuit 6; Numeral 6 performs linear quantization with the quantization width corrected by the set quantization width coefficient α. The quantized transform coefficients are entropy-encoded by an entropy encoding circuit 8 and output to a code output circuit 10. Then, the encoded output is sent from the code output circuit 10 to a recording system and recorded on a recording medium.

【0138】上記の例のように、一回のみのパスで符号
化する場合でも、量子化幅を目的符号量に基づいて設定
するようにしたことにより、最適な量子化幅に近くな
り、得られる符号量をおおよそ目的符号量と一致させる
ことができる。そして、この場合、処理は一回で終わる
ので、極めて高速で符号化を行えるようになる。
Even when encoding is performed in a single pass as in the above example, the quantization width is set based on the target code amount, so that the quantization width approaches the optimum quantization width. It is possible to make the code amount to be approximately equal to the target code amount. In this case, since the processing is completed in one time, encoding can be performed at an extremely high speed.

【0139】以上の各実施例では目的符号量から量子化
幅を設定していたが、複数の目的符号量をモードで切換
えて使用するようなアプリケーションにおいては、それ
ぞれのモードに対応する量子化幅を予め用意しておき、
これをモードで切り換えて使用するようにしても勿論差
支えない。
In each of the above embodiments, the quantization width is set based on the target code amount. However, in an application in which a plurality of target code amounts are switched between modes, the quantization width corresponding to each mode is used. Prepare in advance,
Of course, it can be used by switching between modes.

【0140】本発明によれば、目的の符号量を変化させ
ても、発生符号量を目的の符号量に近付けるのに最適な
量子化幅が得られる。この量子化幅を用いて量子化する
ことにより、1回の符号化処理のみで符号化を終了する
場合(1パス方式)でも、得られる符号量を目的の符号
量に近付けることができ、2回の符号化処理で符号量を
制御する2パス方式では、第一回目の符号化処理(統計
処理)における暫定的な量子化幅を用いて得た符号量に
基づいて量子化幅を補正するので、最適量子化幅の予測
精度を向上させる効果があり、高画質の符号化が行える
とともに、総符号量が十分目標値に近付き、また、目的
の符号量以内になるまで、符号化処理と最適な量子化幅
の予測を繰り返すnパス方式とすることもでき、この方
式では第1パスでの符号化処理(統計処理)において、
符号量を目標値に収めるに最適な量子化幅を見付けるま
での(量子化幅が最適値に収束するまでの)繰り返し回
数が少なくなり、符号化に要する処理時間が短くなると
云う効果が得られる。
According to the present invention, even if the target code amount is changed, an optimum quantization width for making the generated code amount close to the target code amount can be obtained. By performing quantization using this quantization width, the obtained code amount can be made close to the target code amount even when the coding is completed only by one coding process (one-pass method). In the two-pass method in which the code amount is controlled in the first encoding process, the quantization width is corrected based on the code amount obtained using the temporary quantization width in the first encoding process (statistical process). Therefore, it has the effect of improving the prediction accuracy of the optimal quantization width, can perform high-quality encoding, and can perform encoding processing until the total code amount is sufficiently close to the target value and is within the target code amount. An n-pass method that repeats the prediction of the optimal quantization width can be used. In this method, in the encoding process (statistical process) in the first pass,
The number of repetitions (until the quantization width converges to the optimum value) until finding the optimum quantization width for keeping the code amount within the target value is reduced, and the effect that the processing time required for encoding is reduced is obtained. .

【0141】尚、本発明は上記し、且つ、図面に示す実
施例に限定することなくその要旨を変更しない範囲内で
適宜変形して実施し得るものであり、本発明はスチル画
像に限らず動画像等、種々の画像に対しての圧縮符号化
に適用できるものである。
The present invention is not limited to the embodiments described above and shown in the drawings, but can be appropriately modified and implemented without departing from the scope of the invention. The present invention is not limited to still images. The present invention can be applied to compression encoding of various images such as moving images.

【0142】また、上記実施例では圧縮率対応情報より
総符号量の情報を与え、この総符号量に対応した量子化
幅を与えることのできる量子化幅係数の予測を行い、こ
の予測された量子化幅係数に基づく量子化幅で量子化を
行うようにしているが、予め圧縮率対応情報に対する量
子化幅の関係を計算で求めてテーブル化しておき、これ
をメモリ等に記憶して、圧縮率対応情報から直接、量子
化幅の情報(すなわち、量子化幅係数或いは量子化幅の
値)を出力させるようにすることもできる。このように
すれば、所望の圧縮率に対応する情報を入力すると、こ
の入力された圧縮率対応情報に対応して一義的に定まる
量子化幅の情報を読出して出力でき、即座に最適量子化
幅を設定できて直ちに量子化回路にこの量子化幅で画像
信号データを量子化させることができるようになる。
Further, in the above embodiment, information of the total code amount is given from the compression ratio correspondence information, and a quantization width coefficient capable of giving a quantization width corresponding to the total code amount is predicted. Although the quantization is performed with the quantization width based on the quantization width coefficient, the relationship between the quantization width and the compression ratio correspondence information is calculated in advance and stored in a table, and this is stored in a memory or the like. It is also possible to output quantization width information (that is, quantization width coefficient or quantization width value) directly from the compression ratio correspondence information. In this way, when the information corresponding to the desired compression ratio is input, the information of the quantization width uniquely determined corresponding to the input compression ratio corresponding information can be read and output, and the optimum quantization can be immediately performed. As soon as the width can be set, the quantization circuit can quantize the image signal data with this quantization width.

【0143】この構成によれば、メモリ等に各種の圧縮
率に対応した最適量子化幅の情報を予め記憶させて、こ
れを入力圧縮率対応情報に対応して読出すだけで最適量
子化幅の情報を与えることができるので、目的の符号量
に収まるよう符号化するに当り、その処理を極めて短時
間で行える他、ハードウェアも簡単で済むようになる。
According to this configuration, information on the optimum quantization width corresponding to various compression ratios is stored in advance in a memory or the like, and is read out in accordance with the input compression ratio correspondence information. Can be given, so that the encoding process can be performed in an extremely short time and the hardware can be simplified when encoding to the target code amount.

【0144】本発明の更に別の実施例を次に説明する。
本例は、画質設定を手動で行うことなく、自動的に設定
できるようにしたものである。
Next, still another embodiment of the present invention will be described.
In this example, the image quality can be automatically set without manually setting the image quality.

【0145】すなわち、本例では暫定的な量子化幅を用
いて符号化を行い、この時に発生した符号量を用いて最
適な画質モードを設定する。一般的に同一の量子化幅を
用いて符号化したときに、符号量が多く発生する画像は
高周波成分を多く有しており、これを高圧縮、すなわ
ち、少ない符号量に圧縮することは、高周波成分の切り
捨てが多く発生することを意味し、画質を損なうことに
なる。
That is, in this example, encoding is performed using a temporary quantization width, and an optimal image quality mode is set using the code amount generated at this time. In general, when encoding using the same quantization width, an image in which a large amount of code occurs has many high-frequency components, and high compression, that is, compressing this to a small amount of code, This means that high-frequency components are often cut off, which impairs image quality.

【0146】一方、符号量発生の少い画像は、高圧縮を
行っても比較的画質は損なわれない。この性質を利用
し、画像毎に適した圧縮率を自動的に設定するようにし
たものがこの実施例である。
On the other hand, the quality of an image with a small amount of code generation is not relatively deteriorated even if high compression is performed. This embodiment utilizes this property and automatically sets a suitable compression ratio for each image.

【0147】本実施例の符号化回路の構成を図11に示
す。上述の実施例と同一の構成要素については同一符号
を付し、説明は省略する。この実施例は撮影を行うと、
この画像(ディジタル化された画像)について、ブロッ
ク化を行い、次に各ブロックについて順にDCTを行
い、周波数成分別の係数にし、この周波数成分別のDC
T係数データを低周波数成分から順に暫定的な周波数成
分別量子化幅係数αを用いての量子化を行い、これをハ
フマン符号化し、次にこれにより発生した総符号量と各
ブロック別符号量から最適な目的符号量を決め、この目
的符号量を各ブロック毎の発生符号量で配分して各ブロ
ック毎の割当符号量を決め、さらに前記発生した総符号
量と目的符号量から各周波数毎の最適量子化幅を決め、
前記撮影により得られた画像のブロック化を行い、次に
各ブロックについて順にDCTを行い、周波数成分別の
係数にし、この周波数成分別のDCT係数データを低周
波数成分から順に前記決定した周波数成分別最適量子化
幅係数αを用いての量子化を行い、これをハフマン符号
化し、次にこれにより発生した符号を、そのブロックで
の前記割当符号量を越えない範囲で記録し、割当符号量
を越える分は符号化を打ち切る。
FIG. 11 shows the configuration of the encoding circuit of this embodiment. The same components as those in the above-described embodiment are denoted by the same reference numerals, and description thereof will be omitted. In this embodiment, when taking a picture,
This image (digitized image) is divided into blocks, and then DCT is sequentially performed on each block to obtain coefficients for each frequency component.
The T coefficient data is quantized in order from the low frequency component using the provisional quantization component coefficient α for each frequency component, and this is Huffman-coded, and then the total code amount generated by this and the code amount for each block From this, the optimal target code amount is determined, and the target code amount is distributed by the generated code amount for each block to determine the allocated code amount for each block. Further, for each frequency from the total code amount generated and the target code amount, Determine the optimal quantization width of
The image obtained by the photographing is divided into blocks, and then DCT is sequentially performed on each block to obtain coefficients for each frequency component, and the DCT coefficient data for each frequency component is sequentially determined from the low frequency component for each of the determined frequency components. Performs quantization using the optimal quantization width coefficient α, performs Huffman encoding, and records the code generated by the Huffman encoding within the range not exceeding the allocated code amount in the block. Exceeding stops the encoding.

【0148】制御回路90にはこのような処理を行うた
めの制御機能を持たせる。そして、最初に制御回路90
に統計処理時の総符号量の値(第1パスの処理での発生
総符号量の値)から、当該処理中の画像に最も適した目
的符号量を決定させ、この制御回路90が決定した目的
符号量を制御回路18に設定すると共に、制御回路18
では量子化幅予測回路12に対して、この決定した目的
符号量と前記統計処理時の総符号量とから各周波数成分
毎の最適量化幅係数αを予測させるべく制御させ、この
予測して各周波数成分毎の最適量子化幅係数αにて補正
して得られた各周波数成分毎の最適量子化幅を量子化幅
予測回路12より、量子化回路6に与え、量子化回路6
にこの各周波数成分毎の最適量子化幅で各ブロック毎の
画像データ(DCT変換値)の量子化を行わせるように
する。
The control circuit 90 has a control function for performing such processing. Then, first, the control circuit 90
The control circuit 90 determines the most suitable target code amount for the image under processing from the value of the total code amount at the time of the statistical processing (the value of the total code amount generated in the processing of the first pass). The target code amount is set in the control circuit 18 and the control circuit 18
Then, the quantization width prediction circuit 12 is controlled to predict the optimum quantization width coefficient α for each frequency component from the determined target code amount and the total code amount at the time of the statistical processing. The optimum quantization width for each frequency component obtained by correcting with the optimum quantization width coefficient α for each frequency component is given from the quantization width prediction circuit 12 to the quantization circuit 6.
Then, the quantization of the image data (DCT transform value) for each block is performed with the optimal quantization width for each frequency component.

【0149】そして、この量子化出力をエントロピー符
号化回路8に与えて、該発生した符号を、そのブロック
での割当符号量内に収まるように符号化を進め、割当符
号量を越える場合はそのブロックでの符号化を打ち切
り、割当符号量の範囲内に符号量を収めるようにするも
のである。
The quantized output is supplied to an entropy coding circuit 8, and the generated code is subjected to coding so as to be within the allocated code amount of the block. The coding in the block is discontinued so that the code amount falls within the range of the allocated code amount.

【0150】このような構成において、撮影が行われる
と、撮像系40内の撮像素子から画像信号が出力され
る。撮像系40から出力された画像信号は、信号処理回
路60において、ディジタル信号に変換され、8×8画
素ブロック単位で読み出される。このブロック単位で読
み出されたディジタル信号の画像データは符号化回路8
0に入力される。符号化回路80に入力された画像デー
タは、符号化回路80における直交変換回路4により、
まず、各ブロック毎にDCTが行われ、各周波数成分別
の値であるDCT係数を得る。そして、この得られたD
CT係数に対し、符号化回路80における量子化回路6
により、各周波数成分毎に各周波数成分毎の予め設定さ
れた暫定量子化幅を用いて、線形量子化が行われる。
In such a configuration, when photographing is performed, an image signal is output from the image pickup device in the image pickup system 40. The image signal output from the imaging system 40 is converted into a digital signal in the signal processing circuit 60 and read out in units of 8 × 8 pixel blocks. The image data of the digital signal read in block units is encoded by an encoding circuit 8.
Input to 0. The image data input to the encoding circuit 80 is processed by the orthogonal transformation circuit 4 in the encoding circuit 80.
First, DCT is performed for each block to obtain a DCT coefficient which is a value for each frequency component. And this obtained D
For the CT coefficient, the quantization circuit 6 in the encoding circuit 80
As a result, linear quantization is performed using a provisional quantizer width preset for each frequency component for each frequency component.

【0151】量子化された変換係数は、符号化回路80
内のエントロピー符号化回路8によりハフマン符号化さ
れる。
The quantized transform coefficients are supplied to the encoding circuit 80
Are subjected to Huffman encoding by the entropy encoding circuit 8.

【0152】一方、符号化回路80内の符号量算出回路
14はエントロピー符号化回路8の出力をもとに、符号
化された画像データの符号量を計算し、符号量割当回路
20に出力する。符号化回路80内の符号量割当回路2
0は各ブロック毎に、発生した符号量を記憶する。
On the other hand, the code amount calculating circuit 14 in the coding circuit 80 calculates the code amount of the coded image data based on the output of the entropy coding circuit 8 and outputs it to the code amount allocating circuit 20. . Code amount allocating circuit 2 in coding circuit 80
0 stores the generated code amount for each block.

【0153】このような処理が制御回路90の制御のも
とに、各ブロック毎に順次、行われる。そして、1枚の
画面分のブロックの処理が終了した時点で、当該1画面
について発生した総符号量を符号量算出回路14から符
号化回路80内の量子化幅予測回路12および制御回路
90に出力させる。
Such processing is sequentially performed for each block under the control of the control circuit 90. When the processing of the block for one screen is completed, the total code amount generated for the one screen is sent from the code amount calculation circuit 14 to the quantization width prediction circuit 12 and the control circuit 90 in the coding circuit 80. Output.

【0154】制御回路90では総符号量の値から処理中
の画像に最も適した目的符号量を決定し、制御回路18
に設定する。
The control circuit 90 determines the target code amount most suitable for the image being processed from the value of the total code amount.
Set to.

【0155】この後、制御回路90の制御のもとに、信
号処理回路60では第2パス目の処理である符号化処理
に入る。これは、再度、バッファメモリ60cから画像
データを読み出し、ブロック化処理して符号化回路80
に入力することからはじめる。符号化回路80ではこの
入力された画像データを直交変換回路4に与え、この直
交変換回路4により、DCTを行い、その結果、得られ
たDCT係数を量子化回路6に与える。
Thereafter, under the control of the control circuit 90, the signal processing circuit 60 starts the encoding processing which is the processing of the second pass. This is because the image data is read out again from the buffer memory 60c, processed into blocks, and
Start by typing in. The encoding circuit 80 supplies the input image data to the orthogonal transformation circuit 4, performs DCT by the orthogonal transformation circuit 4, and supplies the obtained DCT coefficients to the quantization circuit 6.

【0156】一方、符号化回路80の量子化幅予測回路
12では第1パスでの符号化により、求められた総画像
符号量と、目的符号量とから、より適した各周波数成分
毎の量子化幅係数αを予測し、この予測値を量子化回路
6に出力する。また、符号量割当回路20は前記記憶し
ている各ブロック毎の符号量と制御回路90からの目的
総符号量とから比例配分等により、各ブロック毎の割当
符号量を決め、これを記憶する。
On the other hand, in the quantization width prediction circuit 12 of the encoding circuit 80, a more suitable quantization for each frequency component is obtained from the total image code amount and the target code amount obtained by the encoding in the first pass. The quantization width coefficient α is predicted, and the predicted value is output to the quantization circuit 6. The code amount allocating circuit 20 determines the allocated code amount for each block by proportional distribution or the like from the stored code amount for each block and the target total code amount from the control circuit 90, and stores this. .

【0157】量子化回路6においては、与えられたこの
新たな各周波数成分毎の量子化幅係数αに、量子化マト
リックスにより与えられる各周波数成分毎の重みをかけ
た補正済み量子化幅を用いて、前記直交変換回路4より
出力されるDCT変換係数を低い周波数領域から順に線
形量子化する。
In the quantization circuit 6, the corrected quantization width obtained by multiplying the given quantization width coefficient α for each frequency component by the weight for each frequency component given by the quantization matrix is used. Then, the DCT transform coefficients output from the orthogonal transform circuit 4 are linearly quantized in order from a low frequency region.

【0158】この線形量子化された係数はエントロピー
符号化回路8により、ハフマン符号化される。ここで第
2パスでの処理である符号化処理時に発生した符号量
は、先の暫定的な符号化時(第1パスでの処理である統
計処理での符号化時)に求められ、符号量割当回路20
に記憶されている各ブロックの割当符号量との比較が行
われ、これを越えた場合には、符号打切回路16がエン
トロピー符号化回路8に符号化打切りを指令する。これ
により、当該符号化中のブロックに対するエントロピー
符号化回路8での符号化処理は打切られ、そのブロック
内で、それ以降の符号化が打ち切られる。この符号化打
切りの指令は制御回路90にも送られ、制御回路90は
次のブロックに対する上述のような符号化処理制御に移
る。
The linearly quantized coefficients are Huffman-coded by the entropy coding circuit 8. Here, the code amount generated at the time of the encoding process which is the process of the second pass is obtained at the time of the above-mentioned provisional encoding (at the time of encoding at the statistical process which is the process of the first pass). Quantity allocation circuit 20
Is compared with the assigned code amount of each block stored in the above. If it exceeds this, the code truncation circuit 16 instructs the entropy coding circuit 8 to terminate the coding. As a result, the encoding process of the block being encoded in the entropy encoding circuit 8 is discontinued, and the subsequent encoding is discontinued in the block. The command to stop the encoding is also sent to the control circuit 90, and the control circuit 90 shifts to the above-described encoding processing control for the next block.

【0159】以上の手法により目的の符号量に制御され
た符号化データは順次、符号出力回路10を経由して記
録系70に出力され、記録される。
The coded data controlled to the target code amount by the above method is sequentially output to the recording system 70 via the code output circuit 10 and recorded.

【0160】以上のように最初の符号化(第1パスでの
処理)、すなわち、暫定的な量子化幅係数を用いた符号
化である統計処理時の符号化では各ブロック毎の直交変
換値を周波数成分毎に定めた暫定的な量子化幅係数を用
いて可変長符号化し、撮影した1画面分の画像について
の、暫定的量子化幅係数による発生総符号量を求め、こ
の符号量から画質を損なわない最適な圧縮率になる符号
量を目的符号量として決定し、設定すると共に、この目
的符号量と統計処理時の発生符号量とから各周波数成分
毎の最適な量子化幅係数を決定し、符号化処理(第2パ
スでの処理)時には各ブロック毎の直交変換値を前記周
波数成分毎に決定した量子化幅係数で符号化し、各ブロ
ック別の割当符号量を越えない範囲で符号化を進め、割
当符号量を越える場合にはそのブロックでの符号化を打
ち切り、次のブロックの符号化に移るようにしたので、
自動的に各画像に適した圧縮率を選択することができ
る。
As described above, in the first encoding (processing in the first pass), that is, in the encoding at the time of statistical processing, which is encoding using a provisional quantization width coefficient, the orthogonal transform value for each block is used. Is subjected to variable-length coding using a provisional quantization width coefficient determined for each frequency component, and the generated total code amount by the provisional quantization width coefficient for one captured image is calculated. The amount of code at which the optimal compression rate does not impair image quality is determined and set as the target code amount, and the optimal quantization width coefficient for each frequency component is determined from the target code amount and the code amount generated during the statistical processing. At the time of the encoding process (the process in the second pass), the orthogonal transform value for each block is encoded with the quantization width coefficient determined for each frequency component, and the allocated code amount for each block is not exceeded. Proceed with encoding and exceed the allocated code amount The case truncation coding in the block. Thus proceeds to encode the next block,
A compression ratio suitable for each image can be automatically selected.

【0161】すなわち、圧縮率選択の基準として符号化
回路により出力される符号量を用いているため、圧縮率
選択のために特別の回路を必要としない。また、同一の
ハードウェアで種々の目的符号量に制御することができ
る。
That is, since the code amount output from the encoding circuit is used as a criterion for selecting the compression ratio, no special circuit is required for selecting the compression ratio. Further, it is possible to control various target code amounts with the same hardware.

【0162】なお、この方式では先の実施例のようにY
(輝度)成分)、C(クロマ)成分(C成分は更にC
r、Cbに細分化することも可能)の色成分別に異なる
量子化マトリックスで量子化するようにしても良い。ま
た、目的符号量は記録媒体における最小記録可能枚数の
規格もあることから、予め選択可能な何種類かの目的符
号量を決めておき、発生符号量から最適と考えられる値
を選択する方式が最適である。
Note that, in this method, Y as in the previous embodiment is used.
(Luminance) component), C (chroma) component (C component is
(It is also possible to subdivide the color components into r and Cb). In addition, since the target code amount has a standard of the minimum recordable number of recording media, there is a method in which several selectable target code amounts are determined in advance, and a value considered to be optimal from the generated code amount is used. Optimal.

【0163】[0163]

【発明の効果】以上詳述したように、本発明によれば、
記録媒体に記録された可変長符号化画像信号データを復
号化し、この復号化されたデータを上記記録媒体から読
み出された輝度信号成分と色信号成分に対する各々の量
子化幅の情報に基づいて逆量子化することにより、色信
号成分の帯域幅が輝度信号成分のそれに比較して狭くて
も画質を損なうことなく、迅速な再生が可能となる。
As described in detail above, according to the present invention,
The variable-length coded image signal data recorded on the recording medium is decoded, and the decoded data is decoded based on the information of each quantization width for the luminance signal component and the chrominance signal component read from the recording medium. By inverse quantization, even if the bandwidth of the color signal component is narrower than that of the luminance signal component, rapid reproduction can be performed without deteriorating the image quality.

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

【図1】本発明の第1の実施例を示すブロック図。FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】本発明装置の要部構成例を示すブロック図。FIG. 2 is a block diagram showing a configuration example of a main part of the apparatus of the present invention.

【図3】図2の回路の動作の流れを説明するためのブロ
ック図。
FIG. 3 is a block diagram for explaining an operation flow of the circuit of FIG. 2;

【図4】再生機の構成を示すブロック図。FIG. 4 is a block diagram showing a configuration of a playback device.

【図5】再生機の構成を示すブロック図。FIG. 5 is a block diagram showing a configuration of a playback device.

【図6】本発明による電子カメラ本体の外観を示す斜視
図。
FIG. 6 is a perspective view showing the appearance of an electronic camera body according to the present invention.

【図7】1パス方式の場合の符号化回路の構成例を示す
ブロック図。
FIG. 7 is a block diagram illustrating a configuration example of an encoding circuit in the case of a one-pass method.

【図8】本発明の原理的な作用を説明するための動作遷
移図。
FIG. 8 is an operation transition diagram for explaining the principle operation of the present invention.

【図9】8×8画素に分けられたブロックのジグザグ・
スキャンを説明するための図。
FIG. 9 shows a zigzag pattern of a block divided into 8 × 8 pixels.
FIG. 4 is a diagram for explaining scanning.

【図10】従来技術を説明するための動作遷移図。FIG. 10 is an operation transition diagram for explaining a conventional technique.

【図11】本発明の別の実施例を示すブロック図。FIG. 11 is a block diagram showing another embodiment of the present invention.

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

1…電子カメラ本体、6…量子化回路、8…エントロピ
ー符号化回路、10…符号出力回路、12…量子化幅予
測回路、14…符号量算出回路、16…符号打切回路、
18,18a…制御回路、20…符号量割当回路、24
…DCPM回路、30…スイッチ、40…撮像系、48
…LCD表示器、60…信号処理回路、80…符号化回
路、70…記録系、71
DESCRIPTION OF SYMBOLS 1 ... Electronic camera main body, 6 ... Quantization circuit, 8 ... Entropy coding circuit, 10 ... Code output circuit, 12 ... Quantization width prediction circuit, 14 ... Code amount calculation circuit, 16 ... Code discontinuation circuit,
18, 18a: control circuit, 20: code amount allocating circuit, 24
... DCPM circuit, 30 ... switch, 40 ... imaging system, 48
... LCD display, 60 ... signal processing circuit, 80 ... encoding circuit, 70 ... recording system, 71

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭63−76684(JP,A) 特開 昭63−286078(JP,A) 特開 平1−292987(JP,A) 特開 平3−65886(JP,A) (58)調査した分野(Int.Cl.7,DB名) H04N 5/76 - 5/956 H04N 5/225 - 5/243 H04N 9/79 - 9/898 H04N 101:00 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-63-76684 (JP, A) JP-A-63-286078 (JP, A) JP-A 1-292987 (JP, A) JP-A-3-29 65886 (JP, A) (58) Field surveyed (Int. Cl. 7 , DB name) H04N 5/76-5/956 H04N 5/225-5/243 H04N 9/79-9/898 H04N 101: 00

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】映像信号を生成する撮影系を有し、この撮
影系により得た画像信号を、直交変換もしくは予測符号
化等を行う画像情報圧縮手段により画像データを前処理
した後、量子化手段により量子化し、この量子化出力を
可変長符号化手段によりハフマン符号化し、このハフマ
ン符号化した画像信号データを、読出し可能に記録する
記録媒体に記録して保存し、この保存された画像信号デ
ータを復号化手段により復号化して画像の再生信号とし
て得るようにした電子カメラ装置であって、 前記量子化手段は、前記前処理済み画像データについて
与えられる量子化幅を以て輝度信号成分、色信号成分別
に量子化した成分別量子化画像データを出力する機能を
持たせ、 また、 所望の圧縮率に対応する情報を入力する入力手段と、 可変長符号化手段の出力を受け、画面単位の総符号量を
求めてこれを算出符号量情報として出力する符号量算出
手段と、 前記入力手段により入力された圧縮率対応情報より、画
像当りの収めるべき総符号量の情報を与えると共に初め
に統計処理指令を発令し、統計処理が終わると符号化処
理指令を発令する制御手段と、 前記統計処理指令による実行開始時には前記制御手段か
らの総符号量の情報に基づき、該総符号量の枠に対応し
た量子化幅の予測を行って該予測した量子化幅の情報を
前記量子化手段に与え、符号化処理指令による実行開始
時には入力される前記算出符号量情報に基づき前回予測
した量子化幅の情報に対して前記総符号量の枠に収まる
よう補正した量子化幅の情報を得て、この補正量子化幅
情報を前記量子化手段に与える量子化幅予測手段と、 前記量子化幅予測手段の予測した量子化幅の情報を、輝
度信号に対応した量子化幅情報と色信号成分に対応した
量子化幅情報に分けて前記記録媒体に読出し可能に記録
すると共に、前記与えられた補正量子化幅情報での前記
量子化手段による量子化された輝度信号成分、色信号成
分別画像データを更に前記可変長符号化手段にてハフマ
ン符号化した画像信号データについてこれを入力として
受けて前 記記録媒体に読出し可能に記録する記録手段
と、 前記記録媒体に記録された可変長符号化画像信号データ
とこの可変長符号化画像信号データに関連する輝度信号
成分と色信号成分に対応する各々の量子化幅の情報を読
み出す読取手段と、 この読み出された画像信号データを復号するハフマン復
号手段と、 このハフマン復号手段により復号されたデータを 前記読
取手段により読み出された輝度信号成分と色信号成分に
対する各々の量子化幅の情報に基づいて当該量子化幅で
逆量子化する逆量子化手段と、 この逆量子化されたデータをブロック毎に逆直交変換
し、画像信号に変換して出力する出力手段とを具備し、
この出力手段からの出力画像信号を画像の再生信号とし
て得るようにしたことを特徴とする電子カメラ装置。
An imaging system for generating a video signal;
The image signal obtained by the shadow system is transformed by orthogonal transformation or prediction code.
Preprocessing image data by image information compression means
After that, it is quantized by quantization means, and this quantized output is
The Huffman coding is performed by the variable length coding means.
Record the encoded image signal data in a readable manner
Record and save on a recording medium, and save the saved image signal data.
Data is decoded by a decoding means to obtain a reproduced signal of the image.
An electronic camera device according to claim 1, wherein said quantizing means comprises:
Luminance signal component and chrominance signal component with given quantization width
Function to output quantized image data for each component
To have, also, an input unit configured to input information corresponding to a desired compression ratio, receives the output of the variable length coding means, the total code amount of each screen
Code amount calculation to obtain and output this as calculated code amount information
From the compression ratio correspondence information input by the input means.
Give information on the total amount of code to be stored per image
A statistical processing command is issued to the
Control means for issuing a processing command, and said control means at the start of execution according to said statistical processing command.
Based on the total code amount information,
Prediction of the quantization width is performed, and information of the predicted quantization width is obtained.
Start to be given to the quantization means and to be executed by an encoding process command
Sometimes a previous prediction based on the calculated code amount information input
Fit in the frame of the total code amount for the information of the quantized width
Obtain the information of the corrected quantization width and obtain the corrected quantization width
A quantization width prediction unit for providing information to the quantization unit; and information on the quantization width predicted by the quantization width prediction unit.
Quantization width information corresponding to the degree signal and color signal components
Divided into quantization width information and recorded readable on the recording medium
And at the given corrected quantization width information
The luminance signal component and the chrominance signal component quantized by the quantization means
The separated image data is further processed by the variable-length coding means
This is used as input for image signal data
Recording means for readably recorded before type recording medium receives
When the luminance signal component and a reading means reading information for each of the quantization width corresponding to the color signal component associated with the variable length coded image signal data recorded on the recording medium to the variable-length coded image signal data Huffman decoding for decoding the read image signal data
No. means and, contrary to inverse quantization in the quantization width based on the luminance signal component and information of each of the quantization width for the chrominance signal components read by said reading means data decoded by the Huffman decoding means A quantizing means, and an inverse orthogonal transform of the dequantized data for each block.
Output means for converting to an image signal and outputting the image signal,
Electronic camera equipment, characterized in that the output image signal from the output means to obtain a reproduced signal of the image.
【請求項2】映像信号を生成する撮影系を有し、この撮
影系により得た画像信号を画像データ化すると共に、こ
の画像データは所定画素単位でブロック化し、この各ブ
ロックについて順に直交変換を行って周波数成分別係数
データ化した後、量子化手段により所定の量子化幅を設
定して量子化し、この量子化出力を可変長符号化手段に
よりハフマン符号化し、このハフマン符号化した画像信
号データと前記量子化幅に対応した量子化情報を輝度信
号に対応した量子化幅情報と色信号に対応した量子化幅
情報とに分けて、読出し可能に記録する記録媒体に記録
して保存し、この保存された画像信号データを復号化手
段により復号化して画像の再生信号として得るようにし
た電子カメラ装置であって、 前記量子化手段には前記ブロック毎の周波数成分別前記
係数データを、統計処理には暫定的な量子化幅係数を用
いて低周波数成分から順に量子化を行わせ、符号化処理
時には最適量子化幅係数を用いて低周波数成分から順に
量子化を行わせる構成とし、 また、 可変長符号化手段からの符号化出力の符号量を算出する
算出手段と、 最初に統計処理を行い、その後に符号化処理を行うべく
制御すると共に、統計 処理においては前記ブロック毎の
周波数成分別前記係数データを、低周波数成分から順に
予め定めた暫定的な周波数成分別量子化幅係数を用いて
量子化を行うべく量子化手段を制御し、符号化処理時に
は前記ブロック毎の周波数成分別前記係数データを、低
周波数成分から順に周波数成分別最適量子化幅係数を用
いて量子化を行うべく量子化手段を制御すると共に、前
記算出手段から得られる前記統計処理時の発生総符号量
から画像の収めるべき最適な総符号量を決定してこれを
前記最適目的符号量とする制御手段と、 最適目的符号量および統計処理時に得られる前記算出手
段からの符号量情報から得られる画像あたりの発生した
総符号量と各ブロック別符号量とから各ブロック別の割
当符号量を決定する符号割当手段と、 前記符号化処理時に前記可変長符号化手段の出力する前
記各ブロック毎の符号化出力がそのブロックでの前記割
当符号量を超えないように符号化を打ち切る打ち切り手
段と、 前記記録媒体に記録された可変長符号化画像信号データ
と、この可変長符号化画像信号データに関連する輝度信
号成分と色信号成分に対応する各々の量子化幅の情報を
読み出す読取手段と、 この読み出された可変長符号化画像信号データを前記読
み出し、ハフマン符号を復号するハフマン復号手段と、 このハフマン復号手段により復号されたデータを前記読
取手段により読み出された輝度信号成分と色信号成分に
対する各々の量子化幅の情報に基づいて当該量子化幅で
逆量子化する逆量子化手段と、 この逆量子化されたデータをブロック毎に逆直交変換
し、画像信号に変換して出力する出力手段とを具備し、
この出力手段からの出力画像信号を画像の再生信号とし
て得るようにしたことを特徴とする電子カメラ装置。
2. An imaging system for generating a video signal.
The image signal obtained by the shadow system is converted into image data, and
Image data is divided into blocks in predetermined pixel units, and each block is
Performs orthogonal transform on the lock in order to obtain the coefficients for each frequency component.
After data conversion, a predetermined quantization width is set by the quantization means.
And quantized, and the quantized output is sent to the variable-length encoding means.
Huffman coded image signal
Signal and quantization information corresponding to the quantization width
Quantization width information corresponding to the color signal and quantization width corresponding to the color signal
Recorded on a recording medium that can be read out separately from information
And save the stored image signal data as a decryption method.
So that the decoded signal is obtained as a reproduced signal of the image.
An electronic camera device, wherein the quantizing means includes a frequency component for each block.
Uses coefficient data and provisional quantization width coefficients for statistical processing
And perform quantization in order from the low frequency component
Sometimes, using the optimal quantization width coefficient,
A configuration to perform quantization, also calculates the code amount of the coded output from the variable length coding means
Calculation means, to perform statistical processing first, and then to perform encoding processing
Control, and in the statistical processing,
The coefficient data for each frequency component is sequentially calculated from a low frequency component.
Using a predetermined provisional quantization component for each frequency component
Control the quantization means to perform quantization, and
Represents the coefficient data for each frequency component of each block,
Use the optimal quantization width coefficient for each frequency component in order from the frequency component
Control the quantization means to perform quantization,
Total code amount generated during the statistical processing obtained from the calculating means
Determine the optimal total code amount to fit the image from
A control unit for setting the optimal target code amount; and an optimal target code amount and the calculation means obtained at the time of statistical processing.
Generated per image obtained from code amount information from the stage
From the total code amount and the code amount for each block,
Code allocation means for determining the code amount, and before output from the variable-length coding means during the coding process
The encoded output of each block is
Censoring to stop encoding so as not to exceed this code amount
And a variable length coded image signal data recorded on the recording medium.
And the luminance signal associated with the variable-length coded image signal data.
The information of each quantization width corresponding to the signal component and the color signal component
Reading means for reading, and reading the read variable-length coded image signal data.
Huffman decoding means for decoding the Huffman code, and reading the data decoded by the Huffman decoding means.
To the luminance and chrominance signal components read by the
Based on the information of each quantization width,
Inverse quantization means for inverse quantization, and inverse orthogonal transform of the inversely quantized data for each block
Output means for converting to an image signal and outputting the image signal,
The output image signal from this output means is used as an image reproduction signal.
An electronic camera device characterized by being obtained by:
【請求項3】映像信号を生成する撮影系を有し、この撮
影系により得た画像信号を画像データ化すると共に、こ
の画像データは所定画素単位でブロック化し、この各ブ
ロックについて順に直交変換を行って周波数成分別係数
データ化した後、量子化手段 により所定の量子化幅を設
定して量子化し、この量子化出力を可変長符号化手段に
よりハフマン符号化し、このハフマン符号化した画像信
号データと前記量子化幅に対応する量子化情報を輝度信
号に対応した量子化幅情報と色信号に対応した量子化幅
情報とに分けて、読み出し可能に記録する記録媒体に記
録して保存し、この保存された画像信号データを復号化
手段により復号化して画像の再生信号として得るように
した電子カメラ装置であって、 前記量子化手段には前記ブロック毎の周波数成分別前記
係数データを、統計処理時には暫定的な周波数成分別量
子化幅係数を用いて低周波数成分から順に量子化を行わ
せ、符号化処理時には周波数成分別最適量子化幅係数を
用いて低周波数成分から順に量子化を行わせる構成と
し、また、可変長符号化手段からの符号化出力の符号量
を算出する算出手段と、 最初に統計処理を行い、その後に符号化処理を行うべく
制御すると共に、統計処理においては前記ブロック毎の
周波数成分別前記係数データを、低周波数成分から順に
予め定めた暫定的な周波数成分別量子化幅係数を用いて
量子化を行うべく量子化手段を制御し、符号化処理時に
は前記ブロック毎の周波数成分別前記係数データを、低
周波数成分から順に周波数成分別最適量子化幅係数を用
いて量子化を行うべく量子化手段を制御すると共に、前
記算出手段から得られる前記統計処理時の発生総符号量
から画像の収めるべき最適な総符号量を決定してこれを
前記最適目的符号量とする制御手段と、 最適目的符号量および統計処理時に得られる算出手段か
らの符号量情報から得られる画像あたりの発生した総符
号量と各ブロック別符号量とから各ブロック別の割当符
号量を決定する符号割当手段と、 前記符号化処理時に前記可変長符号化手段の出力する前
記各ブロック毎の符号化出力がそのブロックでの前記割
当符号量を超えないように符号化を打ち切る打ち切り手
段と、 記録媒体に記録されたハフマン符号化画像信号データ
と、このハフマン符号化画像データに関連する輝度信号
成分と色信号成分に対応する各々の量子化幅の情報を読
み出す読取手段と、 この読み出された画像データを復号するハフマン復号手
段と、 このハフマン復号手段により復号されたデータを前記読
取手段により読み出された輝度信号成分と色信号成分に
対する各々の 量子化幅の情報に基づいて当該量子化幅
で逆量子化する逆量子化手段と、 この逆量子化されたデータをブロック毎に逆直交変換
し、画像信号に変換して出力する出力手段とを具備しこ
の出力手段からの出力画像信号を画像の再生信号として
得るようにしたことを特徴とする電子カメラ装置。
3. An imaging system for generating a video signal.
The image signal obtained by the shadow system is converted into image data, and
Image data is divided into blocks in predetermined pixel units, and each block is
Performs orthogonal transform on the lock in order to obtain the coefficients for each frequency component.
After data conversion, a predetermined quantization width is set by the quantization means.
And quantized, and the quantized output is sent to the variable-length encoding means.
Huffman coded image signal
Signal data and quantization information corresponding to the quantization width
Quantization width information corresponding to the color signal and quantization width corresponding to the color signal
Information on a recording medium that records it in a readable manner.
Record and save and decode this saved image signal data
By means of decoding to obtain a reproduced signal of the image
An electronic camera device according to claim 1, wherein said quantizing means includes a frequency component for each block.
The coefficient data is tentatively calculated for each frequency component during statistical processing.
Quantization is performed in order from the low frequency component using the quantization width coefficient
In the encoding process, the optimal quantization width coefficient for each frequency component is
Configuration that performs quantization in order from the low frequency component using
And the code amount of the encoded output from the variable length encoding means.
Calculation means for calculating the first, statistical processing is performed first, and then encoding processing is performed.
Control, and in the statistical processing,
The coefficient data for each frequency component is sequentially calculated from a low frequency component.
Using a predetermined provisional quantization component for each frequency component
Control the quantization means to perform quantization, and
Represents the coefficient data for each frequency component of each block,
Use the optimal quantization width coefficient for each frequency component in order from the frequency component
Control the quantization means to perform quantization,
Total code amount generated during the statistical processing obtained from the calculating means
Determine the optimal total code amount to fit the image from
Control means for setting the optimum target code amount, and calculation means for obtaining the optimum target code amount and statistical processing.
Total number of generated symbols per image obtained from these code amount information
Assigned code for each block from code amount and code amount for each block
Code assigning means for determining a signal amount, and before output from the variable-length encoding means during the encoding process.
The encoded output of each block is
Censoring to stop encoding so as not to exceed this code amount
And Huffman-coded image signal data recorded on the recording medium
And a luminance signal related to this Huffman encoded image data
Read the quantization width information corresponding to the
Reading means for reading out, and a Huffman decoding means for decoding the read image data.
And reading the data decoded by the Huffman decoding means.
To the luminance and chrominance signal components read by the
Based on the information of each quantization width
Inverse quantization means for inversely quantizing the data, and inverse orthogonal transform of the inversely quantized data for each block.
Output means for converting the image signal into an image signal and outputting the image signal.
Output image signal from the output means of
An electronic camera device characterized by being obtained.
【請求項4】画像信号を生成する撮影系を有し、この撮
影系により得た1画面分の画像信号のデータをブロック
に分割し、この分割されたブロック毎に直交変換などを
行って前処理した後、量子化手段により所定の量子化幅
を設定して量子化し、この量子化出力を可変長符号化手
段によりハフマン符号化し、このハフマン符号化した画
像信号データと前記量子化幅に対応した量子化情報を輝
度信号に対応した量子化幅情報と色信号に対応した量子
化幅情報とに分けて、読み出し可能に記録する記録媒体
に記録して保存し、この保存された画像信号データを復
号化手段により復号化して画像の再生信号として得るよ
うにした子カメラ装置であって、 所望の圧縮率に対応する情報を入力する入力手段と、 可変長符号化手段の出力を受け、画面単位の総符号量を
求めてこれを算出符号量情報として出力する符号量算出
手段と、 前記入力手段により入力された圧縮率対応情報より、画
像当りの収めるべき総符号量の情報を与えると共に初め
に統計処理指令を発令し、統計処理が終わると符号化処
理指令を発令する制御手段と、 前記統計処理指令による実行開始時には前記制御手段か
らの総符号量の情報に基づき、該総符号量の枠に対応し
た量子化幅の予測を行って該予測した量子化幅の情報を
前記量子化手段に与え、符号化処理指令による実行開始
時には入力される前記算出符号量情報に基づき前回予測
した量子化幅の情報に対して前記総符号量の枠に収まる
よう補正した量子化幅の情報を得て、この補正した量子
化幅の情報を前記量子化手段に与える量子化幅予測手段
と、 前記統計処理指令による実行時に前記算出符号量情報と
前記収めるべき総符号 量の情報とに基づき、前記各ブロ
ックの割当て符号量を求める符号量割当手段と、 前記符号化処理指令による実行時、前記各ブロック毎の
前記算出符号量情報がそのブロックでの前記割当て符号
量に達すると前記可変長符号化手段の当該ブロックに対
する符号化を打切るべく制御する符号化打切手段と、 前記量子化幅予測手段の予測した量子化幅の情報を前記
記録媒体に読出し可能に記録する手段とを設けると共
に、前記量子化手段は量子化幅の情報を受けてその量子
化幅で前記前処理済み画像データを量子化する構成と
し、前記可変長符号化手段は前記打切り指令を受ける毎
に現在処理中のブロックに対する符号化を打切る構成を
有し、 前記記録媒体に記録されたハフマン符号化画像信号デー
タと、このハフマン符号化画像データに関連する輝度信
号成分と色信号成分に対応する各々の量子化幅の情報を
読み出す読取手段と、 この読み出された画像データを復号するハフマン復号手
段と、 このハフマン復号手段により復号されたデータを前記読
取手段により読み出された輝度信号成分と色信号成分に
対する各々の量子化幅の情報に基づいて当該量子化幅で
逆量子化する逆量子化手段と、 この逆量子化されたデータをブロック毎に逆直交変換
し、画像信号に変換して出力する出力手段とを具備し、
出力手段からの出力画像信号を画像の再生信号として得
るようにしたことを特徴とする電子カメラ装置。
4. An imaging system for generating an image signal.
Block image signal data for one screen obtained by shadow system
And orthogonal transform etc. is performed for each of the divided blocks.
After performing the preprocessing, the quantization means sets a predetermined quantization width.
And quantize it, and use this quantized output
Huffman-encoded image
The image signal data and the quantization information corresponding to the quantization width are illuminated.
Quantization width information corresponding to the degree signal and the quantum corresponding to the color signal.
Recording medium that can be read and recorded separately from
And save the image signal data.
Decoding means to obtain an image reproduction signal.
A Unishi other electronic camera apparatus, comprising: input means for inputting information corresponding to the desired compression ratio, receives the output of the variable length coding means, the total code amount of each screen
Code amount calculation to obtain and output this as calculated code amount information
From the compression ratio correspondence information input by the input means.
Give information on the total amount of code to be stored per image
A statistical processing command is issued to the
Control means for issuing a processing command, and said control means at the start of execution according to said statistical processing command.
Based on the total code amount information,
Prediction of the quantization width is performed, and information of the predicted quantization width is obtained.
Start to be given to the quantization means and to be executed by an encoding process command
Sometimes a previous prediction based on the calculated code amount information input
Fit in the frame of the total code amount for the information of the quantized width
Obtained information on the quantization width corrected as described above,
Quantization width prediction means for providing quantization width information to the quantization means
And the calculated code amount information at the time of execution by the statistical processing command
Based on the information of the total code amount to be stored,
Code amount allocating means for determining an allocated code amount of a block, and when executing by the encoding processing command,
The calculated code amount information is the allocated code in the block.
When the amount reaches the value, the corresponding block of the variable length
Coding abort means for controlling to abort the coding to be performed, and information of the quantization width predicted by the quantization width prediction means.
Means for readable recording on a recording medium is provided.
The quantization means receives the information of the quantization width and
A configuration for quantizing the preprocessed image data with a quantization width
The variable length encoding means receives the truncation command
Configuration to abort coding for the block currently being processed
Has, recorded on the recording medium Huffman encoded image signal data
And the luminance signal associated with this Huffman encoded image data.
The information of each quantization width corresponding to the signal component and the color signal component
Reading means for reading, and a Huffman decoding means for decoding the read image data
And reading the data decoded by the Huffman decoding means.
To the luminance and chrominance signal components read by the
Based on the information of each quantization width,
Inverse quantization means for inverse quantization, and inverse orthogonal transform of this inversely quantized data for each block
Output means for converting to an image signal and outputting the image signal,
The output image signal from the output means is obtained as an image reproduction signal.
An electronic camera device characterized in that:
【請求項5】映像信号を生成する撮影系を有し、この撮
影系により得られた画像信号を、A/D変換し、輝度信
号成分と色信号成分に分離し、直交変換を行う直交変換
手段により前処理した後、量子化手段により量子化し、
この量子化出力をハフマン符号化手段によりハフマン符
号化し、このハフマン符号化した画像信号データを、読
み出し可能に記録する記録媒体に記録して保存するよう
にした電子カメラ装置であって、 前記直交変換された画像データを量子化する量子化手段
と、輝度信号成分と色 信号成分に対する量子化幅の情報
を各々出力する量子化幅設定手段と、この量子化幅設定
手段より出力された前記量子化幅の情報を前記記録媒体
に読み出し可能に記録する手段とを設けると共に、 前記量子化手段は前記量子化幅設定手段から出力される
量子化幅の情報を受けてその量子化幅で前記前処理済み
画像信号データを量子化する構成を有し、記録媒体に記
録されたハフマン符号化画像信号データとこの画像信号
データに関連する輝度信号成分と色信号成分に対応する
各々の量子化幅の情報を読み出す読取手段と、この読み
出された画像データを復号するハフマン復号手段と、こ
のハフマン復号手段により復号されたデータを前記読取
手段により読み出された輝度信号成分と色信号成分に対
する各々の量子化幅の情報に基づいて当該量子化幅で逆
量子化する逆量子化手段と、この逆量子化されたデータ
をブロック毎に逆DCT変換し、画像信号に変換して出
力する出力手段とを具備し、 この出力手段からの出力画像信号を画像の再生信号とし
て得るようにしたことを特徴とする電子カメラ装置。
5. An imaging system for generating a video signal.
A / D conversion is performed on the image signal obtained by the shadow system, and the luminance signal is converted.
Orthogonal transform that separates signal components and color signal components and performs orthogonal transform
After pre-processing by means, it is quantized by quantization means,
This quantized output is converted to a Huffman code by Huffman encoding means.
The Huffman coded image signal data is read.
Record and save on a recordable recording medium
An electronic camera device according to claim 1, wherein said orthogonally transformed image data is quantized.
And information on the quantization width for the luminance signal component and the chrominance signal component
And a quantization width setting means for respectively outputting
Means for outputting the information on the quantization width output from the recording medium
Means for recording in a readable manner, and the quantization means is output from the quantization width setting means.
Received the quantization width information and pre-processed with the quantization width
It has a configuration for quantizing image signal data and records it on a recording medium.
Huffman coded image signal data recorded and this image signal
Corresponding to luminance and chrominance signal components related to data
Reading means for reading information of each quantization width;
Huffman decoding means for decoding the output image data,
Reading the data decoded by the Huffman decoding means
The luminance signal component and the chrominance signal component read by the
Based on the information of each quantization width
Inverse quantization means for quantizing, and the inversely quantized data
Is subjected to inverse DCT for each block, converted to an image signal, and output.
And an output means for force, and the output image signal from the output means, the reproduction signal of the image
An electronic camera device characterized by being obtained by:
JP37182199A 1990-04-25 1999-12-27 Electronic camera device Expired - Lifetime JP3192133B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP37182199A JP3192133B2 (en) 1990-04-25 1999-12-27 Electronic camera device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP10754690 1990-04-25
JP2-107546 1990-04-25
JP37182199A JP3192133B2 (en) 1990-04-25 1999-12-27 Electronic camera device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2404233A Division JP3038022B2 (en) 1990-04-19 1990-12-20 Electronic camera device

Publications (2)

Publication Number Publication Date
JP2000152172A JP2000152172A (en) 2000-05-30
JP3192133B2 true JP3192133B2 (en) 2001-07-23

Family

ID=26447570

Family Applications (1)

Application Number Title Priority Date Filing Date
JP37182199A Expired - Lifetime JP3192133B2 (en) 1990-04-25 1999-12-27 Electronic camera device

Country Status (1)

Country Link
JP (1) JP3192133B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1752485A1 (en) 2005-08-08 2007-02-14 Alveo AG Soft polyolefin foams with high heat resistance

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1752485A1 (en) 2005-08-08 2007-02-14 Alveo AG Soft polyolefin foams with high heat resistance

Also Published As

Publication number Publication date
JP2000152172A (en) 2000-05-30

Similar Documents

Publication Publication Date Title
JP3012698B2 (en) Image data encoding apparatus and encoding method
US5291282A (en) Image data coding apparatus and method capable of controlling amount of codes
JP3085465B2 (en) Image data encoding apparatus and encoding method
JP3093233B2 (en) Image encoding apparatus and method
US6144763A (en) Method and apparatus for compression coding of image data representative of a color image and digital camera including the same
JPH0832037B2 (en) Image data compression device
EP1377071A1 (en) Image processing device, image processing method, image processing program, and recording medium
JP2952000B2 (en) Image data encoding apparatus and encoding method
JP2959831B2 (en) Image data encoding device
JP3795932B2 (en) Image data compression encoding method and apparatus
JP3192133B2 (en) Electronic camera device
JP3406924B2 (en) Image processing apparatus and method
JPWO2002080575A1 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP3038022B2 (en) Electronic camera device
JP3037961B2 (en) Electronic camera device and image data encoding device
JP4430731B2 (en) Digital camera and photographing method
JPH0537901A (en) Image recorder
JPH04114564A (en) Picture signal recording device
JPH04179371A (en) Device and method for encoding picture data
JP3055954B2 (en) Electronic still camera
JPH04207266A (en) Encoder and encoding method for image data
JPH04207352A (en) Encoding device and encoding method for image data
JPH07115668A (en) Device and method for compressing image
JP3095788B2 (en) Electronic camera device
JPH0481176A (en) Electronic still camera

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20010501

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

Free format text: PAYMENT UNTIL: 20080525

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090525

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100525

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100525

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20110525

Year of fee payment: 10

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110525

Year of fee payment: 10