JP7242235B2 - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
JP7242235B2
JP7242235B2 JP2018188118A JP2018188118A JP7242235B2 JP 7242235 B2 JP7242235 B2 JP 7242235B2 JP 2018188118 A JP2018188118 A JP 2018188118A JP 2018188118 A JP2018188118 A JP 2018188118A JP 7242235 B2 JP7242235 B2 JP 7242235B2
Authority
JP
Japan
Prior art keywords
pixel
data
value
attribute
circuit
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.)
Active
Application number
JP2018188118A
Other languages
Japanese (ja)
Other versions
JP2020057958A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2018188118A priority Critical patent/JP7242235B2/en
Publication of JP2020057958A publication Critical patent/JP2020057958A/en
Application granted granted Critical
Publication of JP7242235B2 publication Critical patent/JP7242235B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)

Description

本発明は、画像処理装置および画像処理方法に関し、特に、画素の属性を示す値を伝送するために用いて好適なものである。 The present invention relates to an image processing apparatus and image processing method, and is particularly suitable for use in transmitting values indicating attributes of pixels.

例えば、フレームデータの処理において、画素の属性(以下、画素アトリビュートと称する)を継承したい場合がある。例えば、デジタルカメラで撮影したRAWデータ中の画素の状態に係る画素アトリビュートとしては、欠陥画素(傷)、飽和画素(感度不良)、機能画素(像面位相差AF用の視差取得画素)等が挙げられる。
画素アトリビュートを付加したい画素データを、有効データとしない場合が存在する。例示の欠陥画素、飽和画素、機能画素にあたる画素値は、画像を記録する際には、当該画素の周辺の参照画素の画素値を用いて補間した画素値に置換する必要がある。
伝送した画素アトリビュートは、画像処理時に注目画素の状態を知るために使われる。例えば、欠陥画素の補正処理において、注目画素が工程で既知の傷の場合に周辺の参照画素から注目画素の画素値を補間する場合、データパスにおいて事前に当該画素値を欠陥画素の画素アトリビュートに置換しておく。そして、当該画素アトリビュートを傷補正処理部においてデコードすることで当該注目画素の画素アトリビュートを検出する(特許文献1を参照)。
For example, in processing frame data, there are cases where it is desired to inherit pixel attributes (hereinafter referred to as pixel attributes). For example, pixel attributes related to the state of pixels in RAW data captured by a digital camera include defective pixels (scratches), saturated pixels (poor sensitivity), functional pixels (parallax acquisition pixels for image plane phase difference AF), and the like. mentioned.
Pixel data to which a pixel attribute is to be added may not be valid data. When recording an image, the pixel values corresponding to the defective pixels, saturated pixels, and functional pixels need to be replaced with pixel values interpolated using the pixel values of the reference pixels surrounding the pixels in question.
The transmitted pixel attributes are used to know the state of the pixel of interest during image processing. For example, in the process of correcting a defective pixel, if the pixel of interest is a known flaw in the process and the pixel value of the pixel of interest is interpolated from surrounding reference pixels, the pixel value of the pixel of interest is set to the pixel attribute of the defective pixel in advance in the data path. replace it. Then, the pixel attribute of the pixel of interest is detected by decoding the pixel attribute in the blemish correction processing unit (see Patent Document 1).

また、画素毎に、データに画素アトリビュートを直接バインドする方法も提案されている(特許文献2を参照)。例えば、画素が傷状態であることを示すフラグを1bit分、データの下位bitに付加する。この場合、途中の演算処理においては、フラグbitを分離して保持し、演算処理後に、分離したフラグbitをマージする。 A method of directly binding pixel attributes to data for each pixel has also been proposed (see Patent Document 2). For example, a 1-bit flag indicating that the pixel is damaged is added to the lower bits of the data. In this case, the flag bits are separated and held in the intermediate arithmetic processing, and the separated flag bits are merged after the arithmetic processing.

特開2010-21858号公報Japanese Unexamined Patent Application Publication No. 2010-21858 特開2012-124795号公報JP 2012-124795 A 特開2001-83407号公報JP-A-2001-83407 特開2017-107204号公報JP 2017-107204 A 特開2017-156770号公報JP 2017-156770 A

しかしながら、特許文献1の方法では、画素アトリビュートに置換してから画素アトリビュートを検出するまでの間に別の処理が入る場合、途中の処理(演算回路)において当該画素アトリビュートの保存・保持が必要となる。特に、画素アトリビュートとして任意の設定値に画素値を置換する方法においては、途中の演算結果で設定値と同値が出現した場合にはそれをキャンセルする仕組みが必要である。このため、回路規模(コスト)が増大する虞がある。また、演算回路の実装工数や、検証工数が増大する虞がある。
一方、特許文献2に記載の方法では、画素アトリビュートをデータにバインドするため、画素アトリビュートの伝送に際し、データの帯域が増大する虞がある。
以上のように従来の技術では、画素アトリビュートの値(画素の属性を示す値)を適切に伝送することが出来ないという問題点がある。
本発明は、このような問題点に鑑みてなされたものであり、画素の属性を示す値を適切に伝送することが出来るようにすることを目的とする。
However, in the method of Patent Document 1, when another process is performed between the replacement with the pixel attribute and the detection of the pixel attribute, the pixel attribute needs to be saved/held in the intermediate process (arithmetic circuit). Become. In particular, in the method of replacing a pixel value with an arbitrary setting value as a pixel attribute, it is necessary to have a mechanism for canceling the same value as the setting value when the same value as the setting value appears in the intermediate calculation result. Therefore, there is a possibility that the circuit scale (cost) will increase. Moreover, there is a possibility that the number of man-hours for mounting the arithmetic circuit and the number of man-hours for verification will increase.
On the other hand, the method described in Patent Document 2 binds pixel attributes to data, so there is a risk that the data band will increase when transmitting pixel attributes.
As described above, the conventional technique has the problem that the value of the pixel attribute (the value indicating the attribute of the pixel) cannot be properly transmitted.
SUMMARY OF THE INVENTION The present invention has been made in view of such problems, and it is an object of the present invention to enable appropriate transmission of values indicating attributes of pixels.

本発明の画像処理装置は、画素の属性を示す値が第1の形態で表現されたデータを、当該画素の属性を示す値が当該第1の形態とは異なる第2の形態で表現されたデータに変換する第1の変換手段と、画素の属性を示す値が前記第2の形態で表現されたデータを、当該画素の属性を示す値が前記第1の形態で表現されたデータに変換する第2の変換手段と、前記第1の形態で表現されたデータを第1の伝送路に伝送する第1の伝送手段と、前記第2の形態で表現されたデータを前記第1の伝送路と異なる第2の伝送路に伝送する第2の伝送手段と、を有し、前記第1の形態は、画素のデータにおける当該画素の画素値として、当該画素の属性に対応する値を割り当てる形態であり、前記第2の形態は、画素のデータに当該画素の属性を示す値が付加される形態、または、画素のデータの一部を当該画素の属性に対応する値に置換する形態であることを特徴とする。 The image processing apparatus of the present invention converts data in which a value indicating a pixel attribute is expressed in a first form to a second form in which the value indicating the pixel attribute is expressed in a second form different from the first form. a first conversion means for converting into data, and converting data in which a value indicating a pixel attribute is expressed in the second form into data in which a value indicating the attribute of the pixel is expressed in the first form. a first transmission means for transmitting the data expressed in the first form to a first transmission line; and the data expressed in the second form in the first transmission and a second transmission means for transmitting to a second transmission path different from the path, wherein the first form assigns a value corresponding to the attribute of the pixel as the pixel value of the pixel in the pixel data The second form is a form in which a value indicating the attribute of the pixel is added to the pixel data, or a form in which a part of the pixel data is replaced with a value corresponding to the attribute of the pixel. characterized by being

本発明によれば、画素の属性を示す値を適切に伝送することが出来る。 According to the present invention, values indicating attributes of pixels can be appropriately transmitted.

画像処理装置の構成を示す図である。It is a figure which shows the structure of an image processing apparatus. リコンフィギュラブル回路の構成を示す図である。FIG. 2 is a diagram showing the configuration of a reconfigurable circuit; FIG. 第1の画素アトリビュート形態を示す図である。FIG. 10 is a diagram showing a first pixel attribute form; 第2の画素アトリビュート形態の第1の例を示す図である。FIG. 10 is a diagram showing a first example of a second pixel attribute form; 第1の変換部の構成の第1の例を示す図である。FIG. 4 is a diagram illustrating a first example of a configuration of a first conversion unit; FIG. 第2の変換部の構成の第1の例を示す図である。FIG. 10 is a diagram illustrating a first example of a configuration of a second conversion unit; FIG. ALUの内部構成を示す図である。4 is a diagram showing the internal configuration of an ALU; FIG. パルス生成回路を示す図である。FIG. 4 illustrates a pulse generation circuit; 距離マップを作成する処理を示すフローチャートである。4 is a flowchart showing processing for creating a distance map; Y値(輝度値)を取得する際の処理を示すフローチャートである。4 is a flow chart showing processing when obtaining a Y value (luminance value). 視差画像間の相関演算を行う際の処理を示すフローチャートである。FIG. 10 is a flowchart showing processing when performing correlation calculation between parallax images; FIG. 第2の画素アトリビュート形態の第2の例を示す図である。FIG. 10 is a diagram showing a second example of a second pixel attribute form; 第1の変換部の構成の第2の例を示す図である。FIG. 10 is a diagram showing a second example of the configuration of the first conversion unit; 第2の変換部の構成の第2の例を示す図である。FIG. 10 is a diagram illustrating a second example of the configuration of the second conversion unit;

以下の各実施形態では、ハードワイヤードで実現したデータパス中に、リコンフィギュラブル回路を通して処理を完成させる場合を例示する。ハードワイヤード(固定回路)は、論理構成(命令)をハードウェアにより実現したものである。リコンフィギュラブル回路は、ソフトウェアによる回路再構成(リコンフィギュラブル)によって論理構成(命令)を実現するものである。
リコンフィギュラブル回路は、回路内のサブモジュールにALU(算術演算回路)を多く敷き詰めている。リコンフィギュラブル回路は、CPUと連携して、例えば揮発性の大容量の記憶部(DRAM等)に一時保持したフレームデータを大量に高速に読み出して、ALUの組合せで所望の演算処理を実行する。リコンフィギュラブル回路は、当該演算処理が実行された後にフレームデータを再び記憶部に書き戻す。そして、リコンフィギュラブル回路は、ALUの組合せをソフトウェアで再構成した後に、再構成後のALUの組合せで再び記憶部のフレームデータを演算処理する。
In each of the following embodiments, a case where processing is completed through a reconfigurable circuit in a hardwired data path will be exemplified. A hardwired (fixed circuit) is a logical configuration (instruction) realized by hardware. A reconfigurable circuit realizes a logic configuration (instructions) through circuit reconfiguration (reconfigurable) by software.
In a reconfigurable circuit, many ALUs (arithmetic operation circuits) are laid out in submodules within the circuit. The reconfigurable circuit, in cooperation with the CPU, reads a large amount of frame data temporarily held in a volatile large-capacity storage unit (DRAM, etc.) at high speed, and performs desired arithmetic processing in combination with the ALU. . The reconfigurable circuit writes the frame data back to the storage unit after the arithmetic processing is executed. After reconfiguring the combination of ALUs by software, the reconfigurable circuit again performs arithmetic processing on the frame data in the storage unit using the reconfigured combination of ALUs.

記憶部へは、リコンフィギュラブル回路を含めシステム中の様々な処理部からのアクセス要求がある。従って、それらを許容帯域内で処理しなければならない。そのため、夫々の処理部におけるデータの帯域増大を避けなければシステムは成立しない。
そこで、画素データを画素アトリビュートに置換することが考えられる。しかしながら、リコンフィギュラブル回路はALUの集合体であり、画素データを画素アトリビュートに置換する形態では、ALU毎に当該画素アトリビュートを保存・保持する仕組みが必要になる。具体的には、ALUに入力された画素アトリビュートを後段のALUへ継承する仕組みや、ALUの演算結果が画素アトリビュート状態を疑似しないように回避するする仕組みが必要になる。従って、リコンフィギュラブル回路全体の回路規模(コスト)が増大にする虞がある。また、各ALUへの実装工数や、検証工数が増大する虞がある。
There are access requests to the storage unit from various processing units in the system, including the reconfigurable circuit. Therefore, they must be processed within the tolerance band. Therefore, the system cannot be established unless an increase in the data bandwidth in each processing unit is avoided.
Therefore, it is conceivable to replace pixel data with pixel attributes. However, a reconfigurable circuit is a collection of ALUs, and in a form in which pixel data is replaced with pixel attributes, a mechanism for saving and holding the pixel attributes is required for each ALU. Specifically, a mechanism for inheriting the pixel attribute input to the ALU to the subsequent ALU and a mechanism for preventing the ALU operation result from simulating the pixel attribute state are required. Therefore, the circuit scale (cost) of the entire reconfigurable circuit may increase. In addition, there is a possibility that the man-hours required for mounting each ALU and the man-hours required for verification may increase.

一方、ALUに適した画素アトリビュートを画素データにバインドする方法では、例えば、画素データの他にフラグbitをバインドした場合には、記憶部への記憶情報が増加し、データの転送帯域を圧迫する。フラグbitを、本来の画素データのLSB(Least Significant Bit)と置換した場合には、データの本来の転送帯域と数値は変わらないが、データパス全体において本来の画素値の分解能をフラグbit分捨てることになる。 On the other hand, in the method of binding pixel attributes suitable for ALU to pixel data, for example, when flag bits are bound in addition to pixel data, the amount of information stored in the storage unit increases, and the data transfer band is compressed. . When the flag bit is replaced with the LSB (Least Significant Bit) of the original pixel data, the original transfer band and numerical value of the data do not change, but the resolution of the original pixel value is discarded by the flag bit in the entire data path. It will be.

そこで、以下の実施形態では、画素アトリビュートの値を、相互に異なる2つの形態(第1の画素アトリビュート形態および第2の画素アトリビュート形態)で表現する。第1の画素アトリビュート形態は、画素データの画素値に対し、画素アトリビュートの値として任意の別の画素値を割り当てる形態である。第2の画素アトリビュート形態は、画素アトリビュートの値を画素値の一部のbit値(例えばLSBのbit値)と置換する形態、または、画素アトリビュートの値をフラグとしてデータにバインド(付加)する形態である。そして、リコンフィギュラブル回路と外部との間の画素アトリビュートの伝送を、(第2のアトリビュート形態では行わずに)第1の画素アトリビュート形態で行う。また、リコンフィギュラブル回路の内部における画素アトリビュートの伝送を、(第1のアトリビュート形態では行わずに)第2の画素アトリビュート形態で行う。このため、リコンフィギュラブル回路において、第1の画素アトリビュート形態から第2の画素アトリビュート形態への変換と、第2の画素アトリビュート形態から第1の画素アトリビュート形態への変換とを行う。 Therefore, in the following embodiments, pixel attribute values are expressed in two mutually different forms (first pixel attribute form and second pixel attribute form). A first pixel attribute form is a form in which any other pixel value is assigned as a pixel attribute value to a pixel value of pixel data. The second pixel attribute format is a format in which the pixel attribute value is replaced with a partial bit value of the pixel value (for example, an LSB bit value), or a format in which the pixel attribute value is bound (added) to data as a flag. is. Then, pixel attributes are transmitted between the reconfigurable circuit and the outside in the first pixel attribute format (not in the second attribute format). Also, the transmission of pixel attributes within the reconfigurable circuit is performed in a second pixel attribute format (instead of in the first attribute format). Therefore, in the reconfigurable circuit, conversion from the first pixel attribute form to the second pixel attribute form and conversion from the second pixel attribute form to the first pixel attribute form are performed.

