JP2008113070A - Imaging device and imaging method - Google Patents

Imaging device and imaging method Download PDF

Info

Publication number
JP2008113070A
JP2008113070A JP2006293067A JP2006293067A JP2008113070A JP 2008113070 A JP2008113070 A JP 2008113070A JP 2006293067 A JP2006293067 A JP 2006293067A JP 2006293067 A JP2006293067 A JP 2006293067A JP 2008113070 A JP2008113070 A JP 2008113070A
Authority
JP
Japan
Prior art keywords
unit
compression
image data
data
value
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.)
Pending
Application number
JP2006293067A
Other languages
Japanese (ja)
Inventor
Katsuya Kosuge
克也 小菅
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.)
Sony Corp
Original Assignee
Sony Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sony Corp filed Critical Sony Corp
Priority to JP2006293067A priority Critical patent/JP2008113070A/en
Publication of JP2008113070A publication Critical patent/JP2008113070A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To pick up an image of high quality by an imaging device through fast imaging operation. <P>SOLUTION: Image data generated through imaging and digital conversion by an imaging element are compressed by a RAW compressing unit 41 by an irreversible compression method and temporarily held as compressed image data in a memory. A RAW expanding unit 42 expands the compressed image data read out of the memory, and a signal processing function including a gain adjusting part 44 in a digital image processing circuit 14 processes the image data expanded by the RAW expanding unit 42 as specified. A compression/expansion control unit 74 automatically switches the compressing operation of the RAW compressing unit 41 and the expanding operation of the RAW expanding unit 42 into off states when a gain application quantity of the gain adjusting part 44 becomes equal to or more than a predetermined gain threshold. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、固体撮像素子を用いて画像を撮像する撮像装置および撮像方法に関し、デジタル変換された画像データをメモリに一時的に格納した後、そのメモリから画像データを読み出して処理する場合に適した撮像装置および撮像方法に関する。   The present invention relates to an image pickup apparatus and an image pickup method for picking up an image using a solid-state image pickup device, and is suitable for a case where digitally converted image data is temporarily stored in a memory and then the image data is read from the memory and processed. The present invention relates to an imaging apparatus and an imaging method.

近年、デジタルスチルカメラやデジタルビデオカメラなど、固体撮像素子を用いて撮像し、撮像画像をデジタルデータとして保存することができる撮像装置が広く普及している。このような撮像装置では、撮像素子の多画素化や、装置の高機能化・高性能化が進んでいる。特に、撮像素子の多画素化が進むと、撮像信号の処理負荷が増大するが、そのような撮像装置であっても、操作にストレスがないように高速で処理できることが求められている。   In recent years, imaging apparatuses capable of capturing an image using a solid-state imaging device and storing the captured image as digital data, such as a digital still camera and a digital video camera, have become widespread. In such an image pickup apparatus, the number of pixels of the image pickup element is increased and the function and performance of the apparatus are improved. In particular, as the number of pixels of the image sensor increases, the processing load of the image pickup signal increases. However, even such an image pickup apparatus is required to be able to process at high speed so that there is no stress in operation.

また、一般的なデジタル方式の撮像装置では、撮像素子から得られたRAW(生)画像データを、一旦SDRAM(Synchronous Dynamic Random Access Memory)などの画像メモリに格納した後、そこから読み出して各種の信号処理などを施す構成となっているものが多い。例えば、インタレース読み出し方式の撮像素子を用いた場合など、複数フィールドで1フレームのキャプチャが終了するタイプの撮像装置では、各フィールドのデータを画像メモリに格納してから、フレームのデータを生成することが必須である。また、カメラ信号処理部のラインメモリの規模を抑制するために、1H(水平同期期間)の長さの数分の一程度のディレイラインのみを用いて、全画面を部分的に(例えば、縦方向に数本の短冊状に)処理していくような処理系を持つ場合にも、少なくともその処理の前に全画面のデータをメモリに格納しておく必要がある。   Further, in a general digital imaging apparatus, RAW (raw) image data obtained from an imaging element is temporarily stored in an image memory such as an SDRAM (Synchronous Dynamic Random Access Memory), and then read from the image memory. Many are configured to perform signal processing and the like. For example, in the case of an imaging device that captures one frame in a plurality of fields, such as when using an interlace readout type imaging device, the data of each field is stored in the image memory, and then the frame data is generated. It is essential. Further, in order to suppress the size of the line memory of the camera signal processing unit, the entire screen is partially (for example, vertically) using only a delay line that is a fraction of the length of 1H (horizontal synchronization period). Even in the case of a processing system that performs processing (in the form of several strips in the direction), it is necessary to store the data of the entire screen in the memory at least before the processing.

しかし、このような構成の撮像装置では、撮像素子の画素数が増加し、RAW画像データの容量が大きくなるほど、データ転送の負荷が高まり、画像メモリの書き込み/読み出しに要する時間も長くなる。従って、記録処理に要する時間を短縮しようとすると、伝送周波数を高くするなどしてバス帯域を拡大することが必要となり、装置コストが増大するという問題があった。また、画素数が多いほど、RAW画像データを格納するメモリの容量も大きくなるという問題もあった。そこで、内部バスにおける伝送時に、RAW画像データを圧縮して伝送することで、処理を高速化することが考えられている。   However, in the imaging apparatus having such a configuration, as the number of pixels of the imaging element increases and the capacity of the RAW image data increases, the load of data transfer increases and the time required for writing / reading of the image memory also increases. Therefore, if the time required for the recording process is to be shortened, it is necessary to increase the bus band by increasing the transmission frequency, and there is a problem that the apparatus cost increases. There is also a problem that the larger the number of pixels, the larger the capacity of the memory for storing the RAW image data. Therefore, it is considered to increase the processing speed by compressing and transmitting RAW image data during transmission on the internal bus.

なお、上記に関連する技術として、撮像画像をJPEG(Joint Photographic Experts Group)方式などによる圧縮データではなく、RAW画像データのままで記録媒体に記録する機能を備えた撮像装置も実現されている。例えば、RAW画像データをハフマンテーブルを利用した可逆的圧縮手法により圧縮して記録する機能を備え、そのハフマンテーブルを色チャネルごとに最適化するようにしたものがあった(例えば、特許文献1参照)。また、RAW画像データを圧縮して記録するRAW圧縮モードに設定した際には、通常圧縮モードで使用するRAW画像データの補間処理部をバイパスするようにしたものもあった(例えば、特許文献2参照)。なお、特許文献1は、RAW画像データを可変長符号化方式で圧縮するものであり、また、特許文献1および2の双方とも、内部バスの帯域を削減するためにRAW画像データを圧縮するものではない。
特開2004−40300号公報(段落番号〔0019〕〜〔0028〕、図2) 特開2003−125209号公報(段落番号〔0027〕〜〔0037〕、図1)
As a technique related to the above, an imaging apparatus having a function of recording a captured image on a recording medium as RAW image data instead of compressed data by a JPEG (Joint Photographic Experts Group) method or the like is realized. For example, there is a function of compressing and recording RAW image data by a reversible compression method using a Huffman table, and optimizing the Huffman table for each color channel (for example, see Patent Document 1). ). In addition, when a RAW compression mode for compressing and recording RAW image data is set, an interpolation processing unit for RAW image data used in the normal compression mode is bypassed (for example, Patent Document 2). reference). Patent Document 1 compresses RAW image data using a variable-length encoding method, and both Patent Documents 1 and 2 compress RAW image data in order to reduce the bandwidth of the internal bus. is not.
Japanese Patent Laid-Open No. 2004-40300 (paragraph numbers [0019] to [0028], FIG. 2) JP 2003-125209 A (paragraph numbers [0027] to [0037], FIG. 1)

ところで、最近のデジタル方式の撮像装置に対して、撮像感度を高めることが強く要望されており、このために撮像で得られた画像データに対してゲインを印加して増幅する機会が多くなっている。しかし、一般的に画像データに強いゲインを印加すると、ノイズが多く現れて、画質が悪化してしまう。   By the way, there is a strong demand for a recent digital imaging device to increase imaging sensitivity. For this reason, there are many opportunities to amplify the image data obtained by imaging by applying gain. Yes. However, generally, when a strong gain is applied to image data, a lot of noise appears and image quality deteriorates.

特に、上記のように、撮像装置の内部バスにおいてRAW画像データを圧縮して伝送する手法、さらには、その圧縮方式として非可逆圧縮でかつ可変長符号化方式を採った場合には、従来では問題とならなかった圧縮による画質劣化が、ゲイン印加量を大きくすることで目立ってしまうことがあるという問題があった。   In particular, as described above, when a method of compressing and transmitting RAW image data on the internal bus of the imaging apparatus, and further employing a lossy compression and variable length encoding method as the compression method, There has been a problem that image quality deterioration due to compression, which has not been a problem, may become noticeable by increasing the gain application amount.

さらに、画像データ圧縮においては、その画像データに高周波成分が多く含まれる場合や、ダイナミックレンジが広い画像のデータが入力された場合にも、画質劣化に対する影響が強くなるという問題もあった。   Further, in the image data compression, there is a problem that the influence on the image quality deterioration becomes strong even when the image data includes many high-frequency components or when image data having a wide dynamic range is input.

本発明はこのような点に鑑みてなされたものであり、高速な撮像動作により品質の高い画像を撮像できるようにした撮像装置および撮像方法を提供することを目的とする。   The present invention has been made in view of the above points, and an object thereof is to provide an imaging apparatus and an imaging method capable of capturing a high-quality image by a high-speed imaging operation.

本発明では上記課題を解決するために、固体撮像素子を用いて画像を撮像する撮像装置において、前記固体撮像素子により撮像されてデジタル変換された画像データを非可逆圧縮方式により圧縮し、圧縮画像データを出力する圧縮部と、前記圧縮部から出力された前記圧縮画像データを一時的に保持するメモリと、前記メモリから読み出された前記圧縮画像データを伸張する伸張部と、前記伸張部により伸張された画像データに対して、ゲイン印加処理を含む所定の信号処理を施す信号処理部と、前記圧縮部および前記伸張部にそれぞれ圧縮動作および伸張動作を実行させるオン状態と、前記圧縮動作および前記伸張動作を停止させて入力画像データをそのまま出力させるオフ状態とを切り替え、前記信号処理部におけるゲイン印加量が所定のゲインしきい値以上である場合に、前記圧縮動作および前記伸張動作を前記オフ状態に切り替える圧縮/伸張制御部とを有することを特徴とする撮像装置が提供される。   In the present invention, in order to solve the above-described problem, in an imaging apparatus that captures an image using a solid-state imaging device, the image data captured by the solid-state imaging device and converted into a digital image is compressed by an irreversible compression method. A compression unit that outputs data; a memory that temporarily holds the compressed image data output from the compression unit; a decompression unit that decompresses the compressed image data read from the memory; and the decompression unit. A signal processing unit that performs predetermined signal processing including gain application processing on the decompressed image data; an ON state that causes the compression unit and the decompression unit to perform a compression operation and a decompression operation; and the compression operation and The expansion operation is stopped and the off state in which the input image data is output as it is is switched, and the gain application amount in the signal processing unit is predetermined. If it is more than the gain threshold, the imaging device is provided characterized by having a said switch the compression operation and the decompression operation to the off-state compression / decompression control unit.

このような撮像装置では、固体撮像素子により撮像されてデジタル変換された画像データは、圧縮部によって非可逆圧縮方式により圧縮され、圧縮画像データとしてメモリに一時的に保持される。伸張部は、このメモリから読み出された圧縮画像データを伸張し、信号処理部は、伸張部により伸張された画像データに対して、ゲイン印加処理を含む所定の信号処理を施す。圧縮/伸張制御部は、圧縮部および伸張部にそれぞれ圧縮動作および伸張動作を実行させるオン状態と、圧縮動作および伸張動作を停止させて入力画像データをそのまま出力させるオフ状態とを切り替える機能を備えており、信号処理部におけるゲイン印加量が所定のゲインしきい値以上である場合には、圧縮部の圧縮動作および伸張部の伸張動作をオフ状態に自動的に切り替える。   In such an imaging apparatus, image data captured by a solid-state imaging device and digitally converted is compressed by a compression unit using an irreversible compression method, and temporarily stored in a memory as compressed image data. The expansion unit expands the compressed image data read from the memory, and the signal processing unit performs predetermined signal processing including gain application processing on the image data expanded by the expansion unit. The compression / decompression control unit has a function of switching between an on state in which the compression unit and the decompression unit respectively perform a compression operation and an expansion operation, and an off state in which the compression operation and the decompression operation are stopped and input image data is output as it is. When the gain application amount in the signal processing unit is greater than or equal to a predetermined gain threshold value, the compression operation of the compression unit and the expansion operation of the expansion unit are automatically switched to an off state.

本発明の撮像装置によれば、固体撮像素子により撮像されてデジタル変換された画像データが、圧縮部によって圧縮された状態でメモリに一時的に格納され、その圧縮画像データがメモリから読み出されて伸張部により伸張され、信号処理部によって処理されるので、画像データの書き込みおよび読み出しのためのメモリへのアクセス時間が短縮され、処理を高速化することができる。これとともに、圧縮/伸張制御部の制御により、信号処理部におけるゲイン印加量が所定のゲインしきい値以上である場合には、圧縮部の圧縮動作および伸張部の伸張動作がオフ状態に切り替えられるので、圧縮処理によって生じる画質劣化を抑制できる。   According to the imaging apparatus of the present invention, the image data captured and digitally converted by the solid-state imaging device is temporarily stored in the memory in a state compressed by the compression unit, and the compressed image data is read from the memory. Since the data is decompressed by the decompression unit and processed by the signal processing unit, the access time to the memory for writing and reading the image data is shortened, and the processing can be speeded up. At the same time, under the control of the compression / expansion control unit, when the gain application amount in the signal processing unit is equal to or greater than a predetermined gain threshold value, the compression operation of the compression unit and the expansion operation of the expansion unit are switched to the off state. Therefore, it is possible to suppress image quality degradation caused by the compression process.

