[go: up one dir, main page]

JP4905080B2 - Transfer circuit, transfer control method, imaging apparatus, control program - Google Patents

Transfer circuit, transfer control method, imaging apparatus, control program Download PDF

Info

Publication number
JP4905080B2
JP4905080B2 JP2006315838A JP2006315838A JP4905080B2 JP 4905080 B2 JP4905080 B2 JP 4905080B2 JP 2006315838 A JP2006315838 A JP 2006315838A JP 2006315838 A JP2006315838 A JP 2006315838A JP 4905080 B2 JP4905080 B2 JP 4905080B2
Authority
JP
Japan
Prior art keywords
transfer
pixels
ring
data
pixel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006315838A
Other languages
Japanese (ja)
Other versions
JP2008131472A (en
JP2008131472A5 (en
Inventor
正人 曽雌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2006315838A priority Critical patent/JP4905080B2/en
Publication of JP2008131472A publication Critical patent/JP2008131472A/en
Publication of JP2008131472A5 publication Critical patent/JP2008131472A5/ja
Application granted granted Critical
Publication of JP4905080B2 publication Critical patent/JP4905080B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)

Description

本発明は、デジタルカメラ等の撮像装置に用いる好適な転送回路、転送制御方法、およびこれらを用いた撮像装置、および制御プログラムに関するものである。 The present invention relates to a transfer circuit suitable for use in an imaging apparatus such as a digital camera , a transfer control method, an imaging apparatus using these , and a control program .

従来、撮影により取得したデジタルの画像データを記録媒体に記録するデジタルカメラにおいては、最終的に記録する画像データを得る過程で複数段の画像処理が行われている。例えば撮影に際してメモリに一時記憶されたベイヤーデータ、すなわち原色ベイヤー配列の色フィルタに応じた色情報の画素からなる画像データを、画素毎のRGBデータからなるYUVデータに変換するベイヤー補間処理等が行われている。   2. Description of the Related Art Conventionally, in a digital camera that records digital image data acquired by photographing on a recording medium, multiple stages of image processing are performed in the process of finally obtaining image data to be recorded. For example, Bayer interpolation processing for converting Bayer data temporarily stored in the memory at the time of shooting, that is, image data composed of pixels of color information corresponding to the color filter of the primary color Bayer array into YUV data composed of RGB data for each pixel is performed. It has been broken.

このベイヤー補間処理においては、YUVデータを1ピクセル生成するのに該当ピクセルの周辺の複数ピクセル、例えば7×7ピクセルを用いる。したがって、元のベイヤーデータを所望の画像サイズのYUVデータに変換する場合、例えば横640×縦480ピクセルのベイヤーデータを同じ横640×縦480ピクセルのYUVデータに変換する場合には、元のベイヤーデータの周辺にリングピクセルと称される複数のピクセルを付加する必要がある。   In this Bayer interpolation processing, a plurality of pixels around the corresponding pixel, for example, 7 × 7 pixels, are used to generate one pixel of YUV data. Therefore, when converting the original Bayer data into YUV data of a desired image size, for example, when converting the Bayer data of 640 × 480 pixels into YUV data of the same 640 × 480 pixels, It is necessary to add a plurality of pixels called ring pixels around the data.

また、かかる画像処理においては、画像全体のデータ(ベイヤーデータやYUVデータ)を処理単位とするのではなく、転送能力に起因する制約等との関係から、元画像を垂直方向に分割した帯状のベルトと呼ばれる複数ライン分のデータを処理単位とし、作業用のメモリからベルト毎にデータを順に転送して処理することが行われている(図7参照)。   Further, in such image processing, the entire image data (Bayer data or YUV data) is not used as a processing unit, but a band-like shape obtained by dividing the original image in the vertical direction from the relationship with restrictions caused by transfer capability. Data for a plurality of lines called a belt is used as a processing unit, and data is sequentially transferred from a working memory for each belt and processed (see FIG. 7).

一方、主としてYUVデータへの変換後に実行されるJPEG符号化処理に際しては、その符号化形式が例えば4:2:2であれば8×8画素のブロック単位(MCU)で符号化が行われ、また4:2:0であれば16×16画素のブロック単位で符号化が行われる。このため、処理の高速化を目的として、前記ベルトのライン数は、YUVデータ換算で8ライン又はその倍数である16ラインとすることが好ましい。これは、ベイヤーデータに換算すると、例えばYUVデータを1ピクセル生成するためにベイヤーデータを7×7ピクセル使用していた場合には、該当ピクセルの周囲にそれぞれ3ピクセル分のベイヤーデータが必要となるため、それぞれ14ラインまたは22ラインに相当することとなる。そして、1ベルト目と最終ベルト目においては、ベイヤーデータの不足分として前記リングピクセルを予め設定されている固定的なライン数、例えば3ライン分だけ加えて転送を行うようにしている(例えば、特許文献1参照)。
特開2006−211402号公報
On the other hand, when JPEG encoding processing is performed mainly after conversion to YUV data, if the encoding format is 4: 2: 2, for example, encoding is performed in units of 8 × 8 pixel blocks (MCU). If 4: 2: 0, encoding is performed in block units of 16 × 16 pixels. For this reason, for the purpose of speeding up the processing, the number of lines of the belt is preferably 8 lines in terms of YUV data or 16 lines that is a multiple thereof. In terms of Bayer data, for example, when 7 × 7 pixels of Bayer data are used to generate 1 pixel of YUV data, 3 pixels of Bayer data are required around each pixel. Therefore, it corresponds to 14 lines or 22 lines, respectively. In the first belt and the final belt, transfer is performed by adding the ring pixels as a shortage of Bayer data in advance to a fixed number of lines, for example, three lines (for example, Patent Document 1).
JP 2006-211402 A

しかしながら、ベイヤーデータのライン数は、479ラインや29ライン等の、約数を持たない素数となる場合があり、このような場合にはYUVデータ換算のライン数で1ラインずつ転送することとなる。つまり、より簡易な回路構成で転送を行うために、各ベルト間でライン数を変化させるのではなく、各ベルト間でライン数を一致させている。そして、このようにYUVデータ換算のライン数で1ラインずつ転送する場合には、1ベルト目や最終ベルト目以外においても、具体的には2ベルト目や3ベルト目、あるいは最終−2ベルト目や最終−1ベルト目においても、ベイヤーデータに対してリングピクセルを付加する必要が生ずる。したがって、前述した従来技術のように、1ベルト目と最終ベルト目においてのみ、前記リングピセルを固定的に、例えば3ライン分だけ加えて転送を行い、他のベルトでのリングピクセルの付加を考慮していない転送装置では、特にベイヤーデータのライン数が素数であるような場合の転送に対応することができない。   However, the number of lines of Bayer data may be a prime number that does not have a divisor, such as 479 lines or 29 lines. In such a case, the lines are transferred one line at a time in terms of YUV data conversion. . That is, in order to perform transfer with a simpler circuit configuration, the number of lines is matched between the belts instead of changing the number of lines between the belts. When transferring one line at a time in terms of YUV data conversion lines as described above, the second belt, the third belt, or the final -2nd belt is also used in addition to the first belt and the final belt. In addition, the ring pixel needs to be added to the Bayer data even in the last-first belt. Therefore, as in the prior art described above, only in the first belt and the final belt, the ring pixels are fixedly transferred, for example, by 3 lines, and the addition of ring pixels in other belts is considered. The transfer device that is not capable of handling the transfer particularly when the number of lines of the Bayer data is a prime number cannot be accommodated.

本発明は、かかる従来の課題に鑑みてなされたものであり、ベイヤーデータのライン数がどのような場合であっても、支障なくリングピクセルを付加して転送を行うことのできる転送回路、転送制御方法、撮像装置、および制御プログラムを提供することを目的とする。 The present invention has been made in view of such a conventional problem. A transfer circuit capable of performing transfer by adding ring pixels without any problem regardless of the number of lines of Bayer data , and transfer It is an object to provide a control method, an imaging apparatus , and a control program .

請求項1記載の発明に係る転送回路は、格納手段に格納されたベイヤーデータにリングピクセルを付加して転送する転送回路であって、前記格納手段に格納されるベイヤーデータに付加するリングピクセル数が、予め記憶された記憶手段と、前記格納手段に格納されるベイヤーデータの画素数を取得する取得手段と、前記取得手段により取得されたベイヤーデータの画素数に基づいて、転送単位となる転送画素数を設定する設定手段と、前記設定手段により設定された転送画素数での各転送時に、前記リングピクセルを付加するか否かを判断する判断手段と、前記判断手段によりリングピクセルを付加すると判断されたときに、前記記憶手段に記憶されているリングピクセル数と、前記設定手段により設定された転送画素数とに基づいて、当該転送時に付加するリングピクセル数を可変設定する可変設定手段と、を備えたことを特徴とする。The transfer circuit according to claim 1 is a transfer circuit for adding a ring pixel to the Bayer data stored in the storage means and transferring it, and the number of ring pixels added to the Bayer data stored in the storage means Is a storage unit that is stored in advance, an acquisition unit that acquires the number of pixels of Bayer data stored in the storage unit, and a transfer that is a transfer unit based on the number of pixels of Bayer data acquired by the acquisition unit A setting unit that sets the number of pixels, a determination unit that determines whether or not to add the ring pixel at each transfer with the number of transfer pixels set by the setting unit, and a ring pixel that is added by the determination unit When the determination is made, the number of ring pixels stored in the storage means and the number of transfer pixels set by the setting means are determined. A variable setting means for variably setting the number of rings pixels to be added at the time of transfer, and further comprising a.

請求項2記載の発明は更に、前記設定手段は、前記取得手段により取得されたベイヤーデータの総ライン数に対する約数を、前記転送単位となる転送ライン数として設定することを特徴とする。According to a second aspect of the present invention, the setting means sets a divisor with respect to the total number of lines of Bayer data acquired by the acquisition means as the number of transfer lines as the transfer unit.

請求項3記載の発明は更に、前記設定手段は、前記取得手段により取得されたベイヤーデータの総ライン数に対する約数のうち、一度に転送可能な最大ライン数以下で、かつ、最大の約数を、前記転送単位となる転送ライン数として設定することを特徴とする。According to a third aspect of the present invention, the setting means has a maximum divisor that is less than or equal to the maximum number of lines that can be transferred at one time among the divisors of the total number of lines of Bayer data acquired by the acquisition means. Is set as the number of transfer lines serving as the transfer unit.

請求項4記載の発明は更に、前記可変設定手段は、前記設定手段により設定された転送ライン数と、前記記憶手段に記憶されたリングピクセル数とを比較し、この比較結果に基づいて、前記転送時に付加するリングピクセル数を可変設定することを特徴とする。The variable setting means further compares the number of transfer lines set by the setting means with the number of ring pixels stored in the storage means, and based on the comparison result, the variable setting means It is characterized in that the number of ring pixels added at the time of transfer is variably set.
請求項5記載の発明は更に、前記設定手段は、前記取得手段により取得されたベイヤーデータの総ライン数が素数である場合には、前記転送単位となる転送ライン数を1ラインに設定し、ベイヤーデータの総ライン数が素数でない場合には、ベイヤーデータの総ライン数に対する約数を、前記転送単位となる転送ライン数として設定することを特徴とする。In the invention according to claim 5, the setting means sets the number of transfer lines as the transfer unit to one line when the total number of lines of the Bayer data acquired by the acquisition means is a prime number, When the total number of lines of Bayer data is not a prime number, a divisor with respect to the total number of lines of Bayer data is set as the number of transfer lines serving as the transfer unit.
請求項6記載の発明は更に、前記判断手段は、前記設定手段により前記転送単位となる転送ライン数がベイヤーデータの総ライン数に対する約数に設定された場合には、この設定された転送単位による最初の転送および最後の転送のときだけリングピクセルを付加すると判断し、前記設定手段により前記転送単位となる転送ライン数が1ラインに設定された場合には、この設定された転送単位による最初の転送に続く複数回の転送および最後の転送の前の複数回の転送のときにリングピクセルを付加すると判断することを特徴とする。According to a sixth aspect of the present invention, when the setting means sets the transfer line number serving as the transfer unit to a divisor with respect to the total number of Bayer data, the determining means sets the transfer unit thus set. If it is determined that a ring pixel is added only during the first transfer and the last transfer according to (1) and the number of transfer lines as the transfer unit is set by the setting means, the first transfer by the set transfer unit is determined. It is characterized in that it is determined that a ring pixel is added at the time of a plurality of transfers following the transfer and a plurality of transfers before the last transfer.
請求項7記載の発明は更に、前記可変設定手段は、前記判断手段により最初の転送に続く複数回の転送および最後の転送の前の複数回の転送のときにリングピクセルを付加すると判断された場合には、最初の転送および最後の転送のときに付加するリングピクセル数を最大とし、最初の転送または最後の転送の前後の転送では、この最大のリングピクセル数よりも少なくすることを特徴とする。According to a seventh aspect of the present invention, the variable setting means is determined by the determining means to add a ring pixel at the time of a plurality of transfers following the first transfer and a plurality of transfers before the last transfer. In some cases, the maximum number of ring pixels added during the first transfer and the last transfer is maximized, and the number of ring pixels before and after the first transfer or the last transfer is less than this maximum number of ring pixels. To do.
請求項8記載の発明は更に、請求項1乃至7のいずれかに記載の転送回路を備えた撮像装置であって、被写体を撮像してベイヤーデータを取得する撮像手段と、前記撮像手段により取得されたベイヤーデータを前記格納手段に格納する格納制御手段と、前記転送回路よりリングピクセルを付加した形で転送されてくるベイヤーデータに対して所定の画像データ処理を施す画像データ処理手段と、を更に備えたことを特徴とする。According to an eighth aspect of the present invention, there is provided an image pickup apparatus comprising the transfer circuit according to any one of the first to seventh aspects, wherein the image pickup means picks up an image of a subject and acquires Bayer data; Storage control means for storing the acquired Bayer data in the storage means, and image data processing means for performing predetermined image data processing on the Bayer data transferred with the ring pixels added from the transfer circuit, It is further provided with the feature.
請求項9記載の発明は更に、請求項1乃至7のいずれかに記載の転送回路を備えた撮像装置が有するコンピュータを、被写体を撮像してベイヤーデータを取得する撮像手段と、前記撮像手段により取得されたベイヤーデータを前記格納手段に格納する格納制御手段と、前記転送回路よりリングピクセルを付加した形で転送されてくるベイヤーデータに対して所定の画像データ処理を施す画像データ処理手段と、して機能させることを特徴とする。According to a ninth aspect of the present invention, there is provided a computer having an image pickup apparatus including the transfer circuit according to any one of the first to seventh aspects of the present invention, an image pickup unit that picks up an image of a subject and acquires Bayer data, and the image pickup unit. Storage control means for storing the acquired Bayer data in the storage means, image data processing means for performing predetermined image data processing on the Bayer data transferred with the ring pixels added from the transfer circuit, It is characterized by functioning.
請求項10記載の発明は更に、格納手段に格納されたベイヤーデータにリングピクセルを付加して転送する転送回路の転送を制御する転送制御方法であって、前記格納手段に格納されるベイヤーデータの画素数を取得する取得ステップと、前記取得ステップにより取得されたベイヤーデータの画素数に基づいて、転送単位となる転送画素数を設定する設定ステップと、前記設定ステップにより設定された転送画素数での各転送時に、前記リングピクセルを付加するか否かを判断する判断ステップと、前記判断ステップによりリングピクセルを付加すると判断されたときに、前記格納手段に格納されるベイヤーデータに付加するリングピクセル数が予め記憶された記憶手段に記憶されている前記リングピクセル数と、前記設定ステップにより設定された転送画素数とに基づいて、当該転送時に付加するリングピクセル数を可変設定する可変設定ステップと、を備えたことを特徴とする。The invention according to claim 10 is further a transfer control method for controlling transfer of a transfer circuit for adding a ring pixel to the Bayer data stored in the storage means and transferring the Bayer data, wherein the Bayer data stored in the storage means An acquisition step for acquiring the number of pixels, a setting step for setting the number of transfer pixels as a transfer unit based on the number of pixels of the Bayer data acquired by the acquisition step, and a transfer pixel number set by the setting step A determination step for determining whether or not to add the ring pixel at each transfer, and a ring pixel to be added to the Bayer data stored in the storage means when it is determined by the determination step that the ring pixel is to be added The number of ring pixels stored in the storage means in which the number is stored in advance, and the setting step. Based on the number of transfer pixels which are characterized by having a variable setting step for variably setting the number of rings pixels to be added at the time of the transfer, the.

本発明によれば、ベイヤーデータのライン数がどのような場合であっても、支障なくリングピクセルを付加して効率的に転送を行うことが可能になる。 According to the present invention, regardless of the number of lines of Bayer data, it is possible to efficiently transfer by adding ring pixels without any trouble.

以下、図面を参照して本発明の実施の形態について説明する。図1は、本実施の形態におけるカメラ装置の画像処理に関連する主要な構成を示すブロック図である。図1に示すように、本実施の形態におけるカメラ装置には、CPU1、ASIC(Application Specific Integrated Circuit)2、RAM3、CCD4、ROM5、LCD(Liquid Crystal Display)6、キーボード7などを有して構成されているとともに、各部に電源を供給する電源部8を備えている。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram illustrating a main configuration related to image processing of the camera device according to the present embodiment. As shown in FIG. 1, the camera apparatus according to the present embodiment includes a CPU 1, an ASIC (Application Specific Integrated Circuit) 2, a RAM 3, a CCD 4, a ROM 5, an LCD (Liquid Crystal Display) 6, a keyboard 7, and the like. And a power supply unit 8 for supplying power to each unit.

CPU1は、ROM5に記憶されたプログラムを実行することによりカメラ装置全体の制御を司るもので、コントロールバス9を介してASIC2に制御信号を出力し、ASIC2における各種のデータ入出力処理や画像処理などを制御する。ASIC2は、CPU1の制御のもとで、本実施の形態における画像データへのデータ付加を伴う画像処理など各種処理を実行する。ASIC2では、撮像系からの画像データの入力、キーボード7におけるキー入力制御、LCD6における表示制御などを実行する。また、ASIC2は、画像データについてRAM3とのDMA(Direct Memory Access)制御を行いながら各種の画像処理を行う。   The CPU 1 controls the entire camera apparatus by executing a program stored in the ROM 5. The CPU 1 outputs a control signal to the ASIC 2 through the control bus 9, and performs various data input / output processes and image processing in the ASIC 2. To control. The ASIC 2 executes various processes such as image processing with data addition to the image data in the present embodiment under the control of the CPU 1. The ASIC 2 executes input of image data from the imaging system, key input control on the keyboard 7, display control on the LCD 6, and the like. The ASIC 2 performs various image processing on the image data while performing DMA (Direct Memory Access) control with the RAM 3.

RAM3は、画像データなどを記憶するもので、データバス10を通じてASIC2との間でデータが転送される。ROM5は、CPU1により実行されるプログラムを格納する。図示しない光学レンズ系の撮影光軸後方に配置された撮像素子であるCCD4は、走査駆動されて、一定周期毎に結像した光像に対応する光電変換出力を行う。この光電変換出力は、アナログ値の信号の状態でRGBの各原色成分毎に適宜ゲイン調整された後に、サンプルホールドされ、デジタルデータに変換される。   The RAM 3 stores image data and the like, and data is transferred to and from the ASIC 2 through the data bus 10. The ROM 5 stores a program executed by the CPU 1. A CCD 4 that is an image pickup device disposed behind the photographing optical axis of an optical lens system (not shown) is driven to scan and performs photoelectric conversion output corresponding to a light image formed at regular intervals. This photoelectric conversion output is appropriately adjusted for each primary color component of RGB in the state of an analog value signal, then sampled and held, and converted into digital data.

キーボード7は、パワーSW、シャッタキー、モードスイッチ、メニューキー、選択キー、ズームボタン、及び十字キー(カーソルキー)等から構成され、それらのキー操作に伴なう信号がASIC2(後述するキーボード制御部21)へ送出される。LCD6は、撮影モード時に電子ファインダとしてスルー画像をリアルタイム表示したり、シャッタキーの操作に伴って撮像された撮影画像を表示する。なお、図示していないが、図1に示す構成の他に撮像された画像を記録するための記録媒体として着脱自在に装着されているメモリカードや固定的に内蔵されている内蔵メモリが設けられる。   The keyboard 7 includes a power SW, a shutter key, a mode switch, a menu key, a selection key, a zoom button, a cross key (cursor key), and the like, and signals associated with these key operations are ASIC 2 (keyboard control described later). Part 21). The LCD 6 displays a through image in real time as an electronic viewfinder in the shooting mode, or displays a shot image taken in accordance with the operation of the shutter key. Although not shown, in addition to the configuration shown in FIG. 1, a memory card that is detachably mounted as a recording medium for recording a captured image and a built-in memory that is fixedly incorporated are provided. .