以下、添付の図面を参照して、実施形態を詳細に説明する。
(第1の実施形態)
まず、第1の実施形態を説明する。
図1は、画像処理装置の構成の一例を示す図である。本実施形態では、画像処理装置が撮像装置に搭載される場合を例に挙げて説明する。撮像装置は、例えば、デジタルスチルカメラ、デジタルムービーカメラ、工業用カメラ、車載用カメラ、または医療用カメラなどである。ただし、撮像部で撮像された画像に対する画像処理を行う機能を有する装置であれば、画像処理装置が搭載される装置は、携帯端末(携帯電話やタブレット端末など)またはパーソナルコンピュータなどの情報処理装置であっても良い。また、画像処理装置は、撮像装置に搭載されるものに限定されない。例えば、画像処理装置は、撮像部(図1に示す例では撮像ユニット105)を有していなくても良い。この場合、画像処理装置は、撮像部を有する装置と通信することが出来る。
Embodiments will now be described in detail with reference to the accompanying drawings.
(First embodiment)
First, the first embodiment will be described.
FIG. 1 is a diagram showing an example of the configuration of an image processing apparatus. In the present embodiment, an example in which an image processing device is installed in an imaging device will be described. The imaging device is, for example, a digital still camera, a digital movie camera, an industrial camera, an in-vehicle camera, a medical camera, or the like. However, if the device has a function of performing image processing on the image captured by the imaging unit, the device equipped with the image processing device can be a mobile terminal (mobile phone, tablet terminal, etc.) or an information processing device such as a personal computer. can be Also, the image processing device is not limited to one mounted on the imaging device. For example, the image processing apparatus does not have to have an imaging section (the imaging unit 105 in the example shown in FIG. 1). In this case, the image processing device can communicate with the device having the imaging unit.

図1において、撮像装置は、CPU100、ROM101、RAM102、記録メディア103、リコンフィギュラブル回路104、撮像ユニット105、および画像処理回路106を有する。画像処理装置は、例えば、CPU100、ROM101、RAM102、記録メディア103、リコンフィギュラブル回路104、および画像処理回路106を用いて構成される。 In FIG. 1, the imaging apparatus has a CPU 100, a ROM 101, a RAM 102, a recording medium 103, a reconfigurable circuit 104, an imaging unit 105, and an image processing circuit . The image processing apparatus is configured using, for example, a CPU 100, a ROM 101, a RAM 102, a recording medium 103, a reconfigurable circuit 104, and an image processing circuit .

ROM101は、不揮発性記憶媒体の一例である。RAM102は、揮発性記憶媒体の一例であり、データを一時記憶する。RAM102は、例えば、大容量のDRAM等である。ROM101およびRAM102は共にCPU100の一次記憶部(CPU100が直接アクセスする記憶媒体)である。ROM101には、リコンフィギュラブル回路104の設定情報1011が記憶される。また、RAM102は、CPU100にwork領域を提供する他、リコンフィギュラブル回路104の設定情報1011や、画像処理対象であるフレームデータも一時記憶する。 ROM 101 is an example of a non-volatile storage medium. The RAM 102 is an example of a volatile storage medium and temporarily stores data. The RAM 102 is, for example, a large-capacity DRAM or the like. Both the ROM 101 and the RAM 102 are primary storage units of the CPU 100 (storage media directly accessed by the CPU 100). Setting information 1011 of the reconfigurable circuit 104 is stored in the ROM 101 . In addition to providing a work area to the CPU 100, the RAM 102 temporarily stores setting information 1011 of the reconfigurable circuit 104 and frame data to be subjected to image processing.

記録メディア103は、補助記憶装置の一例である。記録メディア103は、例えば、CF(コンパクトフラッシュ(登録商標))やSDカード等である。本実施形態では、記録メディア103に記憶されているフレームデータ1031が、一旦RAM102に展開されて、データパスに通される処理を例示する。記録メディア103の(write、readの)アクセス速度が高速であれば、RAM102を通す必要は無い。ただし、記録メディア103が、NANDフラッシュ等のメモリ技術を用いた記録メディアの場合、書き換え(消去して書き込む行為)自体が素子のデータ保持寿命を縮める。このため、フレームデータ1031を、一旦RAM102に展開することは、データの保持寿命を縮めることを回避することになる。尚、ROM101、RAM102、および記録メディア103は、夫々データwrite、readをするための制御部を備える。 The recording medium 103 is an example of an auxiliary storage device. The recording medium 103 is, for example, a CF (compact flash (registered trademark)), an SD card, or the like. In this embodiment, the frame data 1031 stored in the recording medium 103 is expanded once in the RAM 102 and passed through the data path. If the access speed (write, read) of the recording medium 103 is high, there is no need to pass through the RAM 102 . However, when the recording medium 103 is a recording medium using memory technology such as NAND flash, rewriting (the action of erasing and writing) itself shortens the data retention life of the device. Therefore, developing the frame data 1031 once in the RAM 102 avoids shortening the retention life of the data. The ROM 101, RAM 102, and recording medium 103 each have a control unit for writing and reading data.

不揮発性であり、一次記憶部にも適した記憶媒体が開発されている。例えば、記憶素子技術に「相変化メモリ」を用いると共に、セル選択技術に「オボニックスイッチ」を用いたメモリがある。このようなメモリは、NANDフラッシュの欠点を改善し、書き換え回数の向上(高寿命)と、ランダムアクセスの改善(短レイテンシ化)とを実現するメモリである。この様なメモリを、ROM101、RAM102、および記録メディア103の少なくとも何れか1つとして用いても良い。本実施形態では、以上のROM101、RAM102、および記録メディア103を用いて画像処理装置が構成される場合を例示する。 Storage media have been developed that are non-volatile and also suitable for primary storage. For example, there is a memory that uses a "phase change memory" as a storage element technology and an "ovonic switch" as a cell selection technology. Such a memory is a memory that improves the drawbacks of the NAND flash and realizes an improvement in the number of rewrites (longer life) and an improvement in random access (shorter latency). Such a memory may be used as at least one of the ROM 101 , RAM 102 and recording medium 103 . In this embodiment, a case where an image processing apparatus is configured using the ROM 101, RAM 102, and recording medium 103 described above will be exemplified.

撮像ユニット105は、光学系(レンズ等)、撮像素子(イメージセンサー)、およびA/D変換回路等を有する。撮像ユニット105は、画像を撮像し、撮像した画像の画像信号(デジタル信号)を生成する。尚、光学系は、撮像装置から取り外し可能となっていても良い。
画像処理回路106は、画像信号に対して画像処理を行う。画像処理回路106は、例えば、ハードワイヤードのロジック回路構成(サブモジュール)として、シェーディング補正回路や、リニアリティー補正回路等センサー補正用の信号処理回路も含んで良い。画像処理回路106は、リコンフィギュラブル回路104の前後にカスケードに接続されていても良い。
データバス107は、CPU100、ROM101、RAM102、記録メディア103、リコンフィギュラブル回路104、撮像ユニット105、および画像処理回路106を相互に通信可能に接続する。例えばデータバス107を用いることにより第1の伝送路に対し第1の伝送(第1のアトリビュート形態のデータの伝送)が行われる。
The imaging unit 105 has an optical system (lens, etc.), an imaging element (image sensor), an A/D conversion circuit, and the like. The imaging unit 105 captures an image and generates an image signal (digital signal) of the captured image. Incidentally, the optical system may be detachable from the imaging device.
The image processing circuit 106 performs image processing on the image signal. The image processing circuit 106 may include, for example, a signal processing circuit for sensor correction such as a shading correction circuit and a linearity correction circuit as a hardwired logic circuit configuration (submodule). The image processing circuit 106 may be connected in cascade before and after the reconfigurable circuit 104 .
A data bus 107 connects the CPU 100, ROM 101, RAM 102, recording medium 103, reconfigurable circuit 104, imaging unit 105, and image processing circuit 106 so that they can communicate with each other. For example, by using the data bus 107, a first transmission (transmission of data in the form of a first attribute) is performed on the first transmission line.

本実施形態の画像処理装置のデジタル回路は、システムクロック(不図示)による同期回路であり、同相転送が成立するものとする。また、本実施形態では、モジュール間I/Fは、データ信号の他に、データが有効であることを示すステータス信号(有効ステータス信号(不図示))を入出力するものとする。システムによっては、モジュール間I/Fは、前段回路に対してデータ転送の停止を要求する停止要求信号を送出しても良い。 The digital circuit of the image processing apparatus of this embodiment is a synchronous circuit by a system clock (not shown), and in-phase transfer is established. Also, in this embodiment, the inter-module I/F inputs/outputs a status signal (valid status signal (not shown)) indicating that the data is valid in addition to the data signal. Depending on the system, the inter-module I/F may send a stop request signal for requesting stop of data transfer to the preceding stage circuit.

図2は、リコンフィギュラブル回路104の構成の一例を示す図である。
リコンフィギュラブル回路104は、入力部に第1の変換部1041を有し、出力部に第2の変換部1042を有する。ALU群1043は、複数のALU10431を選択的に接続可能に配したALUアレイ(ALU Array)である。第1の変換部1041と任意のALU10431との間、第2の変換部1042と任意のALU10431との間、複数のALU10431中の任意の2点間は、セレクタ(後述有り)を介して接続することで伝送路を形成する。例えばこの伝送路を用いることにより第2の伝送路に対し第2の伝送(第2のアトリビュート形態のデータの伝送)が行われる。
FIG. 2 is a diagram showing an example of the configuration of the reconfigurable circuit 104. As shown in FIG.
The reconfigurable circuit 104 has a first conversion section 1041 at its input section and a second conversion section 1042 at its output section. The ALU group 1043 is an ALU array in which a plurality of ALUs 10431 are selectively connectable. A selector (to be described later) connects between the first conversion unit 1041 and an arbitrary ALU 10431, between the second conversion unit 1042 and an arbitrary ALU 10431, and between arbitrary two points in the plurality of ALUs 10431. form a transmission path. For example, by using this transmission line, second transmission (transmission of data in the second attribute format) is performed on the second transmission line.

第1の変換部1041については、図5で後述する。第2の変換部1042については、図6で後述する。また、ALU10431の内部構成については、図7で後述する。
SRAM1044は、任意のALU10431の演算結果を一時的に記憶するためのメモリ(揮発性記憶媒体)の一例である。制御部1040は、回路のコンフィギュレーションを行う。
The first conversion unit 1041 will be described later with reference to FIG. The second conversion unit 1042 will be described later with reference to FIG. Also, the internal configuration of the ALU 10431 will be described later with reference to FIG.
The SRAM 1044 is an example of a memory (volatile storage medium) for temporarily storing the calculation result of any ALU 10431 . The control unit 1040 configures the circuit.

制御部1040は、例えば、第1の変換部1041および第2の変換部1042やALU群1043内に存在するレジスタ情報を書き換えることで、全体の演算処理(処理機能)を変更・更新する。また、制御部1040は、レジスタ情報の変更・更新のタイミングを事前に設定することで、ファームウェアの介在無く、レジスタ情報の変更・更新を実施することが可能であるよう、カウンタやコンパレータ等のロジック回路を有する。レジスタ情報の変更・更新のタイミングの設定は、例えば、設定情報1011中に命令(インストラクション・コード)として記述しておくことにより実現される。 For example, the control unit 1040 rewrites register information existing in the first conversion unit 1041, the second conversion unit 1042, and the ALU group 1043, thereby changing/updating the entire arithmetic processing (processing function). In addition, the control unit 1040 sets the timing of changing/updating the register information in advance so that the register information can be changed/updated without the intervention of firmware. have a circuit. The setting of the timing of changing/updating the register information is realized by, for example, describing it as an instruction (instruction code) in the setting information 1011 .

回路のアップデート要求については、ALU10431内でパルス信号を生成し、当該パルス信号を制御部1040に伝達することで実現することが可能である。
制御部1040は、設定情報1011に記述されたインストラクション・コードをデコードして、命令を実行する。命令として、ALU10431に対するレジスタへのWrite/Read命令の他、自身のWait命令(完了通知待ち等)や、Loop命令(同一回路処理を複数回実行すること等)を定義しても良い。これらの所作は、CPUの命令処理同様の公知の技術であり、詳細な説明は省略する。制御部1040は、レジスタの更新をALU10431に知らせるための更新ステータス信号を発行しても良い。
A circuit update request can be realized by generating a pulse signal in the ALU 10431 and transmitting the pulse signal to the control unit 1040 .
The control unit 1040 decodes the instruction code described in the setting information 1011 and executes the instruction. As an instruction, in addition to a Write/Read instruction to a register for the ALU 10431, its own Wait instruction (waiting for completion notification, etc.) and Loop instruction (executing the same circuit processing multiple times, etc.) may be defined. These actions are well-known techniques similar to the instruction processing of the CPU, and detailed description thereof will be omitted. Control unit 1040 may issue an update status signal to inform ALU 10431 of register updates.

図3は、第1の画素アトリビュート形態のフォーマットの一例を示す図である。本実施形態では、データバス107を伝送する信号のデータ幅を16bitと定義する(16bitで例示する)。図3(a)では、データバス107に、16bit幅の画像データまたは画素アトリビュートの値が画素アトリビュート情報として出現することを示す。例えば、或る画素の画素値が飽和してしいるために正しい値を示していない場合に、当該画素を感度不良画素であるとして「飽和画素」を示す値を当該画素の画素アトリビュート情報として割り当てることにより画素アトリビュート情報が出現する。第1の画素アトリビュート形態では、画素データを画素アトリビュートの値で置換するものとする。本実施形態では、「飽和画素」を示す画素アトリビュートの値として0値が割り当てる場合を例示する。 FIG. 3 is a diagram showing an example of the format of the first pixel attribute form. In this embodiment, the data width of the signal transmitted through the data bus 107 is defined as 16 bits (16 bits is exemplified). FIG. 3A shows that 16-bit width image data or pixel attribute values appear on the data bus 107 as pixel attribute information. For example, when the pixel value of a certain pixel is saturated and does not indicate a correct value, the pixel is considered to be a pixel with poor sensitivity, and a value indicating "saturated pixel" is assigned as the pixel attribute information of the pixel. Thus, pixel attribute information appears. The first form of pixel attribute is to replace the pixel data with the value of the pixel attribute. This embodiment exemplifies a case in which a value of 0 is assigned as a value of a pixel attribute indicating a "saturated pixel".