以下、本発明の実施の形態を図面を参照して詳細に説明する。
図1は、本発明の実施の形態に係る撮像装置の要部構成を示すブロック図である。
図1に示す撮像装置は、デジタルスチルカメラあるいはデジタルビデオカメラなどとして実現されるものである。この撮像装置は、光学ブロック11、ドライバ11a、撮像素子12、タイミングジェネレータ(TG)12a、アナログ/デジタル(A/D)変換回路13、デジタル画像処理回路14、画像メモリ15、ディスプレイ16、マイクロコンピュータ17、入力部18、メモリカードI/F(インタフェース)19、メモリカード19a、フラッシュメモリ20、および内蔵メモリ21を具備する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing a main configuration of an imaging apparatus according to an embodiment of the present invention.
The imaging apparatus shown in FIG. 1 is realized as a digital still camera or a digital video camera. The imaging apparatus includes an optical block 11, a driver 11a, an imaging device 12, a timing generator (TG) 12a, an analog / digital (A / D) conversion circuit 13, a digital image processing circuit 14, an image memory 15, a display 16, and a microcomputer. 17, an input unit 18, a memory card I / F (interface) 19, a memory card 19 a, a flash memory 20, and a built-in memory 21.

光学ブロック11は、被写体からの光を撮像素子12に集光するためのレンズ、レンズを移動させてフォーカス合わせやズーミングを行うための駆動機構、シャッタ機構、アイリス機構などを具備している。ドライバ11aは、マイクロコンピュータ17からの制御信号に基づいて、光学ブロック11内の各機構の駆動を制御する。   The optical block 11 includes a lens for condensing light from the subject on the image sensor 12, a drive mechanism for moving the lens to perform focusing and zooming, a shutter mechanism, an iris mechanism, and the like. The driver 11 a controls driving of each mechanism in the optical block 11 based on a control signal from the microcomputer 17.

撮像素子12は、例えば、CCD(Charge Coupled Device)型、CMOS(Complementary Metal Oxide Semiconductor)型などの固体撮像素子であり、TG12aから出力されるタイミング信号に基づいて駆動され、被写体からの入射光を電気信号に変換する。TG12aは、マイクロコンピュータ17の制御の下でタイミング信号を出力する。   The image pickup device 12 is a solid-state image pickup device such as a CCD (Charge Coupled Device) type or a CMOS (Complementary Metal Oxide Semiconductor) type, and is driven based on a timing signal output from the TG 12a to receive incident light from a subject. Convert to electrical signal. The TG 12 a outputs a timing signal under the control of the microcomputer 17.

A/D変換回路13は、画像信号に対するA/D変換を含むアナログフロントエンド処理を実行する回路である。このA/D変換回路13は、撮像素子12から出力された画像信号に対して、CDS(Correlated Double Sampling)処理によりS/N(Signal/Noise)比を良好に保つようにサンプルホールドを行い、その信号に対してA/D変換を行ってデジタル画像データを出力する。   The A / D conversion circuit 13 is a circuit that executes analog front-end processing including A / D conversion for an image signal. The A / D conversion circuit 13 performs a sample hold on the image signal output from the image sensor 12 so as to maintain a good S / N (Signal / Noise) ratio by CDS (Correlated Double Sampling) processing. A / D conversion is performed on the signal to output digital image data.

デジタル画像処理回路14は、A/D変換回路13からの画像データに対して、AF(Auto Focus)、AE(Auto Exposure)、各種画質補正処理のための検波処理や、検波情報を基にマイクロコンピュータ17から出力される信号に応じた各種画質補正処理を施す。また、ディスプレイ16での表示用のデータを生成する機能や、JPEG方式などを用いた画像データの圧縮符号化/伸張復号化処理機能なども備える。   The digital image processing circuit 14 performs a detection process for AF (Auto Focus), AE (Auto Exposure), various image quality correction processes on the image data from the A / D conversion circuit 13, and a micro based on the detection information. Various image quality correction processes according to the signal output from the computer 17 are performed. In addition, a function of generating data for display on the display 16 and a function of compressing / decompressing image data using a JPEG method or the like are also provided.

画像メモリ15は、例えばSDRAMなどからなり、デジタル画像処理回路14との間でメモリバス15aを介して接続されている。画像メモリ15は、デジタル画像処理回路14で処理される画像データを一時的に記憶する。なお、後述するように、画像メモリ15とデジタル画像処理回路14との間でメモリバス15aを介して受け渡される画像データの一部は、デジタル画像処理回路14に設けられたRAW画像データの圧縮・伸張機能によって圧縮される。   The image memory 15 is made of, for example, SDRAM, and is connected to the digital image processing circuit 14 via a memory bus 15a. The image memory 15 temporarily stores image data processed by the digital image processing circuit 14. As will be described later, a part of the image data transferred between the image memory 15 and the digital image processing circuit 14 via the memory bus 15a is a compression of the RAW image data provided in the digital image processing circuit 14. • Compressed by the decompression function.

ディスプレイ16は、例えばLCD(Liquid Crystal Display)などからなり、デジタル画像処理回路14から出力される表示用の画像データを基に画像を表示する。このディスプレイ16には、撮像素子12によって現在撮像中の画像や、メモリカード19aに記録された画像データに基づく再生画像などが表示される。   The display 16 is composed of an LCD (Liquid Crystal Display), for example, and displays an image based on display image data output from the digital image processing circuit 14. The display 16 displays an image that is currently being picked up by the image pickup device 12, a reproduced image based on the image data recorded on the memory card 19a, and the like.

マイクロコンピュータ17は、この撮像装置全体を統括的に制御する。このマイクロコンピュータ17には、フラッシュメモリ20および内蔵メモリ21が接続されており、マイクロコンピュータ17は例えば、フラッシュメモリ20に格納された各種プログラムを読み込んで実行し、必要に応じてフラッシュメモリ20内の各種データを参照する。また、揮発性メモリである内蔵メモリ21は、マイクロコンピュータ17でのプログラム実行時のワークエリアとして利用される。   The microcomputer 17 comprehensively controls the entire imaging apparatus. A flash memory 20 and a built-in memory 21 are connected to the microcomputer 17. The microcomputer 17 reads and executes various programs stored in the flash memory 20, for example, and stores the programs in the flash memory 20 as necessary. Refer to various data. The built-in memory 21 that is a volatile memory is used as a work area when the microcomputer 17 executes a program.

入力部18は、各種の入力スイッチに対するユーザによる操作入力に応じた制御信号を、マイクロコンピュータ17に出力する。この入力スイッチとしては、例えば、シャッタレリーズボタン、各種メニュー選択や動作モードの設定などを行うための十字キーなどが設けられる。   The input unit 18 outputs a control signal corresponding to an operation input by the user to various input switches to the microcomputer 17. As this input switch, for example, a shutter release button, a cross key for selecting various menus, setting an operation mode, and the like are provided.

メモリカードI/F19は、メモリカード19aが装着されるカードスロット(図示せず)を備え、装着されたメモリカード19aに対するデータの書き込みや、このメモリカード19aからのデータの読み出しを行う。メモリカード19aは、フラッシュメモリなどの不揮発性メモリからなり、主に画像ファイルを記憶する。なお、画像ファイルが格納される記録媒体としては、メモリカード19aの他に、例えば、磁気テープ、光ディスクなどの可搬型記録媒体、あるいはHDD(Hard Disk Drive)などの内蔵記録媒体が用いられてもよい。   The memory card I / F 19 includes a card slot (not shown) in which the memory card 19a is inserted, and performs data writing to the memory card 19a inserted and data reading from the memory card 19a. The memory card 19a is composed of a nonvolatile memory such as a flash memory, and mainly stores image files. In addition to the memory card 19a, for example, a portable recording medium such as a magnetic tape or an optical disk, or a built-in recording medium such as an HDD (Hard Disk Drive) may be used as a recording medium for storing an image file. Good.

この撮像装置では、撮像素子12によって受光されて光電変換された信号が、順次A/D変換回路13に供給され、デジタル画像データに変換される。デジタル画像処理回路14は、A/D変換回路13から供給された画像データを画質補正処理し、処理後の画像データを表示用の画像信号に変換して、ディスプレイ16に出力する。これによりディスプレイ16には、現在撮像中の画像がディスプレイ16が表示され、撮影者はこの画像を視認して画角を確認できるようになる。   In this image pickup apparatus, signals received and photoelectrically converted by the image pickup device 12 are sequentially supplied to the A / D conversion circuit 13 and converted into digital image data. The digital image processing circuit 14 performs image quality correction processing on the image data supplied from the A / D conversion circuit 13, converts the processed image data into an image signal for display, and outputs it to the display 16. As a result, the display 16 displays the currently captured image on the display 16, and the photographer can visually recognize this image and check the angle of view.

また、この状態から、入力部18のシャッタレリーズボタンが押下されることなどにより、マイクロコンピュータ17に対して画像の記録が指示されると、デジタル画像処理回路14は画質補正処理後の画像データを圧縮符号化処理し、画像ファイルを生成する。なお、画質補正処理や圧縮符号化が施されていないRAW画像データのファイルを生成できるようにしてもよい。マイクロコンピュータ17は、デジタル画像処理回路14で生成された画像ファイルをメモリカードI/F19に供給し、メモリカード19aに記憶させる。   In this state, when the microcomputer 17 is instructed to record an image by pressing the shutter release button of the input unit 18, the digital image processing circuit 14 displays the image data after the image quality correction processing. A compression encoding process is performed to generate an image file. Note that a RAW image data file that has not been subjected to image quality correction processing or compression encoding may be generated. The microcomputer 17 supplies the image file generated by the digital image processing circuit 14 to the memory card I / F 19 and stores it in the memory card 19a.

なお、メモリカード19aには記録する画像ファイルとしては、静止画像ファイルだけでなく、動画像ファイルが適用されてもよい。デジタル画像処理回路14は、静止画像ファイルの記録時には、1フレーム分の画像データを圧縮符号化処理して出力し、動画像ファイルの記録時には、画像データを連続的に圧縮符号化して出力する。   The image file to be recorded in the memory card 19a may be a moving image file as well as a still image file. The digital image processing circuit 14 compresses and encodes one frame of image data when recording a still image file, and outputs the compressed and encoded image data continuously when recording a moving image file.

図2は、デジタル画像処理回路の内部構成を示すブロック図である。
デジタル画像処理回路14は、RAW圧縮部41、RAW伸張部42、検波部43、ゲイン調整部44、ホワイトバランス(WB)調整/YC変換部45、および解像度変換/圧縮伸張部46を具備する。
FIG. 2 is a block diagram showing the internal configuration of the digital image processing circuit.
The digital image processing circuit 14 includes a RAW compression unit 41, a RAW expansion unit 42, a detection unit 43, a gain adjustment unit 44, a white balance (WB) adjustment / YC conversion unit 45, and a resolution conversion / compression expansion unit 46.

RAW圧縮部41は、A/D変換回路13から出力されたRAW画像データを圧縮し、メモリバス15aを介して画像メモリ15に供給する。なお、実際には、A/D変換回路13から供給される画像データに対して、撮像素子12における欠陥画素の信号補正処理や、レンズの周辺光量落ちを補正するシェーディング処理などの前処理が施された後、その処理後のRAW画像データがRAW圧縮部41に供給されるようにしてもよい。   The RAW compression unit 41 compresses the RAW image data output from the A / D conversion circuit 13 and supplies it to the image memory 15 via the memory bus 15a. In practice, the image data supplied from the A / D conversion circuit 13 is subjected to preprocessing such as signal correction processing for defective pixels in the image sensor 12 and shading processing for correcting a loss of peripheral light of the lens. Then, the processed RAW image data may be supplied to the RAW compression unit 41.

RAW伸張部42は、画像メモリ15からメモリバス15aを介して読み出した、圧縮されたRAW画像データを伸張して、検波部43およびゲイン調整部44に出力する。
なお、これらのRAW圧縮部41およびRAW伸張部42は、マイクロコンピュータ17からのオン/オフを指示する制御信号に応じて、入力信号に対して圧縮/伸張処理を行うか否かを切り替えることが可能になっている。
The RAW decompression unit 42 decompresses the compressed RAW image data read from the image memory 15 via the memory bus 15 a and outputs the decompressed RAW image data to the detection unit 43 and the gain adjustment unit 44.
Note that the RAW compression unit 41 and the RAW expansion unit 42 can switch whether to perform compression / expansion processing on the input signal in accordance with a control signal instructing on / off from the microcomputer 17. It is possible.

検波部43は、RAW伸張部42から供給される画像データを基に、AF、AE、AWB(Auto White Balance)などのための信号検波処理を行い、検波結果をマイクロコンピュータ17に出力する。マイクロコンピュータ17は、この検波結果に基づいて、AFのためのフォーカスレンズ制御信号や、AEのための露出制御信号、AWBのためのゲイン制御信号などを算出する。   The detection unit 43 performs signal detection processing for AF, AE, AWB (Auto White Balance), etc. based on the image data supplied from the RAW expansion unit 42, and outputs the detection result to the microcomputer 17. Based on the detection result, the microcomputer 17 calculates a focus lens control signal for AF, an exposure control signal for AE, a gain control signal for AWB, and the like.

ゲイン調整部44は、マイクロコンピュータ17からのゲイン制御信号に基づき、RAW伸張部42から供給される画像データに対して、フレームごとにゲインを印加する。
WB調整/YC変換部45は、ゲイン調整部44によってゲインが調整された画像データに対して、マイクロコンピュータ17からの制御信号に応じたWBゲインを印加する。さらに、WB調整後の画像データをY(輝度)信号とC(色差)信号とに変換する。
The gain adjustment unit 44 applies gain to each frame of the image data supplied from the RAW expansion unit 42 based on a gain control signal from the microcomputer 17.
The WB adjustment / YC conversion unit 45 applies a WB gain according to a control signal from the microcomputer 17 to the image data whose gain has been adjusted by the gain adjustment unit 44. Further, the image data after WB adjustment is converted into a Y (luminance) signal and a C (color difference) signal.

