[go: up one dir, main page]

JP2007228514A - Imaging apparatus and method - Google Patents

Imaging apparatus and method Download PDF

Info

Publication number
JP2007228514A
JP2007228514A JP2006050169A JP2006050169A JP2007228514A JP 2007228514 A JP2007228514 A JP 2007228514A JP 2006050169 A JP2006050169 A JP 2006050169A JP 2006050169 A JP2006050169 A JP 2006050169A JP 2007228514 A JP2007228514 A JP 2007228514A
Authority
JP
Japan
Prior art keywords
unit
detection
data
image data
memory
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
JP2006050169A
Other languages
Japanese (ja)
Inventor
Fumiaki Kato
文昭 加藤
Takeshi Nakajima
健 中島
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 JP2006050169A priority Critical patent/JP2007228514A/en
Publication of JP2007228514A publication Critical patent/JP2007228514A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging apparatus wherein a degree of freedom of detection for various adjustments is improved and the scale and the manufacturing cost of a signal processing circuit are suppressed. <P>SOLUTION: RAW data compressed by each block are read from an SDRAM 14 in the unit of the block, and a RAW expansion section 32 expands the data. The RAW data for an ordinary detection system are supplied to any of detectors 221 to 225 and the RAW data for a multi-detection system are supplied to a detector 230. The detector 230 detects prescribed information on the basis of input image data in each of a plurality of detection frames established on an image as a plurality of rectangular regions of the same size respectively at least in a horizontal direction, and since the single detector 230 sequentially receives image data at a position corresponding to an optional detection frame and can execute the detection from the detection frame, it is not required to prepare one detector for each detection frame. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、固体撮像素子を用いて画像を撮像する撮像装置および方法に関し、特に、撮像により得られた画像信号を一旦メモリに格納して処理する構成の撮像装置、およびその撮像装置における撮像方法に関する。   The present invention relates to an image pickup apparatus and method for picking up an image using a solid-state image pickup device, and in particular, an image pickup apparatus configured to temporarily store an image signal obtained by image pickup in a memory and process the image signal, and an image pickup method in the image pickup apparatus About.

近年、デジタルスチルカメラやデジタルビデオカメラなど、固体撮像素子を用いて撮像し、撮像画像をデジタルデータとして保存することができる撮像装置が広く普及している。このような撮像装置では、撮像素子の多画素化や、装置の高機能化・高性能化が進んでいる。特に、撮像素子の多画素化が進むと、撮像信号の処理負荷が増大するが、そのような撮像装置であっても、操作にストレスがないように高速で処理できることが求められている。   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.

図11は、従来の撮像装置の構成例を示すブロック図である。
図11に示す従来の撮像装置は、撮像素子81、アナログフロントエンド(AFE)回路82、デジタル画像処理回路83、SDRAM(Synchronous Dynamic Random Access Memory)84、ROM(Read Only Memory)85、およびストレージデバイス86を備えている。また、デジタル画像処理回路83は、カメラ信号前処理部91、検波部92、カメラ信号処理部93、解像度変換部94、JPEG(Joint Photographic Experts Group)エンジン95、CPU(Central Processing Unit)96、ビデオ出力エンコーダ97、およびSDRAMコントローラ98を備え、これらが内部バス99により相互に接続された構成となっている。
FIG. 11 is a block diagram illustrating a configuration example of a conventional imaging device.
11 includes an image sensor 81, an analog front end (AFE) circuit 82, a digital image processing circuit 83, an SDRAM (Synchronous Dynamic Random Access Memory) 84, a ROM (Read Only Memory) 85, and a storage device. 86. The digital image processing circuit 83 includes a camera signal preprocessing unit 91, a detection unit 92, a camera signal processing unit 93, a resolution conversion unit 94, a JPEG (Joint Photographic Experts Group) engine 95, a CPU (Central Processing Unit) 96, a video. An output encoder 97 and an SDRAM controller 98 are provided and are connected to each other via an internal bus 99.

このような撮像装置において、撮像素子81による撮像信号は、順次AFE回路82に供給され、CDS(Correlated Double Sampling)処理やAGC(Auto Gain Control)処理が施された後、デジタル信号に変換されて、デジタル画像処理回路83に供給される。カメラ信号前処理部91は、入力された画像信号に対して、欠陥画素補正やシェーディング補正などを施し、RAW(生)データとして、SDRAMコントローラ98を介してSDRAM84に書き込む。   In such an image pickup apparatus, an image pickup signal from the image pickup element 81 is sequentially supplied to the AFE circuit 82, subjected to CDS (Correlated Double Sampling) processing and AGC (Auto Gain Control) processing, and then converted into a digital signal. And supplied to the digital image processing circuit 83. The camera signal preprocessing unit 91 performs defective pixel correction, shading correction, and the like on the input image signal, and writes the raw image data to the SDRAM 84 through the SDRAM controller 98 as raw data.

検波部92は、そのRAWデータをSDRAMコントローラ98を介してSDRAM84から読み出し、輝度情報などの各種検波処理を行う。
カメラ信号処理部93は、RAWデータをSDRAMコントローラ98を介してSDRAM84から読み出し、検波部92による検波結果に基づくCPU96の制御に従って、読み込んだRAWデータに対して各種の画質補正処理を実行した後、輝度信号(Y)と色差信号(R−Y,B−Y)に変換して出力する。解像度変換部94は、カメラ信号処理部93からの出力画像データに対して、必要に応じて、解像度変換処理を施す。
The detection unit 92 reads the raw data from the SDRAM 84 via the SDRAM controller 98 and performs various detection processes such as luminance information.
The camera signal processing unit 93 reads out the RAW data from the SDRAM 84 via the SDRAM controller 98, and executes various image quality correction processes on the read RAW data according to the control of the CPU 96 based on the detection result by the detection unit 92. The luminance signal (Y) and the color difference signals (R−Y, B−Y) are converted and output. The resolution conversion unit 94 performs resolution conversion processing on the output image data from the camera signal processing unit 93 as necessary.

ビデオ出力エンコーダ97は、解像度変換部94により表示に適する解像度に変換された画像データを、モニタ表示用の画像信号に変換して、図示しないモニタ、あるいはビデオ出力端子97aに対して出力する。これにより、カメラスルー画像を表示させることができる。JPEGエンジン95は、カメラ信号処理部93または解像度変換部94からの画像データを、JPEG規格に従って圧縮符号化し、一旦SDRAM84に格納する。CPU96は、SDRAM84に格納されたJPEG符号化データを、ストレージデバイス86に記録する。   The video output encoder 97 converts the image data converted to a resolution suitable for display by the resolution converter 94 into an image signal for monitor display, and outputs it to a monitor (not shown) or a video output terminal 97a. Thereby, a camera through image can be displayed. The JPEG engine 95 compresses and encodes the image data from the camera signal processing unit 93 or the resolution conversion unit 94 in accordance with the JPEG standard, and temporarily stores it in the SDRAM 84. The CPU 96 records the JPEG encoded data stored in the SDRAM 84 in the storage device 86.

なお、CPU96は、この撮像装置全体の処理を、統括的に制御し、ROM85には、CPU96が実行するプログラムや、処理に必要なデータが記録されている。
ところで、上記のような従来の一般的な撮像装置では、撮像素子から得られたRAWデータを、一旦SDRAMなどの画像メモリに格納した後、読み出して画質補正処理などを施す構成となっている。例えば、インタレース読み出し方式の撮像素子を用いた場合など、複数フィールドで1フレームのキャプチャが終了するタイプの装置では、各フィールドのデータをメモリに格納してから、フレームのデータを生成することが必須である。また、カメラ信号処理部のラインメモリの規模を抑制するために、1H(水平同期期間)の長さの数分の一程度のディレイラインのみを用いて、全画面を部分的に(例えば、縦方向に数本の短冊状に)処理していくような処理系を持つ場合にも、少なくともその処理の前に全画面のデータをメモリに格納しておく必要がある。
The CPU 96 controls the overall processing of the image pickup apparatus, and the ROM 85 stores programs executed by the CPU 96 and data necessary for the processing.
By the way, in the conventional general imaging apparatus as described above, the RAW data obtained from the imaging device is temporarily stored in an image memory such as an SDRAM, and then read and subjected to image quality correction processing and the like. For example, in the case of an apparatus of a type that captures one frame in a plurality of fields, such as when using an interlaced readout type image sensor, data of each field may be stored in a memory and then frame data may be 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データを格納するメモリの容量も大きくなるという問題もあった。   Here, when writing and reading RAW data to / from the memory, data for the entire screen flows on the internal bus, so the bus bandwidth necessary for this transmission occupies most of the entire bus bandwidth during imaging. . In particular, as the number of pixels of the image sensor increases and the capacity of RAW data increases, the load of data transfer increases and the time required for memory writing / reading 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 data.

これに対して、内部バスの伝送時にRAWデータを圧縮して伝送することも考えられているが、この圧縮方式として可変長符号化方式を用いると、伝送に必要なバス帯域を一定にできなくなり、処理が複雑になる、バス帯域の削減効果を常時得られないなどの問題も生じる。   On the other hand, it is considered that the RAW data is compressed and transmitted during transmission of the internal bus. However, if the variable length coding method is used as this compression method, the bus bandwidth necessary for transmission cannot be made constant. There are also problems such as complicated processing and the inability to constantly obtain the effect of reducing the bus bandwidth.

なお、RAWデータを圧縮する機能を備えた従来の撮像装置としては、例えば、RAWデータをハフマンテーブルを利用した可逆的圧縮手法により圧縮して記録する機能を備え、そのハフマンテーブルを色チャネルごとに最適化するようにしたものがあった(例えば、特許文献1参照)。また、RAWデータを圧縮して記録するRAW圧縮モードに設定した際には、通常圧縮モードで使用するRAWデータの補間処理部をバイパスするようにしたものもあった(例えば、特許文献2参照)。しかし、上記の特許文献1は、RAWデータを可変長符号化方式で圧縮するものであり、また、特許文献1および2の双方とも、内部バスの帯域を削減するためにRAWデータを圧縮するものではない。   As a conventional imaging device having a function of compressing RAW data, for example, it has a function of compressing and recording RAW data by a reversible compression method using a Huffman table, and the Huffman table is stored for each color channel. Some have been optimized (for example, see Patent Document 1). In addition, when the RAW compression mode for compressing and recording the RAW data is set, the RAW data interpolation processing unit used in the normal compression mode is bypassed (for example, see Patent Document 2). . However, Patent Document 1 described above compresses RAW data using a variable-length encoding method, and both Patent Documents 1 and 2 compress RAW data in order to reduce the bandwidth of the internal bus. is not.