図3(b)はデータ値のダイナミックレンジを例示する。16bitのデータ値中1~65535の範囲を符号なしの画像データの値として扱い、0値を飽和画素フラグとして定義する。つまり、全体(0~65535値)から1値分のダイナミックレンジを放棄して、その分を画素アトリビュート情報に割り当てる。そのため、第1の画素アトリビュート形態のときには、画素値として0になった場合には、当該画素値を1値に置換するものとする。このように画素値を置換しても、後に現像処理が行われる。従って、1値程度のダイナミックレンジの破棄は目視的には問題とならない。 FIG. 3(b) illustrates the dynamic range of data values. A range of 1 to 65535 in the 16-bit data value is treated as an unsigned image data value, and a value of 0 is defined as a saturated pixel flag. That is, one value of the dynamic range is discarded from the whole (0 to 65535 values), and that portion is assigned to the pixel attribute information. Therefore, in the case of the first pixel attribute form, when the pixel value becomes 0, the pixel value is replaced with 1 value. Even if pixel values are replaced in this manner, development processing is performed later. Therefore, discarding a dynamic range of about one value does not pose a problem visually.

図4は、第2の画素アトリビュート形態のフォーマットの一例を示す図である。本実施形態では、ALU群1043で扱うデータ幅を符号付きの17bit(符号bitと画素データ16bit)と定義する。符号付きデータは、後述する第1の変換部1041でのオフセットクランプ減算を考慮したものである。
図4(a)では、画素データが符号付きの17bitのデータ(最上位bitは符号bit)であることと、画素データにバインドする画素アトリビュートの値が1bitであることを示す。図4(b)は、画素値のダイナミックレンジが65535~-65536の範囲であることと、画素データに付随する飽和画素情報は、その値が0値で通常画素であり、その値が1値で飽和画素であることとを示す。図4(b)において、データ値と飽和画素情報との間の「&」記号は、それらが(Verilog RTL記述等で)連接処理されることを例示しており、論理回路上は1つの信号として扱われることを例示している。
FIG. 4 is a diagram showing an example of the format of the second pixel attribute form. In this embodiment, the data width handled by the ALU group 1043 is defined as signed 17 bits (sign bit and pixel data 16 bits). The signed data takes into account offset clamp subtraction in the first conversion unit 1041, which will be described later.
FIG. 4A shows that the pixel data is signed 17-bit data (the most significant bit is the sign bit) and that the value of the pixel attribute bound to the pixel data is 1 bit. FIG. 4B shows that the dynamic range of pixel values is in the range of 65535 to -65536, and that the saturated pixel information attached to the pixel data has a value of 0 for a normal pixel and a value of 1 for the saturated pixel information. indicates that it is a saturated pixel. In FIG. 4(b), the "&" symbol between the data value and the saturated pixel information exemplifies that they are concatenated (in Verilog RTL description, etc.), and one signal on the logic circuit It exemplifies that it is treated as

図5は、第1の変換部1041の構成の一例を示す図である。
信号sig_500は、リコンフィギュラブル回路104への入力信号であり、被処理データにあたる(図2を参照)。入力信号sig_500は、図3に示すように定義される第1の画素アトリビュート形態をとり、有効ステータス信号(不図示)と共に16bitデータとして前段回路より送信される。
FIG. 5 is a diagram showing an example of the configuration of the first conversion unit 1041. As shown in FIG.
A signal sig_500 is an input signal to the reconfigurable circuit 104 and corresponds to data to be processed (see FIG. 2). The input signal sig_500 takes the form of the first pixel attribute defined as shown in FIG. 3, and is transmitted as 16-bit data together with a valid status signal (not shown) from the preceding circuit.

信号sig_504は、リコンフィギュラブル可能なレジスタ値であり、図2に示した制御部1040から不図示の更新ステータス信号と共に転送される。当該更新ステータスの指示によってFF回路10411のレジスタ値は更新される。
FF回路(フリップフロップ回路)10410は、有効ステータス信号の状態によって(例えば、High状態時のクロックの立ち上がりで)、信号sig_501の値をそのときの信号sig_500値に更新する。FF回路10410は、信号sig_500に対するタイミング改善や配線混雑緩和対策のための信号(LSI化のための実装技術)である。図5および図6には、FF回路10410と同様に、タイミング改善や配線混雑緩和対策用のFF回路を示す。これらは、内部に選択的な切り替え部を多用するリコンフィギュラブル回路の構成としては、必要な構成要素である。但し、FF回路の実装(位置、有無、個数等)について、ここで限定するものではない。
Signal sig_504 is a reconfigurable register value, and is transferred from control unit 1040 shown in FIG. 2 together with an update status signal (not shown). The register value of the FF circuit 10411 is updated according to the update status instruction.
An FF circuit (flip-flop circuit) 10410 updates the value of the signal sig_501 to the value of the signal sig_500 at that time, depending on the state of the valid status signal (for example, at the rising edge of the clock in the High state). The FF circuit 10410 is a signal (implementation technology for LSI implementation) for improving the timing of the signal sig_500 and for mitigating wiring congestion. Similar to the FF circuit 10410, FIGS. 5 and 6 show FF circuits for improving timing and mitigating wiring congestion. These are necessary components for the configuration of a reconfigurable circuit that uses many selective switching units inside. However, the mounting (position, presence/absence, number, etc.) of the FF circuits is not limited here.

FF回路10411は、データパス中のオフセットクランプ値を保持するために実装される。信号sig_505のbit幅は、信号sig_500のbit幅と同じで構わない。例えば、信号sig_505のbit幅は、16bit相当であり、画像に対する設定黒レベルによってはそれ以下のbit数でも構わない。イメージセンサーからの撮像データは、暗電流等のオフセット成分が重畳されるため本来の黒レベルにならない。FF回路10411は、ALUによる信号処理中に乗算が入った場合に、このオフセット成分までゲインがかからないようにするため、前処理として目標値(レジスタ10411のレジスタ設定値)をクランプする。 A FF circuit 10411 is implemented to hold the offset clamp value in the datapath. The bit width of the signal sig_505 may be the same as the bit width of the signal sig_500. For example, the bit width of the signal sig_505 is equivalent to 16 bits, and depending on the set black level for the image, the number of bits may be less than that. Image data from the image sensor does not have the original black level because offset components such as dark current are superimposed thereon. The FF circuit 10411 clamps the target value (the register setting value of the register 10411) as preprocessing so that the gain is not applied to this offset component when multiplication is performed during signal processing by the ALU.

既にクランプされたデータが入力される場合には、レジスタ値を0に設定することでこの機能をキャンセルすることが出来る。本実施形態では、加算器(減算器)10415の出力は、17bitの符号付きデータであり、演算結果を示す信号sig_506のMSB(Most-Significant Bit)は符号bitとして扱われる。 This function can be canceled by setting the register value to 0 if already clamped data is being input. In this embodiment, the output of the adder (subtractor) 10415 is 17-bit signed data, and the MSB (Most-Significant Bit) of the signal sig_506 indicating the calculation result is treated as a sign bit.

尚、以上のクランプ処理自体は、画素アトリビュート形態の変換処理とは直接は関係しないが、ハードウェアとしての実装位置はちょうどこの位置に来る。即ち、クランプ前のデータの画素アトリビュートの値を検出し、クランプ後のデータに対して画素アトリビュートの値を示すフラグを添付する。そこで、クランプ処理も例示に含めている。また、信号sig_505が示すレジスタ値は、信号sig_506のbit幅で加算(減算)結果がクリップしない様に設定されているものとする。または、この位置に正負クリップ回路(リミッタ)を挿入しても良い。 Although the above-described clamp processing itself is not directly related to conversion processing in the form of pixel attributes, the implementation position as hardware is just this position. That is, the value of the pixel attribute of the data before clamping is detected, and a flag indicating the value of the pixel attribute is attached to the data after clamping. Therefore, the clamp processing is also included in the example. It is also assumed that the register value indicated by the signal sig_505 is set so that the addition (subtraction) result does not clip with the bit width of the signal sig_506. Alternatively, a positive/negative clip circuit (limiter) may be inserted at this position.

信号sig_502は、比較器10414における比較値(基準値)を示す信号である。信号sig_501が0値(図3(a)に示す「飽和画素」を示す値)であること検出するために、信号sig_502の値は、0値に設定される。図5では、この値が固定値であるとして縮退表現しているが、必要に応じて、信号sig_505と同様に制御部1040からレジスタ値として設定する様にしても良い。 A signal sig_502 is a signal indicating a comparison value (reference value) in the comparator 10414 . The value of signal sig_502 is set to 0 in order to detect that signal sig_501 is 0 (value indicating "saturated pixel" shown in FIG. 3(a)). In FIG. 5, this value is degenerated as a fixed value, but if necessary, it may be set as a register value from the control unit 1040 like the signal sig_505.

信号sig_503は、任意の画素の飽和状態を示すフラグ信号である。信号sig_503は、第1の変換部1041が第1の画素アトリビュート形態として0値を受信したときに、飽和画素であることを示すフラグ値として1値を伝送するためのものである。信号sig_507は、クランプ後の信号sig_506と、フラグ値を示す信号sig_503とをバインドした信号である。この信号のデータ幅は、図4を参照しながら説明したように合計18bitである。信号sig_507は、FF回路10413で一旦保持され、信号sig_508として後段(ALU群1043)に出力される。信号sig_508は、ALU群1043内にバラ撒かれる信号(ファンアウトが大きい信号)である。FF回路10413は、そのタイミング改善や配線混雑緩和対策のためのものである。 A signal sig_503 is a flag signal indicating the saturation state of an arbitrary pixel. The signal sig_503 is for transmitting a value of 1 as a flag value indicating a saturated pixel when the first conversion unit 1041 receives a value of 0 as the first pixel attribute form. A signal sig_507 is a signal obtained by binding a clamped signal sig_506 and a signal sig_503 indicating a flag value. The data width of this signal is 18 bits in total as described with reference to FIG. The signal sig_507 is temporarily held in the FF circuit 10413 and output to the subsequent stage (ALU group 1043) as the signal sig_508. A signal sig_508 is a signal scattered within the ALU group 1043 (a signal with a large fan-out). The FF circuit 10413 is for improving the timing and mitigating wiring congestion.

図6は、第2の変換部1042の構成の一例を示す図である。
信号sig_601は、任意のALU10431から出力される信号である。信号sig_601は、ALU群1043内のセレクタ10432によって選択されたALU10431の出力(前述の様、符号付きデータ17bitと飽和フラグ1bit)である。セレクタ10432にはALU群1043中のALU10431の全てまたは一部が接続される。
FF回路10421は、信号sig_601に対するタイミング改善や配線混雑緩和対策のためのものである。FF回路10421からの出力は、画素データを示す上位17bitの信号sig_602と、飽和画素フラグを示す最下位bitの信号sig_606とに分離される。信号sig_602は、加算器10422へ出力され、信号sig_606はセレクタ10424へ出力される。
FIG. 6 is a diagram showing an example of the configuration of the second conversion unit 1042. As shown in FIG.
A signal sig_601 is a signal output from any ALU 10431 . A signal sig_601 is the output of the ALU 10431 selected by the selector 10432 in the ALU group 1043 (as described above, 17-bit signed data and 1-bit saturation flag). All or some of the ALUs 10431 in the ALU group 1043 are connected to the selector 10432 .
The FF circuit 10421 is for improving the timing of the signal sig_601 and reducing wiring congestion. The output from the FF circuit 10421 is separated into an upper 17-bit signal sig_602 representing pixel data and a least significant bit signal sig_606 representing a saturated pixel flag. Signal sig — 602 is output to adder 10422 and signal sig — 606 is output to selector 10424 .

FF回路10420は、信号sig_602に対する信号処理中の設定黒レベルを再現するためのポストセットアップ値を示す信号sig_611を保持するレジスタである。FF回路104020のレジスタ値は、制御部1040より(信号sig_603として)供給され、回路コンフィギュレーション時に必要に応じて更新される。
信号sig_604は、画素データを示す信号sig_602に、設定黒レベルを再現するためのポストセットアップ値を示す信号sig_611を加算した結果を示す信号である。リミッタ回路10427は、当該ポストセットアップ値を加算してもなお信号sig_604が負値の場合に、信号sig_604の値を0値にクリップする。また、リミッタ回路10427は、ポストセットアップ値が加算された後の信号の値の最大値を65535値にクリップする。リミッタ回路10427から出力される信号sig_612は、符号なしの(正の)16bitデータとする。
The FF circuit 10420 is a register that holds a signal sig_611 indicating a post-setup value for reproducing the set black level during signal processing for the signal sig_602. The register value of the FF circuit 104020 is supplied from the control unit 1040 (as signal sig_603) and updated as necessary during circuit configuration.
A signal sig_604 is a signal indicating the result of adding a signal sig_611 indicating a post-setup value for reproducing a set black level to a signal sig_602 indicating pixel data. The limiter circuit 10427 clips the value of the signal sig_604 to 0 when the signal sig_604 is still negative even after adding the post-setup value. Also, the limiter circuit 10427 clips the maximum value of the signal after the post-setup value is added to the 65535 value. The signal sig_612 output from the limiter circuit 10427 is assumed to be unsigned (positive) 16-bit data.

比較器10426は、リミッタ回路10427から出力される信号sig_612と信号sig_610とを比較する。本実施形態では、第1の画素アトリビュート形態において、信号の値が0値の場合には、当該信号で示される画素は飽和画素であるとしている。そこで、ここでは、信号sig_610の値を固定値の0値とする。比較器10426は、リミッタ回路10427から出力される信号sig_612の値が0値のときに、sig_605に1値を出力し、そうでないときに、0値を出力する。回路的には、信号sig_610を0値に縮退しておけば良いが、信号sig_610の値を制御部1040からのレジスタ設定値としても良い。 Comparator 10426 compares signal sig_612 and signal sig_610 output from limiter circuit 10427 . In this embodiment, in the first pixel attribute form, when the value of a signal is 0, the pixel indicated by that signal is a saturated pixel. Therefore, the value of the signal sig_610 is set to a fixed value of 0 here. Comparator 10426 outputs 1 to sig_605 when signal sig_612 output from limiter circuit 10427 is 0, and outputs 0 otherwise. In terms of circuitry, the signal sig_610 may be degenerated to a value of 0, but the value of the signal sig_610 may be used as the register set value from the control unit 1040 .

セレクタ10423は、比較器10426から出力される信号sig_605が0値であれば信号sig_612の値を信号sig_607として出力し、1値であれば信号sig_613の値を信号sig_607として出力する。本実施形態では、信号sig_613の値は、1値の固定値である。これは前述の様に、飽和画素を示す値として0値を割り当てたための回避措置で、ALU10431の演算結果、0値となった画素を1値に置換して疑似的な画素アトリビュートを発生させないためである。比較器10426から出力される信号sig_605が1値である場合に信号sig_607に割り当てる値を変更する場合には、信号sig_613の値を制御部1040からのレジスタ設定値としても良い。 The selector 10423 outputs the value of the signal sig_612 as the signal sig_607 if the signal sig_605 output from the comparator 10426 is 0, and outputs the value of the signal sig_613 as the signal sig_607 if it is 1. In this embodiment, the value of the signal sig_613 is a fixed 1 value. As mentioned above, this is a workaround for assigning a value of 0 as a value indicating a saturated pixel, so that a pixel with a value of 0 as a result of the calculation by the ALU 10431 is replaced with a value of 1 to prevent a pseudo pixel attribute from being generated. is. When changing the value to be assigned to the signal sig_607 when the signal sig_605 output from the comparator 10426 is 1, the value of the signal sig_613 may be used as the register set value from the control unit 1040 .