解像度変換/圧縮伸張部46は、WB調整/YC変換部45によってYC変換された画像データの解像度を、マイクロコンピュータ17からの制御信号に応じた解像度に変換する。例えば、ディスプレイ16に適合した解像度に変換して、表示用の画像データを生成する。また、メモリカード19aへの記録用に指定された解像度に変換し、その変換後の画像データに対して、JPEGなどの所定の符号化方式に従って圧縮符号化処理を施す。圧縮符号化処理により生成された画像データは、マイクロコンピュータ17を介してメモリカードI/F19に供給される。さらに、メモリカードI/F19からマイクロコンピュータ17を介して供給される画像データに対して伸張復号化処理を施し、表示用の解像度に変換してディスプレイ16に出力することもできる。   The resolution conversion / compression / decompression unit 46 converts the resolution of the image data YC converted by the WB adjustment / YC conversion unit 45 into a resolution corresponding to a control signal from the microcomputer 17. For example, the image data for display is generated by converting to a resolution suitable for the display 16. In addition, the image data is converted to a resolution designated for recording on the memory card 19a, and the image data after the conversion is subjected to compression encoding processing according to a predetermined encoding method such as JPEG. The image data generated by the compression encoding process is supplied to the memory card I / F 19 via the microcomputer 17. Furthermore, the image data supplied from the memory card I / F 19 via the microcomputer 17 can be expanded and decoded to be converted into a display resolution and output to the display 16.

表示処理部47は、例えばNTSC(National Television Standards Committee)エンコーダなどとして構成され、解像度変換/圧縮伸張部46によってディスプレイ16向けに解像度が変換された画像データを基に、ディスプレイ16に画像を表示するための画像信号を生成して、ディスプレイ16に出力する。また、マイクロコンピュータ17から供給される合成画像データを、解像度変換/圧縮伸張部46からの画像データに合成することもできる。例えば、撮像画像の輝度のヒストグラムを合成して表示させることができる。   The display processing unit 47 is configured as an NTSC (National Television Standards Committee) encoder, for example, and displays an image on the display 16 based on the image data whose resolution is converted for the display 16 by the resolution conversion / compression / decompression unit 46. An image signal for generating the image is generated and output to the display 16. Further, the composite image data supplied from the microcomputer 17 can be combined with the image data from the resolution conversion / compression / decompression unit 46. For example, a luminance histogram of the captured image can be synthesized and displayed.

なお、このデジタル画像処理回路14において、ゲイン調整部44によってゲイン調整された画像データを、WB調整/YC変換部45、解像度変換/圧縮伸張部46および表示処理部47によって処理していく過程では、処理中の画像データがメモリバス15aを介して適宜画像メモリ15に書き込まれ、またそこから読み出される。   In the digital image processing circuit 14, the image data gain-adjusted by the gain adjustment unit 44 is processed by the WB adjustment / YC conversion unit 45, the resolution conversion / compression / decompression unit 46, and the display processing unit 47. The image data being processed is appropriately written into the image memory 15 via the memory bus 15a, and is read out therefrom.

このように、A/D変換回路13から出力された画像データをデジタル画像処理回路14が処理する際には、処理対象のデータを適宜画像メモリ15に書き込み、そこから必要なデータを読み出して処理が行われる。ここで、デジタル画像処理回路14におけるRAW画像データの入力位置にRAW圧縮部41を設けたことにより、メモリバス15aを通じて画像メモリ15に伝送されるRAW画像データのデータ量、および、そのデータを画像メモリ15から読み出し、メモリバス15aを通じてデジタル画像処理回路14に伝送する際のデータ量を、ともに低減することができる。   As described above, when the digital image processing circuit 14 processes the image data output from the A / D conversion circuit 13, the processing target data is appropriately written in the image memory 15, and necessary data is read therefrom and processed. Is done. Here, by providing the RAW compression unit 41 at the input position of the RAW image data in the digital image processing circuit 14, the amount of RAW image data transmitted to the image memory 15 through the memory bus 15a, and the data as an image Both the amount of data when reading from the memory 15 and transmitting to the digital image processing circuit 14 through the memory bus 15a can be reduced.

これにより、撮像動作中のメモリバス15aの伝送負荷を軽減し、画像メモリ15に対する書き込み/読み出し処理に要する時間が短縮される。特に、RAW圧縮部41およびRAW伸張部42における圧縮/伸張の処理をできるだけ簡単にすることで、処理時間の短縮効果を高めることができる。また、メモリバス15a上の伝送周波数を低減して、消費電力を抑制することもできる。   Thereby, the transmission load of the memory bus 15a during the imaging operation is reduced, and the time required for the writing / reading processing with respect to the image memory 15 is shortened. In particular, by simplifying the compression / expansion processing in the RAW compression unit 41 and the RAW expansion unit 42 as much as possible, the effect of shortening the processing time can be enhanced. Further, the transmission frequency on the memory bus 15a can be reduced to suppress power consumption.

また、画像メモリ15の容量も小さくすることができる。また、同じ容量であれば、画像メモリ15の領域を他の処理に利用する、複数フレーム分のRAW画像データを格納して、連写できる枚数を増やす、あるいは連写速度を向上させるなど、高画質化・高機能化に寄与することもできる。従って、撮像やデータ記録に必要な時間が短くされた、高性能かつ小型、低コストの撮像装置を実現できる。   In addition, the capacity of the image memory 15 can be reduced. Further, if the capacity is the same, the area of the image memory 15 is used for other processing, RAW image data for a plurality of frames is stored, the number of continuous shots is increased, or the continuous shooting speed is improved. It can also contribute to higher image quality and higher functionality. Therefore, it is possible to realize a high-performance, small-sized and low-cost imaging device in which the time required for imaging and data recording is reduced.

本実施の形態において、このRAW圧縮部41およびRAW伸張部42は、後述するように、固定長の符号化が可能で、かつ、画像品質を良好に保つことができ、しかも比較的簡単な処理で実現できる非可逆圧縮/伸張手法を採用している。固定長で符号化することで、メモリバス15aにおける伝送負荷や、画像メモリ15上に必要な画像データの格納領域の容量を安定的に低減でき、また、画像メモリ15における読み出し/書き込みの制御処理を単純化できる。また、圧縮/伸張処理を簡単にし、高速化することで、撮像動作が確実に高速化される。   In the present embodiment, as will be described later, the RAW compression unit 41 and the RAW expansion unit 42 can perform fixed-length encoding, can maintain good image quality, and can be processed relatively easily. Employs a lossy compression / decompression technique that can be realized with By encoding at a fixed length, it is possible to stably reduce the transmission load on the memory bus 15a and the capacity of the image data storage area on the image memory 15, and read / write control processing in the image memory 15 Can be simplified. In addition, since the compression / decompression process is simplified and speeded up, the imaging operation is reliably speeded up.

ところで、画像データに対して非可逆圧縮を施した場合には、基本的に、その後に伸張した画像データにおいて画質が劣化することは避けられない。特に、通常は視認するのが困難な程度の画質劣化しか生じない場合であっても、伸張後の画像データに対してゲインを印加した場合には、そのゲイン印加量が大きくなるに従って、画質劣化が目立ってしまうことがある。   By the way, when irreversible compression is performed on image data, it is inevitable that the image quality is basically deteriorated in the image data expanded thereafter. In particular, even when only image quality deterioration that is normally difficult to visually recognize occurs, when gain is applied to the decompressed image data, image quality deterioration occurs as the gain application amount increases. May stand out.

本実施の形態の撮像装置では、撮像感度を高くした場合には、マイクロコンピュータ17の制御により、デジタル画像処理回路14内のゲイン調整部44で入力画像データに印加されるゲインの量が高められ、この場合には圧縮による画質劣化が無視できない程度となる可能性がある。そこで、本実施の形態では、ゲインの印加量が高い場合には、RAW圧縮部41およびRAW伸張部42において圧縮/伸張処理を行わず、入力画像をそのまま出力するように制御することで、画質の劣化を防止する。   In the imaging apparatus of the present embodiment, when the imaging sensitivity is increased, the amount of gain applied to the input image data by the gain adjusting unit 44 in the digital image processing circuit 14 is increased under the control of the microcomputer 17. In this case, there is a possibility that image quality deterioration due to compression cannot be ignored. Therefore, in the present embodiment, when the amount of gain applied is high, the RAW compression unit 41 and the RAW expansion unit 42 do not perform compression / expansion processing, and control to output the input image as it is. To prevent deterioration.

また、画像データを圧縮した際には、一般的に、入力画像が高周波成分を多く含む場合や、入力画像のダイナミックレンジが広い場合にも、画質劣化が生じやすい。特に、本実施の形態で採用している圧縮手法のように、複数の画素単位で圧縮率が変更され得る固定長符号化を行う場合には、高周波成分が多いほど、またダイナミックレンジが広いほど、圧縮率が高くなって、画質劣化が生じやすくなる。   In addition, when image data is compressed, image quality deterioration generally tends to occur even when the input image contains many high-frequency components or when the input image has a wide dynamic range. In particular, as in the compression method employed in the present embodiment, when performing fixed-length encoding in which the compression rate can be changed in units of a plurality of pixels, the higher the high-frequency component and the wider the dynamic range, The compression rate is increased, and image quality is likely to deteriorate.

そこで、本実施の形態の撮像装置では、さらに、撮像画像の高周波成分やダイナミックレンジを考慮して、RAW圧縮部41およびRAW伸張部42における圧縮/伸張処理の動作を制御する。   Therefore, in the imaging apparatus of the present embodiment, the operation of compression / expansion processing in the RAW compression unit 41 and the RAW expansion unit 42 is further controlled in consideration of the high-frequency component and dynamic range of the captured image.

図3は、RAW圧縮部およびRAW伸張部の動作を制御するためにマイクロコンピュータが備える機能を示すブロック図である。
マイクロコンピュータ17は、AE制御部71、AF制御部72、合成画像生成部73、および圧縮/伸張制御部74を具備する。
FIG. 3 is a block diagram showing functions of the microcomputer for controlling the operations of the RAW compression unit and the RAW expansion unit.
The microcomputer 17 includes an AE control unit 71, an AF control unit 72, a composite image generation unit 73, and a compression / decompression control unit 74.

AE制御部71は、検波部43によって検波された輝度に基づいて、露出調整機能に対する現在の制御値(露出制御値)が適正であるか否かを判定し、適正でない場合には、露出制御値を最適な値となるように更新する。また、AE制御部71は、検波部43からの1フレームごと(または1フレーム内の所定領域ごと)の輝度の積分値に基づいて、上記の判定処理を行ってもよい。また、AE制御部71は、検波部43による撮像画像データに基づく検波値ではなく、撮像装置に別途設けられた明るさ検出器による検出結果を基に、あるいはこの検出結果と検波部43による検波値の双方を基に、露出制御値を算出してもよい。   The AE control unit 71 determines whether or not the current control value (exposure control value) for the exposure adjustment function is appropriate based on the luminance detected by the detection unit 43. If not, the exposure control is performed. Update the value to the optimum value. Further, the AE control unit 71 may perform the above determination process based on the integral value of the luminance for each frame (or for each predetermined region in one frame) from the detection unit 43. In addition, the AE control unit 71 is not based on the detection value based on the captured image data by the detection unit 43 but based on the detection result by the brightness detector separately provided in the imaging device, or the detection result and detection by the detection unit 43. The exposure control value may be calculated based on both values.

このような露出制御状態の判定は、静止画像の撮像時には、例えば、入力部18におけるシャッタレリーズボタンが半押し状態とされた場合に実行される。また、動画像の撮像時には、少なくとも動画像データの記録中に随時(例えば一定時間ごとに)実行される。また、静止画像の撮像時であっても、露出制御状態の判定を一定時間ごとに行うようにしてもよい。   Such determination of the exposure control state is executed when a still image is captured, for example, when the shutter release button in the input unit 18 is half-pressed. Further, at the time of capturing a moving image, it is executed at least during recording of moving image data (for example, at regular intervals). Even when a still image is captured, the exposure control state may be determined at regular intervals.

AE制御部71は、露出状態を制御するために、光学ブロック11内のアイリスの開度やシャッタの速度(露光時間)を制御するための露出機構制御信号と、ゲイン調整部44におけるゲイン印加量を制御するためのゲイン制御信号とを出力する。AE制御部71は、基本的には、撮影シーンが暗く、アイリスやシャッタ速度を制御してもなお十分な明るさが得られない場合に、ゲイン調整部44に対してゲインを印加するように指示する。なお、露出機構制御信号は、ドライバ11aおよびTG12aに供給される。また、ゲイン制御信号は、ゲイン調整部44に出力されるとともに、圧縮/伸張制御部74にも供給される。   The AE control unit 71 controls the exposure state, the exposure mechanism control signal for controlling the opening degree of the iris and the shutter speed (exposure time) in the optical block 11, and the gain application amount in the gain adjustment unit 44. And a gain control signal for controlling. The AE control unit 71 basically applies a gain to the gain adjustment unit 44 when the shooting scene is dark and sufficient brightness cannot be obtained even by controlling the iris and shutter speed. Instruct. The exposure mechanism control signal is supplied to the driver 11a and the TG 12a. The gain control signal is output to the gain adjustment unit 44 and also supplied to the compression / decompression control unit 74.

AF制御部72は、検波部43によって検波された高周波成分に基づいて、光学ブロック11内のフォーカスレンズを駆動するためのフォーカスレンズ制御信号を演算する。ここで、検波部43は、例えば、入力画像データにローパスフィルタ処理を施し、処理後のデータを1フレームごと(または1フレーム内の所定領域ごと)に積分して、その積分値を高周波成分として出力する。   The AF control unit 72 calculates a focus lens control signal for driving the focus lens in the optical block 11 based on the high frequency component detected by the detection unit 43. Here, for example, the detection unit 43 performs low-pass filter processing on the input image data, integrates the processed data for each frame (or for each predetermined region in one frame), and uses the integrated value as a high frequency component. Output.