図2は、図1に示すASIC2の詳細な構成を示すブロック図である。ASIC2には、LCD制御部20、キーボード制御部21、CCD制御部22、データI/F(インタフェース)部23、画像データ転送部24の他、画像データ処理ブロック28として画像処理部25、画素数変換部26、デブロッキングフィルタ部27などの機能が設けられている。   FIG. 2 is a block diagram showing a detailed configuration of the ASIC 2 shown in FIG. The ASIC 2 includes an LCD control unit 20, a keyboard control unit 21, a CCD control unit 22, a data I / F (interface) unit 23, an image data transfer unit 24, an image processing unit 25, and the number of pixels. Functions such as a conversion unit 26 and a deblocking filter unit 27 are provided.

LCD制御部20は、LCD6を駆動して画像の表示を制御する。キーボード制御部21は、キーボード7に対するユーザ操作に伴うキー入力情報を取り込む。CCD制御部22は、撮像系(CCD4)の制御を行い、CCD4により取得された画像データ(ベイヤーデータ)を取り込み、データI/F部23に出力する。データI/F部23は、CCD制御部22の制御によりCCD4から取得された画像データのRAM3への書き込みや、RAM3に書き込まれた画像データの読み込み、あるいは画像データ転送部24から画像データ処理ブロック28により各種画像処理された後の画像データのRAM3への書き込みなどのデータ制御を行う。   The LCD control unit 20 drives the LCD 6 to control image display. The keyboard control unit 21 captures key input information accompanying a user operation on the keyboard 7. The CCD control unit 22 controls the imaging system (CCD 4), captures image data (Bayer data) acquired by the CCD 4, and outputs it to the data I / F unit 23. The data I / F unit 23 writes image data acquired from the CCD 4 to the RAM 3 under the control of the CCD control unit 22, reads image data written in the RAM 3, or receives an image data processing block from the image data transfer unit 24. Data control such as writing of image data into the RAM 3 after various image processing by the control unit 28 is performed.