また、上記の図11のような従来の撮像装置では、メモリSDRAM84に一旦格納したRAWデータは検波部92に読み出され、検波部92では、そのRAWデータから例えばAF(Auto Focus)、AE(Auto Exposure)、ホワイトバランス制御などのための信号検波が行われる。この信号検波としては、画面全体のデータを検波する手法や、1画面を複数の検波枠に分割して検波する手法がある。そして、これらのいずれの手法でも、画素データを画面の左上からラインごとに順に読み出し、検波器に入力する手順が一般的であった。   In the conventional imaging apparatus as shown in FIG. 11, the RAW data once stored in the memory SDRAM 84 is read by the detection unit 92, and the detection unit 92 uses, for example, AF (Auto Focus), AE ( Signal detection for auto exposure and white balance control is performed. As this signal detection, there are a method for detecting data of the entire screen and a method for detecting by dividing one screen into a plurality of detection frames. In any of these methods, a general procedure is to sequentially read pixel data line by line from the upper left of the screen and input it to the detector.

しかし、検波枠が水平方向に複数設けられている場合に、このように画素データをラインごとに順に順次取得して検波するためには、画素データの入力順にあわせて、その水平方向に対する検波枠の数だけの検波器が必要となる。例えば、各検波器が複数ライン分の信号を検波する場合には、そのライン数分の画素データが走査順に入力されるまで、水平方向のすべての検波器で検波が完了しない。また、各検波器において、そのライン数分の検波が終了するまで、前のラインで検波したデータを保持しておく必要もある。   However, in the case where a plurality of detection frames are provided in the horizontal direction, in order to sequentially acquire and detect pixel data for each line in this way, the detection frame for the horizontal direction is matched with the input order of the pixel data. As many detectors as are required. For example, when each detector detects signals for a plurality of lines, detection is not completed for all the detectors in the horizontal direction until pixel data for the number of lines is input in the scanning order. Further, in each detector, it is necessary to hold data detected on the previous line until the detection for the number of lines is completed.

このような検波手法をとった場合でも、検波枠の分割数が少なければ、必要となる検波器の数も少なくて済み、回路規模や製造コストに与える影響は小さい。しかし、最近の撮像装置では、マルチ測光などと言われるように、より多くの検波枠を設けて、各種調整機能の精度を高めることや、撮像装置を高機能化することが求められている。このように検波枠の数が多くなると、必要となる検波器の数が増大し、検波データを保持しておくレジスタなどの規模も大きくなるので、回路規模や製造コストが増大することが問題となる。   Even when such a detection technique is employed, if the number of detection frame divisions is small, the number of detectors required is small, and the influence on the circuit scale and manufacturing cost is small. However, recent imaging devices are required to provide more detection frames to improve the accuracy of various adjustment functions and to enhance the functionality of imaging devices, as referred to as multi-photometry. If the number of detection frames increases in this way, the number of required detectors increases, and the scale of registers for holding detection data also increases, which increases the circuit scale and manufacturing cost. Become.

さらに、比較的大きな検波枠と、より細かく分割された検波枠の双方を用いて検波するなど、1画面に対して大きさの異なる検波枠を用いて同時に検波することも要望されている。このような場合には、検波器の数がさらに増加してしまうとともに、検波枠の異なる検波手法ごとにRAWデータを読み出す必要があるので、RAWデータの伝送負荷が増し、処理の高速化の障害になる。また、細かく分割された検波枠のうち、任意の検波枠からの検波値を用いて、より高精度で様々な制御を行う要求もあり、この場合にも同様に、RAWデータの伝送負荷や処理時間の増大が問題となる。
特開2004−40300号公報(段落番号〔0019〕〜〔0028〕、図2) 特開2003−125209号公報(段落番号〔0027〕〜〔0037〕、図1)
Furthermore, there is a demand for simultaneous detection using detection frames of different sizes for one screen, such as detection using both a relatively large detection frame and a detection frame that is more finely divided. In such a case, the number of detectors further increases, and it is necessary to read out RAW data for each detection method with different detection frames. This increases the transmission load of RAW data, and hinders processing speedup. become. In addition, among the finely divided detection frames, there is also a demand to perform various controls with higher accuracy using detection values from arbitrary detection frames. In this case as well, the transmission load and processing of RAW data are similarly performed. Increased time is a problem.
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)

以上のように、従来の撮像装置では、メモリから読み出したRAWデータを検波する際に、画面を分割した多くの検波枠を用いるようにして、各種調整機能の精度を高めようとすると、その分だけ検波器の数が多くなり、回路規模や製造コストが増大してしまうことが問題となっていた。また、撮像素子の高画素数化に伴って、画像データのメモリからの読み出しに要する時間や伝送負荷が増大することも問題になっていた。   As described above, in the conventional imaging device, when detecting the RAW data read from the memory, if many detection frames obtained by dividing the screen are used to improve the accuracy of various adjustment functions, the corresponding amount is increased. As a result, the number of detectors increases and the circuit scale and manufacturing cost increase. In addition, as the number of pixels of the image sensor increases, the time required to read image data from the memory and the transmission load increase.

本発明はこのような点に鑑みてなされたものであり、各種調整のための検波の自由度が高く、かつ、信号処理回路の規模や製造コストが抑制された撮像装置、およびそのような装置を実現できる撮像方法を提供することを目的とする。   The present invention has been made in view of the above points, an imaging apparatus having a high degree of freedom in detection for various adjustments, and a reduced scale and manufacturing cost of a signal processing circuit, and such an apparatus. An object is to provide an imaging method capable of realizing the above.

本発明では上記課題を解決するために、固体撮像素子を用いて画像を撮像する撮像装置において、前記固体撮像素子により撮像されてデジタル変換された画像データを一時的に保持するメモリと、少なくとも水平方向に対して複数設定され、それぞれ同じサイズの矩形領域として画面上に設定された複数の検波枠のそれぞれにおける入力画像データを基に、所定の情報の検波を行う単一の検波部と、前記メモリに保持された画像データを、画面内で隣接する所定数の画素からなるブロック単位で読み出して、前記単一の検波部に供給する読み出し制御部とを有することを特徴とする撮像装置が提供される。   In the present invention, in order to solve the above-described problems, in an imaging apparatus that captures an image using a solid-state imaging device, a memory that temporarily stores image data captured by the solid-state imaging device and digitally converted, and at least horizontal A single detection unit configured to detect predetermined information based on input image data in each of a plurality of detection frames set on the screen as rectangular regions of the same size, each set in a plurality of directions. There is provided an imaging apparatus comprising: a readout control unit that reads out image data held in a memory in a block unit including a predetermined number of adjacent pixels in a screen and supplies the unit to the single detection unit Is done.

このような撮像装置では、固体撮像素子により撮像され、デジタル変換された画像データが、メモリに一時的に格納された後、画面内で隣接する所定数の画素からなるブロック単位で読み出されて、単一の検波部に供給される。単一の検波部は、少なくとも水平方向に対して複数設定され、それぞれ同じサイズの矩形領域として画面上に設定された複数の検波枠のそれぞれにおける入力画像データを基に、所定の情報の検波を行う。   In such an imaging apparatus, image data captured by a solid-state imaging device and digitally converted is temporarily stored in a memory, and then read out in units of blocks each including a predetermined number of adjacent pixels in the screen. , Supplied to a single detector. A plurality of single detection units are set at least in the horizontal direction, and detect predetermined information based on input image data in each of a plurality of detection frames set on the screen as rectangular regions of the same size. Do.

また、例えばさらに、前記デジタル変換された画像データを前記ブロック単位で圧縮し、圧縮画像データとして前記メモリに供給する圧縮部と、前記メモリから読み出された前記圧縮画像データを伸張する伸張部と、前記単一の検波部が持つ検波枠より大きい1つ以上の矩形領域として画面上に設定された検波枠における入力画像データを基に、所定の情報の検波を行う他の検波部とを設け、前記読み出し制御部が、前記メモリに保持された前記圧縮画像データを前記ブロック単位で読み出し、前記伸張部に伸張させて、前記単一の検波部および前記他の検波部に対して選択的に供給するようにしてもよい。   In addition, for example, a compression unit that compresses the digitally converted image data in units of blocks and supplies the compressed image data to the memory; and a decompression unit that decompresses the compressed image data read from the memory And another detection unit for detecting predetermined information based on input image data in a detection frame set on the screen as one or more rectangular areas larger than the detection frame of the single detection unit. The read control unit reads the compressed image data held in the memory in units of blocks, expands the data to the expansion unit, and selectively selects the single detection unit and the other detection units. You may make it supply.

本発明の撮像装置によれば、少なくとも水平方向に対して複数設定され、それぞれ同じサイズの矩形領域として画面上に設定された複数の検波枠のそれぞれにおける入力画像データを基に、所定の情報の検波を行う検波器がただ1つだけ設けられ、この単一の検波器に対して、所定数の画素からなるブロック単位でメモリから読み出された画像データが供給される。これにより、単一の検波器では、任意の検波枠に対応する位置の画像データを順次受け取って、その検波枠からの検波を実行でき、例えば、画面上で水平方向に並列するすべての検波枠から検波する場合でも、それらの各検波枠に対応する検波器を用意することなく、単一の検波器で検波できる。従って、検波器の回路規模や製造コストを抑制しながらも、検波の自由度を高めることができる。   According to the imaging apparatus of the present invention, a plurality of predetermined information is set based on input image data in each of a plurality of detection frames set on the screen as a rectangular area of the same size, which is set at least in the horizontal direction. Only one detector for performing detection is provided, and image data read from the memory is supplied to the single detector in units of blocks each having a predetermined number of pixels. Thus, a single detector can sequentially receive image data at a position corresponding to an arbitrary detection frame and execute detection from the detection frame. For example, all detection frames parallel in the horizontal direction on the screen Even when detecting from a single detector, it is possible to detect with a single detector without preparing a detector corresponding to each detection frame. Therefore, it is possible to increase the degree of freedom of detection while suppressing the circuit scale and manufacturing cost of the detector.

また、例えばさらに、上記の単一の検波部が持つ検波枠より大きい1つ以上の矩形領域として画面上に設定された検波枠における入力画像データを基に、所定の情報の検波を行う他の検波部を設け、デジタル変換された画像データをメモリに格納する際に、ブロック単位で圧縮して格納するようにして、それらの圧縮画像データをメモリからブロック単位で読み出して伸張し、単一の検波部と他の検波部に対して選択的に供給するようにしてもよい。これにより、それぞれ異なる検波枠を用いて検波する単一の検波部および他の検波部を、並行して動作させることができ、しかもメモリからの画像データは圧縮画像データとして読み出されるので、読み出しに要する時間や伝送負荷が抑制される。従って、検波の自由度をさらに高めながらも、高速で、しかも回路規模や製造コストの小さい撮像装置を実現できる。   In addition, for example, the detection of predetermined information may be performed based on input image data in a detection frame set on the screen as one or more rectangular areas larger than the detection frame of the single detection unit. A detection unit is provided, and when the digitally converted image data is stored in the memory, the compressed image data is compressed and stored in units of blocks, the compressed image data is read out from the memory in units of blocks, and is expanded. You may make it selectively supply with respect to a detection part and another detection part. As a result, a single detection unit and other detection units that detect using different detection frames can be operated in parallel, and image data from the memory is read out as compressed image data. Time required and transmission load are suppressed. Therefore, it is possible to realize an image pickup apparatus that is high in speed and low in circuit scale and manufacturing cost while further increasing the degree of freedom of detection.

以下、本発明の実施の形態を図面を参照して詳細に説明する。
〔第1の実施の形態〕
図1は、本発明の第1の実施の形態に係る撮像装置の構成を示すブロック図である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[First Embodiment]
FIG. 1 is a block diagram showing the configuration of the imaging apparatus according to the first embodiment of the present invention.

図1に示す撮像装置は、撮像素子11、AFE回路12、デジタル画像処理回路13、SDRAM14、ROM15、およびストレージデバイス16を備えている。また、デジタル画像処理回路13は、カメラ信号前処理部21、検波部22、カメラ信号処理部23、解像度変換部24、JPEGエンジン25、CPU26、ビデオ出力エンコーダ27、およびSDRAMコントローラ28を備え、これらが内部バス29により相互に接続された構成となっている。さらに、このような従来からの構成に加えて、本実施の形態のデジタル画像処理回路13は、RAW圧縮部31、RAW伸張部32および33を備えている。   The imaging apparatus shown in FIG. 1 includes an imaging element 11, an AFE circuit 12, a digital image processing circuit 13, an SDRAM 14, a ROM 15, and a storage device 16. The digital image processing circuit 13 includes a camera signal preprocessing unit 21, a detection unit 22, a camera signal processing unit 23, a resolution conversion unit 24, a JPEG engine 25, a CPU 26, a video output encoder 27, and an SDRAM controller 28. Are connected to each other by an internal bus 29. Further, in addition to such a conventional configuration, the digital image processing circuit 13 of this embodiment includes a RAW compression unit 31 and RAW expansion units 32 and 33.

撮像素子11は、例えばCCD(Charge Coupled Devices)、CMOS(Complementary Metal Oxide Semiconductor)型イメージセンサなどの固体撮像素子であり、図示しないレンズブロックを通じて被写体から入射された光を、電気信号に変換する。   The imaging device 11 is a solid-state imaging device such as a CCD (Charge Coupled Devices) or CMOS (Complementary Metal Oxide Semiconductor) image sensor, and converts light incident from a subject through a lens block (not shown) into an electrical signal.