セレクタ10424は、信号sig_606の値が0値であれば信号sig_607の値を信号sig_608として出力し、1値であればsig_610の値を信号sig_608として出力する。信号sig_606は、図4に示す画素データにバインドされた画素アトリビュートの値を当該画素データから分離した1bitのステータスフラグである。従って、飽和画素のステータスを持つデータは、画素アトリビュートの値としてここで置換される。FF回路10425は、タイミング改善や配線混雑緩和対策のため(外部モジュールまでのバスがクリティカルパスにならない様にするため)のものである。FF回路10425から信号sig_609が出力される。 The selector 10424 outputs the value of the signal sig_607 as the signal sig_608 if the value of the signal sig_606 is 0, and outputs the value of sig_610 as the signal sig_608 if it is 1. A signal sig_606 is a 1-bit status flag obtained by separating the value of the pixel attribute bound to the pixel data shown in FIG. 4 from the pixel data. Therefore, data with saturated pixel status is now replaced as the value of the pixel attribute. The FF circuit 10425 is for improving the timing and mitigating wiring congestion (to prevent the bus to the external module from becoming a critical path). A signal sig_609 is output from the FF circuit 10425 .

図7は、ALU10431の内部構成の一例を示す図である。
ALU群1043には、大抵、数10~数100のALUが含まれ、かなりの回路規模を割いて実装されるため、省電対策が求められる。ALU群1043に供給されるクロックは、例えば、図5を参照しながら説明した不図示の有効ステータス信号の受信時にのみ投入される様、ゲーテッドクロック構成を用いても良い(尚、実際には、内部レイテンシを考慮したクロックの供給が必要である)。
FIG. 7 is a diagram showing an example of the internal configuration of the ALU 10431. As shown in FIG.
The ALU group 1043 usually includes several tens to several hundreds of ALUs and is implemented with a considerable circuit scale, so power saving measures are required. The clock supplied to the ALU group 1043 may use a gated clock configuration so that it is turned on only when the valid status signal (not shown) described with reference to FIG. It is necessary to supply a clock considering the internal latency).

信号sig_710~716およびsig_719は、制御部1040から配給される回路パラメータであり、夫々、FF回路713~719および721で、当該信号の値が保持される。図が煩雑になるので、図5、図6と同様にこれらFF回路の更新ステータスは不図示とする。また、制御部1040への回路アップデート要求は、幾つかのALUを用いて図8を参照しながら後述するパルス生成回路を用いても行われる様にしても良い。 Signals sig_710 to 716 and sig_719 are circuit parameters distributed from the control unit 1040, and the values of these signals are held in FF circuits 713 to 719 and 721, respectively. Since the drawing becomes complicated, the update status of these FF circuits is not shown in the same manner as in FIGS. Also, the circuit update request to the control unit 1040 may be made by using several ALUs and by using a pulse generation circuit, which will be described later with reference to FIG.

本実施形態では、ALU10431は、2入力1出力の算術演算回路であるものとする。ALU10431の2入力中の各入力の遅延量を独立して調整することが可能であり、該2入力は内部の演算器の直前で位相が揃う様に設定される。信号sig_701は、第1の入力信号であり、前段のALUからの出力や、第1の変換部1041からの出力のうちの1つである。
セレクタ700は、信号sig_701を含む入力信号群から、FF回路716の設定値に従い信号を選択して信号sig_702として出力する。多段の遅延素子701は、データbit幅のFF回路をカスケード接続したシフトレジスタ構成で実現される。このときの何段目のFF回路の出力を後段に出力するのかを、FF回路715に設定することで遅延量が調整される。
In this embodiment, the ALU 10431 is assumed to be a two-input one-output arithmetic operation circuit. It is possible to independently adjust the delay amount of each of the two inputs of the ALU 10431, and the two inputs are set so that the phases are aligned immediately before the internal calculator. A signal sig_701 is a first input signal and is one of the output from the ALU in the previous stage and the output from the first conversion unit 1041 .
The selector 700 selects a signal from the input signal group including the signal sig_701 according to the set value of the FF circuit 716 and outputs it as the signal sig_702. The multi-stage delay element 701 is implemented by a shift register configuration in which FF circuits each having a data bit width are cascaded. The amount of delay is adjusted by setting in the FF circuit 715 at which stage the output of the FF circuit at this time is to be output to the subsequent stage.

本実施形態におけるALU10431は、第2の画素アトリビュート形態をとる。従って、信号sig_703のLSB(bit0)は画素アトリビュートを示すフラグとなっている。当該フラグbitは、後段に伝達するために演算器には入力せず、同位相状態で演算後の信号sig_707にマージされ、信号sig_708としてFF回路709に入力される。
画素アトリビュートを示すフラグである信号sig_703のLSB(bit0)は、途中、AND素子710と、OR素子712とを経由する。これは、FF回路713の設定値によって画素アトリビュートを示す信号の伝送をマスクすることと、必要に応じてALU10431の他方の入力信号(信号sig_704)の画素アトリビュートの状態とマージ(または置換)することを可能にするためである。これらを反映した状態の信号sig_717が、信号sig_707にマージされ、信号sig_708としてFF回路709に入力される。
ALU 10431 in this embodiment takes the form of a second pixel attribute. Therefore, the LSB (bit0) of signal sig_703 is a flag indicating the pixel attribute. The flag bit is merged with the signal sig_707 after the operation in the same phase state and input to the FF circuit 709 as the signal sig_708 without inputting it to the computing unit for transmission to the subsequent stage.
The LSB (bit 0) of signal sig_703, which is a flag indicating a pixel attribute, passes through AND element 710 and OR element 712 on the way. This involves masking the transmission of the signal indicating the pixel attribute by the setting value of the FF circuit 713 and merging (or replacing) the state of the pixel attribute of the other input signal (signal sig_704) of the ALU 10431 as necessary. This is to enable A signal sig_717 reflecting these states is merged with the signal sig_707 and input to the FF circuit 709 as the signal sig_708.

ALU10431の2入力信号の他方である信号sig_704側についても信号sig_701側と同様であり、前述の説明の符号を図7に例示の様に読み替えるのみなので重複する説明は省略する。信号sig_701側との差異部分として、セレクタ722は、演算器単体に信号sig_706の信号値を通す代わりに付随してきた画素アトリビュートの値を選択出来る様に設定されている。信号sig_718は、最下位bitに画素アトリビュートの値が与えられ、それ以外のbitは0値で縮退されても良いし、画素アトリビュートの値を全bitに展開しても良い。必要であればその両方を選択肢としても良いし、不要であればセレクタ722自体を設けなくても良い。セレクタ722は、制御部1040から信号sig_719で設定されたFF回路721の値で切り替えることが出来る。 The signal sig_704 side, which is the other of the two input signals of the ALU 10431, is the same as the signal sig_701 side. As a different part from the signal sig_701 side, the selector 722 is set so that it can select the value of the accompanying pixel attribute instead of passing the signal value of the signal sig_706 to the calculator alone. The signal sig_718 may have the value of the pixel attribute given to the least significant bit, and the other bits may be degenerated with a value of 0, or the value of the pixel attribute may be expanded to all bits. If necessary, both of them may be used as options, and if unnecessary, the selector 722 itself may not be provided. The selector 722 can be switched by the value of the FF circuit 721 set by the signal sig_719 from the control unit 1040 .

信号sig_701、sig_704をFF回路で受けていないのは、ALU10431や第1の変換部1041において、FF回路から信号sig_701、sig_704を出力しているためである。ただし、実際の半導体の配置配線時の状況によっては、信号sig_701、sig_704を受信するFF回路をALU10431に配置しても良い。 The reason why the FF circuits do not receive the signals sig_701 and sig_704 is that the ALU 10431 and the first conversion unit 1041 output the signals sig_701 and sig_704 from the FF circuits. However, the FF circuits that receive the signals sig_701 and sig_704 may be placed in the ALU 10431 depending on the actual placement and routing of the semiconductor.

本実施形態では、演算器704~707および720を、実際にどの様に搭載するかは限定されない。図7に示すブロック図中の図示もイメージである。これら演算器中に記載の丸印は、加減算器や乗算器等を示し、三角形は、比較器等を示し、論理素子は、AND・OR・XOR回路等を示す。ただし、これらは、実装時の要求に応じて適宜、変更、追加、削除される。また、演算器の後にビットシフトする機構を設けても良い。また、ビットシフトによる正規化や演算精度の削減において、丸め機構(四捨五入等)を設けても良い。これらALUの演算の実装についての詳細は特に限定されない。
セレクタ708は、演算器704~707および720の演算結果をFF回路719の設定値によって選択して信号sig_707として出力する。
前述した様に、信号sig_707は、画素アトリビュートを示す信号sig_717とマージされた信号sig_708としてFF回路709に一旦保持される。FF回路709からの出力は、信号sig_709として他のALUに入力される他、第2の変換部1042に入力される。第2の変換部1042への出力は、図6に示したセレクタ10432の例示の様に、ALU群1043内での選択後で良い。
また、FF回路709からの出力は、回路のアップデート要求信号として利用可能な様に、制御部1040に出力される。制御部1040への出力は、ALU群1043内において、図8を参照しながら後述するセレクタ802を介した後で良い。
In this embodiment, there is no limitation on how the calculators 704 to 707 and 720 are actually mounted. The illustration in the block diagram shown in FIG. 7 is also an image. Circle marks in these calculators indicate adder-subtractors, multipliers, etc., triangles indicate comparators, etc., and logic elements indicate AND, OR, XOR circuits, and the like. However, these may be changed, added, or deleted as required at the time of implementation. Also, a mechanism for bit shifting may be provided after the calculator. In addition, a rounding mechanism (such as rounding off) may be provided for normalization by bit shift and reduction of calculation accuracy. The details of implementation of these ALU operations are not particularly limited.
A selector 708 selects the operation result of the arithmetic units 704 to 707 and 720 according to the set value of the FF circuit 719 and outputs it as a signal sig_707.
As described above, the signal sig_707 is temporarily held in the FF circuit 709 as the signal sig_708 merged with the signal sig_717 indicating the pixel attribute. The output from the FF circuit 709 is input to another ALU as a signal sig_709 and is also input to the second conversion unit 1042 . The output to the second conversion unit 1042 may be after selection within the ALU group 1043 as illustrated by the selector 10432 shown in FIG.
Also, the output from the FF circuit 709 is output to the control unit 1040 so that it can be used as a circuit update request signal. The output to the control unit 1040 may be after going through the selector 802 described later with reference to FIG. 8 in the ALU group 1043 .

図8は、ALU10431により構成されるパルス生成回路の一例を示す図である。
図8において、ALU10431a、10431bは、ALU10431の機能のうち、ALU10431にレジスタ経由でパラメータ指示を与えることにより得られる要部機能のみを例示するものである。ALU10431a、10431bの内部において夫々に描写している小さい四角形は、FF回路を示す。特に入力側の四角形は、遅延素子701(または703)を示す。
FIG. 8 is a diagram showing an example of a pulse generation circuit configured by the ALU10431.
In FIG. 8, ALUs 10431a and 10431b exemplify only main functions of the functions of the ALU 10431 that can be obtained by giving parameter instructions to the ALU 10431 via registers. Small squares drawn inside the ALUs 10431a and 10431b indicate FF circuits. In particular, the squares on the input side indicate delay elements 701 (or 703).

ALU10431aは、カウンタ(積算回路)を構成する。ALU10431aは、2入力のうちの1入力のみ使用し、演算器における他方の入力はALU自身の出力段のFF回路の出力とする(ALU10431aが、図7に示す演算器720である場合を例示する)。ALU群1043がゲーテッドクロック動作をしている場合、有効データを処理する毎にクロックが1周期分発生する(不図示)。従って、この様な構成の場合、信号sig_801を1値に固定とすることで有効データを処理する毎に1値ずつインクリメントするカウンタを実現することが出来る。 The ALU 10431a constitutes a counter (integrating circuit). The ALU 10431a uses only one of the two inputs, and the other input in the arithmetic unit is the output of the FF circuit in the output stage of the ALU itself (the case where the ALU 10431a is the arithmetic unit 720 shown in FIG. 7 is exemplified). ). When the ALU group 1043 performs gated clock operation, a clock is generated for one cycle each time valid data is processed (not shown). Therefore, in such a configuration, by fixing the signal sig_801 to 1, it is possible to implement a counter that increments by 1 each time valid data is processed.

ALU10431bは、比較器を構成する。ALU10431bは、ALU10431aのカウント値が信号sig_803と等価なときに「True」、それ以外のときに「False」と判定し、「True」と判定したときにのみ1値を出力する。信号sig_801が有効データとして連続して処理される場合、信号sig_804は、パルスとしてセレクタ802に入力され、セレクタ802が信号sig_804を選択している状態にあれば、信号sig_805として制御部1040へ出力される。図8に示す例では、ALU10431b(比較器)が「True」と判定したときの出力は1値、「False」と判定したときの出力は0値のフラグステータスとして後段に転送できる。信号sig_805が制御部1040への制御信号使途のみであれば、セレクタ802はLSB(bit0)のみを取り扱わせる、といった実装でも良い。 ALU 10431b constitutes a comparator. The ALU 10431b determines "True" when the count value of the ALU 10431a is equivalent to the signal sig_803, otherwise determines "False", and outputs a value of 1 only when it determines "True". When the signal sig_801 is continuously processed as valid data, the signal sig_804 is input to the selector 802 as a pulse, and when the selector 802 selects the signal sig_804, it is output to the control unit 1040 as the signal sig_805. be. In the example shown in FIG. 8, when the ALU 10431b (comparator) determines "True", the output is 1, and when the ALU 10431b determines "False", the output can be transferred to the subsequent stage as a 0-value flag status. If the signal sig_805 is only used as a control signal to the control unit 1040, the selector 802 may handle only the LSB (bit0).

本実施形態におけるALU10431のセレクタ700または/および702は、入力される信号の選択に際し、制御部1040の持つ多目的レジスタ(不図示)のレジスタ値を用いることが出来る。信号sig_801、sig_803の値は、制御部1040で設定された多目的レジスタ値とすることが出来る。
ALU10431a(カウンタ)における積算値の上限は、内部処理bit幅による。内部を符号付きの17bitで処理する場合には、正の65535値が積算値の上限である。65535値を超える積算をするのであれば、ALU10431a、10431bを1セットとするカウンタ構成を複数用意してカスケードに接続し、信号sig_804相当のパルスを後段のカウンタにカウントさせれば良い。
The selector 700 and/or 702 of the ALU 10431 in this embodiment can use the register value of the multi-purpose register (not shown) of the control unit 1040 when selecting the signal to be input. The values of signals sig_801 and sig_803 can be multi-purpose register values set by control unit 1040 .
The upper limit of the integrated value in the ALU 10431a (counter) depends on the internal processing bit width. When processing the inside with signed 17 bits, the positive 65535 value is the upper limit of the integrated value. If it is necessary to integrate more than 65535 values, a plurality of counter configurations with ALUs 10431a and 10431b as one set should be prepared and connected in cascade, and pulses corresponding to the signal sig_804 should be counted by the subsequent counter.