画像データ転送部24は、データI/F部23と画像データ処理ブロック28との間のデータ転送を制御する。画像データ転送部24は、CPU1の制御により、データI/F部23を介して入力される画像データを、画像データ処理ブロック28の何れか、すなわち画像処理部25、画素数変換部26、デブロッキングフィルタ部27の何れかに転送し、画像データ処理ブロック28において処理された画像データをデータI/F部23に転送する。画像データ転送部24は、画像データ処理ブロック28に画像データを転送する際、画像処理の対象となる元画像データに対して、画像処理で必要とするリングピクセルを元画像の周辺に付加して画像データ処理ブロック28に転送する。画像データ転送部24は、元画像データに対して付加するリングピクセルを、CPU1の制御により画像処理の内容に応じてピクセル数を選択的に変更することができる。   The image data transfer unit 24 controls data transfer between the data I / F unit 23 and the image data processing block 28. Under the control of the CPU 1, the image data transfer unit 24 converts the image data input via the data I / F unit 23 to one of the image data processing blocks 28, that is, the image processing unit 25, the pixel number conversion unit 26, The image data is transferred to any of the blocking filter units 27, and the image data processed in the image data processing block 28 is transferred to the data I / F unit 23. When transferring image data to the image data processing block 28, the image data transfer unit 24 adds ring pixels necessary for image processing to the periphery of the original image for the original image data to be processed. Transfer to the image data processing block 28. The image data transfer unit 24 can selectively change the number of ring pixels to be added to the original image data according to the content of the image processing under the control of the CPU 1.

画像処理部25は、ベイヤーデータをYUVデータに変換する画像処理を実行する。画素数変換部26は、画像を拡大あるいは縮小するために、画像データに対する補間処理によって画像数を変換する拡大・縮小処理を行う。デブロッキングフィルタ部27は、MPEG4デコード時にブロッキングノイズを緩和するためのフィルタ処理を実行する。   The image processing unit 25 executes image processing for converting Bayer data into YUV data. The pixel number conversion unit 26 performs enlargement / reduction processing for converting the number of images by interpolation processing on image data in order to enlarge or reduce the image. The deblocking filter unit 27 executes a filter process for reducing blocking noise during MPEG4 decoding.

画像データ処理ブロック28における画像処理では、処理対象とする注目ピクセルに対して、その周辺のピクセルのデータを用いて処理を実行する。したがって、例えば画像処理によって得られるYUVデータの画像サイズを元画像データと同じにする場合、元画像の周辺にリングピクセルを付加し、このリングピクセルの画像データを含めて画像処理を実行することで対応する。   In the image processing in the image data processing block 28, processing is performed on the target pixel to be processed using data of surrounding pixels. Therefore, for example, when the image size of YUV data obtained by image processing is made the same as that of the original image data, a ring pixel is added to the periphery of the original image, and image processing is executed by including the image data of the ring pixel. Correspond.

本実施の形態では、画像処理に必要なリングピクセルを、RAM3に展開記憶された画像データに対して付加するのではなく、RAM3に記憶された元画像データを画像データ処理ブロック28に転送する際に、画像データ転送部24において画像処理の必要性に応じてリングピクセルのデータを付加していく。画像データ処理ブロック28では、処理すべき画像データを構成する複数のデータの転送順序に基づいて各データのピクセル位置を認識しながらそれぞれの画像処理を実行し、画像データ転送部24は、画像データ処理ブロック28において画像処理を実行する際に認識されるデータの転送順序に対応して順次ピクセル位置を発生させながら、該当するデータを画像データ処理ブロック28に順次転送する。なお、データバス10は32ビットバスとし、DMAは16バーストとする。   In the present embodiment, when the ring pixels necessary for image processing are not added to the image data expanded and stored in the RAM 3, the original image data stored in the RAM 3 is transferred to the image data processing block 28. In addition, the image data transfer unit 24 adds ring pixel data according to the necessity of image processing. In the image data processing block 28, each image processing is executed while recognizing the pixel position of each data based on the transfer order of a plurality of data constituting the image data to be processed. The corresponding data is sequentially transferred to the image data processing block 28 while sequentially generating pixel positions corresponding to the transfer order of the data recognized when the image processing is executed in the processing block 28. The data bus 10 is a 32-bit bus, and the DMA is 16 bursts.

次に、本実施の形態におけるカメラ装置における画像処理の動作について説明する。撮像系(CCD4)により撮影された画像データがCCD制御部22により取り込まれ、データI/F部23を介してRAM3に書き込まれる。図3には、RAM3に展開記憶された画像データ(ベイヤーデータ)を示している。図3に示すベイヤーデータは、1ピクセルが8ビットのデータである。   Next, an image processing operation in the camera device according to the present embodiment will be described. Image data captured by the imaging system (CCD 4) is captured by the CCD control unit 22 and written to the RAM 3 via the data I / F unit 23. FIG. 3 shows image data (Bayer data) developed and stored in the RAM 3. The Bayer data shown in FIG. 3 is data in which one pixel is 8 bits.

ここで、ベイヤーデータを画像処理部25においてYUVデータに変換するために、図4に示すように、ベイヤーデータ(画像処理部25が処理するデータブロック)の周辺に3ピクセル分のリングピクセルが必要であるものとし、この必要とするリングピクセル数については、予めROM5に記憶されている。つまり、ここでは、注目ピクセルを中心とした7×7ピクセルのベイヤーデータを用いてYUVデータへの変換を実行するものとして説明する。   Here, in order to convert the Bayer data into YUV data in the image processing unit 25, as shown in FIG. 4, three pixels of ring pixels are required around the Bayer data (data block processed by the image processing unit 25). The required number of ring pixels is stored in the ROM 5 in advance. That is, here, description will be made assuming that conversion to YUV data is performed using Bayer data of 7 × 7 pixels centered on the pixel of interest.

一方、CPU1が、ROM5に記憶されたプログラムを実行することによりカメラ装置は図5のフローチャートに示すように動作する。すなわち、CPU5は、前記RAM3に展開された画像データ(ベイヤーデータ)の縦サイズを取得し(取得手段)、この取得したベイヤーデータの縦サイズが素数であるか否かを判断する(ステップS1)。   On the other hand, when the CPU 1 executes the program stored in the ROM 5, the camera device operates as shown in the flowchart of FIG. That is, the CPU 5 acquires the vertical size of the image data (Bayer data) developed in the RAM 3 (acquisition means), and determines whether or not the acquired vertical size of the Bayer data is a prime number (step S1). .

なお、当該カメラ装置において、RAM3に展開された画像データ(ベイヤーデータ)の縦サイズが素数である場合が、横640×縦479のみである場合は、ステップS1において前記RAM3に展開された画像データ(ベイヤーデータ)の縦サイズが横640×縦479であるか否かを判断すればよい。   In the camera device, when the vertical size of the image data (Bayer data) developed in the RAM 3 is a prime number, but only 640 horizontal × 479 vertical, the image data developed in the RAM 3 in step S1. It may be determined whether or not the vertical size of (Bayer data) is horizontal 640 × vertical 479.

この判断がNOであって、ベイヤーデータの縦サイズが素数ではなく、例えば横640×縦480である場合には、1ベルト目と最終ベルトに対してのみ、ベイヤーデータに固定的なライン数のリングピクセルを付加して転送するといった通常画像処理を実行する(ステップS2)。   If this determination is NO and the vertical size of the Bayer data is not a prime number, for example, horizontal 640 × vertical 480, the fixed number of lines in the Bayer data is only applied to the first belt and the final belt. A normal image process is performed in which ring pixels are added and transferred (step S2).

この通常画像処理においては、画像データ転送部24は、データI/F部23を介して、RAM3に記憶されたベイヤーデータを順次読み込み、図6に示すように、所定単位(ベルト単位)のデータ毎に垂直方向に分割(例えば16ピクセル単位で30分割)し、必要に応じてリングピクセル(3ピクセル)を付加しながら、画像処理部25に対して垂直方向に1ピクセル単位(8ビット)でデータを転送する。図6では、1つのベルトの上下左右にそれぞれ3ピクセルのデータを付加して画像処理部25に転送する。   In this normal image processing, the image data transfer unit 24 sequentially reads the Bayer data stored in the RAM 3 via the data I / F unit 23 and, as shown in FIG. 6, data in a predetermined unit (belt unit). Each image is divided in the vertical direction (for example, divided into 30 in units of 16 pixels), and ring pixels (3 pixels) are added as necessary, while the image processing unit 25 is vertically divided in units of 1 pixel (8 bits). Transfer data. In FIG. 6, 3-pixel data is added to each of the upper, lower, left, and right sides of one belt and transferred to the image processing unit 25.