AF制御部72は、例えば、シャッタレリーズボタンが半押しされた場合や、一定時間ごとに、フォーカス合わせの処理を実行する。フォーカス合わせは、例えば、フォーカスレンズを少しずつ移動させてその都度高周波成分を取得し、高周波成分が最も多くなるようにフォーカスレンズを移動させることが行われる。   For example, the AF control unit 72 performs a focusing process when the shutter release button is half-pressed or at regular intervals. The focusing is performed, for example, by moving the focus lens little by little to acquire a high frequency component each time and moving the focus lens so that the high frequency component is maximized.

合成画像生成部73は、表示処理部47において画像上に合成する合成画像のデータを生成する。その例として、検波部43から1フレーム中の輝度ごとの頻度を示すヒストグラム(輝度ヒストグラム)を取得して、その輝度ヒストグラムを表す合成画像のデータを生成する。撮影者による操作入力により輝度ヒストグラムの表示が要求されると、その時点での輝度ヒストグラムの合成画像データが表示処理部47に出力される。これにより撮影者は、ディスプレイ16に表示された輝度ヒストグラムを視認し、撮像画像の輝度分布を認識することができる。   The composite image generation unit 73 generates composite image data to be combined on the image in the display processing unit 47. As an example, a histogram (luminance histogram) indicating the frequency for each luminance in one frame is acquired from the detector 43, and composite image data representing the luminance histogram is generated. When display of the luminance histogram is requested by an operation input by the photographer, the combined image data of the luminance histogram at that time is output to the display processing unit 47. Thereby, the photographer can visually recognize the luminance histogram displayed on the display 16 and recognize the luminance distribution of the captured image.

圧縮/伸張制御部74は、AE制御部71からのゲイン制御信号、検波部43からの高周波成分および輝度ヒストグラムに基づいて、RAW圧縮部41およびRAW伸張部42における圧縮/伸張処理のオン/オフを制御する。この制御処理手順については、次の図4において詳しく説明する。   The compression / expansion control unit 74 turns on / off the compression / expansion processing in the RAW compression unit 41 and the RAW expansion unit 42 based on the gain control signal from the AE control unit 71, the high frequency component from the detection unit 43, and the luminance histogram. To control. This control processing procedure will be described in detail with reference to FIG.

図4は、圧縮/伸張制御部による制御処理手順を示すフローチャートである。
〔ステップS1〕圧縮/伸張制御部74は、AE制御部71から出力されている最新のゲイン制御信号を取得する。
FIG. 4 is a flowchart showing a control processing procedure by the compression / decompression control unit.
[Step S1] The compression / decompression control unit 74 acquires the latest gain control signal output from the AE control unit 71.

〔ステップS2〕圧縮/伸張制御部74は、取得したゲイン制御信号に基づくゲイン量と、あらかじめ設定されたゲイン量のしきい値とを比較する。ゲイン制御信号に基づくゲイン量がしきい値未満である場合には、ステップS3の処理を実行し、ゲイン制御信号に基づくゲイン量がしきい値以上である場合には、ステップS9の処理を実行する。   [Step S2] The compression / decompression controller 74 compares the gain amount based on the acquired gain control signal with a preset gain amount threshold value. If the gain amount based on the gain control signal is less than the threshold value, the process of step S3 is executed. If the gain amount based on the gain control signal is equal to or greater than the threshold value, the process of step S9 is executed. To do.

〔ステップS3〕圧縮/伸張制御部74は、検波部43によって検波された最新の高周波成分を取得する。上述したように、高周波成分の量は、例えば、入力画像データにローパスフィルタ処理を施したデータを1フレームごと(または1フレーム内の所定領域ごと)に積分した値などとして取得される。   [Step S3] The compression / expansion control unit 74 acquires the latest high-frequency component detected by the detection unit 43. As described above, the amount of the high frequency component is acquired as, for example, a value obtained by integrating data obtained by performing low-pass filter processing on input image data for each frame (or for each predetermined region in one frame).

〔ステップS4〕圧縮/伸張制御部74は、取得した高周波成分の量と、あらかじめ設定された高周波成分のしきい値とを比較する。取得した高周波成分の量がしきい値未満である場合には、ステップS5の処理を実行し、取得した高周波成分の量がしきい値以上である場合には、ステップS9の処理を実行する。   [Step S4] The compression / expansion control unit 74 compares the amount of the acquired high frequency component with a preset threshold value of the high frequency component. When the amount of the acquired high frequency component is less than the threshold value, the process of step S5 is executed. When the amount of the acquired high frequency component is equal to or greater than the threshold value, the process of step S9 is executed.

〔ステップS5〕圧縮/伸張制御部74は、検波部43によって検波された最新の輝度ヒストグラムを取得する。
〔ステップS6〕圧縮/伸張制御部74は、取得した輝度ヒストグラムを基に、撮像シーンのダイナミックレンジを演算する。
[Step S5] The compression / decompression control unit 74 acquires the latest luminance histogram detected by the detection unit 43.
[Step S6] The compression / decompression control unit 74 calculates the dynamic range of the imaging scene based on the acquired luminance histogram.

ここで、図5は、ステップS6でのダイナミックレンジの演算手法について説明するための図である。
図5(A)および(B)では、ステップS5で取得される輝度ヒストグラムの例を示している。圧縮/伸張制御部74は、輝度ヒストグラムを取得すると、その頻度(すなわち画素数)が所定のしきい値Pth(ただし、Pth>0)以上となる最小輝度値と最大輝度値とを検出し、それらの最小輝度値と最大輝度値との差分をダイナミックレンジとする。なお、図5の例では、(B)の輝度ヒストグラムを持つ画像より、(A)の輝度ヒストグラムを持つ画像の方が、より広いダイナミックレンジを持っている。
Here, FIG. 5 is a diagram for describing the dynamic range calculation method in step S6.
5A and 5B show examples of luminance histograms acquired in step S5. When acquiring the luminance histogram, the compression / decompression control unit 74 detects a minimum luminance value and a maximum luminance value whose frequency (that is, the number of pixels) is equal to or higher than a predetermined threshold value Pth (where Pth> 0), A difference between the minimum luminance value and the maximum luminance value is defined as a dynamic range. In the example of FIG. 5, the image having the luminance histogram (A) has a wider dynamic range than the image having the luminance histogram (B).

以下、図4に戻って説明する。
〔ステップS7〕圧縮/伸張制御部74は、算出したダイナミックレンジと、あらかじめ設定されたダイナミックレンジのしきい値とを比較する。算出したダイナミックレンジがしきい値未満である場合には、ステップS8の処理を実行し、算出したダイナミックレンジがしきい値以上である場合には、ステップS9の処理を実行する。
Hereinafter, description will be made with reference back to FIG.
[Step S7] The compression / decompression control unit 74 compares the calculated dynamic range with a preset dynamic range threshold. If the calculated dynamic range is less than the threshold value, the process of step S8 is executed. If the calculated dynamic range is equal to or greater than the threshold value, the process of step S9 is executed.

〔ステップS8〕圧縮/伸張制御部74は、RAW圧縮部41による圧縮処理機能およびRAW伸張部42による伸張処理機能を、ともにオン状態とする。
〔ステップS9〕圧縮/伸張制御部74は、RAW圧縮部41による圧縮処理機能およびRAW伸張部42による伸張処理機能を、ともにオフ状態(すなわち、入力画像データをそのまま出力させる状態)とする。
[Step S8] The compression / decompression control unit 74 turns on both the compression processing function by the RAW compression unit 41 and the expansion processing function by the RAW expansion unit 42.
[Step S9] The compression / decompression control unit 74 sets both the compression processing function by the RAW compression unit 41 and the decompression processing function by the RAW expansion unit 42 to an off state (that is, a state in which input image data is output as it is).

なお、以上の図4の処理は、例えば、A/D変換回路13から1フレーム分の画像データが出力されるごとに実行される。また、例えば静止画像の撮像時には、画像記録前のモニタリング状態では、RAW圧縮部41およびRAW伸張部42を常にオン状態(あるいは常にオフ状態)とし、シャッタレリーズボタンが半押しされた状態で、上記処理によりRAW圧縮部41およびRAW伸張部42のオン/オフの状態を制御するようにしてもよい。また、動画像の撮像時には、同様に、記録待機状態では常にオン状態(あるいは常にオフ状態)とし、記録開始から終了までの期間において、上記処理によりオン/オフの状態を制御するようにしてもよい。   The above-described processing of FIG. 4 is executed each time image data for one frame is output from the A / D conversion circuit 13, for example. For example, when capturing a still image, in the monitoring state before image recording, the RAW compression unit 41 and the RAW expansion unit 42 are always on (or always off), and the shutter release button is half-pressed. The on / off state of the RAW compression unit 41 and the RAW expansion unit 42 may be controlled by processing. Similarly, when a moving image is picked up, the recording standby state is always on (or always off), and the on / off state is controlled by the above process during the period from the start to the end of recording. Good.

また、例えば、画質を優先する撮像モードと速度を優先する撮像モードとで、オン状態またはオフ状態で固定する制御処理と、上記処理によるオン/オフ状態の可変制御処理とを使い分けるようにしてもよい。例えば、画質を優先する撮像モードでは常にオフ状態とし、速度を優先する撮像モードでは、上記処理によりオン/オフ状態を制御するようにしてもよい。また、高速に連写を行う撮像モード(連写モード)においてのみ、上記処理によりオン/オフ状態を制御するようにしてもよい。   In addition, for example, in the imaging mode that prioritizes image quality and the imaging mode that prioritizes speed, the control processing that is fixed in the on state or the off state and the variable control processing in the on / off state by the above processing may be used separately. Good. For example, the imaging mode that prioritizes image quality may always be in the off state, and in the imaging mode that prioritizes speed, the on / off state may be controlled by the above processing. In addition, the on / off state may be controlled by the above processing only in an imaging mode (continuous shooting mode) in which continuous shooting is performed at high speed.

また、例えば、撮像素子12の出力回路などに画素加算を行う機能が設けられた場合や、撮像素子12にその受光面の中央領域の画素信号のみを出力する機能が設けられている場合など、A/D変換回路13から出力される画像データの解像度が変化するような場合には、その解像度に応じて、オン状態またはオフ状態で固定する制御処理と、上記処理によるオン/オフ状態の可変制御処理とを使い分けるようにしてもよい。例えば、解像度が低い場合には常にオフ状態とし、解像度が一定値以上となった場合に、上記処理によるオン/オフ状態の制御を行うようにしてもよい。また、A/D変換回路13から出力される画像データのフレームレートが可変である場合にも、そのフレームレートに応じて、オン状態またはオフ状態で固定する制御処理と、上記処理によるオン/オフ状態の可変制御処理とを使い分けるようにしてもよい。   In addition, for example, when the function of performing pixel addition is provided in the output circuit of the image sensor 12, or when the function of outputting only the pixel signal of the central region of the light receiving surface is provided in the image sensor 12, etc. When the resolution of the image data output from the A / D conversion circuit 13 changes, a control process that is fixed in an on state or an off state according to the resolution, and a variable on / off state by the above process. You may make it use a control process properly. For example, when the resolution is low, it is always in the off state, and when the resolution becomes a certain value or more, the on / off state control by the above processing may be performed. In addition, even when the frame rate of the image data output from the A / D conversion circuit 13 is variable, the control processing is fixed in the on state or the off state in accordance with the frame rate, and the on / off state by the above processing. You may make it use properly the variable control process of a state.

さらに、上記のステップS2,S4,S7におけるしきい値は、基本的には、RAW圧縮部41およびRAW伸張部42での圧縮/伸張処理による画質変化の特性に応じて決定されるが、これらのしきい値の設定をユーザの操作に応じて変更できるようにしてもよい。また、例えば、上述したシャッタレリーズボタンの半押しの有無や、記録要求の有無、各種撮像モードの設定、A/D変換回路13から出力される画像データの解像度、フレームレートなどに応じて、上記の各しきい値の設定が自動的に変更されるようにしてもよい。例として、連写モードでは、その他の撮像モードと比較して各しきい値の値を高く設定することで、所望の連写周期内にデジタル画像処理回路14内のフレームごとの処理を確実に実行させることが可能になる。   Further, the threshold values in the above steps S2, S4, and S7 are basically determined according to the characteristics of image quality change by the compression / expansion processing in the RAW compression unit 41 and the RAW expansion unit 42. The threshold value may be changed according to the user's operation. Further, for example, depending on whether the shutter release button described above is half-pressed, whether there is a recording request, various imaging mode settings, the resolution of image data output from the A / D conversion circuit 13, the frame rate, etc. The threshold values may be automatically changed. For example, in the continuous shooting mode, each threshold value is set higher than in the other imaging modes, so that processing for each frame in the digital image processing circuit 14 is ensured within a desired continuous shooting period. It becomes possible to execute.

以上のような圧縮/伸張制御部74の制御により、撮像画像データに対するゲイン量が一定値以上となる条件、撮像画像データの高周波成分の量が一定値以上となる条件、撮像画像データのダイナミックレンジが一定値以上となる条件のうち、少なくとも1つの条件を満たした場合には、RAW圧縮部41およびRAW伸張部42の圧縮/伸張機能がオフ状態とされる。これにより、メモリバス15aを介した画像メモリ15へのRAW画像データの書き込みおよび画像メモリ15からのRAW画像データの読み出しに要する時間を短縮して、処理を高速化し、かつ消費電力を低減するという効果を奏しながらも、圧縮/伸張処理により発生し得る画質劣化を防止できる。   By the control of the compression / decompression control unit 74 as described above, the condition that the gain amount for the captured image data is a certain value or more, the condition that the amount of the high frequency component of the captured image data is a certain value or more, the dynamic range of the captured image data When at least one of the conditions in which the value is equal to or greater than a certain value is satisfied, the compression / decompression function of the RAW compression unit 41 and the RAW expansion unit 42 is turned off. This shortens the time required for writing RAW image data to the image memory 15 and reading RAW image data from the image memory 15 via the memory bus 15a, thereby speeding up the process and reducing power consumption. While achieving the effect, it is possible to prevent image quality deterioration that may occur due to compression / decompression processing.