AFE回路12は、撮像素子11から出力された画像信号に対して、CDS処理によりS/N(Signal/Noise)比を良好に保つようにサンプルホールドを行い、さらにAGC処理により利得を制御し、A/D(Analog/Digital)変換を行ってデジタル画像信号を出力する。   The AFE circuit 12 samples and holds the image signal output from the image sensor 11 so as to maintain a good S / N (Signal / Noise) ratio by CDS processing, and further controls the gain by AGC processing. A / D (Analog / Digital) conversion is performed to output a digital image signal.

デジタル画像処理回路13は、例えば、SoC(System On a Chip)回路などとして形成される。このデジタル画像処理回路13において、カメラ信号前処理部21は、AFE回路12から供給された画像信号に対して、撮像素子11における欠陥画素の信号補正処理、レンズの周辺光量落ちを補正するシェーディング処理などを施し、処理後の信号をRAWデータとして出力する。   The digital image processing circuit 13 is formed as, for example, a SoC (System On a Chip) circuit. In the digital image processing circuit 13, the camera signal pre-processing unit 21 performs a signal correction process for a defective pixel in the image sensor 11 and a shading process for correcting a peripheral light loss of the lens for the image signal supplied from the AFE circuit 12. The processed signal is output as RAW data.

RAW圧縮部31は、カメラ信号前処理部21からのRAWデータを、後述する圧縮手法により圧縮し、SDRAMコントローラ28を介して、SDRAM14に供給する。後述するように、RAW圧縮部31は、カメラ信号前処理部21からのRAWデータに対して、隣接する一定数の同色成分の画素データを1ブロックとしてブロックごとに圧縮し、圧縮画像データを出力する。   The RAW compression unit 31 compresses the RAW data from the camera signal preprocessing unit 21 by a compression method to be described later, and supplies the compressed RAW data to the SDRAM 14 via the SDRAM controller 28. As will be described later, the RAW compression unit 31 compresses the RAW data from the camera signal preprocessing unit 21 for each block with pixel data of a certain number of adjacent same color components as one block, and outputs compressed image data. To do.

RAW伸張部32および33は、SDRAM14からSDRAMコントローラ28を介して読み出した、圧縮されたRAWデータを、後述する手法によりブロックごとに伸張して、それぞれ検波部22およびカメラ信号処理部23に出力する。   The RAW decompression units 32 and 33 decompress the compressed RAW data read from the SDRAM 14 via the SDRAM controller 28 for each block by a method described later, and output the decompressed data to the detection unit 22 and the camera signal processing unit 23, respectively. .

検波部22は、RAW伸張部32からのRAWデータから、AF、AE、ホワイトバランス制御などのための信号検波処理を行う。
カメラ信号処理部23は、RAW伸張部33からRAWデータにデモザイク処理を施した後、CPU26による制御の下で、ホワイトバランス調整に代表される信号補正処理を実行する。さらに、信号補正後の画像データを、例えば4:2:2などの所定フォーマットの輝度信号(Y)と色差信号(R−Y,B−Y)に変換する。
The detection unit 22 performs signal detection processing for AF, AE, white balance control, and the like from the RAW data from the RAW expansion unit 32.
The camera signal processing unit 23 performs demosaic processing on the RAW data from the RAW decompression unit 33 and then executes signal correction processing represented by white balance adjustment under the control of the CPU 26. Further, the image data after signal correction is converted into a luminance signal (Y) and a color difference signal (RY, BY) in a predetermined format such as 4: 2: 2.

解像度変換部24は、カメラ信号処理部23で処理された画像データ、あるいはJPEGエンジン25で伸張復号化された画像データの入力を受けて、所定の解像度に変換する。   The resolution conversion unit 24 receives image data processed by the camera signal processing unit 23 or image data decompressed and decoded by the JPEG engine 25 and converts the image data into a predetermined resolution.

JPEGエンジン25は、解像度変換部24で処理された画像データを圧縮符号化し、JPEG方式の符号化データを生成する。また、ストレージデバイス16から読み出されたJPEG画像データを伸張復号化する。なお、デジタル画像処理回路13には、このJPEGエンジン25以外の他の静止画圧縮方式、あるいは動画圧縮方式のエンコード/デコードエンジンが設けられてもよい。   The JPEG engine 25 compresses and encodes the image data processed by the resolution converter 24 to generate JPEG encoded data. Further, JPEG image data read from the storage device 16 is decompressed and decoded. The digital image processing circuit 13 may be provided with an encoding / decoding engine of a still image compression method or a moving image compression method other than the JPEG engine 25.

CPU26は、ROM15に格納されたプログラムを実行することにより、このデジタル画像処理回路13、および撮像装置全体を統括的に制御し、また、その制御のための各種演算を実行する。   The CPU 26 executes a program stored in the ROM 15 to control the digital image processing circuit 13 and the entire imaging apparatus in a centralized manner, and executes various operations for the control.

ビデオ出力エンコーダ27は、例えばNTSC(National Television Standards Committee)エンコーダなどとして構成され、解像度変換部24などから出力された画像データを基に、モニタ表示用の画像信号を生成し、図示しないモニタ、あるいはビデオ出力端子27aに出力する。   The video output encoder 27 is configured as an NTSC (National Television Standards Committee) encoder, for example, and generates an image signal for monitor display based on the image data output from the resolution conversion unit 24 or the like. The video is output to the video output terminal 27a.

SDRAMコントローラ28は、SDRAM14に対するインタフェースブロックであり、アドレスデコーダなどを備えて、CPU26からの制御信号に従って、SDRAM14の書き込みおよび読み出し動作を制御する。   The SDRAM controller 28 is an interface block for the SDRAM 14 and includes an address decoder and the like, and controls writing and reading operations of the SDRAM 14 according to a control signal from the CPU 26.

SDRAM14は、デジタル画像処理回路13におけるデータ処理のためのワークエリアとして用意された揮発性のメモリであり、撮像素子11からキャプチャされたデータ、すなわち、RAW圧縮部31で圧縮されたRAWデータを一時的に格納するためのキャプチャデータエリア14a、JPEGエンジン25により符号化された画像データや、その符号化・復号化処理で利用されるデータなどを一時的に格納するためのJPEG符号エリア14b、CPU26の処理で利用されるデータを一時的に格納するためのCPUワークエリア14cなどを含んでいる。   The SDRAM 14 is a volatile memory prepared as a work area for data processing in the digital image processing circuit 13, and temporarily captures data captured from the image sensor 11, that is, RAW data compressed by the RAW compression unit 31. Capture data area 14a for temporary storage, JPEG code area 14b for temporarily storing image data encoded by the JPEG engine 25, data used in the encoding / decoding process, and the CPU 26 The CPU work area 14c for temporarily storing data used in the above process is included.

ROM15は、CPU26が実行するプログラムや各種データを保持する。このROM15としては、例えば、EEPROM(Electronically Erasable and Programmable ROM)、フラッシュメモリなどの不揮発性メモリが用いられてもよい。   The ROM 15 holds programs executed by the CPU 26 and various data. As the ROM 15, for example, a nonvolatile memory such as an EEPROM (Electronically Erasable and Programmable ROM) or a flash memory may be used.

ストレージデバイス16は、符号化された画像データのファイルを記録するためのデバイスであり、例えば、フラッシュメモリ、光ディスク、磁気テープなどの記録媒体、およびそれらの記録/再生ドライブなどからなる。   The storage device 16 is a device for recording an encoded image data file, and includes, for example, a recording medium such as a flash memory, an optical disk, and a magnetic tape, and a recording / reproducing drive thereof.

このような撮像装置において、撮像素子11による撮像信号は、順次AFE回路12に供給され、CDS処理やAGC処理が施された後、デジタル信号に変換されて、デジタル画像処理回路13に供給される。カメラ信号前処理部21では、入力された画像信号に対して、欠陥画素補正やシェーディング補正などを施してRAWデータが生成され、このRAWデータは、RAW圧縮部31により圧縮された後、SDRAM14に一旦書き込まれる。   In such an image pickup apparatus, an image pickup signal from the image pickup element 11 is sequentially supplied to the AFE circuit 12, subjected to CDS processing and AGC processing, converted into a digital signal, and supplied to the digital image processing circuit 13. . In the camera signal preprocessing unit 21, RAW data is generated by performing defective pixel correction, shading correction, or the like on the input image signal. The RAW data is compressed by the RAW compression unit 31 and then stored in the SDRAM 14. Once written.

このRAWデータは、SDRAM14から読み出されて、RAW伸張部32により伸張された後、検波部22に供給される。検波部22は、読み込んだ画像データを基に所定の検波処理を行い、検波結果を例えばSDRAM14を介してCPU26に通知する。CPU26は、通知された検波結果に基づいて、AF、AE、ホワイトバランス調整のための各種制御値を演算する。   The RAW data is read from the SDRAM 14, expanded by the RAW expansion unit 32, and then supplied to the detection unit 22. The detection unit 22 performs a predetermined detection process based on the read image data, and notifies the CPU 26 of the detection result via the SDRAM 14, for example. The CPU 26 calculates various control values for AF, AE, and white balance adjustment based on the notified detection result.

一方、SDRAM14内のRAWデータは、RAW伸張部33にも読み出されて伸張された後、カメラ信号処理部23に供給される。カメラ信号処理部23は、上記制御値の演算に基づくCPU26の制御に従って、入力画像データに対して、ホワイトバランス調整などの各種画質補正処理を施す。   On the other hand, the RAW data in the SDRAM 14 is also read out and expanded by the RAW expansion unit 33 and then supplied to the camera signal processing unit 23. The camera signal processing unit 23 performs various image quality correction processes such as white balance adjustment on the input image data in accordance with the control of the CPU 26 based on the calculation of the control value.

画質補正処理後の画像データは、例えばSDRAM14に一旦格納された後、解像度変換部24により、表示に適した解像度のデータに変換され、さらに例えばSDRAM14に格納された後、ビデオ出力エンコーダ27に供給される。これにより、カメラスルー画像がモニタに表示される。   The image data after the image quality correction processing is temporarily stored in, for example, the SDRAM 14, converted into data having a resolution suitable for display by the resolution conversion unit 24, and further stored in, for example, the SDRAM 14, and then supplied to the video output encoder 27. Is done. Thereby, a camera through image is displayed on the monitor.

また、図示しない入力部などを通じて画像の記録が要求されると、解像度変換部24は、カメラ信号処理部23で画質補正処理された画像データを、必要に応じて記録用に設定された解像度のデータに変換して、例えばSDRAM14に一旦格納し、JPEGエンジン25は、この画像データを圧縮符号化して、符号化データを生成する。符号化データは、例えばSDRAM14に一旦記録された後、ストレージデバイス16に記録される。   When image recording is requested through an input unit (not shown) or the like, the resolution conversion unit 24 converts the image data subjected to image quality correction processing by the camera signal processing unit 23 to a resolution set for recording as necessary. For example, the JPEG engine 25 compresses and encodes the image data to generate encoded data. For example, the encoded data is once recorded in the SDRAM 14 and then recorded in the storage device 16.

また、ストレージデバイス16に記録された画像データ(符号化データ)は、JPEGエンジン25で伸張復号化され、解像度変換部24で解像度変換された後、ビデオ出力エンコーダ27に出力されることで、モニタに表示させることができる。   Further, the image data (encoded data) recorded in the storage device 16 is decompressed and decoded by the JPEG engine 25, converted in resolution by the resolution converter 24, and then output to the video output encoder 27. Can be displayed.

このようなデジタル画像処理回路13では、カメラ信号前処理部21から内部バス29に対する画像データの入力位置に、RAWデータを圧縮するRAW圧縮部31を設けたことにより、内部バス29を通じてSDRAM14に伝送されて記録されるRAWデータのデータ量を低減することができる。また、内部バス29から検波部22およびカメラ信号処理部23のそれぞれに対する画像データの入力位置に、RAWデータを伸張するRAW伸張部32および33を設けたことにより、同様に、SDRAM14から検波部22およびカメラ信号処理部23に伝送されるRAWデータのデータ量を低減することができる。   In such a digital image processing circuit 13, a RAW compression unit 31 that compresses RAW data is provided at the input position of the image data from the camera signal preprocessing unit 21 to the internal bus 29, and is transmitted to the SDRAM 14 through the internal bus 29. Thus, the amount of RAW data to be recorded can be reduced. Further, by providing RAW expansion units 32 and 33 for expanding RAW data at the input positions of the image data from the internal bus 29 to the detection unit 22 and the camera signal processing unit 23, respectively, the detection unit 22 from the SDRAM 14 is similarly detected. In addition, the amount of RAW data transmitted to the camera signal processing unit 23 can be reduced.