RAM3に記憶されたベイヤーデータ全体については、図7に示すように、ベルト単位で画像処理部25にデータが転送される。1ベルト目のデータについては、画像データ転送部24によりベルトの上に3ライン分のリングピクセルを付加してベイヤーデータの上側から19ライン目まで(16ライン+下側付加分の3ライン)を転送する。すなわち、1ベルト目と2ベルト目の間のように、画像データが存在する場合には、画像データ転送部24によりリングピクセル付加を行わず、元のデータを画像処理部25に出力する。2ベルト目から29ベルト目までは22ライン分(上側付加分の3ライン+16ライン+下側付加分の3ライン)のベイヤーデータを転送することとなる。また、30ベルト目(最終ベルト)では、画像データ転送部24によりベルトの下に3ライン分のリングピクセルを付加してベイヤーデータの下側から19ライン目まで(上側付加分の3ライン+16ライン)を転送する。つまり、ここでは、各ベルトでのライン数がYUVデータ換算で16ラインとなるようにベイヤーデータを転送している。   The entire Bayer data stored in the RAM 3 is transferred to the image processing unit 25 in units of belts as shown in FIG. For the first belt data, the image data transfer unit 24 adds 3 lines of ring pixels on the belt to the 19th line from the upper side of the Bayer data (16 lines + the lower additional line). Forward. That is, when image data exists, such as between the first belt and the second belt, ring pixel addition is not performed by the image data transfer unit 24, and the original data is output to the image processing unit 25. From the second belt to the 29th belt, the Bayer data of 22 lines (upper additional 3 lines + 16 lines + lower additional 3 lines) is transferred. In the 30th belt (final belt), the image data transfer unit 24 adds 3 lines of ring pixels below the belt to the 19th line from the lower side of the Bayer data (3 lines + 16 lines on the upper side). ). That is, here, the Bayer data is transferred so that the number of lines in each belt is 16 lines in terms of YUV data.

なお、図では、各ベルトの上下のリングピクセルのみについて説明しているが、各ベルトの左右に対してもそれぞれ縦に3ライン分のリングピクセルのデータが画像データ転送部24により付加されて画像処理部25に転送される。   In the figure, only the upper and lower ring pixels of each belt are described, but the image data transfer unit 24 adds ring pixel data for three lines vertically to the left and right of each belt. It is transferred to the processing unit 25.

画像処理部25は、画像データ転送部24から所定の順番で転送されたデータに対して、分割単位(ベルト単位)ごとに各データのピクセル位置を認識しながらデータを処理し、640×16ピクセルのYUVデータを生成し、画像データ転送部24に出力する。画像データ転送部24は、画像処理部25からの画像データを、データI/F部23を介してRAM3に書き込む。   The image processing unit 25 processes the data while recognizing the pixel position of each data for each division unit (belt unit) with respect to the data transferred in a predetermined order from the image data transfer unit 24 to obtain 640 × 16 pixels. YUV data is generated and output to the image data transfer unit 24. The image data transfer unit 24 writes the image data from the image processing unit 25 into the RAM 3 via the data I / F unit 23.

このように、画像処理部25においてベイヤーデータをYUVデータに変換する処理にリングピクセルのデータが必要な場合に、RAM3に展開記憶されたベイヤーデータに対して付加するのではなく、画像データ転送部24において、画像処理部25に対してデータを出力する直前に付加するようにしている。よって、RAM3では元画像データのみを記憶させておくだけで良く画像データの占有領域を増大させることがない。   As described above, when ring pixel data is required for the process of converting Bayer data into YUV data in the image processing unit 25, the image data transfer unit is not added to the Bayer data expanded and stored in the RAM 3. 24, the data is added to the image processing unit 25 immediately before the data is output. Therefore, only the original image data needs to be stored in the RAM 3, and the occupied area of the image data is not increased.

ここで、画像データに対してリングピクセルを付加する処理を実行するための画像データ転送部24の詳細な構成と動作について説明する。まず、画像データ転送部24のリングピクセルを付加する機能構成の概略について説明する。   Here, a detailed configuration and operation of the image data transfer unit 24 for executing processing for adding ring pixels to image data will be described. First, an outline of a functional configuration for adding ring pixels of the image data transfer unit 24 will be described.

(1)画像データ記憶
まず、CCD4によって取得された画像データ(各ピクセル位置のデータを含む)を実メモリ(入力バッファ)に記憶する。ここでは、例えばベルト単位で複数回に分けてCCD4により取得された画像データが読み込まれて一時記憶されるものとする。例えば、実メモリ(入力バッファ)に記憶されるデータのデータ長を32ビットとして記憶する。
(1) Image data storage First, image data (including data at each pixel position) acquired by the CCD 4 is stored in an actual memory (input buffer). Here, for example, it is assumed that the image data acquired by the CCD 4 divided into a plurality of times for each belt is read and temporarily stored. For example, the data length of data stored in the real memory (input buffer) is stored as 32 bits.

(2)ピクセル範囲設定
画像データ処理ブロック28に転送する画像データにおけるピクセル範囲(Xmin Ymin,Xmax,Ymax)と、このピクセル範囲の周辺に画像処理の内容に応じて付加されるリングピクセルを含む全体のピクセル範囲(Xmin0 ,Ymin0,Xmax0,Ymax0)を設定する。ここでは、ピクセル範囲(Xmin Ymin,Xmax,Ymax)は、1つのベルトの画像データとなる。
(2) Pixel range setting The entire pixel range (Xmin Ymin, Xmax, Ymax) in the image data to be transferred to the image data processing block 28 and ring pixels added according to the contents of the image processing around this pixel range The pixel range (Xmin0, Ymin0, Xmax0, Ymax0) is set. Here, the pixel range (Xmin Ymin, Xmax, Ymax) is image data of one belt.

(3)ピクセル位置指定
全体のピクセル範囲(Xmin0 ,Ymin0,Xmax0,Ymax0)における転送すべきピクセル位置(X,Y)を逐次順番に指定する。例えば、実メモリ(入力バッファ)にはベルト単位で画像データが記憶される場合には、複数のベルトのそれぞれについて順番に処理する。1つのベルトの画像データに対する処理は、Y方向、X方向の順で順次ピクセル位置を更新していく。
(3) Pixel position designation Pixel positions (X, Y) to be transferred in the entire pixel range (Xmin0, Ymin0, Xmax0, Ymax0) are designated sequentially. For example, when image data is stored in units of belts in the real memory (input buffer), each of the plurality of belts is processed in order. In the processing for the image data of one belt, the pixel positions are sequentially updated in the order of the Y direction and the X direction.

なお、前述した説明では、実メモリにベルト単位で画像データが記憶される場合を例にして説明しているが、ベルト単位に分割した処理に限定されるものではない。また、この画像データに対するピクセル位置の指定順序は、Y方向、X方向の順に限定されない。   In the above description, the case where the image data is stored in the real memory in units of belts is described as an example, but the present invention is not limited to the processing divided in units of belts. Further, the order of specifying pixel positions for the image data is not limited to the order of the Y direction and the X direction.

(4)ピクセル位置判定
ピクセル位置(X,Y)がピクセル範囲(Xmin Ymin,Xmax,Ymax)に含まれるか否か、すなわち指定されたピクセル位置に対応するデータの有無を判定する。ここでは条件(X<Xmin)or(X>Xmax)or(Y<Ymin)or(Y>Ymax)を満たす場合に、指定されたピクセル位置に対応するデータが存在しないと判定することができる。
(4) Pixel position determination It is determined whether or not the pixel position (X, Y) is included in the pixel range (Xmin Ymin, Xmax, Ymax), that is, whether there is data corresponding to the designated pixel position. Here, when the condition (X <Xmin) or (X> Xmax) or (Y <Ymin) or (Y> Ymax) is satisfied, it can be determined that there is no data corresponding to the designated pixel position.