また、圧縮/伸張制御部74では、AE制御部71からのゲイン制御信号や、AF制御のために検波された高周波成分、ディスプレイ16への表示のために検波される輝度ヒストグラムなど、従来の撮像装置の内部において利用されていた情報を用いて、圧縮/伸張機能のオン/オフが制御される。従って、圧縮/伸張機能のオン/オフ制御を行うために従来の撮像装置の内部構成を大幅に変更する必要がなくなり、撮像装置の開発・製造コストを抑制することができる。   The compression / expansion control unit 74 also performs conventional imaging such as a gain control signal from the AE control unit 71, a high-frequency component detected for AF control, and a luminance histogram detected for display on the display 16. On / off of the compression / decompression function is controlled using information used in the apparatus. Therefore, it is not necessary to significantly change the internal configuration of the conventional imaging device in order to perform the on / off control of the compression / decompression function, and the development / manufacturing cost of the imaging device can be suppressed.

次に、本実施の形態で適用されるRAW画像データの圧縮/伸張手法について説明する。本実施の形態では、以下で説明するように、固定長の符号化が可能で、かつ、画像品質を良好に保つことができ、しかも比較的簡単な処理で実現できる非可逆圧縮/伸張手法を採用する。   Next, the RAW image data compression / decompression technique applied in the present embodiment will be described. In this embodiment, as will be described below, a lossy compression / decompression method that can perform fixed-length encoding, maintain good image quality, and can be realized with relatively simple processing. adopt.

ここで、固定長の符号化を可能とすることで、画像メモリ15に対して読み書きするRAW画像データの帯域を一定に保つことができ、メモリバス15aにおける伝送負荷を安定的に低減できる。また、固定長の符号化がなされることで、画像メモリ15から検波部43にデータを読み出す際の読み出しアドレス指定などの処理が単純化される。   Here, by enabling encoding of fixed length, the bandwidth of RAW image data to be read from and written to the image memory 15 can be kept constant, and the transmission load on the memory bus 15a can be stably reduced. In addition, by performing fixed-length encoding, processing such as reading address designation when data is read from the image memory 15 to the detection unit 43 is simplified.

なお、以下の例では、RAW画像データ信号を1画素当たり14ビット、量子化語長を7ビット固定とし、同一色成分を持つ水平方向の16画素分を、1ブロックの符号化データに変換する。なお、例えば、14ビットのデータは、画像メモリ15において16ビット分の領域を占有する。上記のように16画素を1ブロックとすると、1ブロックに対応するRAW画像データを圧縮せずに画像メモリ15に記録した場合、256ビット分の領域を占有するが、本実施の形態では、このような記録領域を128ビット分に圧縮でき、1/2の圧縮率を達成できることになる。   In the following example, the raw image data signal is fixed at 14 bits per pixel, the quantization word length is fixed at 7 bits, and 16 horizontal pixels having the same color component are converted into encoded data of one block. . For example, 14-bit data occupies a 16-bit area in the image memory 15. As described above, assuming that 16 pixels are one block, when RAW image data corresponding to one block is recorded in the image memory 15 without being compressed, an area of 256 bits is occupied. Such a recording area can be compressed to 128 bits, and a compression ratio of 1/2 can be achieved.

図6は、RAW圧縮部の内部構成を示すブロック図である。
図6に示すように、RAW圧縮部41は、折れ線圧縮部101、ブロック化部102、最大/最小検出部103、最小値ラッチ部104、最大値ラッチ部105、最小値アドレスラッチ部106、最大値アドレスラッチ部107、減算器108および109、量子化器110、量子化データバッファ111、およびパッキング部112を備えている。
FIG. 6 is a block diagram showing an internal configuration of the RAW compression unit.
As shown in FIG. 6, the RAW compression unit 41 includes a polygonal line compression unit 101, a blocking unit 102, a maximum / minimum detection unit 103, a minimum value latch unit 104, a maximum value latch unit 105, a minimum value address latch unit 106, a maximum value, A value address latch unit 107, subtracters 108 and 109, a quantizer 110, a quantized data buffer 111, and a packing unit 112 are provided.

折れ線圧縮部101は、入力された14ビットのRAW画像データを、折れ線を用いた近似により11ビットのデータに非線形で圧縮する。この折れ線圧縮部101は、この後の圧縮手順の前に、できるだけ階調を下げておくことで、全体的な圧縮効率を向上させることを目的として設けられている。このため、目的とする圧縮率によっては、省略されてもよい。なお、この場合には、後の図9で説明するRAW伸張部42の出力段に設けられる逆折れ線変換部についても、省略する必要がある。   The polygonal line compression unit 101 nonlinearly compresses the input 14-bit RAW image data into 11-bit data by approximation using a polygonal line. The broken line compression unit 101 is provided for the purpose of improving the overall compression efficiency by reducing the gradation as much as possible before the subsequent compression procedure. For this reason, it may be omitted depending on the target compression rate. In this case, it is also necessary to omit the reverse broken line conversion unit provided at the output stage of the RAW expansion unit 42 described later with reference to FIG.

ここで、図7は、折れ線圧縮部で用いられる折れ線の例を示す図である。
図7では、4つの点で分割された5通りの傾きを持つ直線により、入力データの階調を変換する例を示している。この例では、人間の視覚特性に合わせて、入力データが小さいほど、すなわち暗いほど(または色がうすいほど)、高い階調を割り当てるようにしている。このような折れ線は、例えば色成分ごとに用意し、入力画素の色成分ごとに切り替えて利用してもよい。
Here, FIG. 7 is a figure which shows the example of the broken line used in a broken line compression part.
FIG. 7 shows an example in which the gradation of the input data is converted by straight lines having five inclinations divided by four points. In this example, in accordance with human visual characteristics, a higher gradation is assigned as input data is smaller, that is, darker (or lighter in color). Such a broken line may be prepared for each color component, for example, and may be used by switching for each color component of the input pixel.

折れ線圧縮部101では、例えば、このような折れ線を用いて、入力データの階調を変換した後、変換後のデータを8で除算(すなわち3ビット分下位にシフト)して、11ビットデータに圧縮する。このとき、捨てられる下位ビットは、例えば四捨五入する。あるいは、折れ線圧縮部101では、以上のような演算に基づく、入力データと圧縮後の出力データとを対応付けて記憶したROMテーブルを用意し、このROMテーブルに従って入出力データの変換が行われてもよい。   In the polygonal line compression unit 101, for example, after converting the gradation of the input data using such a polygonal line, the converted data is divided by 8 (that is, shifted downward by 3 bits) to become 11-bit data. Compress. At this time, the discarded lower bits are rounded off, for example. Alternatively, the polygonal line compression unit 101 prepares a ROM table that stores the input data and the compressed output data in association with each other based on the above calculation, and the input / output data is converted according to the ROM table. Also good.

以下、図6に戻って説明する。
ブロック化部102は、折れ線圧縮部101から出力されたデータを、水平方向に隣接する16画素分の同色成分画素からなるブロックに分離し、分離したブロックごとに出力する。これにより、ブロック内のデータの相関が強くなり、この後の量子化処理による画質劣化を抑制することができる。
Hereinafter, the description will be returned to FIG.
The block forming unit 102 divides the data output from the polygonal line compression unit 101 into blocks composed of the same color component pixels for 16 pixels adjacent in the horizontal direction, and outputs the blocks for each separated block. Thereby, the correlation of the data in a block becomes strong, and the image quality deterioration by subsequent quantization processing can be suppressed.

例えば、ベイヤ配列の撮像素子12が用いられた場合、出力データには、R成分とGr成分の繰り返しと、B成分とGb成分の繰り返しとが、1ラインごとに出現する。例として、ブロック化部102への入力データに、R0,Gr0,R1,Gr1,……,R15,Gr15のように、R成分とGr成分が繰り返し現れる場合には、R0,R1,R2,……,R15,Gr0,Gr1,……,Gr15のように、同色成分の画素が16個連続して現れるように、出力順序を変換して、ブロック化する。   For example, when the Bayer array image sensor 12 is used, in the output data, the repetition of the R component and the Gr component and the repetition of the B component and the Gb component appear for each line. As an example, when the R component and the Gr component repeatedly appear in the input data to the blocking unit 102 such as R0, Gr0, R1, Gr1,..., R15, Gr15, R0, R1, R2,. .., R15, Gr0, Gr1,..., Gr15, the output order is changed so that 16 pixels of the same color component appear continuously, and the blocks are formed.

最大/最小検出部103は、1ブロック内における最大値および最小値を検出する。具体的には、1ブロック内における最大値および最小値と、最大値および最小値をとった画素が1ブロックの先頭からそれぞれ何番目かを示すアドレス(以下、最大値アドレスおよび最小値アドレスと呼ぶ)を検出する。最大値アドレスおよび最小値アドレスは、それぞれ0〜15のアドレス値として検出される。   The maximum / minimum detection unit 103 detects the maximum value and the minimum value in one block. Specifically, the maximum value and minimum value in one block, and the addresses indicating the number of pixels having the maximum value and minimum value from the beginning of one block (hereinafter referred to as maximum value address and minimum value address). ) Is detected. The maximum value address and the minimum value address are detected as address values of 0 to 15, respectively.

ただし、同一の値を持つ画素がブロック内に複数存在し、かつその値が最大値または最小値であった場合を考慮して、最大値および最小値の判定には、以下のような判定ルールを設けることで、圧縮・伸張処理上の混乱を避けるようにする。まず、最大値の判定にあたっては、初期化動作として、0番目の画素の値をテンポラリな最大値(テンポラリ最大値)として取り込む。次に、1〜15番目の画素については、テンポラリ最大値以上の値であれば、その画素の値でテンポラリ最大値を更新する。これにより、15番目の画素の判定後のテンポラリ最大値が、ブロック内の最大値と判定される。   However, considering the case where there are multiple pixels with the same value in the block and the value is the maximum value or the minimum value, the following determination rules are used for determining the maximum value and the minimum value: By providing this, confusion in compression / decompression processing is avoided. First, in determining the maximum value, as the initialization operation, the value of the 0th pixel is captured as a temporary maximum value (temporary maximum value). Next, for the first to fifteenth pixels, if the value is not less than the temporary maximum value, the temporary maximum value is updated with the value of that pixel. Thereby, the temporary maximum value after the determination of the 15th pixel is determined as the maximum value in the block.

また、最小値の判定にあたっては、同様に、初期化動作として、0番目の画素の値をテンポラリな最小値(テンポラリ最小値)として取り込む。次に、1〜15番目の画素については、テンポラリ最大値未満の値であれば、その画素の値でテンポラリ最小値を更新する。これにより、15番目の画素の判定後のテンポラリ最小値が、ブロック内の最小値と判定される。   In determining the minimum value, similarly, as the initialization operation, the value of the 0th pixel is taken in as a temporary minimum value (temporary minimum value). Next, for the 1st to 15th pixels, if the value is less than the temporary maximum value, the temporary minimum value is updated with the value of the pixel. Thereby, the temporary minimum value after the determination of the 15th pixel is determined as the minimum value in the block.

例えば、16画素のうち、先頭の2画素(0番目,1番目)が、同一の最大値をとる場合には、最大値アドレスは“1”となる。また、16画素がすべて同じ値の場合には、最小値アドレスは“0”、最大値アドレスは“15”となる。   For example, of the 16 pixels, when the first two pixels (0th and 1st) have the same maximum value, the maximum value address is “1”. When all 16 pixels have the same value, the minimum value address is “0” and the maximum value address is “15”.

なお、最大/最小検出部103は、検出した最小値および最大値を、それぞれ最小値ラッチ部104および最大値ラッチ部105に出力し、最小値アドレスおよび最大値アドレスを、それぞれ最小値アドレスラッチ部106および最大値アドレスラッチ部107に出力する。また、入力された1ブロック分のデータを、そのブロックの最大および最小判定の終了後に、減算器108に順次出力する。   The maximum / minimum detection unit 103 outputs the detected minimum value and maximum value to the minimum value latch unit 104 and the maximum value latch unit 105, respectively, and the minimum value address and the maximum value address are respectively output to the minimum value address latch unit. 106 and the maximum value address latch unit 107. Further, the input data for one block is sequentially output to the subtracter 108 after the maximum and minimum determinations of the block are completed.

最小値ラッチ部104および最大値ラッチ部105は、最大/最小検出部103からの最小値および最大値を、それぞれラッチする。また、最小値アドレスラッチ部106および最大値アドレスラッチ部107は、最大/最小検出部103からの最小値アドレスおよび最大値アドレスを、それぞれラッチする。これらの最小値ラッチ部104、最大値ラッチ部105、最小値アドレスラッチ部106、および最大値アドレスラッチ部107は、入力データに対応するブロックがパッキング部112において符号化されるまでの間、その入力データをラッチする。   The minimum value latch unit 104 and the maximum value latch unit 105 latch the minimum value and the maximum value from the maximum / minimum detection unit 103, respectively. Further, the minimum value address latch unit 106 and the maximum value address latch unit 107 latch the minimum value address and the maximum value address from the maximum / minimum detection unit 103, respectively. The minimum value latch unit 104, the maximum value latch unit 105, the minimum value address latch unit 106, and the maximum value address latch unit 107 are used until the block corresponding to the input data is encoded in the packing unit 112. Latch input data.

減算器108は、最大/最小検出部103から出力される画素のデータから、最小値ラッチ部104が出力する対応するブロックの最小値を減算する。この減算は、1ブロック内の画素に共通するDCオフセット分を、各画素のデータから差し引くことと等価である。   The subtracter 108 subtracts the minimum value of the corresponding block output from the minimum value latch unit 104 from the pixel data output from the maximum / minimum detection unit 103. This subtraction is equivalent to subtracting the DC offset common to the pixels in one block from the data of each pixel.

減算器109は、最大値ラッチ部105が出力する最大値から、最小値ラッチ部104が出力する対応するブロックの最小値を減算する。この減算結果は、量子化時におけるダイナミックレンジ(DR)を示す。   The subtractor 109 subtracts the minimum value of the corresponding block output from the minimum value latch unit 104 from the maximum value output from the maximum value latch unit 105. This subtraction result indicates the dynamic range (DR) at the time of quantization.