これにより、撮像動作中の内部バス29の伝送負荷を軽減し、SDRAM14に対する書き込み/読み出し処理に要する時間を短縮することが可能となる。特に、圧縮/伸張の処理をできるだけ簡単にすることで、処理時間の短縮効果を上げることができる。また、バス上の伝送周波数を低減して、消費電力を抑制することもできる。   As a result, the transmission load of the internal bus 29 during the imaging operation can be reduced, and the time required for the writing / reading processing with respect to the SDRAM 14 can be shortened. In particular, by simplifying the compression / decompression process as much as possible, the effect of shortening the processing time can be increased. In addition, power consumption can be suppressed by reducing the transmission frequency on the bus.

また、SDRAM14の容量も小さくすることができる。あるいは、SDRAM14の領域を他の処理に利用する、複数フレーム分のRAWデータを格納して、連写できる枚数を増やす、あるいは連写速度を向上させるなど、高画質化・高機能化に寄与することもできる。従って、撮像やデータ記録に必要な時間が短くされた、高性能かつ小型、低コストの撮像装置を実現できる。   Further, the capacity of the SDRAM 14 can be reduced. Alternatively, the area of the SDRAM 14 is used for other processing, RAW data for a plurality of frames is stored, the number of continuous shots is increased, or the continuous shooting speed is improved, which contributes to higher image quality and higher functionality. You can also. 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 shortened.

このRAW圧縮部31、RAW伸張部32および33では、後述するように、固定長の符号化が可能で、かつ、画像品質を良好に保つことができ、しかも比較的簡単な処理で実現できる非可逆圧縮/伸張手法を採用している。固定長で符号化することで、内部バス29における伝送負荷や、SDRAM14上のキャプチャデータエリア14aの容量を安定的に低減でき、また、SDRAM14における読み出し/書き込みの制御処理を単純化できる。また、圧縮/伸張処理を簡単にし、高速化することで、撮像動作が確実に高速化される。   As will be described later, the RAW compression unit 31 and the RAW expansion units 32 and 33 can perform fixed-length encoding, maintain good image quality, and can be realized by relatively simple processing. Reversible compression / decompression technique is used. By encoding with a fixed length, the transmission load on the internal bus 29 and the capacity of the capture data area 14a on the SDRAM 14 can be stably reduced, and the read / write control processing in the SDRAM 14 can be simplified. In addition, since the compression / decompression process is simplified and speeded up, the imaging operation is reliably speeded up.

次に、デジタル画像処理回路13の検波部22における検波処理について説明する。本実施の形態の検波部22では、RAWデータをSDRAM14から1ラインずつ順に読み出して検波する方式(通常検波方式と呼ぶ)と、多数の検波枠を用い、検波枠に対応するRAWデータを任意に取得して検波できる方式(マルチ検波方式と呼ぶ)の2種類の方式で、検波を行うことが可能となっている。   Next, detection processing in the detection unit 22 of the digital image processing circuit 13 will be described. In the detection unit 22 according to the present embodiment, a RAW data is sequentially read out from the SDRAM 14 line by line (referred to as a normal detection method) and a number of detection frames are used, and RAW data corresponding to the detection frames is arbitrarily set. Detection can be performed by two types of methods (called a multi-detection method) that can be acquired and detected.

より多くの検波枠を用いたマルチ検波方式を採用することにより、撮像動作や画質補正の際に、よりきめ細かい制御を行うことが可能になる。例えば、フォーカス合わせや、ホワイトバランス制御における光源判定の精度を高める、白飛びや黒つぶれが生じないように明るさを制御する、明るさや色再現の状態を撮影シーンやユーザ設定に応じて適正化するといったことが可能になる。さらに、上記の通常検波方式とマルチ検波方式のように、検波枠の大きさの異なる複数の方式を併用して検波することで、制御の目的に応じてさらに適切かつ精細な制御を実行することが可能になり、画質の向上や高機能化など、より大きなメリットが生まれる。   By adopting a multi-detection method using a larger number of detection frames, it becomes possible to perform finer control during an imaging operation or image quality correction. For example, improve the accuracy of light source determination in focus adjustment and white balance control, control the brightness so that overexposure and underexposure do not occur, and optimize the brightness and color reproduction status according to the shooting scene and user settings It becomes possible to do. Furthermore, by performing detection in combination with a plurality of methods having different detection frame sizes, such as the above-described normal detection method and multi-detection method, more appropriate and fine control can be executed according to the purpose of the control. Will be possible, and there will be greater benefits such as improved image quality and higher functionality.

なお、カメラ信号処理部23において検波される情報としては、例えば、輝度情報、色差情報、RGB(Red,Green,Blue)各成分の情報、それらのいずれかについての検波枠ごとの積分値、所定のしきい値を基準としたヒストグラムなどが考えられる。以下で説明する通常検波方式は、例えば、AF制御のための輝度情報のHPF出力の検波などに利用される。また、マルチ検波方式は、例えば、AE制御のための輝度情報の積分値やヒストグラムの検波、ホワイトバランス調整のためのRGB各成分の積分値の検波などに利用される。   The information detected by the camera signal processing unit 23 includes, for example, luminance information, color difference information, information on each component of RGB (Red, Green, Blue), an integrated value for each detection frame, or a predetermined value. A histogram or the like based on the threshold value can be considered. The normal detection method described below is used, for example, for detection of HPF output of luminance information for AF control. In addition, the multi-detection method is used, for example, for detection of integral values of luminance information for AE control, detection of histograms, integration values of RGB components for white balance adjustment, and the like.

図2は、通常検波方式の例について説明するための図である。
通常検波方式では、図2(A)に示すように、比較的大きく分割された5つの検波枠Fa1〜Fa5が設定され、各検波枠Fa1〜Fa5から個別に検波することが可能になっている。この通常検波方式では、図2(B)に示すように、SDRAM14に格納されたRAWデータを1ラインずつ順次読み出し、各検波枠Fa1〜Fa5に対応する検波器に入力させる。なお、画像内のデータを、必要に応じて所定ラインごとに間引いて読み出すこともできる。また、このような検波枠Fa1〜Fa5を用いた検波の他に、画面全体から検波できるようにしてもよい。
FIG. 2 is a diagram for explaining an example of the normal detection method.
In the normal detection method, as shown in FIG. 2A, five detection frames Fa1 to Fa5 that are relatively large are set, and it is possible to individually detect each detection frame Fa1 to Fa5. . In this normal detection method, as shown in FIG. 2B, the RAW data stored in the SDRAM 14 is sequentially read out line by line and input to the detectors corresponding to the detection frames Fa1 to Fa5. It should be noted that the data in the image can be read by thinning out every predetermined line as necessary. Further, in addition to detection using such detection frames Fa1 to Fa5, detection may be performed from the entire screen.

ここで、検波枠Fa2〜Fa4は水平方向に並列に設けられているので、RAWデータが1ラインずつ読み出された場合には、各検波枠Fa2〜Fa4が備えるすべてのライン分のRAWデータが読み出されるまで、検波が完了しない。従って、検波枠Fa2〜Fa4のそれぞれに対応する検波器を設け、必要なすべてのラインのRAWデータが入力されて検波が完了するまでの間、各検波器において入力データを内部のレジスタなどに一時的に保持しておく必要がある。   Here, since the detection frames Fa2 to Fa4 are provided in parallel in the horizontal direction, when the RAW data is read line by line, the RAW data for all the lines included in each detection frame Fa2 to Fa4 is obtained. Detection is not completed until read. Accordingly, a detector corresponding to each of the detection frames Fa2 to Fa4 is provided, and input data is temporarily stored in an internal register or the like in each detector until detection of the RAW data of all necessary lines is completed and detection is completed. It is necessary to keep it.

図3は、マルチ検波方式の例について説明するための図である。
マルチ検波方式では、図2の通常検波方式と比較して、より多くの(すなわち、より小さく分割された)検波枠から検波できるようになっている。特に、このマルチ検波方式では、通常検波方式と比較して水平方向に対してより多くの検波枠を設けている。本実施の形態では、図3(A)に示すように、画面を例えば7×7の領域に分割した検波枠Fb1〜Fb49を設定している。また、図3(B)は、検波枠Fb1〜Fb49のそれぞれに対応するRAWデータをSDRAM14から個別に読み出す場合の読み出し手法について示している。なお、この図3では、各検波枠Fb1〜Fb49の間隔を空けて示しているが、実際には、間隔を空けずに検波枠を設けてもよい。
FIG. 3 is a diagram for explaining an example of the multi-detection method.
In the multi-detection method, detection can be performed from a larger number of detection frames (that is, smaller divided frames) as compared with the normal detection method of FIG. In particular, in this multi-detection method, more detection frames are provided in the horizontal direction than in the normal detection method. In the present embodiment, as shown in FIG. 3A, detection frames Fb1 to Fb49 obtained by dividing the screen into, for example, 7 × 7 areas are set. FIG. 3B shows a reading method when RAW data corresponding to each of the detection frames Fb1 to Fb49 is individually read from the SDRAM 14. In FIG. 3, the detection frames Fb <b> 1 to Fb <b> 49 are shown spaced apart from each other, but actually, the detection frames may be provided without any gaps.

ここで、通常検波方式とマルチ検波方式の双方により検波することが可能な従来の検波部の構成例を、参考のために示す。図4は、このような従来の検波部の構成例を示すブロック図である。   Here, a configuration example of a conventional detection unit capable of detecting by both the normal detection method and the multi-detection method is shown for reference. FIG. 4 is a block diagram showing a configuration example of such a conventional detection unit.

図4に示す従来の検波部22aは、Y−C合成部210と、通常検波用の検波器221〜225と、マルチ検波用の検波器231〜237とを備えている。また、検波部22aの入力段には、CPU26による制御の下でSDRAM14からのデータ読み出しを制御するDMA(Direct Memory Access)コントローラ22bが設けられている。なお、この従来構成では、RAWデータの圧縮処理を行わない場合を想定しているため、検波部22aの入力段にはRAW伸張部32は設けられていない。   The conventional detector 22a shown in FIG. 4 includes a Y-C synthesizer 210, normal detectors 221 to 225, and multi-detectors 231 to 237. In addition, a DMA (Direct Memory Access) controller 22b that controls reading of data from the SDRAM 14 under the control of the CPU 26 is provided at the input stage of the detection unit 22a. In this conventional configuration, since it is assumed that RAW data compression processing is not performed, the RAW expansion unit 32 is not provided in the input stage of the detection unit 22a.

この従来構成において、SDRAM14から読み出されたRAWデータは、Y−C合成部210により必要に応じて輝度情報あるいは色差情報に変換され、検波器221〜225,その都度231〜237のいずれかに供給される。すなわち、Y−C合成部210からの出力データは、例えば、通常検波方式で検波される場合には、通常検波用の検波器221〜225の信号系に振り分けられ、マルチ検波方式で検波される場合には、検波器231〜237の信号系に振り分けられる。   In this conventional configuration, the RAW data read from the SDRAM 14 is converted into luminance information or color difference information by the Y-C synthesis unit 210 as necessary, and is sent to any one of the detectors 221 to 225 and 231 to 237 each time. Supplied. That is, when the output data from the Y-C combining unit 210 is detected by the normal detection method, for example, it is distributed to the signal system of the detectors 221 to 225 for normal detection and detected by the multi-detection method. In this case, the signals are distributed to the signal systems of the detectors 231 to 237.