(5)ピクセル位置変換
転送すべきピクセル位置(X,Y)を、ピクセル範囲(Xmin Ymin,Xmax,Ymax)内の転送対象とするデータのピクセル位置に変換する。例えば、2×2ピクセルが単位ブロックであるベイヤーデータなどの場合に、(X<Xmin)の場合は、(Xmin+((Xmin−1−X)/2)の余り)をXに変換し、(X>Xmax)の場合は、(Xmax+((X−Xmin+1)/2)の余り)をXに変換し、(Y<Ymin)の場合は、(Ymin+((Ymin−1−Y)/2)の余り)をYに変換し、(Y>Ymax)の場合は、(Ymax+((Y−Ymin+1)/2)の余り)をYに変換する。
(5) Pixel position conversion The pixel position (X, Y) to be transferred is converted into the pixel position of the data to be transferred within the pixel range (Xmin Ymin, Xmax, Ymax). For example, in the case of Bayer data or the like in which 2 × 2 pixels are a unit block, if (X <Xmin), (the remainder of (Xmin + ((Xmin−1−X) / 2)) is converted to X, and ( When X> Xmax), (Xmax + (the remainder of (X−Xmin + 1) / 2)) is converted to X, and when (Y <Ymin), (Ymin + ((Ymin−1−Y) / 2) (Remainder of (Ymax + ((Y−Ymin + 1) / 2)) is converted to Y if (Y> Ymax).

(6)ピクセル位置選択
ピクセル位置判定の判定結果に基づいて、ピクセル位置指定において転送すべきとして指定されたピクセル位置(X,Y)か、ピクセル位置変換によって変換されたピクセル位置(X,Y)の何れかを選択する。すなわち、ピクセル位置指定により指定されたピクセル位置に対応するデータが存在しないと判定した場合には、ピクセル位置変換によって変換されたピクセル位置(X,Y)を選択する。
(6) Pixel position selection Based on the determination result of the pixel position determination, the pixel position (X, Y) designated to be transferred in the pixel position designation or the pixel position (X, Y) converted by the pixel position conversion Select either of these. That is, when it is determined that there is no data corresponding to the pixel position specified by the pixel position specification, the pixel position (X, Y) converted by the pixel position conversion is selected.

(7)メモリアドレス変換
ピクセル位置選択によって選択されたピクセル位置(X,Y)を、画像データが記憶された実メモリのメモリアドレス及びデータビット位置に変換する。ここでは、CCD4によって取得されたデータ(画素情報)を一時記憶する実メモリ(入力バッファ)の構成および格納方法に応じて、適宜ピクセル位置とメモリアドレスの変換を行う。例えば、1画素が8ビット、実メモリのデータ長が32ビットなどの場合は、メモリアドレスおよびデータビット位置によって1つのピクセル位置が指定される。
(8)データ転送制御。
メモリアドレス変換による変換により得られたメモリアドレス(及びデータビット位置)に従い、所定タイミングによるデータ転送を制御する。
(7) Memory address conversion The pixel position (X, Y) selected by the pixel position selection is converted into the memory address and data bit position of the real memory where the image data is stored. Here, the pixel position and the memory address are appropriately converted according to the configuration and storage method of the real memory (input buffer) that temporarily stores the data (pixel information) acquired by the CCD 4. For example, when one pixel is 8 bits and the data length of the real memory is 32 bits, one pixel position is designated by the memory address and the data bit position.
(8) Data transfer control.
Data transfer at a predetermined timing is controlled according to the memory address (and data bit position) obtained by the conversion by the memory address conversion.

次に、画像データ転送部24の詳細について説明する。図8は、画像データ転送部24のリングピクセルを付加するための構成を示すブロック図である。図8に示すように、画像データ転送部24には、入力バッファ240、アドレス生成部241、垂直ラインカウンタ242、垂直リングピクセルカウンタ243、水平ピクセルカウンタ244、水平リングピクセルカウンタ245、データ選択部246、データセレクタ247が設けられている。   Next, details of the image data transfer unit 24 will be described. FIG. 8 is a block diagram showing a configuration for adding ring pixels of the image data transfer unit 24. As shown in FIG. 8, the image data transfer unit 24 includes an input buffer 240, an address generation unit 241, a vertical line counter 242, a vertical ring pixel counter 243, a horizontal pixel counter 244, a horizontal ring pixel counter 245, and a data selection unit 246. A data selector 247 is provided.

入力バッファ240は、データI/F部23から入力されるデータを記憶するもので、例えば入力データ用に32ビット×16バースト×32ライン分のバッファ領域、出力データ用に32ビット×16バースト×16ライン分のバッファ領域が設けられている。なお、入力バッファ240のバッファ領域はこれに限るものではない。   The input buffer 240 stores data input from the data I / F unit 23. For example, the buffer area for 32 bits × 16 bursts × 32 lines for input data, and 32 bits × 16 bursts × for output data. A buffer area for 16 lines is provided. Note that the buffer area of the input buffer 240 is not limited to this.

アドレス生成部241は、垂直ラインカウンタ242のカウンタ値と垂直リングピクセルカウンタ243によるカウンタ値に応じた入力バッファ240のアドレスを生成する。入力バッファ240が示すアドレスにより、32ビット(4ピクセル)のデータが読み出される。垂直ラインカウンタ242は、入力バッファ240に記憶されたデータのアドレスを生成するためにライン数をカウントする。垂直リングピクセルカウンタ243は、入力バッファ240に記憶されたデータに付加する垂直方向のリングピクセル(垂直リングピクセル)の数をカウントする。   The address generation unit 241 generates an address of the input buffer 240 according to the counter value of the vertical line counter 242 and the counter value of the vertical ring pixel counter 243. Based on the address indicated by the input buffer 240, data of 32 bits (4 pixels) is read out. The vertical line counter 242 counts the number of lines in order to generate an address of data stored in the input buffer 240. The vertical ring pixel counter 243 counts the number of vertical ring pixels (vertical ring pixels) to be added to the data stored in the input buffer 240.

水平ピクセルカウンタ244は、入力バッファ240に記憶されたデータの1ライン中のピクセル位置をカウントする。水平リングピクセルカウンタ245は、入力バッファ240に記憶されたデータに付加する水平方向のリングピクセル(水平リングピクセル)の数をカウントする。データ選択部246は、水平ピクセルカウンタ244あるいは水平リングピクセルカウンタ245の何れかを選択し、この選択されたカウンタによりカウントされた値を出力する。データセレクタ247は、データ選択部246から出力された値をもとに、アドレス生成部241が示すアドレスのデータ(32ビット)から1ピクセル(8ビット)分のデータを選択して画像処理部25に出力する。なお、データセレクタ247は、画像データが記憶される入力バッファ240の構成やバッファリングの方法に応じて、画像処理部25に転送すべきデータ(例えば1ピクセル)を選択できるように構成される。   The horizontal pixel counter 244 counts pixel positions in one line of data stored in the input buffer 240. The horizontal ring pixel counter 245 counts the number of horizontal ring pixels (horizontal ring pixels) added to the data stored in the input buffer 240. The data selection unit 246 selects either the horizontal pixel counter 244 or the horizontal ring pixel counter 245 and outputs a value counted by the selected counter. The data selector 247 selects one pixel (8 bits) of data from the address data (32 bits) indicated by the address generation unit 241 based on the value output from the data selection unit 246, and the image processing unit 25. Output to. Note that the data selector 247 is configured to be able to select data (for example, one pixel) to be transferred to the image processing unit 25 according to the configuration of the input buffer 240 in which the image data is stored and the buffering method.

画像データ転送部24の入力バッファ240には、入力データ用に32ビット×16バースト×32ライン分の記憶容量が設けられており、RAM3に記憶されたベイヤーデータが1ピクセル8ビットなので64ピクセル×32ライン分を取り込むことができる。画像データのサイズが水平640ピクセルなので(図3)、この入力バッファ240への取り込みを10回繰り返すことで1ベルト分のデータを処理することができる。   The input buffer 240 of the image data transfer unit 24 is provided with a storage capacity for 32 bits × 16 bursts × 32 lines for input data, and since the Bayer data stored in the RAM 3 is 8 bits per pixel, 64 pixels × 32 lines can be captured. Since the size of the image data is horizontal 640 pixels (FIG. 3), the data for one belt can be processed by repeating the fetching into the input buffer 240 ten times.

なお、出力データ用に32ビット×16バースト×16ライン分の記憶容量が設けられ、画像処理部25における画像処理によって得られるYUV422の画像データが32ビットで2ピクセル分なので、32ピクセル×16ライン分を取り込むことができる。画像サイズが水平640ピクセルなので、この入力バッファ240のデータ取り込みを20回繰り返すことで1ベルト分のデータを処理できる。   A storage capacity of 32 bits × 16 bursts × 16 lines is provided for output data, and the image data of YUV422 obtained by image processing in the image processing unit 25 is 32 bits × 2 pixels, so 32 pixels × 16 lines. Minutes can be captured. Since the image size is 640 pixels horizontally, data for one belt can be processed by repeating the data fetching of the input buffer 240 20 times.

まず、1ベルト目については、RAM3から読み込まれたデータ(32ビット×16バースト×19ライン分)が、図9のように入力バッファ240に書き込まれる。図9において記載されている番号は、ライン番号と水平ピクセル番号を表したもので、1−1は1ライン目の1ピクセル、2−5は2ライン目の5ピクセルを示している。入力バッファ240への書き込み時には、32ビット毎に32ライン分あけてデータ書き込みを行う。例えば、1−1,1−2,1−3,1−4のデータ(32ビット)を書き込んだ後は、32ライン分の容量のあとに1−5,1−6,1−7,1−8のデータを書き込む。   First, for the first belt, the data read from the RAM 3 (32 bits × 16 bursts × 19 lines) is written to the input buffer 240 as shown in FIG. The numbers described in FIG. 9 represent line numbers and horizontal pixel numbers. 1-1 indicates one pixel on the first line, and 2-5 indicates five pixels on the second line. At the time of writing to the input buffer 240, data is written by leaving 32 lines for every 32 bits. For example, after writing 1-1, 1-2, 1-3, 1-4 data (32 bits), 1-5, 1-6, 1-7, 1 after the capacity of 32 lines Write the data of -8.

画像データ転送部24は、垂直ラインカウンタ242と水平ピクセルカウンタ244によって、入力バッファ240に記憶された転送すべきデータに対応するピクセル位置をカウントし、また入力バッファ240に記憶されたデータに対して付加するリングピクセルをカウントする(ピクセル範囲設定、ピクセル位置指定)。画像処理部25へのデータは、垂直ラインカウンタ242によりカウントされるベルトのライン数分連続したバッファアドレスからデータを読み出し、この読み出した32ビット中の8ビットを水平ピクセルカウンタ244によりカウントされる値に応じて選択して出力する。   The image data transfer unit 24 counts the pixel position corresponding to the data to be transferred stored in the input buffer 240 by the vertical line counter 242 and the horizontal pixel counter 244, and for the data stored in the input buffer 240. Count the ring pixels to add (pixel range setting, pixel position specification). Data to the image processing unit 25 is read from a buffer address continuous by the number of belt lines counted by the vertical line counter 242, and 8 bits out of the read 32 bits are counted by the horizontal pixel counter 244. Select according to the output.

ここでは、図4に示すように、入力バッファ240に記憶されたデータに対して3ライン分のリングピクセルを付加するため、垂直リングピクセルカウンタ243と水平ピクセルカウンタ244によって3ピクセルをカウントする。垂直ラインカウンタ242、垂直リングピクセルカウンタ243、水平ピクセルカウンタ244、水平リングピクセルカウンタ245の初期値をそれぞれ1とする。垂直ラインカウンタ242は、垂直リングピクセルカウンタ243がリングピクセル分のカウントを終了するまでカウントが停止される。また、水平ピクセルカウンタ244は、水平リングピクセルカウンタ245がリングピクセル分のカウントを終了するまでカウントが停止される。   Here, as shown in FIG. 4, in order to add three lines of ring pixels to the data stored in the input buffer 240, three pixels are counted by the vertical ring pixel counter 243 and the horizontal pixel counter 244. The initial values of the vertical line counter 242, the vertical ring pixel counter 243, the horizontal pixel counter 244, and the horizontal ring pixel counter 245 are set to 1, respectively. The vertical line counter 242 stops counting until the vertical ring pixel counter 243 finishes counting the ring pixels. The horizontal pixel counter 244 is stopped until the horizontal ring pixel counter 245 finishes counting for the ring pixels.

アドレス生成部241は、垂直リングピクセルカウンタ243によりカウントされるリングピクセルの位置が奇数位置である場合には、垂直ラインカウンタ242によりカウントされているカウンタ値に+1した値に応じたアドレスを生成し、偶数位置である場合にはカウンタ値に応じたアドレスを生成する。また、データ選択部246は、水平リングピクセルカウンタ245によりカウントされるリングピクセルの位置が奇数位置である場合には、水平ピクセルカウンタ244によりカウントされているカウンタ値に+1した値、偶数位置である場合にはカウンタ値を選択する。   When the position of the ring pixel counted by the vertical ring pixel counter 243 is an odd position, the address generation unit 241 generates an address corresponding to a value obtained by adding 1 to the counter value counted by the vertical line counter 242. If it is an even position, an address corresponding to the counter value is generated. In addition, when the position of the ring pixel counted by the horizontal ring pixel counter 245 is an odd position, the data selection unit 246 has a value obtained by adding 1 to the counter value counted by the horizontal pixel counter 244 and an even position. In this case, a counter value is selected.

データセレクタ247は、データ選択部246によって選択されたカウンタ値に応じて、アドレス生成部241が生成したアドレスに記憶された32ビット中の8ビットを選択して画像処理部25に出力する(メモリアドレス変換)。垂直リングピクセルカウンタ243と水平リングピクセルカウンタ245によりリングピクセル分のカウントが終了するまでは、垂直ラインカウンタ242と水平ピクセルカウンタ244のカウント値に該当するピクセル位置に対応するデータがないものとし(ピクセル位置判定)、垂直ラインカウンタ242と水平ピクセルカウンタ244によりカウントされたカウント値をもとに、入力バッファ240に記憶されたデータを出力するためのピクセル位置をアドレス生成部241とデータ選択部246によって求める(ピクセル位置選択、ピクセル位置変換)。したがって、1ベルト目では、図10中に矢印で示すように、入力バッファ240に記憶されたデータが2−2,1−2,2−2,1−2,2−2、3−2,4−2・・・の順番で画像処理部25に出力される。   The data selector 247 selects 8 bits out of 32 bits stored in the address generated by the address generation unit 241 according to the counter value selected by the data selection unit 246 and outputs the selected 8 bits to the image processing unit 25 (memory). change address). It is assumed that there is no data corresponding to the pixel positions corresponding to the count values of the vertical line counter 242 and the horizontal pixel counter 244 until the count for the ring pixels is completed by the vertical ring pixel counter 243 and the horizontal ring pixel counter 245 (pixels). Position determination), based on the count values counted by the vertical line counter 242 and the horizontal pixel counter 244, the pixel position for outputting the data stored in the input buffer 240 is determined by the address generation unit 241 and the data selection unit 246. Find (pixel position selection, pixel position conversion). Therefore, at the first belt, as indicated by arrows in FIG. 10, the data stored in the input buffer 240 is 2-2, 1-2, 2-2, 1-2, 2-2, 3-2. Are output to the image processing unit 25 in the order of 4-2.

同様に、ベルトの最後でもリングピクセル分カウンタを停止し、垂直リングピクセルカウンタ243が奇数位置では、垂直ラインカウンタ242によるラインカウンタ値+1、偶数位置ではラインカウンタ値によりバッファアドレスを生成し、水平ピクセルカウンタ244が奇数位置では水平ピクセルカウンタ値−1、偶数位置では水平ピクセルカウンタ値により、32ビット中8ビットを選択することで図10に示すような順番でデータを画像処理部25に出力する。   Similarly, the ring pixel counter is stopped even at the end of the belt, and when the vertical ring pixel counter 243 is in an odd position, a buffer address is generated by the line counter value +1 by the vertical line counter 242 and in the even position by the line counter value. Data is output to the image processing unit 25 in the order shown in FIG. 10 by selecting 8 bits out of 32 bits based on the horizontal pixel counter value -1 when the counter 244 is an odd position and the horizontal pixel counter value when the counter 244 is an even position.

2ベルト目から最終ベルトの1つ前のベルトまでについては、上下に位置するベルトのデータ(3ライン)を用いるため、水平方向(左右)のみについて前述と同様にしてリングピクセルの付加を行う。図11には、2ベルト目のデータを示す。図11に示すように、上リングピクセル3ラインは、14〜16ラインのデータがリングピクセルとして付加され、下リングピクセル3ラインは、33〜35ラインのデータが付加されている。   For the belt from the second belt to the belt immediately before the final belt, the data of the belts located above and below (3 lines) are used, and therefore ring pixels are added only in the horizontal direction (left and right) in the same manner as described above. FIG. 11 shows data for the second belt. As shown in FIG. 11, 14 to 16 lines of data are added as ring pixels to the upper ring pixel 3 lines, and 33 to 35 lines of data are added to the lower ring pixel 3 lines.

最終ベルトのベルト開始位置でのリングピクセル付加は、垂直リングピクセルカウンタ243が奇数位置では、垂直ラインカウンタ242によるラインカウンタ値−1、偶数位置ではラインカウンタ値によりバッファアドレスを生成し、水平リングピクセルカウンタ245が奇数位置を示す場合には水平ピクセルカウンタ244による水平ピクセルカウンタ値+1、偶数位置では水平ピクセルカウンタ値により32ビット中8ビットを選択して出力する。また、ベルトの終了位置では、垂直リングピクセルカウンタ243が奇数位置では、垂直ラインカウンタ242によるラインカウンタ値−1、偶数位置ではラインカウンタ値によりバッファアドレスを生成し、水平リングピクセルカウンタ245が奇数位置を示す場合には水平ピクセルカウンタ244による水平ピクセルカウンタ値−1、偶数位置では水平ピクセルカウンタ値により、32ビット中8ビットを選択して出力する。   The ring pixel addition at the belt start position of the final belt is performed by generating a buffer address based on the line counter value -1 by the vertical line counter 242 when the vertical ring pixel counter 243 is an odd position, and the line counter value at an even position. When the counter 245 indicates an odd position, the horizontal pixel counter value +1 is selected by the horizontal pixel counter 244, and at the even position, 8 bits out of 32 bits are selected and output. At the belt end position, a buffer address is generated by the line counter value -1 by the vertical line counter 242 when the vertical ring pixel counter 243 is an odd position, and by the line counter value at an even position, and the horizontal ring pixel counter 245 is an odd position. , The horizontal pixel counter value -1 by the horizontal pixel counter 244 is selected, and 8 bits out of 32 bits are selected and output at the even position by the horizontal pixel counter value.

一方、図5のフローチャートにおいて、ステップS1の判断がYESであって、ベイヤーデータが横640×縦479であり、この横640×縦479のベイヤーデータをYUVデータに変換する場合には、ステップS1からステップS3に進む。この場合には、縦サイズが「479」で素数であるので、1ベルトは有効画素1ピクセル+リングピクセルとなる。したがって、図12に示すように、1ベルト目及び最終ベルト以外でもリングピクセル付加を行わなければならない。つまり、各ベルト間で、ベイヤーデータに付加するリングピクセル数を可変させて転送する必要がある。   On the other hand, in the flowchart of FIG. 5, when the determination in step S1 is YES and the Bayer data is horizontal 640 × vertical 479 and this Bayer data of horizontal 640 × vertical 479 is converted into YUV data, step S1 To step S3. In this case, since the vertical size is “479” and a prime number, one belt is 1 effective pixel + ring pixel. Therefore, as shown in FIG. 12, ring pixel addition must be performed for other than the first belt and the final belt. That is, it is necessary to change the number of ring pixels added to the Bayer data between the belts.

そこで、先ず画像データ処理ブロック28に転送するベイヤーデータが1ベルト目であるか否かを判断する(ステップS3)。1ベルト目である場合には、上側にリングピクセルを3ライン分だけ付加する必要があることから、付加するライン分を「3」に設定して、画像データ転送部24から画像データ処理ブロック28に転送する(ステップS4)。また、2ベルト目である場合には(ステップS5;YES)、上側にリングピクセルを2ライン分だけ付加する必要があることから、付加するライン分を「2」に設定し(ステップS6)、3ベルト目である場合には(ステップS7;YES)、上側にリングピクセルを1ライン分だけ付加する必要があることから、付加するライン分を「1」に設定する(ステップS8)。   Therefore, it is first determined whether or not the Bayer data transferred to the image data processing block 28 is the first belt (step S3). In the case of the first belt, since it is necessary to add ring pixels for three lines on the upper side, the number of lines to be added is set to “3” and the image data transfer unit 24 sets the image data processing block 28. (Step S4). In the case of the second belt (step S5; YES), since it is necessary to add ring pixels for two lines on the upper side, the line to be added is set to “2” (step S6). If it is the third belt (step S7; YES), it is necessary to add one line of ring pixels to the upper side, so the line to be added is set to “1” (step S8).

また、ステップS3、S5、S7の判断が全てNOであって、1ベルト目から3ベルト目のいずれでもない場合には、最終−2ベルト目であるか否か(ステップS9)、最終−1ベルト目であるか否か(ステップS11)、及び最終ベルト目であるか否か(ステップS13)を各々判断する。この結果、これらステップS9、S11、S13の判断が全てNOであって最終−2ベルト目、最終−1ベルト目、及び最終ベルト目のいずれでもなかった場合には、ステップS13からステップS14に進み、付加するライン分を「0」に設定し、リングピクセルを付加することなく転送を行う。   If all the determinations in steps S3, S5, and S7 are NO and none of the first to third belts, it is determined whether or not the final second belt (step S9). It is determined whether it is the belt (step S11) and whether it is the final belt (step S13). As a result, if all of the determinations in steps S9, S11, and S13 are NO and none of the last -2nd belt, the last -1st belt, and the last belt is reached, the process proceeds from step S13 to step S14. The line to be added is set to “0”, and transfer is performed without adding ring pixels.

したがって、4ベルト目から最終−2ベルト目までは、リングピクセルの付加を伴うことなく、画像データ転送部24から画像データ処理ブロック28への転送が行われる。   Therefore, the transfer from the image data transfer unit 24 to the image data processing block 28 is performed without adding ring pixels from the 4th belt to the last -2nd belt.

また、最終−2ベルト目を転送する際には、下側にリングピクセルを1ライン分だけ付加する必要がある。このとき、ステップS9の判断がYESとなる。したがって、ステップS9からステップS10に進み、付加するライン分を「1」に設定して転送する。また、最終−1ベルト目である場合には(ステップS11;YES)、下側にリングピクセルを2ライン分だけ付加する必要があることから、付加するライン分を「2」に設定して転送し(ステップS12)、最終ベルト目である場合には(ステップS13;YES)、下側にリングピクセルを3ライン分だけ付加する必要があることから、付加するライン分を「3」に設定して転送する(ステップS15)。   Further, when transferring the last-second belt, it is necessary to add one ring pixel to the lower side. At this time, the determination in step S9 is YES. Accordingly, the process proceeds from step S9 to step S10, and the line to be added is set to “1” and transferred. If it is the final first belt (step S11; YES), it is necessary to add two lines of ring pixels to the lower side, so the line to be added is set to “2” and transferred. However, if it is the last belt (step S13; YES), it is necessary to add ring pixels for three lines on the lower side, so the line to be added is set to “3”. (Step S15).

したがって、ベイヤーデータのライン数が約数を有する前記480ラインである場合は無論のこと、約数を有しない素数である479ラインである場合であっても、支障なくリングピクセルを付加して効率的に転送を行うことが可能となる。   Therefore, when the number of lines of Bayer data is the 480 line having a divisor, it is a matter of course, and even if it is a 479 line that is a prime number having no divisor, ring pixels can be added without any trouble and efficiency. Transfer can be performed automatically.

無論、画像データ転送部24から画像データ処理ブロック28への転送が行われた後における処理は、前述した通常画像処理(ステップS2)において説明した処理と同様である。   Of course, the processing after the transfer from the image data transfer unit 24 to the image data processing block 28 is the same as the processing described in the normal image processing (step S2) described above.

なお、リングピクセル付加を自動的に行うか否かを設定するレジスタを設けるようにしてもよい。この場合、自動的に行わない場合には、上及び左方向のリングピクセル付加は、各々レジスタに設定された値を使用して、リングピクセルを行う。自動的に行うように設定された場合には、各処理に必要なリングピクセル数が決まって(例えば拡大処理なら5ピクセル)おり、その1/2を四捨五入した値を上及び左方向のリングピクセルとするようにする。但し、元画像がリングピクセルを含めることができるサイズである場合には、リングピクセル付加を行わないようにする。例えば、入力画像として640×480が必要で、リングピクセルが5ピクセルとした場合、元画像が645×485以上のサイズであればリングピクセル付加を行わないようにする。   A register for setting whether or not ring pixel addition is automatically performed may be provided. In this case, if not automatically performed, ring pixel addition in the upper and left directions is performed using the values set in the registers. If it is set to perform automatically, the number of ring pixels necessary for each process is determined (for example, 5 pixels for the enlargement process), and a value obtained by rounding a half of the ring pixels in the upper and left directions And so on. However, when the original image has a size that can include ring pixels, ring pixels are not added. For example, when 640 × 480 is required as an input image and the ring pixel is 5 pixels, ring pixel addition is not performed if the original image has a size of 645 × 485 or more.

また、上述の実施形態では、ベイヤーデータの総ライン数が素数であるか否かを判断する場合について説明したが、ベイヤーデータの総ライン数に対する約数のうち、YUVデータ換算で一度に転送可能な最大ライン数(各ベルトのライン数として設定可能なライン数のうち最大のライン数)をベイヤーデータでのライン数に変換した値以下で且つその中で最大の約数(以下、「最適転送ライン数」と記す)と、ベイヤーデータに付加するために予め記憶されているリングピクセル数とを比較し、リングピクセル数が最適転送ライン数以上であった場合には、1ベルト目と最終ベルトに対してのみベイヤーデータに固定的なライン数のリングピクセルを付加して転送するといった処理を選択し、リングピクセル数が最適転送ライン数未満であった場合には、各ベルト間でベイヤーデータに付加するリングピクセル数を可変させて転送するといった処理を選択する構成としてもよい。   In the above-described embodiment, the case has been described in which it is determined whether or not the total number of lines of Bayer data is a prime number. Of the divisors with respect to the total number of lines of Bayer data, YUV data conversion is possible at a time. The maximum number of lines (the maximum number of lines that can be set as the number of lines for each belt) is equal to or less than the value converted into the number of lines in the Bayer data, and the maximum divisor (hereinafter referred to as “optimal transfer”). The number of lines) and the number of ring pixels stored in advance to be added to the Bayer data. If the number of ring pixels is equal to or greater than the optimum number of transfer lines, the first belt and the final belt For this, select a process that adds a ring pixel with a fixed number of lines to the Bayer data, and the number of ring pixels is less than the optimal number of transfer lines. If the may be configured to select the processing such the number rings pixels to be added to the Bayer data between each belt transfers by varying.