量子化器110は、減算器108の出力データを、減算器109から出力されるダイナミックレンジの大きさに従って量子化する。本実施の形態では、例として、7ビットの固定長で量子化する。   The quantizer 110 quantizes the output data of the subtracter 108 according to the size of the dynamic range output from the subtractor 109. In this embodiment, as an example, quantization is performed with a fixed length of 7 bits.

この量子化器110としては、例えば、整数型の除算器を利用して、減算器108の出力データをダイナミックレンジで除算する構成を適用できる。また、量子化ステップを2のべき乗に限定した場合には、以下のように動作するビットシフタを適用でき、これにより回路規模を削減することができる。なお、圧縮処理側でこのようなビットシフタを利用すると、伸張処理側の逆量子化においても同様に回路規模を削減できる。   As the quantizer 110, for example, a configuration in which the output data of the subtractor 108 is divided by the dynamic range using an integer type divider can be applied. Also, when the quantization step is limited to a power of 2, a bit shifter that operates as follows can be applied, thereby reducing the circuit scale. If such a bit shifter is used on the compression processing side, the circuit scale can be similarly reduced in the inverse quantization on the decompression processing side.

減算器108からの11ビットの入力データを7ビットデータに量子化する場合、例えば以下のようなシフト動作を行えばよい。
[0≦DR≦127のとき]入力データをそのまま出力する。
When the 11-bit input data from the subtracter 108 is quantized into 7-bit data, for example, the following shift operation may be performed.
[When 0 ≦ DR ≦ 127] The input data is output as it is.

[128≦DR≦255のとき]入力データを1ビット分下位にシフトする。
[256≦DR≦511のとき]入力データを2ビット分下位にシフトする。
[512≦DR≦1023のとき]入力データを3ビット分下位にシフトする。
[When 128 ≦ DR ≦ 255] The input data is shifted downward by one bit.
[When 256 ≦ DR ≦ 511] The input data is shifted down by 2 bits.
[When 512 ≦ DR ≦ 1023] The input data is shifted downward by 3 bits.

[1024≦DR≦2047のとき]入力データを4ビット分下位にシフトする。
量子化データバッファ111は、量子化器110から出力される16画素分の量子化データを一時的に保持する。
[When 1024 ≦ DR ≦ 2047] The input data is shifted downward by 4 bits.
The quantized data buffer 111 temporarily holds the quantized data for 16 pixels output from the quantizer 110.

パッキング部112は、量子化データバッファ111、最小値ラッチ部104、最大値ラッチ部105、最小値アドレスラッチ部106、および最大値アドレスラッチ部107からの出力データを利用して、1ブロック当たり128ビットの圧縮データにパッキングする。このパッキング部112は、量子化データバッファ111から各画素に対応する量子化データを読み出す際に、最小値アドレスラッチ部106および最大値アドレスラッチ部107の出力データに基づいて、最大値および最小値に対応する量子化データを破棄し、次の図8に示すように、ブロック内の残りの14画素分の量子化データのみパッキングする。   The packing unit 112 uses the output data from the quantized data buffer 111, the minimum value latch unit 104, the maximum value latch unit 105, the minimum value address latch unit 106, and the maximum value address latch unit 107 to 128 per block. Pack into bit compressed data. The packing unit 112 reads out the quantized data corresponding to each pixel from the quantized data buffer 111, based on the output data of the minimum value address latch unit 106 and the maximum value address latch unit 107, and the maximum value and the minimum value. The quantized data corresponding to is discarded, and only the quantized data for the remaining 14 pixels in the block is packed as shown in FIG.

図8は、パッキングにより生成される1ブロック分の圧縮データの構成を示す図である。
この図8に示すように、圧縮データは、ブロック内の最大値および最小値(ともに11ビット)と、それらの値に対応する最大値アドレスおよび最小値アドレス(ともに4ビット)と、最大値および最小値をとる画素を除く14画素分の量子化データ(98ビット)とから構成される。
FIG. 8 is a diagram showing a configuration of compressed data for one block generated by packing.
As shown in FIG. 8, the compressed data includes a maximum value and a minimum value (both 11 bits) in the block, a maximum value address and a minimum value address (both 4 bits) corresponding to these values, a maximum value and It consists of quantized data (98 bits) for 14 pixels excluding the pixel having the minimum value.

ここで、ブロック内の最大値および最小値がパッキングされているので、これらに対応する量子化データを省略し、代わりに、これらの画素の位置を示す最大値アドレスおよび最小値アドレスをパッキングしておくことで、伸張時に元のデータを復元可能にしている。量子化データが7ビットなのに対して、アドレスは16番地分のため4ビットであるので、これらの差分から、1ブロック当たり、最大値および最小値をあわせて6ビットの削減効果が得られる。以上より、256ビット分のメモリ領域を占める16画素分のRAW画像データを、1/2に圧縮した128ビットのデータが得られる。   Here, since the maximum value and the minimum value in the block are packed, the corresponding quantized data is omitted, and instead, the maximum value address and the minimum value address indicating the positions of these pixels are packed. The original data can be restored when decompressing. Since the quantized data is 7 bits, the address is 4 bits because of 16 addresses, and from these differences, a reduction effect of 6 bits can be obtained by combining the maximum value and the minimum value per block. As described above, 128-bit data obtained by compressing RAW image data for 16 pixels occupying a memory area for 256 bits to ½ is obtained.

次に、図9は、RAW伸張部の内部構成を示すブロック図である。
図9に示すように、RAW伸張部42は、データラッチ部201、セレクタ202、減算器203、逆量子化器204、加算器205、アドレスカウンタ206、アドレス比較部207、セレクタ208、逆折れ線変換部209、および点順次処理部210を備えている。
Next, FIG. 9 is a block diagram showing an internal configuration of the RAW expansion unit.
As shown in FIG. 9, the RAW decompression unit 42 includes a data latch unit 201, a selector 202, a subtractor 203, an inverse quantizer 204, an adder 205, an address counter 206, an address comparison unit 207, a selector 208, and an inverse polygonal line transform. A unit 209 and a dot sequential processing unit 210.

データラッチ部201は、画像メモリ15から読み出された128ビットの圧縮データをラッチする。なお、このデータラッチ部201は、入力データに対応するブロックがセレクタ208においてすべて処理されるまでの間、その入力データをラッチする。   The data latch unit 201 latches 128-bit compressed data read from the image memory 15. The data latch unit 201 latches the input data until all the blocks corresponding to the input data are processed in the selector 208.

セレクタ202は、データラッチ部201でラッチされたデータのうち、量子化データ(98ビット)を受け取り、そのデータから1画素分に相当する7ビット分のデータをシーケンシャルに選択して、逆量子化器204に供給する。   The selector 202 receives quantized data (98 bits) among the data latched by the data latch unit 201, and sequentially selects 7-bit data corresponding to one pixel from the data, and performs inverse quantization. To the container 204.

減算器203は、データラッチ部201でラッチされたデータのうち、最大値(11ビット)および最小値(11ビット)を受け取り、最大値から最小値を減算して、ダイナミックレンジを出力する。   The subtracter 203 receives the maximum value (11 bits) and the minimum value (11 bits) among the data latched by the data latch unit 201, subtracts the minimum value from the maximum value, and outputs the dynamic range.

逆量子化器204は、セレクタ202からの画素ごとの量子化データを、ダイナミックレンジの大きさに従って逆量子化する。本実施の形態では、7ビットの固定長符号を逆量子化して、11ビットのデータを出力する。   The inverse quantizer 204 inversely quantizes the quantized data for each pixel from the selector 202 according to the size of the dynamic range. In this embodiment, a 7-bit fixed length code is inversely quantized and 11-bit data is output.

この逆量子化器204としては、例えば、整数型の乗算器を利用して、量子化データとダイナミックレンジを乗算する構成を適用できる。また、上記の量子化器110の説明で述べた通り、量子化ステップを2のべき乗に限定して量子化した場合には、ビットシフタで構成することができ、これにより回路規模を削減することができる。このビットシフタは、例えば以下のように動作する。   As the inverse quantizer 204, for example, a configuration of multiplying quantized data and a dynamic range by using an integer multiplier can be applied. Further, as described in the description of the quantizer 110 above, when the quantization step is limited to a power of 2, the quantization can be configured by a bit shifter, thereby reducing the circuit scale. it can. This bit shifter operates, for example, as follows.

[0≦DR≦127のとき]入力データ(量子化データ)をそのまま出力する。
[128≦DR≦255のとき]入力データを1ビット分上位にシフトする。
[256≦DR≦511のとき]入力データを2ビット分上位にシフトする。
[When 0 ≦ DR ≦ 127] The input data (quantized data) is output as it is.
[When 128 ≦ DR ≦ 255] The input data is shifted upward by one bit.
[When 256 ≦ DR ≦ 511] The input data is shifted upward by 2 bits.

[512≦DR≦1023のとき]入力データを3ビット分上位にシフトする。
[1024≦DR≦2047のとき]入力データを4ビット分上位にシフトする。
加算器205は、逆量子化器204の出力データと、データラッチ部201でラッチされた最小値とを加算する。これにより、逆量子化されたデータに、ブロック内の共通のDCオフセット値が加算される。
[When 512 ≦ DR ≦ 1023] The input data is shifted upward by 3 bits.
[When 1024 ≦ DR ≦ 2047] The input data is shifted upward by 4 bits.
The adder 205 adds the output data of the inverse quantizer 204 and the minimum value latched by the data latch unit 201. As a result, a common DC offset value in the block is added to the dequantized data.

アドレスカウンタ206は、画素の出力タイミングにあわせてカウントアップ動作を行い、ブロック内の画素順に対応したカウント値(0〜15)を生成する。
アドレス比較部207は、データラッチ部201でラッチされたデータのうち、最大値アドレスおよび最小値アドレスを受け取り、アドレスカウンタ206からのカウント値と比較し、各アドレスの値と一致した場合に、セレクタ208に対して選択信号を出力する。
The address counter 206 performs a count-up operation in accordance with the pixel output timing, and generates a count value (0 to 15) corresponding to the pixel order in the block.
The address comparison unit 207 receives the maximum value address and the minimum value address among the data latched by the data latch unit 201, compares it with the count value from the address counter 206, and if it matches the value of each address, the selector A selection signal is output to 208.

セレクタ208は、加算器205からのデータ、データラッチ部201からの最大値および最小値を選択して出力する。具体的には、アドレス比較部207から、最大値アドレスに対応する選択信号を受信したときは、データラッチ部201からの最大値を選択出力し、最小値アドレスに対応する選択信号を受信したときは、データラッチ部201からの最小値を選択出力し、それ以外では、加算器205からのデータを選択出力する。これにより、11ビットに圧縮されている同色画素のデータが、画素順に伸張される。   The selector 208 selects and outputs the data from the adder 205 and the maximum and minimum values from the data latch unit 201. Specifically, when the selection signal corresponding to the maximum value address is received from the address comparison unit 207, the maximum value from the data latch unit 201 is selected and output, and the selection signal corresponding to the minimum value address is received. Selects and outputs the minimum value from the data latch unit 201, otherwise selects and outputs the data from the adder 205. Thereby, the data of the same color pixel compressed to 11 bits is expanded in pixel order.

逆折れ線変換部209は、セレクタ208からのデータを、RAW圧縮部41の折れ線圧縮部101と逆の特性により、11ビットから14ビットのデータに伸張する。
ここで、図10は、逆折れ線変換部で用いられる折れ線の例を示す図である。
The reverse broken line conversion unit 209 expands the data from the selector 208 from 11 bits to 14 bits with the reverse characteristics of the broken line compression unit 101 of the RAW compression unit 41.
Here, FIG. 10 is a diagram illustrating an example of a polygonal line used in the reverse polygonal line conversion unit.

この図10の折れ線は、図7で示した折れ線圧縮部101における折れ線と、逆の特性により階調を変換するようになっている。逆折れ線変換部209は、まず、入力データに8を乗算(すなわち3ビット分上位にシフト)して14ビット化した後、図10の折れ線を用いて階調変換し、14ビットの画素のデータを伸張する。なお、入力データと伸張後の出力データとを対応付けて記憶したROMテーブルを用意し、このROMテーブルに従って入出力データの変換が行われてもよい。   The polygonal line in FIG. 10 is adapted to convert the gradation by characteristics opposite to those of the polygonal line compression unit 101 shown in FIG. The inverse broken line conversion unit 209 first multiplies the input data by 8 (that is, shifts upward by 3 bits) to 14 bits, and then performs gradation conversion using the broken line in FIG. 10 to obtain 14-bit pixel data. Stretch. A ROM table in which input data and decompressed output data are stored in association with each other may be prepared, and input / output data conversion may be performed according to the ROM table.

なお、圧縮時に、折れ線圧縮部101による圧縮が適用されなかった場合には、伸張時には、この逆折れ線変換部209でのデータ変換もバイパスされる。
以下、図9に戻って説明する。
If compression by the polygonal line compression unit 101 is not applied at the time of compression, data conversion by the reverse polygonal line conversion unit 209 is also bypassed at the time of decompression.
Hereinafter, the description will be returned to FIG.

点順次処理部210は、RAW圧縮部41のブロック化部102で実行されたブロック化と逆のプロセスで、伸張されたデータを元のRAW画像データの画素順に変換して出力する。例えば、R0,R1,R2,……,R15,Gr0,Gr1,……,Gr15のように、同色成分の画素が16個連続するようにブロック化されて圧縮されていた場合には、このようなデータを、R0,Gr0,R1,Gr1,……,R15,Gr15のように、R成分とGr成分が繰り返し現れるように並び替える。このような並び替えを行うために、点順次処理部210は、伸張された2ブロック分のデータを保持するためのバッファメモリを備え、2ブロック分のデータがバッファメモリに蓄積された時点で、各色成分のデータを交互に出力する。   The point-sequential processing unit 210 converts the decompressed data into the pixel order of the original RAW image data and outputs it by a process reverse to the blocking performed by the blocking unit 102 of the RAW compression unit 41. For example, this is the case when 16 pixels of the same color component are blocked and compressed such that R0, R1, R2,..., R15, Gr0, Gr1,. Are rearranged so that the R component and the Gr component appear repeatedly, such as R0, Gr0, R1, Gr1,..., R15, Gr15. In order to perform such rearrangement, the dot-sequential processing unit 210 includes a buffer memory for holding the expanded data for two blocks, and when the data for two blocks are accumulated in the buffer memory, Data of each color component is output alternately.