検波器221〜225は、それぞれ図2に示した通常検波方式の検波枠Fa1〜Fa5に対応している。ここで、通常検波方式では、上述したように、SDRAM14上のRAWデータは1ラインごとに検波器221〜225のいずれかに供給される。すなわち、検波器221〜225で検波が行われる場合には、DMA22bは、CPU26からの制御に応じて、SDRAM14上のRAWデータを1ラインごとに順次読み出して、検波部22a内に供給する。また、通常検波方式では、図2(A)のように検波枠Fa2〜Fa4が水平方向に並列に設けられているので、RAWデータが1ラインごとに供給される場合には、検波枠Fa2〜Fa4に対応する3つの検波器222〜224が少なくとも必要となる。   The detectors 221 to 225 correspond to the detection frames Fa1 to Fa5 of the normal detection method shown in FIG. Here, in the normal detection method, as described above, the RAW data on the SDRAM 14 is supplied to one of the detectors 221 to 225 for each line. That is, when detection is performed by the detectors 221 to 225, the DMA 22b sequentially reads out the RAW data on the SDRAM 14 line by line in accordance with control from the CPU 26 and supplies it to the detection unit 22a. In the normal detection method, the detection frames Fa2 to Fa4 are provided in parallel in the horizontal direction as shown in FIG. 2A. Therefore, when RAW data is supplied for each line, the detection frames Fa2 to Fa2 are provided. At least three detectors 222 to 224 corresponding to Fa4 are required.

一方、検波器231〜237は、マルチ検波方式で検波するために設けられたものであり、図3(A)のように水平方向に並列して設けられた検波枠にそれぞれが対応する。例えば、検波枠Fb1〜Fb7からの検波を行う場合には、検波枠Fb1〜Fb7のそれぞれについて検波器231〜237により検波が行われる。このように、従来では、通常検波方式での動作に合わせて、マルチ検波方式でも、SDRAM14上のRAWデータを1ラインごとに読み出して、検波器231〜237に供給していたので、マルチ検波方式用に水平方向に設けられた検波枠の数だけ、検波器が設けられていた。   On the other hand, the detectors 231 to 237 are provided for detection by a multi-detection method, and each correspond to a detection frame provided in parallel in the horizontal direction as shown in FIG. For example, when detecting from the detection frames Fb1 to Fb7, the detectors 231 to 237 detect the detection frames Fb1 to Fb7, respectively. As described above, conventionally, the RAW data on the SDRAM 14 is read for each line and supplied to the detectors 231 to 237 even in the multi-detection system in accordance with the operation in the normal detection system. There are as many detectors as there are horizontal detection frames.

ここで、通常検波方式では、検波枠数が比較的少ないので、水平方向に並列する検波枠の数だけ検波器を設けても、その分だけ回路規模や製造コストが増えることについてはあまり問題にはならなかった。しかし、マルチ検波方式では、水平方向に対してもより多くの検波枠を設定することが要求されており、検波枠が多数になると、回路規模や製造コストの増加が大きな問題となる。特に、検波器は、対応する検波枠の持つ全ラインに対してデータが入力されるまで、それらの入力データを保持しておくためのレジスタなどを備える必要があるので、検波器が多数になると非常に大規模な回路になってしまう。   Here, since the number of detection frames is relatively small in the normal detection method, even if detectors are provided as many as the number of detection frames arranged in parallel in the horizontal direction, the circuit scale and manufacturing cost increase by that much. I didn't. However, in the multi-detection method, it is required to set more detection frames in the horizontal direction. When there are a large number of detection frames, an increase in circuit scale and manufacturing cost becomes a big problem. In particular, the detector needs to be provided with a register or the like for holding the input data until data is input to all lines of the corresponding detection frame. It becomes a very large circuit.

これに対して、RAWデータをSDRAM14から1ラインごとに読み出すのではなく、図3(B)に示したように、各検波枠に必要な分だけ読み出すような制御ができれば、検波器の数を減らすことができる。しかし、通常検波方式の検波器221〜225と異なる読み出し方式を検波器231〜237に適用すると、CPU26による読み出し制御が非常に複雑になり、実現は難しかった。   On the other hand, if the RAW data is not read from the SDRAM 14 for each line but can be controlled to read only the necessary amount for each detection frame as shown in FIG. Can be reduced. However, when a reading method different from the detectors 221 to 225 of the normal detection method is applied to the detectors 231 to 237, the reading control by the CPU 26 becomes very complicated and difficult to realize.

さらに、図4において、検波器221〜225を用いた通常検波方式による検波と、検波器231〜237を用いたマルチ検波方式による検波の双方を使用すると、SDRAM14から読み出すRAWデータの量が増大してしまい、内部バス29の伝送負荷が増大し、またSDRAM14からの読み出しに要する時間も長くなってしまうという問題もあった。例えば、通常検波方式とマルチ検波方式の双方でそれぞれ全画面に亘る検波を行う場合には、SDRAM14から1画面分のRAWデータを2回読み出さなくてはならなかった。   Further, in FIG. 4, when both the detection by the normal detection method using the detectors 221 to 225 and the detection by the multi-detection method using the detectors 231 to 237 are used, the amount of RAW data read from the SDRAM 14 increases. As a result, the transmission load of the internal bus 29 increases, and the time required for reading from the SDRAM 14 also increases. For example, when performing detection over the entire screen in both the normal detection method and the multi-detection method, it is necessary to read RAW data for one screen from the SDRAM 14 twice.

これに対して、図5は、本実施の形態に適用される検波部の構成例を示すブロック図である。なお、図5では、図4に対応する機能には同じ符号を付して示している。
本実施の形態に適用される検波部22は、図5に示すように、セレクタ200と、それぞれ通常検波方式およびマルチ検波方式のためのY−C合成部211および212と、通常検波方式のための検波器221〜225と、マルチ検波方式のための検波器230とを備えている。また、検波部22の入力段にはRAW伸張部32が設けられ、その入力段には、内部バス29を通じたSDRAM14からのデータ読み出しを制御するDMAコントローラ22bが設けられている。さらに、検波器230の出力段には、その検波結果の内部バス29を通じたSDRAM14に対する書き込みを制御するDMAコントローラ22cが設けられている。
On the other hand, FIG. 5 is a block diagram showing a configuration example of a detection unit applied to the present embodiment. In FIG. 5, the functions corresponding to those in FIG. 4 are denoted by the same reference numerals.
As shown in FIG. 5, the detection unit 22 applied to the present embodiment includes a selector 200, Y-C combining units 211 and 212 for a normal detection method and a multi-detection method, respectively, and a normal detection method. Detectors 221 to 225 and a detector 230 for the multi-detection method. A RAW decompression unit 32 is provided at the input stage of the detection unit 22, and a DMA controller 22 b that controls reading of data from the SDRAM 14 through the internal bus 29 is provided at the input stage. Furthermore, a DMA controller 22 c that controls writing of the detection result to the SDRAM 14 through the internal bus 29 is provided at the output stage of the detector 230.

ここで、本実施の形態では、RAW圧縮部31においては、入力されるRAWデータのうち、水平方向に並列する一定数(例えば16画素)の同色成分の画素データを1ブロックとして、圧縮画像データが生成されるものとする。図5におけるRAW伸張部32は、SDRAM14から読み出された圧縮画像データをブロック単位で伸張し、検波部22に出力する。   Here, in the present embodiment, in the RAW compression unit 31, among the input RAW data, a fixed number (for example, 16 pixels) of the same color component pixel data arranged in parallel in the horizontal direction is regarded as one block, and the compressed image data. Is generated. The RAW decompression unit 32 in FIG. 5 decompresses the compressed image data read from the SDRAM 14 in units of blocks and outputs the decompressed data to the detection unit 22.

セレクタ200は、CPU26による制御の下で、入力される伸張された画素データを、Y−C合成部211および212のいずれかに振り分ける。すなわち、通常検波方式で検波されるRAWデータをY−C合成部211に出力し、マルチ検波方式で検波されるRAWデータをY−C合成部212に出力する。また、このセレクタ200は、最小でブロック単位、すなわち16画素単位で、出力の切り替えを行うようになっている。   The selector 200 distributes the input expanded pixel data to one of the Y-C combining units 211 and 212 under the control of the CPU 26. That is, RAW data detected by the normal detection method is output to the Y-C combining unit 211, and RAW data detected by the multi-detection method is output to the Y-C combining unit 212. The selector 200 switches the output in units of blocks, that is, in units of 16 pixels at the minimum.

Y−C合成部211および212は、通常検波方式とマルチ検波方式のためにそれぞれ個別に設けられたことにより、検波方式に応じてそれぞれ異なる種類のデータを生成することが可能になっている。   The Y-C combining units 211 and 212 are individually provided for the normal detection method and the multi-detection method, so that different types of data can be generated according to the detection method.

検波器221〜225は、図4で説明した通り、それぞれ図2に示した検波枠Fa1〜Fa5に対応して、入力データを検波する。一方、検波器230は、図4で示した検波器231〜237のうちの1つに相当し、図3に示した検波枠Fb1〜Fb49のいずれからでも検波できるようになっている。   As described with reference to FIG. 4, the detectors 221 to 225 detect input data corresponding to the detection frames Fa <b> 1 to Fa <b> 5 illustrated in FIG. 2. On the other hand, the detector 230 corresponds to one of the detectors 231 to 237 shown in FIG. 4, and can detect from any of the detection frames Fb1 to Fb49 shown in FIG.

DMAコントローラ22cは、DMAコントローラ22bによるSDRAM14からの読み出し制御とは別に、検波器230による検波結果のSDRAM14への書き込みを制御できるようになっている。例えば、SDRAM14が入出力の個別チャネルを持つ場合には、検波器221〜225での通常検波方式での検波の実行時に、検波器230での検波結果をSDRAM14に書き込むことが可能となっている。そして、SDRAM14に書き込まれた検波値は、CPU26により読み出されて、各種調整制御のための演算に用いられる。   The DMA controller 22c can control writing of the detection result by the detector 230 to the SDRAM 14 separately from the reading control from the SDRAM 14 by the DMA controller 22b. For example, when the SDRAM 14 has input / output individual channels, the detection result of the detector 230 can be written to the SDRAM 14 when the detectors 221 to 225 perform detection by the normal detection method. . The detected value written in the SDRAM 14 is read by the CPU 26 and used for calculations for various adjustment controls.

なお、図示しないが、検波器221〜225のそれぞれによる検波値も、検波完了後にSDRAM14に一時的に格納され、CPU26に利用される。あるいは、これらの検波値はCPU26に直接読み出されてもよい。ただし、検波器221〜225に対応する検波枠Fa1〜Fa5は、検波器230に対応する検波枠Fb1〜Fb49より大きいため、検波器221〜225からの検波結果の出力間隔は、検波器230からの出力間隔よりはるかに長くなる。   Although not shown, the detection values by the detectors 221 to 225 are also temporarily stored in the SDRAM 14 after the detection is completed and used by the CPU 26. Alternatively, these detection values may be read directly by the CPU 26. However, since the detection frames Fa1 to Fa5 corresponding to the detectors 221 to 225 are larger than the detection frames Fb1 to Fb49 corresponding to the detector 230, the output interval of the detection results from the detectors 221 to 225 is from the detector 230. Much longer than the output interval.

ここで、DMAコントローラ22bは、CPU26による制御の下で、RAWデータを、ブロック単位で圧縮された圧縮画像データとしてSDRAM14から読み出す。すなわち、RAWデータは、一定数の画素データからなるブロック単位でSDRAM14から読み出され、検波部22に供給される。また、ブロックに含まれる画素数は、マルチ検波方式での各検波枠Fb1〜Fb49が持つ水平方向の画素に含まれる同色成分の画素数と同じか、その画素数を等分割した数であることが望ましい。   Here, the DMA controller 22b reads the RAW data from the SDRAM 14 as compressed image data compressed in units of blocks under the control of the CPU 26. That is, the RAW data is read from the SDRAM 14 in units of blocks each including a certain number of pixel data, and is supplied to the detection unit 22. The number of pixels included in the block is the same as the number of pixels of the same color component included in the horizontal pixels of the detection frames Fb1 to Fb49 in the multi-detection method, or the number of pixels is equally divided. Is desirable.