ゲーテッドクロック構成の場合、クロックがこない場合のロジックは保持される。そのため、図8の構成のままだと、信号sig_804(sig_805)が「True」を示す値の状態のまま保持される場合がある。そこで、信号sig_804(sig_805)を受信する回路が随時クロック入力される回路であれば、該信号sig_804(sig_805)とクロックを止めた要因とのAND(論理積)として1クロックサイクル分のパルスとする必要がある。尚、信号sig_804(sig_805)を受信する回路は、制御部1040等である。また、これらの構成は公知の技術で実現することが出来るので、その詳細な説明を省略する。 In the gated clock configuration, the logic is preserved in the absence of the clock. Therefore, if the configuration in FIG. 8 remains as it is, the signal sig_804 (sig_805) may be kept at the value indicating "True". Therefore, if the circuit that receives the signal sig_804 (sig_805) is a circuit that receives a clock at any time, the AND (logical product) of the signal sig_804 (sig_805) and the cause of stopping the clock is used as a pulse for one clock cycle. There is a need. A circuit that receives the signal sig_804 (sig_805) is the control unit 1040 or the like. Further, since these configurations can be realized by known techniques, detailed description thereof will be omitted.

本実施形態では、図7に示す様にALU10431を構成する場合を例示した。しかしながら、ALU10431の構成要素は多岐にわたる。リコンフィギュラブル回路104のALU群1043内に複数の異なる仕様のALUが存在しても良い。例えば、ALUは、精度の高い乗算器や、比較器の比較結果をフラグとして出力するものや、複数サイクルをかけて除算する機能を有するもの等であっても良く、任意のALUの持つ演算の種類を限定はしない。 In this embodiment, the case where the ALU 10431 is configured as shown in FIG. 7 is exemplified. However, the components of ALU 10431 are diverse. ALUs with different specifications may exist in the ALU group 1043 of the reconfigurable circuit 104 . For example, the ALU may be a high-precision multiplier, one that outputs the comparison result of a comparator as a flag, or one that has a function of dividing over multiple cycles. There are no restrictions on types.

また、本実施形態では、説明の簡素化のために、入力選択・遅延調整・演算をひとつのALU10431内に実装する場合を例示した。しかしながら、夫々が別のエレメントとしてALU群1043内に配置されていても良く、1ALUの機能の構成を限定はしない。また、同様に、図6に示すセレクタ10432や、図8に示すセレクタ802の様なセレクタがALU群1043の階層に実装されていても良い。不図示であるが、図2に示すSRAM1044へのI/Fとして、任意のALUとSRAM1044とを選択的に接続するセレクタを実装しても良い。画素アトリビュートのSRAM1044を介在した伝送は、フラグbitも記憶対象としてSRAM1044に格納・読出しをすることで可能である。SRAM1044にアクセスするためのアドレスの生成はALUで行っても良いし、別途制御部を設けて行っても良い。SRAM1044への書き込み・読出しステータス信号は、ALUで生成しても良い。ALU群1043とSRAM1044とのI/Fとしては、データ線の他、アドレス信号、ステータス信号等がある。 Also, in this embodiment, for the sake of simplicity of explanation, the case where input selection, delay adjustment, and calculation are implemented within one ALU 10431 has been exemplified. However, each may be arranged in the ALU group 1043 as a separate element, and the functional configuration of one ALU is not limited. Similarly, selectors such as the selector 10432 shown in FIG. 6 and the selector 802 shown in FIG. Although not shown, a selector that selectively connects an arbitrary ALU and the SRAM 1044 may be implemented as an I/F to the SRAM 1044 shown in FIG. Transmission of the pixel attribute via the SRAM 1044 is possible by storing and reading out the flag bit in the SRAM 1044 as a storage object. The address generation for accessing the SRAM 1044 may be performed by the ALU, or may be performed by providing a separate control unit. A write/read status signal to the SRAM 1044 may be generated by the ALU. The I/F between the ALU group 1043 and the SRAM 1044 includes data lines, address signals, status signals, and the like.

<リコンフィギュラブル回路104の処理例>
本実施形態では、イメージセンサーの分割画素を用いた瞳分割方式によるデフォーカス量を用いて距離マップを形成する処理の一部をリコンフィギュラブル回路104で実施する際の飽和画素の画素アトリビュートの伝送を例示する。分割画素を持つイメージセンサーについては、例えば、特許文献3に記載されている。また、視差画像に対応した距離マップの取得については、例えば、特許文献4に記載されている。飽和画素の相関演算への影響低減については、例えば、特許文献5に記載されている。
<Processing Example of Reconfigurable Circuit 104>
In the present embodiment, transmission of pixel attributes of saturated pixels when part of the process of forming a distance map using a defocus amount by a pupil division method using divided pixels of an image sensor is performed by the reconfigurable circuit 104. is exemplified. An image sensor having divided pixels is described in Patent Document 3, for example. Acquisition of a distance map corresponding to a parallax image is described in Patent Document 4, for example. For example, Japanese Patent Laid-Open No. 2002-200002 describes how to reduce the influence of saturated pixels on correlation calculation.

図9は、撮影画像(視差画像)からデフォーカス量を検出して距離マップを作成する処理の一例を示すフローチャートである。前述した公報に記載の様に、撮像面からの視差画素の取得、および、距離マップの生成自体は、公知の技術である。ここでは、距離マップの取得のための演算処理(の一部)をリコンフィギュラブル回路104で実施する際の画素アトリビュートの伝送を実現する処理の部分のみを説明し、距離マップの生成自体の詳細な説明を行わない。視差画像は分割画素の形状にもよるが、本実施形態では、縦目、横目等2分割画素を例示し、夫々の像をA像、B像とする。 FIG. 9 is a flowchart showing an example of processing for detecting a defocus amount from a captured image (parallax image) and creating a distance map. As described in the publications mentioned above, the acquisition of parallax pixels from the imaging plane and the generation of the distance map itself are known techniques. Here, only the part of the processing that realizes the transmission of pixel attributes when the reconfigurable circuit 104 executes (a part of) the arithmetic processing for obtaining the distance map will be explained, and the details of the distance map generation itself will be explained. do not provide detailed explanations. Although the parallax image depends on the shape of the divided pixels, in this embodiment, two divided pixels such as vertical and horizontal eyes are exemplified, and the respective images are A image and B image.

図9において、リコンフィギュラブル回路104は、視差画像(A像、B像夫々)から輝度値(以下、Y値と称する)を取得する信号処理を行う(ステップS901、S905)。次に、リコンフィギュラブル回路104は、視差間の相関演算を行う(ステップS902)。次に、リコンフィギュラブル回路104は、ステップS903の相関演算で得た視差間の相対的な像ずれ量からデフォーカス量を推定し(ステップS903)、レンズ収差による面内のデフォーカス量のムラを補正する(ステップS904)。 In FIG. 9, the reconfigurable circuit 104 performs signal processing to acquire luminance values (hereinafter referred to as Y values) from parallax images (A image and B image, respectively) (steps S901 and S905). Next, the reconfigurable circuit 104 performs correlation calculation between parallaxes (step S902). Next, the reconfigurable circuit 104 estimates the defocus amount from the relative image shift amount between the parallaxes obtained by the correlation calculation in step S903 (step S903), and determines the in-plane defocus amount unevenness due to lens aberration. is corrected (step S904).

本実施形態では、図9のステップS901、S902、S903、S904の夫々のステップにて、リコンフィギュラブル回路104内のALU10431の構成を切り替える様にする。そこで、ステップS901(およびS905)、S902、S903、S904において、それぞれ、ALU10431の構成に係る回路情報901、902、903、904を用いる。全体の画像処理を完遂するための、夫々の回路情報901~904を含む回路情報や、制御部1040への制御命令(インストラクション・コード)は、1つの設定情報1011としてコンパイルされた状態でROM101に格納される。装置が動作する際には、高速にリコンフィギュラブル回路104に必要な情報を転送する必要がある。従って、CPU100は、装置立ち上げ時(または任意の準備段階)にRAM102に設定情報1011を展開しておく。回路情報901~904は、リコンフィギュラブル回路104の初期化要求時含む回路更新要求時に、適宜RAM102から読み出される。尚、回路情報901~904の読み出し開始のイベント自体は、制御部1040に対してCPU100が指示することにより実行されるようにしても良い。 In this embodiment, the configuration of the ALU 10431 in the reconfigurable circuit 104 is switched in steps S901, S902, S903, and S904 of FIG. Therefore, in steps S901 (and S905), S902, S903, and S904, circuit information 901, 902, 903, and 904 relating to the configuration of ALU 10431 are used, respectively. Circuit information including circuit information 901 to 904 and control instructions (instruction code) to the control unit 1040 for completing the entire image processing are stored in the ROM 101 in a state compiled as one setting information 1011. Stored. When the device operates, it is necessary to transfer necessary information to the reconfigurable circuit 104 at high speed. Accordingly, the CPU 100 develops the setting information 1011 in the RAM 102 when the apparatus is started up (or at any preparatory stage). The circuit information 901 to 904 are appropriately read from the RAM 102 when a circuit update request including a request for initialization of the reconfigurable circuit 104 is made. It should be noted that the event itself for starting reading of the circuit information 901 to 904 may be executed by the CPU 100 instructing the control unit 1040 .

リコンフィギュラブル回路104内の制御部1040は、回路情報901に基づいて、図5、6、7を参照しながら例示した様なレジスタ値を各モジュールに配送する。リコンフィギュラブル回路104の回路コンフィギュレーションに係るレジスタは、制御部1040内のプライマリレジスタ(不図示)、セカンダリレジスタのダブルバッファの構成を取ることで、現在回路が動作中に次期回路展開を実行することが可能である。尚、セカンダリレジスタは、図5~7等でFF回路として例示した夫々のレジスタである。これにより、回路更新にかかる処理時間を画像処理から隠すことが出来る。制御部1040は、回路情報901に基づいて、プライマリレジスタに値を展開後、プライマリレジスタに展開した値を各モジュールに搭載したセカンダリレジスタにも展開する。制御部1040は、プライマリレジスタ値をセカンダリレジスタに展開した後に、プライマリレジスタの値を次の回路情報に更新すべく、RAM102に対して回路情報902の転送を要求する。この一連の動作指示命令は、設定情報1011中にインストラクション・コードとして記載しておくことが出来る。ステップS901およびS905の処理の後に、ステップS902で用いられる回路情報902をALU群1043に展開する、といったシーケンスは、インストラクション・コードを用いると良い。 Based on the circuit information 901, the control unit 1040 in the reconfigurable circuit 104 distributes the register values as illustrated with reference to FIGS. The registers related to the circuit configuration of the reconfigurable circuit 104 are composed of a primary register (not shown) and a secondary register in the control unit 1040, so that the next circuit development can be performed while the current circuit is operating. Is possible. Incidentally, the secondary registers are the respective registers exemplified as the FF circuits in FIGS. This makes it possible to hide the processing time required for circuit update from the image processing. Based on the circuit information 901, the control unit 1040 develops the values in the primary registers, and then develops the values developed in the primary registers into the secondary registers mounted in each module. After expanding the primary register value to the secondary register, the control unit 1040 requests the RAM 102 to transfer the circuit information 902 in order to update the value of the primary register to the next circuit information. This series of operation instructions can be written in the setting information 1011 as an instruction code. An instruction code may be used for the sequence of expanding the circuit information 902 used in step S902 to the ALU group 1043 after the processing of steps S901 and S905.

図9の夫々のステップの完了時に、任意のALU10431において図8で例示した様なパルス生成回路を用いて、各モジュールのセカンダリレジスタの更新要求を制御部1040に対して出力する。例えば、受信画素数によって回路を切り替えることが出来る(フレーム処理完了を含む)。パルスの生成のための処理イベントは、適宜、システムの要求に沿う様に定義すれば良い。また、制御部1040への回路の更新要求は、パルス信号に限定するものではない(信号のレベル受けとしても良い)。 At the completion of each step in FIG. 9, a pulse generation circuit such as that illustrated in FIG. For example, the circuit can be switched depending on the number of received pixels (including completion of frame processing). Processing events for pulse generation may be defined appropriately to meet system requirements. Further, the circuit update request to the control unit 1040 is not limited to the pulse signal (the level of the signal may be received).

図9において、飽和画素の画素アトリビュートを扱う処理として、Y値の取得処理(ステップS901(およびS905))、相関演算の処理(ステップS902)の一例を、夫々、図10、図11に例示する。尚、ここでは、飽和画素の画素アトリビュートの扱いを主眼とするので、デフォーカス量の推定処理(ステップS903)とレンズ収差の補正処理(ステップS904)については、詳細な説明を省略する。 In FIG. 9, examples of Y-value acquisition processing (steps S901 (and S905)) and correlation calculation processing (step S902) are illustrated in FIGS. 10 and 11, respectively, as processing for handling pixel attributes of saturated pixels. . Note that since the focus here is on handling pixel attributes of saturated pixels, detailed descriptions of the defocus amount estimation process (step S903) and the lens aberration correction process (step S904) will be omitted.

図9の処理ルーチンは、ステップ単位が処理回路の構成単位であり、各ステップでフレーム全体の処理が進められるよう、適宜回路情報が更新される。図10、図11は、夫々図9の1ステップ(サブルーチン)であり、ALU10431で構成する回路、および、第1の変換部1041、第2の変換部1042で行われる処理を1つのステップとして例示している。従って、図10、図11では、各ステップで、任意の画素(または任意のブロック等処理単位)の処理が行われるよう、所望の回路パスが適用される。 In the processing routine of FIG. 9, the step unit is a unit of configuration of the processing circuit, and the circuit information is appropriately updated so that the processing of the entire frame proceeds at each step. 10 and 11 each show one step (subroutine) in FIG. 9, exemplifying the processing performed by the circuit configured by the ALU 10431 and the first conversion unit 1041 and the second conversion unit 1042 as one step. are doing. Therefore, in FIGS. 10 and 11, a desired circuit path is applied so that arbitrary pixels (or arbitrary processing units such as blocks) are processed in each step.

図10は、Y値を取得する際の処理(ステップS901およびS905)の一例を示すフローチャートである。本実施形態では、図1において、処理対象のフレームデータ1031(RAW画像・視差像データ)は、記録メディア103からRAM102に展開され、リコンフィギュラブル回路104へ読み出される場合を例示する。この視差像データのA像、B像夫々の画素は、既にセンサー補正(黒レベル再現、シェーディング補正、リニアリティー補正、欠陥補正等)が施されているものとする。 FIG. 10 is a flow chart showing an example of the processing (steps S901 and S905) when obtaining the Y value. In this embodiment, in FIG. 1, frame data 1031 (RAW image/parallax image data) to be processed is expanded from the recording medium 103 to the RAM 102 and read out to the reconfigurable circuit 104 as an example. It is assumed that sensor correction (black level reproduction, shading correction, linearity correction, defect correction, etc.) has already been performed on the pixels of each of the A and B images of the parallax image data.