以上の構成のRAW圧縮部41およびRAW伸張部42によれば、圧縮時の1画素当たりの量子化語長を固定長とすることで、固定長の符号化を行って圧縮することができる。従って、メモリバス15aを通じて画像メモリ15に読み書きされるデータの帯域を、一定のレベルに低減することができ、画像メモリ15に対するアドレス管理を簡易にすることもできる。   According to the RAW compression unit 41 and the RAW expansion unit 42 having the above-described configuration, the quantization word length per pixel at the time of compression is set to a fixed length, so that compression can be performed by performing fixed-length encoding. Therefore, the bandwidth of data read / written to / from the image memory 15 through the memory bus 15a can be reduced to a certain level, and address management for the image memory 15 can be simplified.

また、圧縮する1ブロックの画素数と量子化語長との組み合わせで圧縮率が決まるので、必要とする画質(すなわち、許容できる圧縮ひずみの量)や、伝送されるバスでの伝送帯域の割り当て、画像メモリ15の読み書きの性能などにあわせて、柔軟に対応することができる。例えば、上記の実施の形態のように、16画素分のRAW画像データを、量子化語長7ビットで量子化することで、圧縮率を1/2としながらも、通常の自然画であれば、圧縮/伸張後に輝度/色差信号に変換した時点でのPSNR(Peak Signal to Noise Ratio)を、50dB程度に維持できる。この信号のPSNRが50dB〜40dB程度であれば、圧縮歪みが肉眼では検知できない程度に抑えられるので、上記構成により画質劣化をほぼなくすことができる。   In addition, since the compression rate is determined by the combination of the number of pixels of one block to be compressed and the quantization word length, the required image quality (that is, the amount of allowable compression distortion) and the allocation of the transmission band on the transmitted bus Therefore, it is possible to flexibly cope with the read / write performance of the image memory 15. For example, as in the above-described embodiment, if the RAW image data for 16 pixels is quantized with a quantization word length of 7 bits, the compression rate is ½, but a normal natural image The PSNR (Peak Signal to Noise Ratio) at the time of conversion into a luminance / color difference signal after compression / expansion can be maintained at about 50 dB. If the PSNR of this signal is about 50 dB to 40 dB, the compression distortion can be suppressed to such an extent that it cannot be detected with the naked eye.

また、基本的に一次元処理により圧縮/伸張処理が実行されるので、例えば、上下ラインの画素のデータを参照するためのラインメモリが不要になり、処理も比較的簡単になる。このため、圧縮/伸張のための回路規模や、製造コストを抑制でき、処理の高速化、および処理時間の短縮の効果を高められる。すなわち、画像メモリ15におけるRAW画像データの読み書き時間の短縮効果や、メモリバス15aの伝送負荷軽減効果を、確実に向上させることができる。   In addition, since compression / decompression processing is basically executed by one-dimensional processing, for example, a line memory for referring to pixel data of the upper and lower lines becomes unnecessary, and processing becomes relatively simple. For this reason, the circuit scale for compression / decompression and the manufacturing cost can be suppressed, and the effect of speeding up the processing and shortening the processing time can be enhanced. That is, the effect of shortening the read / write time of the RAW image data in the image memory 15 and the effect of reducing the transmission load of the memory bus 15a can be reliably improved.

従って、撮像時の動作が高速で、高画質の画像を記録/表示でき、かつ、小型で製造コストの比較的低い撮像装置を実現できる。そして、上述した圧縮/伸張制御部74の制御によりRAW圧縮部41およびRAW伸張部42の圧縮/伸張機能が適応的にオン/オフされることで、圧縮/伸張処理による画質劣化を最小限に留めることができる。   Accordingly, it is possible to realize an image pickup apparatus that can record / display a high-quality image at a high speed during image pickup, and that is small in size and relatively low in manufacturing cost. Then, the compression / decompression function of the RAW compression unit 41 and the RAW expansion unit 42 is adaptively turned on / off under the control of the compression / decompression control unit 74 described above, thereby minimizing image quality degradation due to compression / decompression processing. Can be fastened.

すなわち、上記の圧縮/伸張手法では、非可逆圧縮を行っているために、画像データに対するゲイン印加量が大きくなるほど、圧縮/伸張により生じる画質劣化が目立ってくる可能性があるが、圧縮/伸張制御部74により、ゲイン印加量が一定値以上の場合には圧縮/伸張機能をオフ状態とすることで、このような画質劣化を防止できる。また、上記の圧縮/伸張手法では、一定の画素数単位で固定長のパッキングを行っており、さらにダイナミックレンジに応じて圧縮率が可変されるので、高周波成分の多い画像やダイナミックレンジの広い画像では、圧縮/伸張による画質劣化が大きくなる可能性が高い。しかし、圧縮/伸張制御部74により、高周波成分の量やダイナミックレンジがそれぞれ一定の値以上の場合には圧縮/伸張機能をオフ状態とすることで、このような画質劣化を防止できる。   That is, in the above compression / decompression method, since lossy compression is performed, image quality degradation caused by compression / decompression may become more conspicuous as the amount of gain applied to image data increases. The controller 74 can prevent such image quality deterioration by turning off the compression / decompression function when the gain application amount is a certain value or more. In the compression / decompression method described above, fixed-length packing is performed in units of a fixed number of pixels, and the compression rate can be varied according to the dynamic range. Therefore, an image with a high frequency component or an image with a wide dynamic range is used. Therefore, there is a high possibility that image quality deterioration due to compression / decompression will increase. However, the compression / decompression control unit 74 can prevent such image quality deterioration by turning off the compression / decompression function when the amount of high-frequency components and the dynamic range are equal to or greater than a certain value.

なお、上述した圧縮手法において、量子化ステップを2のべき乗とした場合には、量子化器はビットシフタにより構成できる。この場合、シフト量が、ブロック内のダイナミックレンジを示唆することになる。ここで、ブロック内の最大値を量子化した場合は、その全ビットが1となるのは自明であるため、伸張側では、最大値の絶対量の代わりに、シフト量から、最大値の量子化データを求め、伸張できる。   In the compression method described above, when the quantization step is a power of 2, the quantizer can be configured by a bit shifter. In this case, the shift amount indicates the dynamic range in the block. Here, when the maximum value in the block is quantized, it is obvious that all the bits thereof are 1. Therefore, on the expansion side, instead of the absolute value of the maximum value, the maximum value of the quantum value is calculated from the shift amount. Can be obtained and expanded.

従って、圧縮データ中に、最大値(11ビット)の代わりに量子化器でのシフト量(上記動作例では少なくとも3ビット)を格納することで、圧縮データに格納すべきデータのビット数を減らすことができる。このため、圧縮率をさらに高める、あるいは量子化語長を高めて画質を向上させることが可能となる。   Therefore, by storing the shift amount (at least 3 bits in the above operation example) in the quantizer instead of the maximum value (11 bits) in the compressed data, the number of bits of data to be stored in the compressed data is reduced. be able to. Therefore, the image quality can be improved by further increasing the compression rate or increasing the quantization word length.

また、上記の説明では、RAW画像データをラインごとにブロック化して圧縮する例を示したが、上記の圧縮/伸張手法を応用して、複数ラインに亘る矩形領域ごとにブロック化することも可能である。例えば、CMOSセンサのように全画素読み出し(プログレッシブ読み出し)が可能な撮像素子を用いた場合には、シーケンシャルに画素のデータが読み出されるため、垂直方向に対する画素のデータの相関が強くなる。従って、矩形領域内の画素をブロック化しても、画質を劣化させることなく圧縮を行うことができる。さらに、ブロック化する矩形領域を、検波部43で適用される検波枠と同じにすることもできる。   In the above description, an example in which RAW image data is blocked and compressed for each line has been shown. However, the above compression / decompression method can be applied to block each rectangular area over a plurality of lines. It is. For example, when an image sensor capable of reading out all pixels (progressive reading) such as a CMOS sensor is used, the pixel data is read out sequentially, so that the correlation of the pixel data with respect to the vertical direction becomes strong. Therefore, even if the pixels in the rectangular area are blocked, the compression can be performed without degrading the image quality. Furthermore, the rectangular area to be blocked can be made the same as the detection frame applied by the detection unit 43.

本発明の実施の形態に係る撮像装置の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of the imaging device which concerns on embodiment of this invention. デジタル画像処理回路の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a digital image processing circuit. RAW圧縮部およびRAW伸張部の動作を制御するためにマイクロコンピュータが備える機能を示すブロック図である。It is a block diagram which shows the function with which a microcomputer is provided in order to control operation | movement of a RAW compression part and a RAW expansion | extension part. 圧縮/伸張制御部による制御処理手順を示すフローチャートである。It is a flowchart which shows the control processing procedure by a compression / decompression control part. ダイナミックレンジの演算手法について説明するための図である。It is a figure for demonstrating the calculation method of a dynamic range. RAW圧縮部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a RAW compression part. 折れ線圧縮部で用いられる折れ線の例を示す図である。It is a figure which shows the example of the broken line used in a broken line compression part. パッキングにより生成される1ブロック分の圧縮データの構成を示す図である。It is a figure which shows the structure of the compressed data for 1 block produced | generated by packing. RAW伸張部の内部構成を示すブロック図である。It is a block diagram which shows the internal structure of a RAW expansion | deployment part. 逆折れ線変換部で用いられる折れ線の例を示す図である。It is a figure which shows the example of the broken line used in a reverse broken line conversion part.

符号の説明Explanation of symbols

11……光学ブロック、11a……ドライバ、12……撮像素子、12a……タイミングジェネレータ、13……A/D変換回路、14……デジタル画像処理回路、15……画像メモリ、15a……メモリバス、16……ディスプレイ、17……マイクロコンピュータ、18……入力部、19……メモリカードI/F、19a……メモリカード、20……フラッシュメモリ、21……内蔵メモリ、41……RAW圧縮部、42……RAW伸張部、43……検波部、44……ゲイン調整部、45……WB調整/YC変換部、46……解像度変換/圧縮伸張部、47……表示処理部、71……AE制御部、72……AF制御部、73……合成画像生成部、74……圧縮/伸張制御部   DESCRIPTION OF SYMBOLS 11 ... Optical block, 11a ... Driver, 12 ... Image sensor, 12a ... Timing generator, 13 ... A / D conversion circuit, 14 ... Digital image processing circuit, 15 ... Image memory, 15a ... Memory Bus, 16 ... Display, 17 ... Microcomputer, 18 ... Input section, 19 ... Memory card I / F, 19a ... Memory card, 20 ... Flash memory, 21 ... Built-in memory, 41 ... RAW Compression unit 42... Raw expansion unit 43. Detection unit 44. Gain adjustment unit 45. WB adjustment / YC conversion unit 46. Resolution conversion / compression expansion unit 47. Display processing unit 71... AE control unit, 72... AF control unit, 73... Composite image generation unit, 74.

Claims (18)