従って、ブロック単位で読み出されたRAWデータをセレクタ200で振り分けることで、検波器221〜225に対するRAWデータの読み出しと、検波器230に対する読み出しとを、それぞれ個別に制御することができる。例えば、本実施の形態では、検波器221〜225に対しては、従来の通常検波方式と同様に、ブロック単位のRAWデータを1ライン分だけ連続して読み出し、供給する。また、検波器230に対しては、検波枠Fb1〜Fb49を任意に選択して、その検波枠に必要なRAWデータのみを個別に読み出すことが可能になっている。そして、1ラインごとのRAWデータの読み出しと、任意の検波枠に対応するRAWデータの読み出しとを時分割で交互に実行し、セレクタ200で振り分けることで、所望の検波器にRAWデータを供給することが可能になる。   Therefore, by sorting the RAW data read in block units by the selector 200, the reading of the RAW data for the detectors 221 to 225 and the reading of the detector 230 can be individually controlled. For example, in this embodiment, RAW data in units of blocks is continuously read and supplied to the detectors 221 to 225 for one line as in the conventional normal detection method. Further, for the detector 230, it is possible to arbitrarily select the detection frames Fb1 to Fb49 and individually read out only the RAW data necessary for the detection frame. Then, RAW data reading for each line and RAW data reading corresponding to an arbitrary detection frame are alternately executed in a time division manner, and distributed by the selector 200 to supply the RAW data to a desired detector. It becomes possible.

なお、図5のように読み出し用の1系統のDMAコントローラ22bを設ける構成の代わりに、通常検波方式とマルチ検波方式のそれぞれのために個別の読み出し用DMAコントローラおよびRAW伸張部を設け、それぞれの系統で読み出されて伸張されたデータを、セレクタ200を用いずに直接Y−C合成部211および212に供給する構成としても、上記と同様な動作が可能である。   Instead of the configuration in which one DMA controller 22b for reading is provided as shown in FIG. 5, a separate reading DMA controller and RAW expansion unit are provided for each of the normal detection method and the multi-detection method. Even if the data read and decompressed by the system is supplied directly to the Y-C combining units 211 and 212 without using the selector 200, the same operation as described above is possible.

このように、検波器230に対して、画面上の任意の位置のRAWデータを読み出して供給できるようにしたことで、マルチ検波方式のための検波器の数を1つのみにすることができ、回路規模が縮小され、製造コストも抑制される。   In this way, the RAW data at an arbitrary position on the screen can be read and supplied to the detector 230, so that the number of detectors for the multi-detection method can be reduced to one. The circuit scale is reduced and the manufacturing cost is also suppressed.

また、1ライン分の入力データを保持しておく必要がなく、1つの検波枠からの検波値をSDRAM14などにすぐに出力できるので、検波部22に必要とされる回路が、検波枠の数や必要な検波枠の位置に左右されない。換言すれば、同じ大きさの検波枠であれば、その検波枠が画面上にいくつ設定されていても、またどの位置の検波枠からの検波が必要とされても、1つの検波器230のみで処理できる。従って、回路規模を大きくすることなく、検波の自由度が高まり、撮像動作や画質補正に対して一層きめ細かい制御を行うことが可能になる。   In addition, since it is not necessary to hold input data for one line and a detection value from one detection frame can be immediately output to the SDRAM 14 or the like, a circuit required for the detection unit 22 is provided with the number of detection frames. And the position of the required detection frame. In other words, if the detection frame has the same size, no matter how many detection frames are set on the screen or any position from which detection frame is required, only one detector 230 is required. Can be processed. Therefore, the degree of freedom of detection is increased without increasing the circuit scale, and finer control can be performed for the imaging operation and image quality correction.

さらに、SDRAM14に対して圧縮されたRAWデータを格納し、その圧縮されたRAWデータを読み出すようにしたことで、上記動作のように、通常検波方式での検波とマルチ検波方式での検波とを並列に実行した場合でも、内部バス29上の読み出しデータの伝送負荷が軽減され、SDRAM14からの読み出しに要する時間も短縮される。例えば、通常検波方式とマルチ検波方式の双方で全画面に亘って検波した場合でも、RAWデータの圧縮率が後述のように1/2であれば、1画面分の非圧縮のRAWデータをSDRAM14から読み出す場合と同じ処理時間および伝送負荷で実現できる。   Further, by storing the compressed RAW data in the SDRAM 14 and reading the compressed RAW data, the detection by the normal detection method and the detection by the multi-detection method are performed as described above. Even when executed in parallel, the transmission load of read data on the internal bus 29 is reduced, and the time required for reading from the SDRAM 14 is also reduced. For example, even when detection is performed over the entire screen using both the normal detection method and the multi-detection method, if the RAW data compression rate is ½ as will be described later, uncompressed RAW data for one screen is stored in the SDRAM 14. It can be realized with the same processing time and transmission load as when reading from the network.

従って、回路規模や製造コストを増大させることなく、撮像動作や画質補正の精度が高く、あるいは撮像時の様々な調整機能などが搭載されて機能が向上された、高速な撮像動作が可能な撮像装置を実現することが可能となる。   Therefore, without increasing the circuit scale and manufacturing cost, the imaging operation and the accuracy of image quality correction are high, or various adjustment functions at the time of imaging are installed and the functions are improved, so that imaging capable of high-speed imaging operation is possible. An apparatus can be realized.

次に、本実施の形態で適用されるRAWデータの圧縮/伸張手法について説明する。本実施の形態では、以下で説明するように、固定長の符号化が可能で、かつ、画像品質を良好に保つことができ、しかも比較的簡単な処理で実現できる非可逆圧縮/伸張手法を採用する。   Next, a RAW data compression / decompression technique applied in this 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.

ここで、固定長の符号化を可能とすることで、SDRAM14に対して読み書きするRAWデータの帯域を一定に保つことができ、内部バス29における伝送負荷を安定的に低減できる。また、検波部22やカメラ信号処理部23におけるRAWデータの取り扱い(例えばSDRAM14からの読み出し制御処理)や、内部バス29を通じたRAWデータの伝送制御処理を、単純化することもできる。特に、検波部22では、固定長の符号化がなされることで、CPU26によるDMA22bに対する読み出しアドレス指定やセレクタ200の切り替え制御が単純化される。   Here, by enabling encoding of a fixed length, it is possible to keep the bandwidth of RAW data read / written to / from the SDRAM 14 constant, and to stably reduce the transmission load on the internal bus 29. Also, handling of RAW data (for example, read control processing from the SDRAM 14) in the detection unit 22 and camera signal processing unit 23 and transmission control processing of RAW data through the internal bus 29 can be simplified. In particular, the detection unit 22 performs fixed-length encoding, thereby simplifying the CPU 26 reading address designation to the DMA 22b and the selector 200 switching control.

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

図6は、RAW圧縮部の内部構成を示すブロック図である。
図6に示すように、RAW圧縮部31は、折れ線圧縮部301、ブロック化部302、最大/最小検出部303、最小値ラッチ部304、最大値ラッチ部305、最小値アドレスラッチ部306、最大値アドレスラッチ部307、減算器308および309、量子化器310、量子化データバッファ311、およびパッキング部312を備えている。
FIG. 6 is a block diagram showing an internal configuration of the RAW compression unit.
As shown in FIG. 6, the RAW compression unit 31 includes a polygonal line compression unit 301, a blocking unit 302, a maximum / minimum detection unit 303, a minimum value latch unit 304, a maximum value latch unit 305, a minimum value address latch unit 306, a maximum A value address latch unit 307, subtracters 308 and 309, a quantizer 310, a quantized data buffer 311, and a packing unit 312 are provided.

折れ線圧縮部301は、入力された14ビットのRAWデータを、折れ線を用いた近似により11ビットのデータに非線形で圧縮する。この折れ線圧縮部301は、この後の圧縮手順の前に、できるだけ階調を下げておくことで、全体的な圧縮効率を向上させることを目的として設けられている。このため、目的とする圧縮率によっては、省略されてもよい。なお、この場合には、後の図9で説明するRAW伸張部32の出力段に設けられる逆折れ線変換部についても、省略する必要がある。   The polygonal line compression unit 301 nonlinearly compresses the input 14-bit RAW data into 11-bit data by approximation using a polygonal line. The broken line compression unit 301 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 32 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 polygonal line may be prepared for each color component, for example, and used by switching for each color component of the input pixel.

折れ線圧縮部301では、例えば、このような折れ線を用いて、入力データの階調を変換した後、変換後のデータを8で除算(すなわち3ビット分下位にシフト)して、11ビットデータに圧縮する。このとき、捨てられる下位ビットは、例えば四捨五入する。あるいは、折れ線圧縮部301では、以上のような演算に基づく、入力データと圧縮後の出力データとを対応付けて記憶したROMテーブルを用意し、このROMテーブルに従って入出力データの変換が行われてもよい。   In the polygonal line compression unit 301, 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 be converted into 11-bit data. Compress. At this time, the discarded lower bits are rounded off, for example. Alternatively, the polygonal line compression unit 301 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に戻って説明する。
ブロック化部302は、折れ線圧縮部301から出力されたデータを、水平方向に隣接する16画素分の同色成分画素からなるブロックに分離し、分離したブロックごとに出力する。これにより、ブロック内のデータの相関が強くなり、この後の量子化処理による画質劣化を抑制することができる。
Hereinafter, the description will be returned to FIG.
The blocking unit 302 separates the data output from the polygonal line compression unit 301 into blocks composed of the same color component pixels for 16 pixels adjacent in the horizontal direction, and outputs the separated blocks. Thereby, the correlation of the data in a block becomes strong, and the image quality deterioration by subsequent quantization processing can be suppressed.

例えば、ベイヤ配列の撮像素子11が用いられた場合、出力データには、R成分とGr成分の繰り返しと、B成分とGb成分の繰り返しとが、1ラインごとに出現する。例として、ブロック化部302への入力データに、R0,Gr0,R1,Gr1,……,R15,Gr15のように、R成分とGr成分が繰り返し現れる場合には、R0,R1,R2,……,R15,Gr0,Gr1,……,Gr15のように、同色成分の画素が16個連続して現れるように、出力順序を変換して、ブロック化する。   For example, when the Bayer array image sensor 11 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 302 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.

最大/最小検出部303は、1ブロック内における最大値および最小値を検出する。具体的には、1ブロック内における最大値および最小値と、最大値および最小値をとった画素が1ブロックの先頭からそれぞれ何番目かを示すアドレス(以下、最大値アドレスおよび最小値アドレスと呼ぶ)を検出する。最大値アドレスおよび最小値アドレスは、それぞれ0〜15のアドレス値として検出される。   The maximum / minimum detection unit 303 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”.

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

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

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

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

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

この量子化器310としては、例えば、整数型の除算器を利用して、減算器308の出力データをダイナミックレンジで除算する構成を適用できる。また、量子化ステップを2のべき乗に限定した場合には、以下のように動作するビットシフタを適用でき、これにより回路規模を削減することができる。なお、圧縮処理側でこのようなビットシフタを利用すると、伸張処理側の逆量子化においても同様に回路規模を削減できる。   As the quantizer 310, for example, a configuration in which the output data of the subtracter 308 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.

減算器308からの11ビットの入力データを7ビットデータに量子化する場合、例えば以下のようなシフト動作を行えばよい。
[0≦DR≦127のとき]入力データをそのまま出力する。
When the 11-bit input data from the subtracter 308 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ビット分下位にシフトする。
量子化データバッファ311は、量子化器310から出力される16画素分の量子化データを一時的に保持する。
[When 1024 ≦ DR ≦ 2047] The input data is shifted downward by 4 bits.
The quantized data buffer 311 temporarily holds the quantized data for 16 pixels output from the quantizer 310.