ステップS1001において、リコンフィギュラブル回路104は、飽和画素処理を行う。具体的にリコンフィギュラブル回路104は、各画素の信号値(画素値)が予め設定された一定の飽和レベル(閾値)に達した否かを判定する。リコンフィギュラブル回路104は、画素が飽和レベルに達している場合には、その画素を飽和画素であると判定し、第2の画素アトリビュート形態に則り(図4(b)参照)、フラグbit値を1値とする。 In step S1001, the reconfigurable circuit 104 performs saturation pixel processing. Specifically, the reconfigurable circuit 104 determines whether or not the signal value (pixel value) of each pixel has reached a predetermined saturation level (threshold). When the pixel reaches the saturation level, the reconfigurable circuit 104 determines that the pixel is a saturated pixel, and according to the second pixel attribute form (see FIG. 4B), the flag bit value is set to 1 value.

次に、ステップS1002において、リコンフィギュラブル回路104は、輝度シェーディング補正(光学系に対する補正)を行う。このとき、像高が高い位置での口径食の影響や、マイクロレンズへの光束の入射角が大きい場合の分割画素間のクロストーク等の補正を含めても良い。像高をパラメータとするが、実力的に水平方向のシェーディング補正で事足りるならば、ALU10431の消費量を節約出来る。飽和画素を示す画素アトリビュートの値は、ステップS1002の処理後も保存される。 Next, in step S1002, the reconfigurable circuit 104 performs luminance shading correction (correction for the optical system). At this time, the effect of vignetting at a position where the image height is high and the crosstalk between divided pixels when the incident angle of the light flux to the microlens is large may be included. The image height is used as a parameter, but if horizontal shading correction is practically sufficient, the consumption of the ALU 10431 can be saved. The value of the pixel attribute indicating saturated pixels is preserved even after the process of step S1002.

次に、ステップS1003において、リコンフィギュラブル回路104は、ビニング処理によるY値の生成を行う。例えば、ベイヤー配列の撮像素子から取得したRAW画像であれば、格子状の4画素単位を輝度値の最小単位と定義して、リコンフィギュラブル回路104は、各色(R/Gr/Gb/B)の値加算することでY値を取得する。このとき、加算対象の画素の何れかに画素アトリビュートを示すフラグの立った(画素アトリビュートの値が1値である)画素が存在する場合には、生成したY値の画素アトリビュートの値も1値とする。 Next, in step S1003, the reconfigurable circuit 104 generates a Y value by binning processing. For example, in the case of a RAW image acquired from an imaging device with a Bayer array, a lattice-shaped four-pixel unit is defined as the minimum unit of luminance value, and the reconfigurable circuit 104 outputs each color (R/Gr/Gb/B) Y value is obtained by adding the value of . At this time, if there is a pixel with a flag indicating a pixel attribute (the value of the pixel attribute is 1) in any of the pixels to be added, the pixel attribute value of the generated Y value is also 1. and

本実施形態では、既に記録メディア103に記録済みのRAW画像からY値を生成する場合を例示する。従って、Y値は、AF用途のような解像度ではなく、現像時のアプリケーション用途(画像認識等で主被写体の位置を把握する等の用途)として画像ファイルに添付し、記録しておける程度の情報量に圧縮しても良い。アプリケーションの許容範囲内で画像圧縮もかねて複数ベイヤーから1つのY値を生成する様にしても良い。 In this embodiment, a case of generating a Y value from a RAW image that has already been recorded on the recording medium 103 will be exemplified. Therefore, the Y value is not the resolution for AF use, but information to the extent that it can be attached to the image file and recorded for application use during development (use for grasping the position of the main subject by image recognition, etc.). It can be compressed into volume. One Y value may be generated from a plurality of Bayers while also performing image compression within the allowable range of the application.

次に、ステップS1004において、リコンフィギュラブル回路104は、画素アトリビュート形態の変換(画素アトリビュートの値の第2の画素アトリビュート形態から第1の画素アトリビュート形態への変換)を行う。この変換は、データが第2の変換部1042を通過すれば成立する。ステップS1004の処理後のリコンフィギュラブル回路104から出力されるデータは、第1の画素アトリビュート形態となり、RAM102に一時的に格納される。
図10の処理ステップは、ステップS901、S905において、各視差画像(本実施例では、A像・B像)に対して実施される。
Next, in step S1004, the reconfigurable circuit 104 converts the pixel attribute form (converts the value of the pixel attribute from the second pixel attribute form to the first pixel attribute form). This conversion is established when the data passes through the second conversion unit 1042 . The data output from the reconfigurable circuit 104 after processing in step S1004 is in the form of the first pixel attribute and is temporarily stored in the RAM 102. FIG.
The processing steps in FIG. 10 are performed for each parallax image (A image and B image in this embodiment) in steps S901 and S905.

図11は、視差画像間の相関演算を行う際の処理(ステップS902)の一例を示すフローチャートである。リコンフィギュラブル回路104は、ステップS901、S905を経たA像、B像のY値データの夫々を、一時的に格納したRAM102より読み出す。AF用途であれば、AF枠単位に相関演算を実施する。一方、距離マップの取得の際には、画像全体の相関演算の結果を取得するため、任意のブロック単位で像ずれ量が導出される。 FIG. 11 is a flowchart showing an example of processing (step S902) when performing correlation calculation between parallax images. The reconfigurable circuit 104 reads each of the Y value data of the A image and the B image that have undergone steps S901 and S905 from the temporarily stored RAM 102 . For AF applications, correlation calculation is performed for each AF frame. On the other hand, when acquiring the distance map, the image shift amount is derived for each block because the correlation calculation result of the entire image is acquired.

ステップS1101において、リコンフィギュラブル回路104は、画素アトリビュート形態の変換(画素アトリビュートの値の第1の画素アトリビュート形態から第2の画素アトリビュート形態への変換)を行う。任意のブロック単位でRAM102から読み出すY値データは第1の画素アトリビュート形態になっている。リコンフィギュラブル回路104は、第1の変換部1041で画素アトリビュートの値を第2の画素アトリビュート形態に変換する。 In step S1101, the reconfigurable circuit 104 performs pixel attribute format conversion (conversion of a pixel attribute value from a first pixel attribute format to a second pixel attribute format). The Y value data read out from the RAM 102 in arbitrary block units is in the first pixel attribute format. The reconfigurable circuit 104 converts the value of the pixel attribute into the second pixel attribute form in the first conversion unit 1041 .

次に、ステップS1102において、リコンフィギュラブル回路104は、帯域選択のためのバンドパスフィルタ(以下、BPFと称する)をA像、B像のY値データに適用する。周波数帯域は撮影条件によって変更することが出来る。撮影条件が、RAW画像ファイル中の撮影情報として記録されている場合、当該撮影条件に応じた周波数帯域を選択することが出来る。例えば、S/Nが悪いと予想される様な撮影条件下(高ISO撮影等)では、より低域のフィルタを適用するのが好ましい。
バンドパスフィルタはデジタルフィルタである。バンドパスフィルタの垂直方向のTAPは、リコンフィギュラブル回路104内のSRAM1044で複数本のラインバッファを構成して割り当てる(不図示)。SRAM1044はメモリ制御部を含んでも良いし、前述の様にSRAM1044にアクセスするためのアドレスの生成はALUで行っても良い。
Next, in step S1102, the reconfigurable circuit 104 applies a bandpass filter (hereinafter referred to as BPF) for band selection to the Y value data of the A and B images. The frequency band can be changed according to the imaging conditions. When shooting conditions are recorded as shooting information in a RAW image file, it is possible to select a frequency band according to the shooting conditions. For example, under shooting conditions where the S/N ratio is expected to be poor (high ISO shooting, etc.), it is preferable to apply a lower-pass filter.
A bandpass filter is a digital filter. The vertical taps of the band-pass filter are assigned by forming a plurality of line buffers in the SRAM 1044 in the reconfigurable circuit 104 (not shown). The SRAM 1044 may include a memory controller, and the ALU may generate addresses for accessing the SRAM 1044 as described above.

次に、ステップS1103において、リコンフィギュラブル回路104は、ブロック単位の像ずれ量を算出する。像ずれ量を算出する代表的な方法としてはSAD(Sum of Absolute Difference)によるテンプレートマッチングによる方法がある。例えば、A像のブロックに対してB像のブロックを(Y画素)1画素毎にシフトしつつずれ量(差分値)の総和を取る。任意のブロック内のA像の画素毎に当該ブロック中のB像の画素との像ずれ量が求まる。分割画素が左右2分割のイメージセンサーによって得た視差画像を処理しているとすると、任意のブロックの水平方向の相関曲線が得られる。 Next, in step S1103, the reconfigurable circuit 104 calculates an image shift amount for each block. A representative method for calculating the amount of image shift is a method based on template matching using SAD (Sum of Absolute Difference). For example, while shifting the B image block by one pixel (Y pixel) with respect to the A image block, the sum of the deviation amounts (difference values) is calculated. For each pixel of the A image in an arbitrary block, the amount of image deviation from the pixels of the B image in the block is obtained. Assuming that a parallax image obtained by an image sensor whose divided pixels are divided into left and right halves is processed, a horizontal correlation curve of an arbitrary block can be obtained.

次に、ステップS1104において、リコンフィギュラブル回路104は、サブピクセルの推定のための演算を行う。これにより、画素以下の分解能が得られる。サブピクセルの推定は、ステップS1103で得られた相関曲線に対して、等角直線フィッティングやパラボラフィッティング等の既存のフィッティングの手法から導出した演算式をALUで実行することにより実現することが出来る。距離マップの解像度はこの相関演算に入力するY値のフレームデータ量をどの大きさのブロックに分割するかで決定される。水平2000画素を20シフト程度で像ずれ量を取得するならば、出力は100画素程度となる。ただし、本実施形態においてこの辺りの仕様は制限されない。 Next, in step S1104, the reconfigurable circuit 104 performs an operation for sub-pixel estimation. This provides sub-pixel resolution. Sub-pixel estimation can be realized by executing an arithmetic expression derived from an existing fitting method such as equiangular straight line fitting or parabolic fitting on the correlation curve obtained in step S1103 by the ALU. The resolution of the distance map is determined by the size of blocks into which the frame data amount of the Y value input to this correlation calculation is divided. If the image shift amount is obtained by shifting 2000 horizontal pixels by about 20, the output is about 100 pixels. However, in this embodiment, the specifications in this area are not limited.

本実施形態に係る画素アトリビュートの適用として、ステップS1103の相関演算がある。飽和画素値は相関結果を狂わせ、推定される像ずれ量に誤差を発生させる虞がある。そこで、例えば、リコンフィギュラブル回路104は、SADの最中に、注目画素が飽和画素値である場合に注目画素の画素値を当該注目画素の前後の画素の画素値と置換することが出来る。また、リコンフィギュラブル回路104は、処理ブロック中の飽和画素を計数しておき、飽和画素の計数値を信頼度の判定に使用したりすることが出来る。リコンフィギュラブル回路104は、或るブロックにおいて、飽和画素の計数値が所定数以上となった場合、当該ブロックより得られた距離マップ値を信頼しないものとすることが出来る。 As an application of the pixel attribute according to this embodiment, there is a correlation calculation in step S1103. Saturated pixel values can distort the correlation results and cause an error in the estimated amount of image shift. Therefore, for example, during SAD, the reconfigurable circuit 104 can replace the pixel value of the target pixel with the pixel values of the pixels before and after the target pixel when the target pixel has a saturated pixel value. In addition, the reconfigurable circuit 104 can count the number of saturated pixels in the processing block and use the counted number of saturated pixels to determine the degree of reliability. The reconfigurable circuit 104 can make the distance map value obtained from a certain block unreliable when the count value of saturated pixels is equal to or greater than a predetermined number in that block.

例えば、任意のALU10431において、図7に例示したセレクタ722を画素アトリビュート側に選択し、演算器720が加算器であるとしてセレクタ708で演算器720を選択すれば、FF回路709で飽和画素の計数値を積算することが出来る。 For example, in an arbitrary ALU 10431, if the selector 722 illustrated in FIG. Numerical values can be accumulated.

図11に例示する全てのステップを賄うALUが無い場合には、回路情報をステップで分割して、コンフィギュレーションのステージを増やしても良い。例えば、SRAM1044の容量の都合上、ステップS1102とステップS1103との間で一旦データをRAM102に格納して、回路のコンフィギュレーションを挟む必要な場合が想定される。この場合、リコンフィギュラブル回路104は、ステップS1102の後に一旦第2の変換部1042を介して、飽和画素の画素アトリビュートの値を第1の画素アトリビュート形態に変換し、RAM102に再格納させる。そして、リコンフィギュラブル回路104は、RAM102から、第1の画素アトリビュート形態に変換された飽和画素の画素アトリビュートの値を入力し、第1の変換部1041を介して、第2の画素アトリビュート形態に変換する。 If there is no ALU that covers all the steps illustrated in FIG. 11, the circuit information may be divided into steps to increase the number of configuration stages. For example, due to the capacity of the SRAM 1044, it may be necessary to temporarily store the data in the RAM 102 between steps S1102 and S1103 to interpose the configuration of the circuit. In this case, the reconfigurable circuit 104 temporarily converts the pixel attribute value of the saturated pixel into the first pixel attribute format via the second conversion unit 1042 after step S1102, and stores it in the RAM 102 again. Then, the reconfigurable circuit 104 receives from the RAM 102 the pixel attribute values of the saturated pixels converted into the first pixel attribute form, and converts them into the second pixel attribute form via the first conversion unit 1041 . Convert.

以上のように本実施形態では、多数の演算回路を通過するリコンフィギュラブル回路104の内部では、画素アトリビュートの値をフラグとしてデータにバインドする形態(第2の画素アトリビュート形態)で画素アトリビュートの値を伝送する。リコンフィギュラブル回路104と外部との間では、画素アトリビュートの値として画素値に0値を割り当てる形態(第1の画素アトリビュート形態)で画素アトリビュートの値を伝送する。そのために、リコンフィギュラブル回路104は、第1の画素アトリビュート形態を第1の変換部1041により第2の画素アトリビュート形態に変換可能な回路構成とする。また、リコンフィギュラブル回路104は、この変換された第2の画素アトリビュート形態を第2の変換部1042により第1の画素アトリビュート形態に変換可能な回路構成とする。従って、ALUを多数含むリコンフィギュラブル回路と、一次記憶部と、を含むデータパスにおいて、画素アトリビュートの値の伝送による、バス帯域の増加の回避・コストの低減・設計および検証工数の削減を実現することが可能になる。よって、画素アトリビュートの値を伝送環境に応じて適切に伝送することが出来る。 As described above, in the present embodiment, in the reconfigurable circuit 104 that passes through a large number of arithmetic circuits, pixel attribute values are bound to data as flags (second pixel attribute form). to transmit. Between the reconfigurable circuit 104 and the outside, pixel attribute values are transmitted in a form (first pixel attribute form) in which 0 is assigned to pixel values as pixel attribute values. Therefore, the reconfigurable circuit 104 has a circuit configuration that allows the first conversion unit 1041 to convert the first pixel attribute form into the second pixel attribute form. Also, the reconfigurable circuit 104 has a circuit configuration that allows the second conversion unit 1042 to convert the converted second pixel attribute form into the first pixel attribute form. Therefore, in a data path including a reconfigurable circuit including many ALUs and a primary storage unit, transmission of pixel attribute values can avoid an increase in bus bandwidth, reduce costs, and reduce design and verification man-hours. it becomes possible to Therefore, pixel attribute values can be transmitted appropriately according to the transmission environment.