固体撮像素子を用いて画像を撮像する撮像装置において、
前記固体撮像素子により撮像されてデジタル変換された画像データを非可逆圧縮方式により圧縮し、圧縮画像データを出力する圧縮部と、
前記圧縮部から出力された前記圧縮画像データを一時的に保持するメモリと、
前記メモリから読み出された前記圧縮画像データを伸張する伸張部と、
前記伸張部により伸張された画像データに対して、ゲイン印加処理を含む所定の信号処理を施す信号処理部と、
前記圧縮部および前記伸張部にそれぞれ圧縮動作および伸張動作を実行させるオン状態と、前記圧縮動作および前記伸張動作を停止させて入力画像データをそのまま出力させるオフ状態とを切り替え、前記信号処理部におけるゲイン印加量が所定のゲインしきい値以上である場合に、前記圧縮動作および前記伸張動作を前記オフ状態に切り替える圧縮/伸張制御部と、
を有することを特徴とする撮像装置。
In an imaging device that captures an image using a solid-state imaging device,
A compression unit that compresses image data captured by the solid-state imaging device and converted into digital data by an irreversible compression method, and outputs compressed image data;
A memory that temporarily holds the compressed image data output from the compression unit;
A decompression unit for decompressing the compressed image data read from the memory;
A signal processing unit that performs predetermined signal processing including gain application processing on the image data expanded by the expansion unit;
The signal processing unit switches between an on state in which the compression unit and the decompression unit respectively execute a compression operation and an expansion operation, and an off state in which the compression operation and the decompression operation are stopped and input image data is output as it is. A compression / expansion control unit that switches the compression operation and the expansion operation to the off state when a gain application amount is equal to or greater than a predetermined gain threshold;
An imaging device comprising:
撮像シーンの明るさに応じて、前記信号処理部における前記ゲイン印加処理機能を含む露出調整機能を自動的に制御する露出制御部をさらに有し、
前記圧縮/伸張制御部は、前記露出制御部により出力される、前記ゲイン印加処理機能に対するゲイン制御信号を基に前記ゲイン印加量を判別することを特徴とする請求項1記載の撮像装置。
An exposure control unit for automatically controlling an exposure adjustment function including the gain application processing function in the signal processing unit according to the brightness of the imaging scene;
The imaging apparatus according to claim 1, wherein the compression / expansion control unit determines the gain application amount based on a gain control signal output from the exposure control unit and corresponding to the gain application processing function.
前記圧縮/伸張制御部において設定される前記ゲインしきい値が可変とされたことを特徴とする請求項1記載の撮像装置。   The imaging apparatus according to claim 1, wherein the gain threshold set in the compression / decompression control unit is variable. 前記圧縮/伸張制御部は、画質より速度を優先する撮像モードにおいては、前記ゲインしきい値をより高い値に自動的に設定することを特徴とする請求項3記載の撮像装置。   The imaging apparatus according to claim 3, wherein the compression / decompression control unit automatically sets the gain threshold value to a higher value in an imaging mode in which speed is prioritized over image quality. 前記圧縮/伸張制御部は、さらに、前記伸張部から出力される画像データの高周波成分の量が所定の成分量しきい値以上である場合にも、前記圧縮動作および前記伸張動作を前記オフ状態に切り替えることを特徴とする請求項1記載の撮像装置。   The compression / decompression control unit further performs the compression operation and the decompression operation in the off state even when the amount of the high frequency component of the image data output from the decompression unit is equal to or greater than a predetermined component amount threshold value. The imaging apparatus according to claim 1, wherein the imaging apparatus is switched to 前記伸張部から出力される画像データから高周波成分の量を検波する高周波成分検波部と、
前記高周波成分検波部による検波結果を基に、フォーカスレンズを合焦位置に移動させるためのフォーカス制御値を演算するフォーカス制御部と、
をさらに有し、
前記圧縮/伸張制御部は、前記高周波成分検波部による検波結果と前記成分量しきい値とを比較して、前記圧縮動作および前記伸張動作を前記オフ状態とするか否かを判別することを特徴とする請求項5記載の撮像装置。
A high-frequency component detection unit for detecting the amount of high-frequency components from the image data output from the expansion unit;
A focus control unit that calculates a focus control value for moving the focus lens to the in-focus position based on the detection result by the high-frequency component detection unit;
Further comprising
The compression / expansion control unit compares the detection result by the high-frequency component detection unit with the component amount threshold value to determine whether or not to set the compression operation and the expansion operation to the off state. The imaging apparatus according to claim 5, wherein:
前記圧縮/伸張制御部は、さらに、前記伸張部から出力される画像データのダイナミックレンジが所定のレンジしきい値以上である場合にも、前記圧縮動作および前記伸張動作を前記オフ状態に切り替えることを特徴とする請求項1記載の撮像装置。   The compression / expansion control unit further switches the compression operation and the expansion operation to the off state even when the dynamic range of the image data output from the expansion unit is equal to or greater than a predetermined range threshold value. The imaging apparatus according to claim 1. 前記伸張部から出力される画像データから、1フレーム単位の輝度ごとの頻度を示すヒストグラムを検出するヒストグラム検出部をさらに有し、
前記圧縮/伸張制御部は、前記ヒストグラム検出部により検出された前記ヒストグラムを基に、前記ダイナミックレンジを判別することを特徴とする請求項7記載の撮像装置。
A histogram detection unit for detecting a histogram indicating the frequency for each luminance in one frame unit from the image data output from the decompression unit;
The imaging apparatus according to claim 7, wherein the compression / decompression control unit determines the dynamic range based on the histogram detected by the histogram detection unit.
前記ヒストグラム検出部により検出された前記ヒストグラムに基づく画像を表示する表示部をさらに有することを特徴とする請求項8記載の撮像装置。   The imaging apparatus according to claim 8, further comprising a display unit that displays an image based on the histogram detected by the histogram detection unit. 前記圧縮部は、前記デジタル変換された画像データを、所定数の画素データからなるブロック単位で圧縮し、固定長の符号化データとして前記圧縮画像データを出力することを特徴とする請求項1記載の撮像装置。   The compression unit compresses the digitally converted image data in units of blocks each including a predetermined number of pixel data, and outputs the compressed image data as fixed-length encoded data. Imaging device. 前記圧縮部は、所定数の画素データからなるブロック内の前記画素データの最大値および最小値と、それらの当該ブロック内での位置情報と、前記最大値および前記最小値を除く当該ブロック内の前記画素データから、前記最小値を減算した減算値を量子化した量子化データとを含む前記圧縮画像データを生成することを特徴とする請求項1記載の撮像装置。   The compression unit includes a maximum value and a minimum value of the pixel data in a block composed of a predetermined number of pixel data, position information in the block, and the block in the block excluding the maximum value and the minimum value. The imaging apparatus according to claim 1, wherein the compressed image data including quantized data obtained by quantizing a subtraction value obtained by subtracting the minimum value from the pixel data is generated. 前記圧縮部は、
前記ブロックごとに、前記画素データの前記最大値および前記最小値と、それらの当該ブロック内での前記位置情報とを検出する最大/最小検出部と、
前記画素データから、対応する前記ブロックにおける前記最小値を減算した前記減算値を、当該ブロック内の前記最大値と前記最小値との差分値として算出したダイナミックレンジに応じて量子化する量子化部と、
前記ブロックごとに、当該ブロックにおける前記最大値、前記最小値、およびそれらの前記位置情報と、前記量子化部で量子化された量子化データのうち、前記最大値および前記最小値に対応するものを除く前記量子化データとをパッキングして前記圧縮画像データを生成するパッキング部と、
を有することを特徴とする請求項11記載の撮像装置。
The compression unit is
For each block, a maximum / minimum detection unit that detects the maximum value and the minimum value of the pixel data, and the position information in the block, and
A quantization unit that quantizes the subtraction value obtained by subtracting the minimum value in the corresponding block from the pixel data according to a dynamic range calculated as a difference value between the maximum value and the minimum value in the block. When,
For each block, the maximum value and the minimum value in the block, the position information thereof, and the quantized data quantized by the quantization unit, corresponding to the maximum value and the minimum value A packing unit that packs the quantized data except for generating the compressed image data;
The imaging apparatus according to claim 11, further comprising:
前記量子化部での量子化語長を固定値としたことを特徴とする請求項12記載の撮像装置。   The imaging apparatus according to claim 12, wherein a quantization word length in the quantization unit is a fixed value. 前記圧縮部は、前記デジタル変換された画像データに対して、人間の視感度特性に応じて階調を変換した後、そのビット数を削減して前記圧縮部に供給する前圧縮部をさらに有することを特徴とする請求項12記載の撮像装置。   The compression unit further includes a pre-compression unit that converts the gradation of the digitally converted image data according to human visibility characteristics and then supplies the compressed data to the compression unit after reducing the number of bits. The imaging apparatus according to claim 12. 前記量子化部は、量子化ステップを2のべき乗として、前記ダイナミックレンジに応じたけた数だけ下位にシフトするビットシフタにより、前記減算値を量子化することを特徴とする請求項12記載の撮像装置。   13. The imaging apparatus according to claim 12, wherein the quantization unit quantizes the subtraction value with a bit shifter that shifts the number of steps lower by a number corresponding to the dynamic range, with a quantization step being a power of 2. . 前記パッキング部は、前記ブロックにおける最大値の代わりに、前記ビットシフタにおけるシフト量をパッキングすることを特徴とする請求項15記載の撮像装置。   The imaging apparatus according to claim 15, wherein the packing unit packs a shift amount in the bit shifter instead of the maximum value in the block. 前記伸張部は、
前記ブロックごとの前記圧縮画像データから抽出した前記量子化データを、当該圧縮画像データから抽出した前記最大値と前記最小値との差分値として算出した前記ダイナミックレンジに応じて逆量子化する逆量子化部と、
前記逆量子化部により逆量子化されたデータに前記最小値を加算する加算部と、
前記ブロックごとの前記圧縮画像データから抽出した前記最小値および前記最大値の前記各位置情報に基づき、前記最大値と、前記最小値と、前記加算部からの出力値とを、前記圧縮部に入力された元の前記画素データの順に出力する出力制御部と、
を有することを特徴とする請求項12記載の撮像装置。
The extension part is
Inverse quantization for dequantizing the quantized data extracted from the compressed image data for each block according to the dynamic range calculated as a difference value between the maximum value and the minimum value extracted from the compressed image data And
An adder for adding the minimum value to the data dequantized by the dequantization unit;
Based on the position information of the minimum value and the maximum value extracted from the compressed image data for each block, the maximum value, the minimum value, and the output value from the adding unit are sent to the compression unit. An output control unit that outputs the input original pixel data in the order;
The imaging apparatus according to claim 12, further comprising:
固体撮像素子を用いて画像を撮像する撮像方法において、
圧縮部が、前記固体撮像素子により撮像されてデジタル変換された画像データを非可逆圧縮方式により圧縮し、圧縮画像データを出力してメモリに一時的に格納し、
伸張部が、前記メモリから読み出された前記圧縮画像データを伸張し、
信号処理部が、前記伸張部により伸張された画像データに対して、ゲイン印加処理を含む所定の信号処理を施し、
圧縮/伸張制御部が、前記圧縮部および前記伸張部にそれぞれ圧縮動作および伸張動作を実行させるオン状態と、前記圧縮動作および前記伸張動作を停止させて入力画像データをそのまま出力させるオフ状態とを切り替え、前記信号処理部におけるゲイン印加量が所定のゲインしきい値以上である場合に、前記圧縮動作および前記伸張動作を前記オフ状態に切り替える、
ことを特徴とする撮像方法。
In an imaging method for imaging an image using a solid-state imaging device,
The compression unit compresses the image data imaged and digitally converted by the solid-state imaging device by an irreversible compression method, outputs the compressed image data, and temporarily stores it in the memory.
An expansion unit expands the compressed image data read from the memory;
The signal processing unit performs predetermined signal processing including gain application processing on the image data expanded by the expansion unit,
An on state in which the compression / decompression control unit causes the compression unit and the decompression unit to perform a compression operation and an expansion operation, respectively, and an off state in which the compression operation and the decompression operation are stopped and input image data is output as it is. Switching, when the gain application amount in the signal processing unit is equal to or greater than a predetermined gain threshold value, the compression operation and the expansion operation are switched to the off state,
An imaging method characterized by the above.
JP2006293067A 2006-10-27 2006-10-27 Imaging device and imaging method Pending JP2008113070A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006293067A JP2008113070A (en) 2006-10-27 2006-10-27 Imaging device and imaging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006293067A JP2008113070A (en) 2006-10-27 2006-10-27 Imaging device and imaging method

Publications (1)

Publication Number Publication Date
JP2008113070A true JP2008113070A (en) 2008-05-15

Family

ID=39445375

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006293067A Pending JP2008113070A (en) 2006-10-27 2006-10-27 Imaging device and imaging method

Country Status (1)

Country Link
JP (1) JP2008113070A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012026122A1 (en) * 2010-08-26 2012-03-01 パナソニック株式会社 Imaging device
JP2012511836A (en) * 2007-11-19 2012-05-24 セレックス・ガリレオ・リミテッド Imaging apparatus and method
CN102740069A (en) * 2011-04-05 2012-10-17 索尼公司 Data processing apparatuses, data processing method, program, and camera system
JP2015162851A (en) * 2014-02-28 2015-09-07 オリンパス株式会社 imaging device, imaging method, and program
JP2017121022A (en) * 2015-12-28 2017-07-06 日本テレビ放送網株式会社 Image signal identification apparatus, receiver, image signal identification method, and program
WO2017217241A1 (en) * 2016-06-15 2017-12-21 ソニー株式会社 Image generation device and image generation method
US10375348B2 (en) 2016-12-28 2019-08-06 Canon Kabushiki Kaisha Image capturing apparatus operable to store captured image data in image memory, method of controlling same, and storage medium
US10721426B2 (en) 2017-08-31 2020-07-21 Canon Kabushiki Kaisha Solid-state image sensor, image capture apparatus and image capture method

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012511836A (en) * 2007-11-19 2012-05-24 セレックス・ガリレオ・リミテッド Imaging apparatus and method
WO2012026122A1 (en) * 2010-08-26 2012-03-01 パナソニック株式会社 Imaging device
CN102740069A (en) * 2011-04-05 2012-10-17 索尼公司 Data processing apparatuses, data processing method, program, and camera system
JP2012222453A (en) * 2011-04-05 2012-11-12 Sony Corp Data processing device, data processing method, program, and camera system
JP2015162851A (en) * 2014-02-28 2015-09-07 オリンパス株式会社 imaging device, imaging method, and program
JP2017121022A (en) * 2015-12-28 2017-07-06 日本テレビ放送網株式会社 Image signal identification apparatus, receiver, image signal identification method, and program
WO2017217241A1 (en) * 2016-06-15 2017-12-21 ソニー株式会社 Image generation device and image generation method
JPWO2017217241A1 (en) * 2016-06-15 2019-04-11 ソニー株式会社 Image generating apparatus and image generating method
US10375348B2 (en) 2016-12-28 2019-08-06 Canon Kabushiki Kaisha Image capturing apparatus operable to store captured image data in image memory, method of controlling same, and storage medium
US10721426B2 (en) 2017-08-31 2020-07-21 Canon Kabushiki Kaisha Solid-state image sensor, image capture apparatus and image capture method

Similar Documents

Publication Publication Date Title
JP4508132B2 (en) Imaging device, imaging circuit, and imaging method
JP4337911B2 (en) Imaging device, imaging circuit, and imaging method
KR101241662B1 (en) Image data processing device, image data processing method, and recording medium
KR100820528B1 (en) Digital camera, memory control device usable for it, image processing device and image processing method
JP4618802B2 (en) Imaging device
JP2008113070A (en) Imaging device and imaging method
JP2008124671A (en) Imaging apparatus and imaging method
JP2010021710A (en) Imaging device, image processor, and program
JP2017123670A (en) Imaging controller, and control method, and program therefor
US7953300B2 (en) Image apparatus and captured image recording method
JP5407651B2 (en) Image processing apparatus and image processing program
JP2018110300A (en) Imaging device, control method therefor, program, and recording medium
JP3858528B2 (en) Electronic camera and recording medium on which image processing program is recorded
JP3406924B2 (en) Image processing apparatus and method
JP2010074597A (en) Image processing device, image processing method, program and imaging device
JP4220406B2 (en) Solid-state imaging device, image recording method thereof, and image reproducing method thereof
JP2004104222A (en) Imaging unit
JP5924262B2 (en) Image processing apparatus and image processing program
JP4635076B2 (en) Solid-state imaging device
JP2009290556A (en) Image information processing apparatus and image information processing method
JP2009130563A (en) Unit, method, and program for processing data, imaging apparatus, and method and program for controlling the same
JP4701065B2 (en) Image processing apparatus and image processing method
JP2007228514A (en) Imaging apparatus and method
JP4253839B2 (en) Image compression method, image compression program, image compression apparatus, and digital camera
JP2006197181A (en) Signal processing apparatus and signal processing method for solid-state imaging device and image processing apparatus