パッキング部312は、量子化データバッファ311、最小値ラッチ部304、最大値ラッチ部305、最小値アドレスラッチ部306、および最大値アドレスラッチ部307からの出力データを利用して、1ブロック当たり128ビットの圧縮データにパッキングする。このパッキング部312は、量子化データバッファ311から各画素に対応する量子化データを読み出す際に、最小値アドレスラッチ部306および最大値アドレスラッチ部307の出力データに基づいて、最大値および最小値に対応する量子化データを破棄し、次の図4に示すように、ブロック内の残りの14画素分の量子化データのみパッキングする。   The packing unit 312 uses the output data from the quantized data buffer 311, the minimum value latch unit 304, the maximum value latch unit 305, the minimum value address latch unit 306, and the maximum value address latch unit 307 to 128 per block. Pack into bit compressed data. The packing unit 312 reads out the quantized data corresponding to each pixel from the quantized data buffer 311, based on the output data of the minimum value address latch unit 306 and the maximum value address latch unit 307, 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 data for 16 pixels occupying a memory area for 256 bits to 1/2 is obtained.

次に、図9は、RAW伸張部の内部構成を示すブロック図である。なお、以下ではRAW伸張部32について説明するが、RAW伸張部33も同じ構成を有するので、ここでは説明を省略する。   Next, FIG. 9 is a block diagram showing an internal configuration of the RAW expansion unit. In the following, the RAW expansion unit 32 will be described, but the RAW expansion unit 33 has the same configuration, and thus the description thereof is omitted here.

図9に示すように、RAW伸張部32は、データラッチ部321、セレクタ322、減算器323、逆量子化器324、加算器325、アドレスカウンタ326、アドレス比較部327、セレクタ328、逆折れ線変換部329、および点順次処理部330を備えている。   As shown in FIG. 9, the RAW decompression unit 32 includes a data latch unit 321, a selector 322, a subtracter 323, an inverse quantizer 324, an adder 325, an address counter 326, an address comparison unit 327, a selector 328, and an inverse broken line transform. A unit 329 and a dot sequential processing unit 330.

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

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

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

逆量子化器324は、セレクタ322からの画素ごとの量子化データを、ダイナミックレンジの大きさに従って逆量子化する。本実施の形態では、7ビットの固定長符号を逆量子化して、11ビットのデータを出力する。   The inverse quantizer 324 inversely quantizes the quantized data for each pixel from the selector 322 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.

この逆量子化器324としては、例えば、整数型の乗算器を利用して、量子化データとダイナミックレンジを乗算する構成を適用できる。また、上記の量子化器310の説明で述べた通り、量子化ステップを2のべき乗に限定して量子化した場合には、ビットシフタで構成することができ、これにより回路規模を削減することができる。このビットシフタは、例えば以下のように動作する。   As the inverse quantizer 324, for example, a configuration of multiplying quantized data and a dynamic range by using an integer multiplier can be applied. In addition, as described in the description of the quantizer 310 above, when the quantization step is limited to a power of 2, it 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ビット分上位にシフトする。
加算器325は、逆量子化器324の出力データと、データラッチ部321でラッチされた最小値とを加算する。これにより、逆量子化されたデータに、ブロック内の共通の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 325 adds the output data of the inverse quantizer 324 and the minimum value latched by the data latch unit 321. As a result, a common DC offset value in the block is added to the dequantized data.

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

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

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

この図10の折れ線は、図7で示した折れ線圧縮部301における折れ線と、逆の特性により階調を変換するようになっている。逆折れ線変換部329は、まず、入力データに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 301 shown in FIG. The inverse broken line conversion unit 329 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.

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

点順次処理部330は、RAW圧縮部31のブロック化部302で実行されたブロック化と逆のプロセスで、伸張されたデータを元のRAWデータの画素順に変換して出力する。例えば、R0,R1,R2,……,R15,Gr0,Gr1,……,Gr15のように、同色成分の画素が16個連続するようにブロック化されて圧縮されていた場合には、このようなデータを、R0,Gr0,R1,Gr1,……,R15,Gr15のように、R成分とGr成分が繰り返し現れるように並び替える。このような並び替えを行うために、点順次処理部330は、伸張された2ブロック分のデータを保持するためのバッファメモリを備え、2ブロック分のデータがバッファメモリに蓄積された時点で、各色成分のデータを交互に出力する。   The dot sequential processing unit 330 converts the decompressed data into the pixel order of the original RAW data by the reverse process of the blocking performed by the blocking unit 302 of the RAW compression unit 31 and outputs the converted data. 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 330 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圧縮部31、RAW伸張部32および33によれば、圧縮時の1画素当たりの量子化語長を固定長とすることで、固定長の符号化を行って圧縮することができる。従って、内部バス29を通じてSDRAM14に読み書きされるデータの帯域を、一定のレベルに低減することができ、SDRAM14に対するアドレス管理を簡易にすることもできる。   According to the RAW compression unit 31 and the RAW expansion units 32 and 33 having the above-described configuration, the quantization word length per pixel at the time of compression is set to a fixed length, so that the compression can be performed by performing the fixed length encoding. it can. Therefore, the bandwidth of data read / written to / from the SDRAM 14 through the internal bus 29 can be reduced to a certain level, and address management for the SDRAM 14 can be simplified.

また、圧縮する1ブロックの画素数と量子化語長との組み合わせで圧縮率が決まるので、必要とする画質(すなわち、許容できる圧縮ひずみの量)や、伝送されるバスでの伝送帯域の割り当て、SDRAM14の読み書きの性能などにあわせて、柔軟に対応することができる。例えば、上記の実施の形態のように、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 SDRAM 14. For example, as in the above-described embodiment, RAW data for 16 pixels is quantized with a quantization word length of 7 bits, so that the compression rate is ½, but if it is a normal natural image, PSNR (Peak Signal to Noise Ratio) at the time of conversion into luminance / color difference signals 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.

また、基本的に一次元処理により圧縮/伸張処理が実行されるので、例えば、上下ラインの画素のデータを参照するためのラインメモリが不要になり、処理も比較的簡単になる。このため、圧縮/伸張のための回路規模や、製造コストを抑制でき、処理の高速化、および処理時間の短縮の効果を高められる。すなわち、SDRAM14におけるRAWデータの読み書き時間の短縮効果や、内部バス29の伝送負荷軽減効果を、確実に向上させることができる。   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 RAW data in the SDRAM 14 and the effect of reducing the transmission load of the internal bus 29 can be reliably improved.

従って、撮像時の動作が高速で、高画質の画像を記録/表示でき、かつ、小型で製造コストの比較的低い撮像装置を実現できる。
なお、上記構成のRAW圧縮部31、RAW伸張部32および33では、量子化語長の設定により、可変長の符号化を行うようにすることもできる。例えば、圧縮時において、ダイナミックレンジを基に適応的に量子化語長を変化させることで、可変長の符号化を行い、圧縮効率をさらに高めることができる。さらに、同様の手法で可逆圧縮として、画質劣化を完全に防止することもできる。ただし、この場合には折れ線による圧縮/伸張は行わない。
Accordingly, it is possible to realize an imaging apparatus that can record / display high-quality images at a high speed during imaging, and that is small in size and relatively low in manufacturing cost.
Note that the RAW compression unit 31 and the RAW expansion units 32 and 33 having the above-described configuration may perform variable length encoding by setting the quantization word length. For example, at the time of compression, by changing the quantization word length adaptively based on the dynamic range, variable length coding can be performed, and the compression efficiency can be further increased. Furthermore, image quality degradation can be completely prevented by lossless compression using the same technique. In this case, however, compression / decompression by a broken line is not performed.

また、CPU26により、RAW圧縮部31およびRAW伸張部32の設定を適応的に制御してもよい。例えば、量子化語長や1ブロックの画素数を変化させる、折れ線圧縮/伸張機能をオン/オフするなどの制御により、圧縮率を変化させることができる。また、RAW圧縮部31およびRAW伸張部32の機能をオン/オフできるようにしてもよい。例えば、連写時のみ圧縮/伸張機能をオンにする、RAWデータをストレージデバイス16に記録するモードでは圧縮/伸張機能をオフにするなどの制御を適用できる。   Further, the CPU 26 may adaptively control the settings of the RAW compression unit 31 and the RAW expansion unit 32. For example, the compression rate can be changed by controlling the quantization word length, the number of pixels in one block, or turning on / off the polygonal line compression / decompression function. The functions of the RAW compression unit 31 and the RAW expansion unit 32 may be turned on / off. For example, control such as turning on the compression / decompression function only during continuous shooting, or turning off the compression / decompression function in a mode in which RAW data is recorded in the storage device 16 can be applied.

また、RAW圧縮部31およびRAW伸張部32の機能を、上記の位置の代わりに、例えばSDRAMコントローラ28と内部バス29との間に設けた場合でも、SDRAM14に対するRAWデータの書き込み/読み出しに要する時間を短縮し、SDRAM14の容量を小さくする効果が得られる。   Further, even when the functions of the RAW compression unit 31 and the RAW expansion unit 32 are provided between the SDRAM controller 28 and the internal bus 29, for example, instead of the above positions, the time required for writing / reading RAW data to / from the SDRAM 14 Can be shortened and the capacity of the SDRAM 14 can be reduced.

また、上述した圧縮手法において、量子化ステップを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センサのように全画素読み出し(プログレッシブ読み出し)が可能な撮像素子を用いた場合には、シーケンシャルに画素のデータが読み出されるため、垂直方向に対する画素のデータの相関が強くなる。従って、矩形領域内の画素をブロック化しても、画質を劣化させることなく圧縮を行うことができる。さらに、ブロック化する矩形領域を、マルチ検波方式で用いる検波枠と同じにすることもできる。   In each of the above-described embodiments, an example in which RAW data is blocked and compressed for each line is shown. However, the above compression / decompression method is applied to block each rectangular area over a plurality of lines. Is also possible. 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 the same as the detection frame used in the multi-detection method.

本発明の第1の実施の形態に係る撮像装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an imaging apparatus according to a first embodiment of the present invention. 通常検波方式の例について説明するための図である。It is a figure for demonstrating the example of a normal detection system. マルチ検波方式の例について説明するための図である。It is a figure for demonstrating the example of a multi detection system. 従来の検波部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the conventional detection part. 本実施の形態に適用される検波部の構成例を示すブロック図である。It is a block diagram which shows the structural example of the detection part applied to this Embodiment. 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. 従来の撮像装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the conventional imaging device.

符号の説明Explanation of symbols

11……撮像素子、12……アナログフロントエンド(AFE)回路、13……デジタル画像処理回路、14……SDRAM、14a……キャプチャデータエリア、14b……JPEG符号エリア、14c……CPUワークエリア、15……ROM、16……ストレージデバイス、21……カメラ信号前処理部、22,22a……検波部、22b,22c……DMAコントローラ、23……カメラ信号処理部、24……解像度変換部、25……JPEGエンジン、26……CPU、27……ビデオ出力エンコーダ、27a……ビデオ出力端子、28……SDRAMコントローラ、29……内部バス、31……RAW圧縮部、32,33……RAW伸張部、200……セレクタ、211,212……Y−C合成部、221〜225,230……検波器   DESCRIPTION OF SYMBOLS 11 ... Imaging device, 12 ... Analog front end (AFE) circuit, 13 ... Digital image processing circuit, 14 ... SDRAM, 14a ... Capture data area, 14b ... JPEG code area, 14c ... CPU work area , 15... ROM, 16... Storage device, 21... Camera signal preprocessing section, 22, 22a... Detection section, 22b and 22c. , 25... JPEG engine, 26... CPU, 27... Video output encoder, 27 a... Video output terminal, 28... SDRAM controller, 29... Internal bus, 31. ... RAW decompression unit, 200 ... selector, 211, 212 ... YC synthesis unit, 221 to 225, 230 ... Demultiplexer

Claims (21)

固体撮像素子を用いて画像を撮像する撮像装置において、
前記固体撮像素子により撮像されてデジタル変換された画像データを一時的に保持するメモリと、
少なくとも水平方向に対して複数設定され、それぞれ同じサイズの矩形領域として画面上に設定された複数の検波枠のそれぞれにおける入力画像データを基に、所定の情報の検波を行う単一の検波部と、
前記メモリに保持された画像データを、画面内で隣接する所定数の画素からなるブロック単位で読み出して、前記単一の検波部に供給する読み出し制御部と、
を有することを特徴とする撮像装置。
In an imaging device that captures an image using a solid-state imaging device,
A memory that temporarily holds image data captured by the solid-state imaging device and digitally converted;
A single detection unit configured to detect predetermined information based on input image data in each of a plurality of detection frames set on the screen as rectangular regions of the same size, each set at least in the horizontal direction; ,
A read control unit that reads out image data stored in the memory in units of blocks each including a predetermined number of pixels adjacent in a screen, and supplies the read data to the single detection unit;
An imaging device comprising:
前記読み出し制御部は、前記単一の検波部が持つ検波枠のうちの任意の位置の検波枠に対応する画像データを前記メモリから読み出し、前記単一の検波部に供給することを特徴とする請求項1記載の撮像装置。   The read control unit reads image data corresponding to a detection frame at an arbitrary position among detection frames of the single detection unit from the memory and supplies the image data to the single detection unit. The imaging device according to claim 1. 前記デジタル変換された画像データを前記ブロック単位で圧縮し、圧縮画像データとして前記メモリに供給する圧縮部と、
前記メモリから読み出された前記圧縮画像データを伸張する伸張部と、
前記単一の検波部が持つ検波枠より大きい1つ以上の矩形領域として画面上に設定された検波枠における入力画像データを基に、所定の情報の検波を行う他の検波部と、
をさらに有し、
前記読み出し制御部は、前記メモリに保持された前記圧縮画像データを前記ブロック単位で読み出し、前記伸張部に伸張させて、前記単一の検波部および前記他の検波部に対して選択的に供給することを特徴とする請求項1記載の撮像装置。
A compression unit that compresses the digitally converted image data in units of blocks and supplies the compressed image data to the memory;
A decompression unit for decompressing the compressed image data read from the memory;
Another detection unit for detecting predetermined information based on input image data in a detection frame set on a screen as one or more rectangular areas larger than the detection frame of the single detection unit;
Further comprising
The read control unit reads the compressed image data held in the memory in units of blocks, expands the compressed image data to the expansion unit, and selectively supplies it to the single detection unit and the other detection units. The imaging apparatus according to claim 1, wherein:
前記読み出し制御部は、前記単一の検波部が持つ検波枠のうちの任意の位置の検波枠に対応する前記圧縮画像データを前記メモリから読み出し、前記伸張部を介して前記単一の検波部に供給することを特徴とする請求項3記載の撮像装置。   The read control unit reads the compressed image data corresponding to a detection frame at an arbitrary position in the detection frame of the single detection unit from the memory, and the single detection unit via the decompression unit The imaging apparatus according to claim 3, wherein the imaging apparatus is supplied. 前記他の検波部は、水平方向に対して、前記単一の検波部が持つ検波枠の並列数より少ない数だけ画面上に矩形領域として設定された検波枠に対して、それぞれ個別に対応する個別検波部を少なくとも備え、
前記読み出し制御部は、前記個別検波部において必要な、画像上の水平ライン数分の前記圧縮画像データを、水平ラインごとに前記メモリから順次読み出し、前記伸張部を介して前記他の検波部に供給する、
ことを特徴とする請求項3記載の撮像装置。
The other detection units individually correspond to detection frames set as rectangular areas on the screen by a number smaller than the number of detection frames arranged in parallel in the single detection unit in the horizontal direction. At least an individual detector,
The read control unit sequentially reads the compressed image data for the number of horizontal lines on the image necessary for the individual detection unit from the memory for each horizontal line, and sends the compressed data to the other detection unit via the decompression unit. Supply,
The imaging apparatus according to claim 3.
前記単一の検波部は、各検波枠における検波が完了するたびに、その検波値を前記メモリに格納することを特徴とする請求項3記載の撮像装置。   The imaging apparatus according to claim 3, wherein the single detection unit stores the detection value in the memory every time detection in each detection frame is completed. 前記読み出し制御部は、前記単一の検波部に対する前記圧縮画像データと、前記他の検波部に対する前記圧縮画像データとを、前記メモリから時分割で交互に読み出すことを特徴とする請求項3記載の撮像装置。   The read control unit reads the compressed image data for the single detection unit and the compressed image data for the other detection unit alternately from the memory in a time division manner. Imaging device. 前記圧縮部は、固定長の符号化データとして前記圧縮画像データを生成することを特徴とする請求項3記載の撮像装置。   The imaging apparatus according to claim 3, wherein the compression unit generates the compressed image data as fixed-length encoded data. 前記伸張部、前記単一の検波部および前記他の検波部は、共通のバスを通じて前記メモリに接続され、前記伸張部により伸張された画像データは、前記バスを介さずに直接、前記単一の検波部および前記他の検波部に入力されることを特徴とする請求項3記載の撮像装置。   The decompression unit, the single detection unit, and the other detection unit are connected to the memory through a common bus, and the image data decompressed by the decompression unit is directly connected to the single unit without going through the bus. The imaging apparatus according to claim 3, wherein the imaging device is input to the other detector and the other detector. 前記圧縮部は、前記圧縮画像データを前記バスを通じて前記メモリに書き込むことを特徴とする請求項9記載の撮像装置。   The imaging apparatus according to claim 9, wherein the compression unit writes the compressed image data into the memory through the bus. 前記単一の検波部および前記他の検波部の少なくとも一方による検波結果に基づいて各種の制御値の演算を行う演算部と、
前記メモリから読み出され、前記伸張部により伸張された画像データに対して、前記演算部により演算された制御値に基づいて画質補正処理を施す画質補正部と、
をさらに有することを特徴とする請求項3記載の撮像装置。
A calculation unit that calculates various control values based on a detection result by at least one of the single detection unit and the other detection unit;
An image quality correction unit that performs an image quality correction process on the image data read from the memory and expanded by the expansion unit based on a control value calculated by the calculation unit;
The imaging apparatus according to claim 3, further comprising:
前記圧縮部は、前記ブロック内の画素データの最大値および最小値と、それらの当該ブロック内での位置情報と、前記最大値および前記最小値を除く当該ブロック内の前記画素データから、前記最小値を減算した減算値を量子化した量子化データとを含む前記圧縮画像データを生成することを特徴とする請求項3記載の撮像装置。   The compression unit is configured to calculate the minimum value and the minimum value of the pixel data in the block, the position information in the block, and the pixel data in the block excluding the maximum value and the minimum value. The imaging apparatus according to claim 3, wherein the compressed image data including quantized data obtained by quantizing a subtraction value obtained by subtracting a value is generated. 前記圧縮部は、
前記ブロックごとに、前記画素データの前記最大値および前記最小値と、それらの当該ブロック内での前記位置情報とを検出する最大/最小検出部と、
前記画素データから、対応する前記ブロックにおける前記最小値を減算した前記減算値を、当該ブロック内の前記最大値と前記最小値との差分値として算出したダイナミックレンジに応じて量子化する量子化部と、
前記ブロックごとに、当該ブロックにおける前記最大値、前記最小値、およびそれらの前記位置情報と、前記量子化部で量子化された量子化データのうち、前記最大値および前記最小値に対応するものを除く前記量子化データとをパッキングして前記圧縮画像データを生成するパッキング部と、
を有することを特徴とする請求項12記載の撮像装置。
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 12, further comprising:
前記量子化部での量子化語長を固定値としたことを特徴とする請求項13記載の撮像装置。   The imaging apparatus according to claim 13, wherein a quantization word length in the quantization unit is a fixed value. 前記圧縮部は、前記デジタル変換された画像データに対して、人間の視感度特性に応じて階調を変換した後、そのビット数を削減して前記圧縮部に供給する前圧縮部をさらに有することを特徴とする請求項13記載の撮像装置。   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 13. 前記量子化部は、量子化ステップを2のべき乗として、前記ダイナミックレンジに応じたけた数だけ下位にシフトするビットシフタにより、前記減算値を量子化することを特徴とする請求項13記載の撮像装置。   14. The imaging apparatus according to claim 13, wherein the quantization unit quantizes the subtraction value with a bit shifter that shifts the quantization step to a power of 2 and shifts downward by a number corresponding to the dynamic range. . 前記パッキング部は、前記ブロックにおける最大値の代わりに、前記ビットシフタにおけるシフト量をパッキングすることを特徴とする請求項16記載の撮像装置。   The imaging apparatus according to claim 16, wherein the packing unit packs a shift amount in the bit shifter instead of the maximum value in the block. 前記伸張部は、
前記ブロックごとの前記圧縮画像データから抽出した前記量子化データを、当該圧縮画像データから抽出した前記最大値と前記最小値との差分値として算出した前記ダイナミックレンジに応じて逆量子化する逆量子化部と、
前記逆量子化部により逆量子化されたデータに前記最小値を加算する加算部と、
前記ブロックごとの前記圧縮画像データから抽出した前記最小値および前記最大値の前記各位置情報に基づき、前記最大値と、前記最小値と、前記加算部からの出力値とを、前記圧縮部に入力された元の前記画素データの順に出力する出力制御部と、
を有することを特徴とする請求項13記載の撮像装置。
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 13, further comprising:
前記ブロックは、同色成分の画素データからなることを特徴とする請求項3記載の撮像装置。   The image pickup apparatus according to claim 3, wherein the block includes pixel data of the same color component. 前記ブロックは、撮像画像上の矩形領域に含まれる画素データからなることを特徴とする請求項3記載の撮像装置。   The imaging apparatus according to claim 3, wherein the block includes pixel data included in a rectangular area on the captured image. 固体撮像素子を用いて画像を撮像する撮像方法において、
書き込み手段が、前記固体撮像素子により撮像されてデジタル変換された画像データをメモリに一時的に書き込むステップと、
読み出し制御部が、前記メモリに書き込まれた画像データを、画面内で隣接する所定数の画素からなるブロック単位で読み出して、単一の検波部に供給するステップと、
前記単一の検波部が、少なくとも水平方向に対して複数設定され、それぞれ同じサイズの矩形領域として画面上に設定された複数の検波枠のそれぞれにおける入力画像データを基に、所定の情報の検波を行うステップと、
を含むことを特徴とする撮像方法。
In an imaging method for imaging an image using a solid-state imaging device,
A writing unit temporarily writing image data captured by the solid-state imaging device and digitally converted into a memory;
A step of reading out the image data written in the memory in units of blocks composed of a predetermined number of adjacent pixels in the screen, and supplying the read data to the single detector;
A plurality of the single detection units are set at least in the horizontal direction, and detection of predetermined information is performed based on input image data in each of a plurality of detection frames set on the screen as rectangular regions of the same size. The steps of
An imaging method comprising:
JP2006050169A 2006-02-27 2006-02-27 Imaging apparatus and method Pending JP2007228514A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006050169A JP2007228514A (en) 2006-02-27 2006-02-27 Imaging apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006050169A JP2007228514A (en) 2006-02-27 2006-02-27 Imaging apparatus and method

Publications (1)

Publication Number Publication Date
JP2007228514A true JP2007228514A (en) 2007-09-06

Family

ID=38549834

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006050169A Pending JP2007228514A (en) 2006-02-27 2006-02-27 Imaging apparatus and method

Country Status (1)

Country Link
JP (1) JP2007228514A (en)

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
US9560256B2 (en) Image capture apparatus and image capture method in which an image is processed by a plurality of image processing devices
KR101395433B1 (en) Imaging device and imaging method
KR100347508B1 (en) Photo Image Pick-Up Device
US8823832B2 (en) Imaging apparatus
JP2008113070A (en) Imaging device and imaging method
US11336896B2 (en) Image encoding apparatus and image decoding apparatus, methods of controlling the same, and non-transitory computer-readable storage medium
JP2008124671A (en) Imaging apparatus and imaging method
JP7289642B2 (en) IMAGE PROCESSING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM
JP2004040300A (en) Image processing apparatus
JP2010074597A (en) Image processing device, image processing method, program and imaging device
JP2007228514A (en) Imaging apparatus and method
KR20080006774A (en) Thumbnail data transmission method and device
JP2009290556A (en) Image information processing apparatus and image information processing method
JP5924262B2 (en) Image processing apparatus and image processing program
JP2006197181A (en) Signal processing apparatus and signal processing method for solid-state imaging device and image processing apparatus
JP2013219682A (en) Imaging device