ここで、上記最適転送ライン数について換言すると、ベイヤーデータを転送する際に、各ベルト間での転送ライン数を等しくできる条件のうち、ベルト数を最少にできるライン数(転送回数を最少にできるライン数)を示している。   In other words, in terms of the optimum number of transfer lines, when transferring Bayer data, the number of lines that can minimize the number of belts (the number of transfers can be minimized) among the conditions that can equalize the number of transfer lines between the belts. Line number).

つまり、ベイヤーデータの総ライン数(または画素数)に基づいて、転送効率上理想となる各ベルトのライン数(転送単位となる画素数)を最適転送ライン数として設定するとともに、リングピクセル数が最適転送ライン数以上であった場合には、1ベルト目と最終ベルトに対してのみ、ベイヤーデータに固定的なライン数を付加し、リングピクセル数が最適転送ライン数未満であった場合には、1ベルト目と最終ベルト以外にもリングピクセルが必要となるため、各ベルト間で付加するリングピクセル数を可変させて、必要数のリングピクセルとなるように付加する構成としてもよい。これにより、転送効率を向上させることができるとともに、ベイヤーデータにリングピクセルを適切に付加することができる。なお、各ベルトに付加するリングピクセル数は、例えば、最適転送ライン数とリングピクセルとの関係に対応させて、予め記憶させておけばよい。これにより、各ベルトにリングピクセルを付加するか否か、また、付加すると判断された場合に、付加するリングピクセル数をベルト毎に適宜判断することが可能となる。   That is, based on the total number of lines (or the number of pixels) of Bayer data, the number of lines of each belt that is ideal for transfer efficiency (the number of pixels as a transfer unit) is set as the optimal number of transfer lines, and the number of ring pixels is If the number of transfer lines is greater than or equal to the optimum transfer line number, a fixed line number is added to the Bayer data only for the first and last belts, and the number of ring pixels is less than the optimum transfer line number. Since ring pixels are required in addition to the first belt and the final belt, the number of ring pixels added between the belts may be varied to add the required number of ring pixels. Thereby, it is possible to improve transfer efficiency and to appropriately add a ring pixel to the Bayer data. Note that the number of ring pixels added to each belt may be stored in advance in correspondence with the relationship between the optimum number of transfer lines and the ring pixels, for example. Accordingly, whether or not to add a ring pixel to each belt can be appropriately determined for each belt when it is determined that a ring pixel is to be added.