第1の画素アトリビュート形態および第2の画素アトリビュート形態の適用対象は、本実施形態で説明したものに限定されない。例えば、リコンフィギュラブル回路以外の多数の演算回路を備える部分に第2の画素アトリビュート形態を適用し、当該演算回路と外部との通信を行う部分に第1の画素アトリビュート形態を適用することが出来る。
また、画素アトリビュート(属性)は、飽和画素(感度不良)に限定されない。例えば、欠陥画素(傷)および機能画素(像面位相差AF用の視差取得画素)の少なくとも1つを飽和画素(感度不良)に代えてまたは加えて画素アトリビュート(属性)としても良い。尚、機能画素は、記録あるいは表示のための撮像画像を構成する用途とは異なる用途に使用する信号を出力する画素である。複数の画素アトリビュートを扱う場合、第1の画素アトリビュート形態においては、画素アトリビュートに応じた相互に異なる2つの画素値を画素アトリビュートの値として割り当てる。また、第2の画素アトリビュート形態においては、各画素アトリビュートの値をバインドして1つの信号として取り扱う。
The application targets of the first pixel attribute form and the second pixel attribute form are not limited to those described in this embodiment. For example, it is possible to apply the second pixel attribute format to a portion including a large number of arithmetic circuits other than reconfigurable circuits, and apply the first pixel attribute format to a portion that communicates between the arithmetic circuits and the outside. .
Also, pixel attributes are not limited to saturated pixels (poor sensitivity). For example, at least one of a defective pixel (flaw) and a functional pixel (parallax acquisition pixel for image plane phase difference AF) may be used as a pixel attribute instead of or in addition to a saturated pixel (poor sensitivity). A functional pixel is a pixel that outputs a signal that is used for a purpose different from that for forming a captured image for recording or display. When handling a plurality of pixel attributes, in the first pixel attribute form, two different pixel values corresponding to the pixel attributes are assigned as pixel attribute values. In the second pixel attribute form, the values of each pixel attribute are bound and treated as one signal.

(第2の実施形態)
次に、第2の実施形態を説明する。第1の実施形態では、第2の画素アトリビュート形態として、図4に例示した様に、画素データとしての符号付き17bitのデータに、画素アトリビュートの値を示す値として1bitのデータをバインドする形態を例に挙げて説明した。これに対し、本実施形態では、第2の画素アトリビュート形態が、画素アトリビュートの値を画像データ中の一部のbit値と置換する形態を例に挙げて説明する。
(Second embodiment)
Next, a second embodiment will be described. In the first embodiment, as the second pixel attribute form, as illustrated in FIG. 4, a form in which signed 17-bit data as pixel data is bound with 1-bit data as a value indicating the value of the pixel attribute. explained with an example. On the other hand, in the present embodiment, the second pixel attribute mode will be described by taking as an example a mode in which the value of the pixel attribute is replaced with a part of the bit values in the image data.

画像処理装置が大規模なSRAM(複数ライン分のラインバッファ等)を搭載する場合、データにステータスをバインドしたままSRAMに格納する様にシステム構成するのはコスト増に繋がる虞がある。この場合、第2の画素アトリビュート形態として、画素値の一部をステータスと置換する形態は、第1の実施形態で説明した第2の画素アトリビュート形態よりも有利である。ただし、画像データの有効bitの一部をステータスに置換することは、演算精度を落とすことに繋がる虞がある。従って、本実施形態の第2の画素アトリビュート形態は、例えば、画素アトリビュートの値を使用しない使途が主であるパス構成や、データのbit幅が十分にあるパス構成に有効である。尚、データのbit幅が十分にあるパス構成としては、例えば、処理の途中では演算精度を得るために小数点以下まで演算し、出力段で小数点以下を丸める様なパス構成が挙げられる。 When the image processing apparatus is equipped with a large-scale SRAM (a line buffer for multiple lines, etc.), configuring the system so that the status is stored in the SRAM while binding the data to the data may lead to an increase in cost. In this case, as the second pixel attribute form, the form in which a part of the pixel value is replaced with the status is more advantageous than the second pixel attribute form described in the first embodiment. However, replacing some of the effective bits of the image data with the status may lead to deterioration in calculation accuracy. Therefore, the second pixel attribute form of the present embodiment is effective, for example, for a path configuration that is mainly used without using pixel attribute values, or for a path configuration with a sufficient data bit width. As a path configuration with a sufficient bit width of data, for example, there is a path configuration in which calculations are performed up to the decimal point in order to obtain calculation accuracy during processing, and the decimal point is rounded at the output stage.

以上のように本実施形態と第1の実施形態とは、第2の画素アトリビュート形態が異なることによる構成および処理が主として異なる。従って、本実施形態の説明において、第1の実施形態と同一の部分については、詳細な説明を省略する。 As described above, the present embodiment differs from the first embodiment mainly in the configuration and processing due to the difference in the form of the second pixel attribute. Therefore, in the description of the present embodiment, detailed description of the same parts as those of the first embodiment will be omitted.

図12は、本実施形態における第2の画素アトリビュート形態のフォーマットの一例を示す図である。図12(a)は、元の画素データの各bitの扱いの一例を示す。図12(b)は、第2の画素アトリビュート形態として、最下位bit(bit0)を画素アトリビュートの値に置換した形態の一例を示す。
図12(a)では、画素データが、符号付きの17bitのデータである場合を例示する。第1の実施形態でも言えることであるが、リコンフィギュラブル回路104に対して入出力されるデータのbit幅と、ALU10431内のデータのbit幅とが整合している必要は無い。また、ALU10431内において精度の高いbit(例えば20bit等)で演算処理を実施して、第2の変換部1042(リコンフィギュラブル回路104の出口)において、リコンフィギュラブル回路104から出力すべきbit幅にデータを丸めても良い。
FIG. 12 is a diagram showing an example of the format of the second pixel attribute form in this embodiment. FIG. 12(a) shows an example of handling of each bit of the original pixel data. FIG. 12(b) shows an example of a form in which the least significant bit (bit0) is replaced with the value of the pixel attribute as the second pixel attribute form.
FIG. 12A illustrates a case where the pixel data is signed 17-bit data. As can be said in the first embodiment, the bit width of data input/output to/from the reconfigurable circuit 104 does not need to match the bit width of data in the ALU 10431 . In addition, arithmetic processing is performed with high precision bits (for example, 20 bits) in the ALU 10431, and the bit width to be output from the reconfigurable circuit 104 in the second conversion unit 1042 (exit of the reconfigurable circuit 104) You can also round the data to .

図13は、本実施形態における第1の変換部1300の構成の一例を示す図である。図13に例示する第1の変換部1300は、図5に例示する第1の変換部1041に替わるものである。図13に例示する部分のうち、図5に例示する部分と同じ部分についての詳細な説明を省略する。
図13において、信号sig_1301は、図3(a)に示す形態のデータである。画素アトリビュートの値の伝送を不要とする回路コンフィギュレーション時には、FF回路1307に0値を設定して、セレクタ1305に、画素データのLSBを通す様にすれば良い。
FF回路1301は、図5におけるFF回路10410と同じである。信号sig_1302は、オフセットクランプ値であり、FF回路1302に保持される。信号sig_1302、FF回路1302、加算器(減算器)1303は、それぞれ図5における信号sig_504、FF回路10411、加算器(減算器)10415と同じである。ただし、図13における出力データのbit幅は、図12の設定に整合しているものとする。また、信号sig_1308、比較器1304、信号sig_1304は、それぞれ図5における信号sig_502、比較器10414、フラグ信号sig_503と同じである。
FIG. 13 is a diagram showing an example of the configuration of the first conversion section 1300 in this embodiment. The first conversion unit 1300 illustrated in FIG. 13 replaces the first conversion unit 1041 illustrated in FIG. Of the parts illustrated in FIG. 13, detailed description of the same parts as those illustrated in FIG. 5 will be omitted.
In FIG. 13, signal sig_1301 is data in the form shown in FIG. 3(a). In a circuit configuration that does not require transmission of pixel attribute values, the FF circuit 1307 is set to 0 and the LSB of pixel data is passed through the selector 1305 .
The FF circuit 1301 is the same as the FF circuit 10410 in FIG. A signal sig_1302 is an offset clamp value and is held in the FF circuit 1302 . Signal sig_1302, FF circuit 1302, and adder (subtractor) 1303 are the same as signal sig_504, FF circuit 10411, and adder (subtractor) 10415 in FIG. 5, respectively. However, it is assumed that the bit width of the output data in FIG. 13 matches the setting in FIG. Signal sig_1308, comparator 1304, and signal sig_1304 are the same as signal sig_502, comparator 10414, and flag signal sig_503 in FIG. 5, respectively.

本実施形態では、FF回路1307とセレクタ1305とを設けて、画素アトリビュートの値を、画像データの最下位bitに置換する。第1の実施形態と同様、第1の画素アトリビュート形態の値(飽和画素を示す値)として、0値を割り当てる場合(図3と同様)を例示する。信号sig_1308は0値に縮退しているとして、信号sig_1301が0値のときに信号sig_1304は1値となる。画素アトリビュートの扱いが有効とするならば、制御部1040は、FF回路1307を1値に設定する。これにより、セレクタ1305は、信号sig_1304を選択し、信号sig_1305として出力する。一方、画素アトリビュートを用いない場合、セレクタ1305は、信号sig_1303の最下位bitを選択し、信号sig_1305として出力する。 In this embodiment, an FF circuit 1307 and a selector 1305 are provided to replace the pixel attribute value with the least significant bit of the image data. As in the first embodiment, a case (similar to FIG. 3) in which a value of 0 is assigned as a value of the first pixel attribute form (a value indicating a saturated pixel) will be exemplified. Assuming that the signal sig_1308 is degenerated to a value of 0, the signal sig_1304 is a value of 1 when the signal sig_1301 is a value of 0. If the handling of the pixel attribute is valid, the control unit 1040 sets the FF circuit 1307 to 1 value. Accordingly, the selector 1305 selects the signal sig_1304 and outputs it as the signal sig_1305. On the other hand, when the pixel attribute is not used, the selector 1305 selects the least significant bit of the signal sig_1303 and outputs it as the signal sig_1305.

信号sig_1306は、信号sig_1303のbit0を除く上位bitの値として当該sig_1303の各ビットの値を有し、bit0の値として信号sig_1305の値を有する信号であり、FF回路1306の入力となる。FF回路1306は、図5に例示したFF回路10413と同じである。FF回路1306の出力がそのまま第1の変換部1300から出力される信号sig_1307となる。
本実施形態では、FF回路1307の設定によって、画素アトリビュートの値の伝送のON/OFFを行うことが出来る。第1の実施形態においても、比較器10414の出力を常時0値とするマスク機能を実装することで、同様の制御は可能である。
The signal sig_1306 is a signal that has the value of each bit of the signal sig_1303 as the value of the upper bits of the signal sig_1303 excluding bit0 and the value of the signal sig_1305 as the value of bit0, and is input to the FF circuit 1306 . The FF circuit 1306 is the same as the FF circuit 10413 illustrated in FIG. The output of the FF circuit 1306 becomes the signal sig_1307 output from the first conversion unit 1300 as it is.
In this embodiment, transmission of pixel attribute values can be turned ON/OFF by setting the FF circuit 1307 . Also in the first embodiment, similar control is possible by implementing a mask function that always sets the output of the comparator 10414 to 0 value.

図14は、本実施形態における第2の変換部1400の構成の一例を示す図である。図14に例示する第2の変換部1400は、図6に例示する第2の変換部1042に替わるものである。図14に例示する部分のうち、図6に例示する部分と同じ部分についての詳細な説明を省略する。
図14において、FF回路1401・1403・1411、加算器1404、リミッタ回路1405は、それぞれ、図6に例示したFF回路10421・10420・10425、加算器10422、リミッタ回路10427と同じである。また、比較器1406、セレクタ1409・1410は、それぞれ、図6に例示した比較器10426、セレクタ10423・10424と同じである。ただし、図14における入力データのbit幅は、図12の設定に整合しているものとする。
FIG. 14 is a diagram showing an example of the configuration of the second conversion section 1400 in this embodiment. A second conversion unit 1400 illustrated in FIG. 14 replaces the second conversion unit 1042 illustrated in FIG. Of the parts illustrated in FIG. 14, detailed description of the same parts as those illustrated in FIG. 6 will be omitted.
14, FF circuits 1401, 1403, 1411, adder 1404, and limiter circuit 1405 are the same as FF circuits 10421, 10420, 10425, adder 10422, and limiter circuit 10427, respectively, illustrated in FIG. Comparator 1406 and selectors 1409 and 1410 are the same as comparator 10426 and selectors 10423 and 10424 shown in FIG. 6, respectively. However, it is assumed that the bit width of the input data in FIG. 14 matches the setting in FIG.

信号sig_1401は、図12(a)および図12(b)に示す何れかの形態のデータである。ここでは信号sig_1401は、符号付きの17bitのデータであるものとする。そして、本実施形態における第2の画素アトリビュート形態は、図12(b)の例示する様であり、画素アトリビュートの有効時には、FF回路1402に1値が設定される(制御部1040より、信号sig_1402が転送される)。AND素子1412は、画素アトリビュートの有効時には0値を出力する。この場合、画素データの信号sig_1404のLSBは0値で固定となる。画素アトリビュートの無効時には、AND素子1412の出力は、FF回路1401の出力のbit0と等価となり、信号sig_1401の全bitは画素データとして取り扱われる。 Signal sig_1401 is data in one of the forms shown in FIGS. 12(a) and 12(b). Here, the signal sig_1401 is assumed to be signed 17-bit data. The second pixel attribute format in this embodiment is as illustrated in FIG. 12B, and when the pixel attribute is valid, 1 value is set in the FF circuit 1402 (from the control unit 1040, the signal sig_1402 is transferred). AND element 1412 outputs a 0 value when the pixel attribute is valid. In this case, the LSB of the pixel data signal sig_1404 is fixed at 0 value. When the pixel attribute is invalid, the output of the AND element 1412 becomes equivalent to bit0 of the output of the FF circuit 1401, and all bits of the signal sig_1401 are treated as pixel data.