また、前述した説明では、デジタルスチルカメラやデジタルビデオカメラなどのカメラ装置を対象としているが、カメラ機能付きの携帯電話機や携帯型の情報処理装置(PDA(personal digital assistant)やPC(Personal Computer)など)に適用することもできる。   In the above description, a camera device such as a digital still camera or a digital video camera is targeted. However, a mobile phone with a camera function or a portable information processing device (PDA (personal digital assistant) or PC (Personal Computer)). Etc.).

本発明の実施形態におけるカメラ装置の画像処理に関連する主要な構成を示すブロック図である。It is a block diagram which shows the main structures relevant to the image processing of the camera apparatus in embodiment of this invention. 図1に示すASICの詳細な構成を示すブロック図である。It is a block diagram which shows the detailed structure of ASIC shown in FIG. 本実施の形態におけるRAMに展開記憶された画像データ(ベイヤーデータ)の一例を示す図である。It is a figure which shows an example of the image data (Bayer data) expand | deployed and memorize | stored in RAM in this Embodiment. 同実施の形態におけるベイヤーデータの周辺に付加されるリングピクセルを示す図。The figure which shows the ring pixel added to the circumference | surroundings of Bayer data in the embodiment. 同実施の形態の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the embodiment. 同実施の形態における画像処理部へのデータ転送をしめす説明図である。It is explanatory drawing which shows the data transfer to the image process part in the embodiment. 同実施の形態における画像処理部へのベルト単位でのデータ転送を示す説明図である。It is explanatory drawing which shows the data transfer per belt to the image process part in the embodiment. 同実施の形態における画像データ転送部のリングピクセルを付加するための構成を示すブロック図である。It is a block diagram which shows the structure for adding the ring pixel of the image data transfer part in the embodiment. 同実施の形態における入力バッファ同実施の形態に記憶されるデータの一例を示す図である。It is a figure which shows an example of the data memorize | stored in the input buffer same embodiment in the embodiment. 同実施の形態における1ベルト目に付加されるリングピクセルを示す図である。It is a figure which shows the ring pixel added to the 1st belt in the embodiment. 同実施の形態における2ベルト目に付加されるリングピクセルを示す図である。It is a figure which shows the ring pixel added to the 2nd belt in the embodiment. 同実施の形態におけるライン数が479である場合の第1〜第3ベルト目及び最終ベルト−1〜最終ベルト目のピクセル構成図である。It is a pixel block diagram of the 1st-3rd belt and the last belt -1-the last belt in case the number of lines is 479 in the embodiment.

符号の説明Explanation of symbols

1 CPU
2 ASIC
3 RAM
4 CCD
5 ROM
6 LCD
7 キーボード
8 電源部
9 コントロールバス
10 データバス
20 LCD制御部
21 キーボード制御部
22 CCD制御部
23 データI/F部
24 画像データ転送部
25 画像処理部
26 画素数変換部
27 デブロッキングフィルタ部
240 入力バッファ
241 アドレス生成部
242 垂直ラインカウンタ
243 垂直リングピクセルカウンタ
244 水平ピクセルカウンタ
245 水平リングピクセルカウンタ
246 データ選択部
247 データセレクタ
1 CPU
2 ASIC
3 RAM
4 CCD
5 ROM
6 LCD
7 Keyboard 8 Power supply unit 9 Control bus 10 Data bus 20 LCD control unit 21 Keyboard control unit 22 CCD control unit 23 Data I / F unit 24 Image data transfer unit 25 Image processing unit 26 Pixel number conversion unit 27 Deblocking filter unit 240 Input Buffer 241 Address generation unit 242 Vertical line counter 243 Vertical ring pixel counter 244 Horizontal pixel counter 245 Horizontal ring pixel counter 246 Data selection unit 247 Data selector

Claims (10)