信号sig_1407、信号sig_1408は、それぞれ、図6に例示した信号sig_604、信号sig_612と同様の画素データである。
信号sig_1409は、演算結果の画素値が第1の画素アトリビュート形態で定義した画素アトリビュートの値と重なったことを示すフラグ信号である。本実施形態では、飽和画素として0値が割り当てられる。例えば、信号sig_1410の値を0値で固定として比較器1406で画素値が0値のときに信号sig_1409の値が1値となる(このことは、図6の信号sig_605と同様である)。このとき、画素アトリビュートの値の伝送が無効(FF回路1402のレジスタ値が1値)のときには、信号sig_1409は、AND素子1407でマスクされる。その結果、セレクタ1409は常時信号sig_1408を選択し、信号sig_1412として出力する。画素アトリビュートの値の伝送が有効のときには、セレクタ1409の選択信号として信号sig_1409の値が入力され、飽和画素と判断されたときには、演算結果である0値が1値に変更される。これにより、疑似的な画素アトリビュートが生成されることが回避される(このことは、図6の信号sig_607と同様である)。
A signal sig_1407 and a signal sig_1408 are pixel data similar to the signal sig_604 and the signal sig_612 illustrated in FIG. 6, respectively.
A signal sig_1409 is a flag signal indicating that the pixel value of the operation result overlaps with the value of the pixel attribute defined in the first pixel attribute format. In this embodiment, a 0 value is assigned as a saturated pixel. For example, when the value of the signal sig_1410 is fixed at 0 and the pixel value in the comparator 1406 is 0, the value of the signal sig_1409 becomes 1 (this is the same as the signal sig_605 in FIG. 6). At this time, when the transmission of the pixel attribute value is invalid (the register value of the FF circuit 1402 is 1), the signal sig_1409 is masked by the AND element 1407 . As a result, the selector 1409 always selects the signal sig_1408 and outputs it as the signal sig_1412. When pixel attribute value transmission is enabled, the value of the signal sig_1409 is input as the selection signal of the selector 1409, and when the pixel is determined to be a saturated pixel, the 0 value, which is the operation result, is changed to the 1 value. This avoids generating spurious pixel attributes (which is similar to signal sig_607 in FIG. 6).

AND素子1408は、画素アトリビュートの値をマスクするためのものである。AND素子1408は、画素アトリビュートの値の伝送が無効のときには、信号sig_1415の値を常時0値とする。セレクタ1410は、常時信号sig_1412を選択し、信号sig_1413として出力する。FF回路1402のレジスタ値が1値(画素アトリビュートの値の伝送が有効)であり、処理対象の画素が飽和画素であるときには、セレクタ1410は、信号sig_1410を選択する。この信号sig_1410の値は、0値であり、第1の画素アトリビュート形態での画素アトリビュートの値に相当する。セレクタ1410は、入力信号sig_1401の最下位bitのフラグ値を画素アトリビュート値に置換した信号sig_1413として出力する。信号sig_1413は、FF回路1411で保持され、信号sig_1414として第2の変換部1400の出力となる。 AND element 1408 is for masking the value of the pixel attribute. The AND element 1408 always sets the value of the signal sig_1415 to 0 when the transmission of pixel attribute values is disabled. The selector 1410 always selects the signal sig_1412 and outputs it as the signal sig_1413. When the register value of the FF circuit 1402 is 1 (transmission of the pixel attribute value is valid) and the pixel to be processed is a saturated pixel, the selector 1410 selects the signal sig_1410. The value of this signal sig_1410 is a 0 value and corresponds to the value of the pixel attribute in the first pixel attribute form. The selector 1410 outputs a signal sig_1413 in which the flag value of the least significant bit of the input signal sig_1401 is replaced with a pixel attribute value. The signal sig_1413 is held by the FF circuit 1411 and is output from the second conversion unit 1400 as the signal sig_1414.

本実施形態では、FF回路1402によって画素アトリビュートの値の伝送のON/OFFを行うことが出来る。第1の実施形態においても(図6に例示した回路においても)当該FF回路1402、および、AND素子1407・1408相当のマスク機能を実装することで同様の制御が可能である。
本実施形態における第2の画素アトリビュート形態を用いる場合には、図7に例示したALU10431における、信号sig_708の生成において、最下位bitの扱いを画素とするか画素アトリビュートとするかを制御する仕組みが必要である。例えば、図13に例示するFF回路1307およびセレクタ1305の様な構成である。第2の画素アトリビュート形態について、演算精度の確保が重要な装置への実装には第1の実施形態を、通常は画素アトリビュートを使わない(画素アトリビュートが特殊用途の様な位置付け)装置への実装には第2の実施形態を選択すれば良い。
In this embodiment, the FF circuit 1402 can turn ON/OFF the transmission of pixel attribute values. In the first embodiment (also in the circuit illustrated in FIG. 6), similar control is possible by implementing the FF circuit 1402 and mask functions corresponding to the AND elements 1407 and 1408 .
When using the second pixel attribute form in this embodiment, there is a mechanism for controlling whether the least significant bit is treated as a pixel or as a pixel attribute in generating the signal sig_708 in the ALU 10431 illustrated in FIG. is necessary. For example, it is a configuration like the FF circuit 1307 and the selector 1305 illustrated in FIG. Regarding the second pixel attribute form, the first embodiment is used for implementation in a device in which it is important to ensure the calculation accuracy, and the first embodiment is implemented in a device that does not normally use pixel attributes (pixel attributes are positioned as special uses). Therefore, the second embodiment should be selected.

第2の実施形態においても、第1の実施形態で説明した種々の変形例を採用することが出来る。第2の実施形態において複数の画素アトリビュートを扱う場合、第2の画素アトリビュート形態においては、例えば、画素アトリビュートごとに、画像データにおける置換対象のbitを異ならせる。 Also in the second embodiment, various modifications described in the first embodiment can be adopted. When a plurality of pixel attributes are handled in the second embodiment, in the second pixel attribute form, for example, the bit to be replaced in the image data is changed for each pixel attribute.

尚、前述した各実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することが出来る。 It should be noted that each of the above-described embodiments merely shows specific examples for carrying out the present invention, and the technical scope of the present invention should not be construed to be limited by these. . That is, the present invention can be embodied in various forms without departing from its technical concept or main features.

(その他の実施例)
本発明は、前述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other examples)
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or device via a network or a storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by processing to It can also be implemented by a circuit (for example, ASIC) that implements one or more functions.

100:CPU。101:ROM、102:RAM、103:記録メディア、104:リコンフィギュラブル回路 100: CPU. 101: ROM, 102: RAM, 103: Recording medium, 104: Reconfigurable circuit

Claims (8)

画素の属性を示す値が第1の形態で表現されたデータを、当該画素の属性を示す値が当該第1の形態とは異なる第2の形態で表現されたデータに変換する第1の変換手段と、
画素の属性を示す値が前記第2の形態で表現されたデータを、当該画素の属性を示す値が前記第1の形態で表現されたデータに変換する第2の変換手段と、
前記第1の形態で表現されたデータを第1の伝送路に伝送する第1の伝送手段と、
前記第2の形態で表現されたデータを前記第1の伝送路と異なる第2の伝送路に伝送する第2の伝送手段と、
を有し、
前記第1の形態は、画素のデータにおける当該画素の画素値として、当該画素の属性に対応する値を割り当てる形態であり、
前記第2の形態は、画素のデータに当該画素の属性を示す値が付加される形態、または、画素のデータの一部を当該画素の属性に対応する値に置換する形態であることを特徴とする画像処理装置。
A first conversion for converting data in which a value indicating a pixel attribute is expressed in a first form into data in which a value indicating the pixel attribute is expressed in a second form different from the first form. means and
a second conversion means for converting data in which a value indicating a pixel attribute is expressed in the second form into data in which a value indicating the attribute of the pixel is expressed in the first form;
a first transmission means for transmitting data expressed in the first form to a first transmission line;
a second transmission means for transmitting the data expressed in the second form to a second transmission line different from the first transmission line;
has
The first form is a form in which a value corresponding to the attribute of the pixel is assigned as the pixel value of the pixel in the pixel data,
The second form is characterized in that a value indicating the attribute of the pixel is added to the data of the pixel, or part of the data of the pixel is replaced with a value corresponding to the attribute of the pixel. image processing device.
前記第1の伝送路には、前記第2の形態で表現されたデータは伝送されず、前記第2の伝送路には、前記第1の形態で表現されたデータは伝送されないことを特徴とする請求項1に記載の画像処理装置。 The data expressed in the second form is not transmitted through the first transmission line, and the data expressed in the first form is not transmitted through the second transmission line. The image processing apparatus according to claim 1. 前記第2の変換手段は、前記第1の変換手段により変換された、前記第2の形態で表現されたデータを、前記第1の形態で表現されたデータに変換することを特徴とする請求項1または2に記載の画像処理装置。 wherein said second conversion means converts the data expressed in said second form converted by said first conversion means into data expressed in said first form; Item 3. The image processing device according to Item 1 or 2. 前記第1の変換手段は、前記第2の変換手段により変換された、前記第1の形態で表現されたデータを、前記第2の形態で表現されたデータに変換することを特徴とする請求項1~3の何れか1項に記載の画像処理装置。 wherein said first conversion means converts the data expressed in said first form converted by said second conversion means into data expressed in said second form; 4. The image processing apparatus according to any one of items 1 to 3. 前記画素の属性を示す値は、欠陥画素であることを示す値、飽和画素であることを示す値、および、記録あるいは表示のための撮像画像を構成する用途とは異なる用途に使用する信号を出力する画素である機能画素であることを示す値の少なくとも何れか1つのであることを特徴とする請求項1~の何れか1項に記載の画像処理装置。 The value indicating the attribute of the pixel includes a value indicating a defective pixel, a value indicating a saturated pixel, and a signal used for purposes other than composing a captured image for recording or display. 5. The image processing apparatus according to any one of claims 1 to 4, wherein the pixel is at least one of values indicating that the pixel to be output is a functional pixel. 前記データが伝送されるデータパスとして複数の処理手段を更に有し、
前記複数の処理手段の少なくとも1つは、処理機能が更新される処理手段であることを特徴とする請求項1~の何れか1項に記載の画像処理装置。
further comprising a plurality of processing means as a data path through which the data is transmitted;
6. The image processing apparatus according to claim 1 , wherein at least one of said plurality of processing means is a processing means whose processing function is updated.
前記第1の形態で表現されたデータは、処理機能が更新される処理手段と、その他の前記処理手段との間において伝送され、
前記第2の形態で表現されたデータは、前記処理機能が更新される処理手段を構成する複数の回路の間において伝送されることを特徴とする請求項に記載の画像処理装置。
The data expressed in the first form is transmitted between the processing means whose processing function is updated and the other processing means,
7. An image processing apparatus according to claim 6 , wherein the data expressed in said second form are transmitted between a plurality of circuits constituting processing means for updating said processing function.
画素の属性を示す値が第1の形態で表現されたデータを、当該画素の属性を示す値が当該第1の形態とは異なる第2の形態で表現されたデータに変換する第1の変換工程と、
画素の属性を示す値が前記第2の形態で表現されたデータを、当該画素の属性を示す値が前記第1の形態で表現されたデータに変換する第2の変換工程と、
前記第1の形態で表現されたデータを第1の伝送路に伝送する第1の伝送工程と、
前記第2の形態で表現されたデータを前記第1の伝送路と異なる第2の伝送路に伝送する第2の伝送工程と、
を有し、
前記第1の形態は、画素のデータにおける当該画素の画素値として、当該画素の属性に対応する値を割り当てる形態であり、
前記第2の形態は、画素のデータに当該画素の属性を示す値が付加される形態、または、画素のデータの一部を当該画素の属性に対応する値に置換する形態であることを特徴とする画像処理方法。
A first conversion for converting data in which a value indicating a pixel attribute is expressed in a first form into data in which a value indicating the pixel attribute is expressed in a second form different from the first form. process and
a second conversion step of converting the data in which the value indicating the attribute of the pixel is expressed in the second form into the data in which the value indicating the attribute of the pixel is expressed in the first form;
a first transmission step of transmitting the data expressed in the first form to a first transmission line;
a second transmission step of transmitting the data expressed in the second form to a second transmission line different from the first transmission line;
has
The first form is a form in which a value corresponding to the attribute of the pixel is assigned as the pixel value of the pixel in the pixel data,
The second form is a form in which a value indicating the attribute of the pixel is added to the data of the pixel, or a form in which a part of the data of the pixel is replaced with a value corresponding to the attribute of the pixel. An image processing method characterized by:
JP2018188118A 2018-10-03 2018-10-03 Image processing device and image processing method Active JP7242235B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018188118A JP7242235B2 (en) 2018-10-03 2018-10-03 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018188118A JP7242235B2 (en) 2018-10-03 2018-10-03 Image processing device and image processing method

Publications (2)

Publication Number Publication Date
JP2020057958A JP2020057958A (en) 2020-04-09
JP7242235B2 true JP7242235B2 (en) 2023-03-20

Family

ID=70107804

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018188118A Active JP7242235B2 (en) 2018-10-03 2018-10-03 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP7242235B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007104525A (en) 2005-10-07 2007-04-19 Matsushita Electric Ind Co Ltd Image coding method and apparatus, image decoding method and apparatus, and imaging apparatus
JP2012124795A (en) 2010-12-10 2012-06-28 Canon Inc Image processing system
JP2013055459A (en) 2011-09-02 2013-03-21 Nikon Corp Imaging device, image processing device, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007104525A (en) 2005-10-07 2007-04-19 Matsushita Electric Ind Co Ltd Image coding method and apparatus, image decoding method and apparatus, and imaging apparatus
JP2012124795A (en) 2010-12-10 2012-06-28 Canon Inc Image processing system
JP2013055459A (en) 2011-09-02 2013-03-21 Nikon Corp Imaging device, image processing device, and program

Also Published As

Publication number Publication date
JP2020057958A (en) 2020-04-09

Similar Documents

Publication Publication Date Title
US11494622B2 (en) Method and apparatus for implementing a deep neural network performing an activation function
US10817260B1 (en) Reducing dynamic power consumption in arrays
US20110273459A1 (en) Device for the parallel processing of a data stream
JP2012505562A (en) Image processing apparatus and image processing method, and data processing apparatus and data processing method
US10169295B2 (en) Convolution operation device and method
US20100199071A1 (en) Data processing apparatus and image processing apparatus
CN111010504B (en) Image processing method, image processing apparatus, image processing system, image pickup apparatus, and storage medium
CN103458173B (en) Device, method and terminal for processing image relevant data
US20170255572A1 (en) System and method for preventing cache contention
Cadenas et al. Parallel pipelined array architectures for real-time histogram computation in consumer devices
US20120327260A1 (en) Parallel operation histogramming device and microcomputer
JP7242235B2 (en) Image processing device and image processing method
US20200319852A1 (en) Processing apparatus, method of controlling the same, and non-transitory computer readable storage medium
US11586465B2 (en) Scalable hardware thread scheduler
JP6068351B2 (en) Image processing device, integrated circuit, program, imaging device, display device
KR100769460B1 (en) A real-time stereo matching system
JP2016033754A (en) Image processing device, image processing method and program
KR20210131417A (en) data processing unit and artificial intelligence chip
CN101860670A (en) Digital photographing apparatus and the method that is used to control described digital photographing apparatus
CN115099176B (en) Method for optimizing circuit, electronic device and storage medium
US9779470B2 (en) Multi-line image processing with parallel processing units
JP4014486B2 (en) Image processing method and image processing apparatus
US20080208940A1 (en) Reconfigurable circuit
JP2024015829A (en) Image processing apparatus and image processing circuit
US20220092731A1 (en) Downscaler and Method of Downscaling

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210928

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220804

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221004

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221101

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230308

R151 Written notification of patent or utility model registration

Ref document number: 7242235

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151