格納手段に格納されたベイヤーデータにリングピクセルを付加して転送する転送回路であって、A transfer circuit for adding a ring pixel to the Bayer data stored in the storage means and transferring the data,
前記格納手段に格納されるベイヤーデータに付加するリングピクセル数が、予め記憶された記憶手段と、Storage means in which the number of ring pixels to be added to the Bayer data stored in the storage means is stored in advance;
前記格納手段に格納されるベイヤーデータの画素数を取得する取得手段と、Obtaining means for obtaining the number of pixels of Bayer data stored in the storage means;
前記取得手段により取得されたベイヤーデータの画素数に基づいて、転送単位となる転送画素数を設定する設定手段と、Setting means for setting the number of transfer pixels as a transfer unit based on the number of pixels of Bayer data acquired by the acquisition means;
前記設定手段により設定された転送画素数での各転送時に、前記リングピクセルを付加するか否かを判断する判断手段と、Determining means for determining whether or not to add the ring pixel at each transfer with the number of transfer pixels set by the setting means;
前記判断手段によりリングピクセルを付加すると判断されたときに、前記記憶手段に記憶されているリングピクセル数と、前記設定手段により設定された転送画素数とに基づいて、当該転送時に付加するリングピクセル数を可変設定する可変設定手段と、A ring pixel to be added at the time of transfer based on the number of ring pixels stored in the storage means and the number of transfer pixels set by the setting means when it is determined by the determination means to add a ring pixel Variable setting means for variably setting the number;
を備えたことを特徴とする転送回路。A transfer circuit comprising:
前記設定手段は、前記取得手段により取得されたベイヤーデータの総ライン数に対する約数を、前記転送単位となる転送ライン数として設定することを特徴とする請求項1に記載の転送回路。2. The transfer circuit according to claim 1, wherein the setting unit sets a divisor with respect to the total number of lines of Bayer data acquired by the acquiring unit as the number of transfer lines serving as the transfer unit. 前記設定手段は、前記取得手段により取得されたベイヤーデータの総ライン数に対する約数のうち、一度に転送可能な最大ライン数以下で、かつ、最大の約数を、前記転送単位となる転送ライン数として設定することを特徴とする請求項2に記載の転送回路。The setting means is a transfer line that is equal to or less than the maximum number of lines that can be transferred at one time and is the transfer unit that is the transfer unit among the divisors of the total number of lines of Bayer data acquired by the acquisition means. The transfer circuit according to claim 2, wherein the transfer circuit is set as a number. 前記可変設定手段は、前記設定手段により設定された転送ライン数と、前記記憶手段に記憶されたリングピクセル数とを比較し、この比較結果に基づいて、前記転送時に付加するリングピクセル数を可変設定することを特徴とする請求項3に記載の転送回路。The variable setting means compares the number of transfer lines set by the setting means with the number of ring pixels stored in the storage means, and based on the comparison result, the number of ring pixels added at the time of transfer is variable. The transfer circuit according to claim 3, wherein the transfer circuit is set. 前記設定手段は、前記取得手段により取得されたベイヤーデータの総ライン数が素数である場合には、前記転送単位となる転送ライン数を1ラインに設定し、ベイヤーデータの総ライン数が素数でない場合には、ベイヤーデータの総ライン数に対する約数を、前記転送単位となる転送ライン数として設定することを特徴とする請求項2に記載の転送回路。When the total number of lines of Bayer data acquired by the acquisition unit is a prime number, the setting unit sets the number of transfer lines as the transfer unit to one line, and the total number of lines of Bayer data is not a prime number. 3. The transfer circuit according to claim 2, wherein a divisor for the total number of lines of Bayer data is set as the number of transfer lines serving as the transfer unit. 前記判断手段は、前記設定手段により前記転送単位となる転送ライン数がベイヤーデータの総ライン数に対する約数に設定された場合には、この設定された転送単位による最初の転送および最後の転送のときだけリングピクセルを付加すると判断し、前記設定手段により前記転送単位となる転送ライン数が1ラインに設定された場合には、この設定された転送単位による最初の転送に続く複数回の転送および最後の転送の前の複数回の転送のときにリングピクセルを付加すると判断することを特徴とする請求項5に記載の転送回路。When the number of transfer lines serving as the transfer unit is set to a divisor with respect to the total number of lines of Bayer data by the setting means, the determining means determines the first transfer and the last transfer of the set transfer unit. When it is determined that a ring pixel is added only when the number of transfer lines serving as the transfer unit is set to one line by the setting unit, a plurality of transfers following the first transfer by the set transfer unit and 6. The transfer circuit according to claim 5, wherein it is determined that a ring pixel is added in a plurality of transfers before the last transfer. 前記可変設定手段は、前記判断手段により最初の転送に続く複数回の転送および最後の転送の前の複数回の転送のときにリングピクセルを付加すると判断された場合には、最初の転送および最後の転送のときに付加するリングピクセル数を最大とし、最初の転送または最後の転送の前後の転送では、この最大のリングピクセル数よりも少なくすることを特徴とする請求項6に記載の転送回路。The variable setting means, when it is judged by the judging means that a ring pixel is added at the time of a plurality of transfers following the first transfer and a plurality of transfers before the last transfer, 7. The transfer circuit according to claim 6, wherein the number of ring pixels added at the time of transfer is maximized, and the number of ring pixels before and after the first transfer or the last transfer is less than the maximum number of ring pixels. . 請求項1乃至7のいずれかに記載の転送回路を備えた撮像装置であって、An imaging apparatus comprising the transfer circuit according to claim 1,
被写体を撮像してベイヤーデータを取得する撮像手段と、  Imaging means for capturing a subject and acquiring Bayer data;
前記撮像手段により取得されたベイヤーデータを前記格納手段に格納する格納制御手段と、Storage control means for storing Bayer data acquired by the imaging means in the storage means;
前記転送回路よりリングピクセルを付加した形で転送されてくるベイヤーデータに対して所定の画像データ処理を施す画像データ処理手段と、Image data processing means for performing predetermined image data processing on the Bayer data transferred with the ring pixels added from the transfer circuit;
を更に備えたことを特徴とする撮像装置。An image pickup apparatus further comprising:
請求項1乃至7のいずれかに記載の転送回路を備えた撮像装置が有するコンピュータを、A computer included in an imaging apparatus including the transfer circuit according to claim 1,
被写体を撮像してベイヤーデータを取得する撮像手段と、Imaging means for capturing a subject and acquiring Bayer data;
前記撮像手段により取得されたベイヤーデータを前記格納手段に格納する格納制御手段と、Storage control means for storing Bayer data acquired by the imaging means in the storage means;
前記転送回路よりリングピクセルを付加した形で転送されてくるベイヤーデータに対して所定の画像データ処理を施す画像データ処理手段と、Image data processing means for performing predetermined image data processing on the Bayer data transferred with the ring pixels added from the transfer circuit;
して機能させることを特徴とする制御プログラム。A control program characterized by functioning as a function.
格納手段に格納されたベイヤーデータにリングピクセルを付加して転送する転送回路の転送を制御する転送制御方法であって、A transfer control method for controlling transfer of a transfer circuit that adds a ring pixel to Bayer data stored in a storage means and transfers the data,
前記格納手段に格納されるベイヤーデータの画素数を取得する取得ステップと、An acquisition step of acquiring the number of pixels of Bayer data stored in the storage means;
前記取得ステップにより取得されたベイヤーデータの画素数に基づいて、転送単位となる転送画素数を設定する設定ステップと、A setting step for setting the number of transfer pixels as a transfer unit based on the number of pixels of the Bayer data acquired by the acquisition step;
前記設定ステップにより設定された転送画素数での各転送時に、前記リングピクセルを付加するか否かを判断する判断ステップと、A determination step of determining whether or not to add the ring pixel at each transfer with the transfer pixel number set in the setting step;
前記判断ステップによりリングピクセルを付加すると判断されたときに、前記格納手段に格納されるベイヤーデータに付加するリングピクセル数が予め記憶された記憶手段に記憶されている前記リングピクセル数と、前記設定ステップにより設定された転送画素数とに基づいて、当該転送時に付加するリングピクセル数を可変設定する可変設定ステップと、The number of ring pixels stored in the storage means in which the number of ring pixels to be added to the Bayer data stored in the storage means when it is determined in the determination step to add ring pixels, and the setting Based on the transfer pixel number set in the step, a variable setting step for variably setting the number of ring pixels added at the time of the transfer,
を備えたことを特徴とする転送制御方法。A transfer control method comprising:
JP2006315838A 2006-11-22 2006-11-22 Transfer circuit, transfer control method, imaging apparatus, control program Expired - Fee Related JP4905080B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006315838A JP4905080B2 (en) 2006-11-22 2006-11-22 Transfer circuit, transfer control method, imaging apparatus, control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006315838A JP4905080B2 (en) 2006-11-22 2006-11-22 Transfer circuit, transfer control method, imaging apparatus, control program

Publications (3)

Publication Number Publication Date
JP2008131472A JP2008131472A (en) 2008-06-05
JP2008131472A5 JP2008131472A5 (en) 2009-12-24
JP4905080B2 true JP4905080B2 (en) 2012-03-28

Family

ID=39556863

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006315838A Expired - Fee Related JP4905080B2 (en) 2006-11-22 2006-11-22 Transfer circuit, transfer control method, imaging apparatus, control program

Country Status (1)

Country Link
JP (1) JP4905080B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6574655B2 (en) * 2015-09-16 2019-09-11 キヤノン株式会社 Imaging apparatus and encoding method in imaging apparatus

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3873168B2 (en) * 2001-07-03 2007-01-24 カシオ計算機株式会社 Digital camera and image processing method
JP4887614B2 (en) * 2004-11-05 2012-02-29 カシオ計算機株式会社 Image processing apparatus and image processing method
JP4432786B2 (en) * 2005-01-28 2010-03-17 カシオ計算機株式会社 Camera device and image processing method

Also Published As

Publication number Publication date
JP2008131472A (en) 2008-06-05

Similar Documents

Publication Publication Date Title
CN101998041B (en) Imaging apparatus and method of controlling same
EP1234443A1 (en) Programmable image transform processor
US12160678B2 (en) Imaging element, imaging apparatus, operation method of imaging element, and program
JPWO2013005727A1 (en) Imaging apparatus and program
JP4460447B2 (en) Information terminal
US7545416B2 (en) Image processing device and camera including CPU which determines whether processing performed using external memory
EP1763238A2 (en) Image processor, imaging device, and image processing system
JP6702792B2 (en) Image processing apparatus and control method thereof
JP4905080B2 (en) Transfer circuit, transfer control method, imaging apparatus, control program
JP4432786B2 (en) Camera device and image processing method
JP2014082768A (en) Imaging apparatus and control method thereof
JP2006080860A (en) Camera and camera image transfer system
JP4609315B2 (en) Imaging device, method of displaying angle frame at zoom, and program
KR100745837B1 (en) Method and device for outputting pixel data with extra data added
US20040196380A1 (en) Image processing device, camera and image processing method
US8804014B2 (en) Imaging device for reducing color moire
JP7410088B2 (en) Imaging device, imaging device, image data output method, and program
US9019404B2 (en) Image processing apparatus and method for preventing image degradation
JP5867903B2 (en) Image processing apparatus, image processing method, and program
JP2009033438A (en) Imaging apparatus
JP4438357B2 (en) Electronic still camera
JP5605761B2 (en) Image processing apparatus, image processing method, and program
JP2005020521A (en) Imaging apparatus and cellular phone equipped with the same imaging apparatus
JP2005080198A (en) Imaging apparatus
JP2004215174A (en) Portable device provided with camera

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20091106

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20091106

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111110

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111213

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111226

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

Free format text: PAYMENT UNTIL: 20150120

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4905080

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees