JP6583111B2 - Arithmetic unit - Google Patents
Arithmetic unit Download PDFInfo
- Publication number
- JP6583111B2 JP6583111B2 JP2016079586A JP2016079586A JP6583111B2 JP 6583111 B2 JP6583111 B2 JP 6583111B2 JP 2016079586 A JP2016079586 A JP 2016079586A JP 2016079586 A JP2016079586 A JP 2016079586A JP 6583111 B2 JP6583111 B2 JP 6583111B2
- Authority
- JP
- Japan
- Prior art keywords
- output
- unit
- order
- integration
- input data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Databases & Information Systems (AREA)
- Mathematical Analysis (AREA)
- Computational Mathematics (AREA)
- Algebra (AREA)
- Image Processing (AREA)
- Advance Control (AREA)
- Complex Calculations (AREA)
- Image Analysis (AREA)
Description
本発明は、加算比較選択演算を繰り返し実行する演算装置に関する。 The present invention relates to an arithmetic device that repeatedly executes an addition comparison selection operation.
近年、自動車の事故防止や自動運転化のために、車載カメラによる測距や認識処理のニーズが高まっている。車載向けの画像処理装置は組み込みシステムのため、限られた性能およびリソースで要求時間内での処理を実現する必要がある。例えば、ステレオカメラは原理的に模様の少ない物体の測距が難しい。そのため、グローバル法という視差画像全体の滑らかさを考慮する手法を導入することにより、弱パタンである路面などもロバストに検出することができる手法が近年開発されている。このような方法の主なものとして、Viterbi(以下、ビタビと呼ぶ)アルゴリズムと呼ばれる動的計画法の一種により、全体のコストが最小になる視差の組み合わせを決定するものがある。 In recent years, there has been an increasing need for distance measurement and recognition processing using an in-vehicle camera in order to prevent automobile accidents and to enable automatic driving. Since an in-vehicle image processing apparatus is an embedded system, it is necessary to realize processing within a required time with limited performance and resources. For example, a stereo camera is difficult in principle to measure an object with few patterns. For this reason, a technique that can robustly detect a road surface having a weak pattern by introducing a global method that takes into account the smoothness of the entire parallax image has been developed in recent years. As such a main method, there is a method for determining a parallax combination that minimizes the overall cost by a kind of dynamic programming called a Viterbi (hereinafter referred to as Viterbi) algorithm.
ビタビアルゴリズムの計算量としては、その遷移状態、つまりノードの数が増えると、指数関数的に処理量が増える。そして、ステレオカメラの場合、遷移状態数が視差の数(通常、数十〜数百以上の数)だけあるため、計算量が大きくなる。このような課題に対して、アルゴリズムに着目し、既に計算した隣の遷移状態の結果を再利用することにより、従来ではノード数の2乗に比例していた計算量を、ノード数の2倍程度の計算量に抑えることを実現する手法が考えられている(例えば、特許文献1参照)。このような手法によれば、処理時間の短縮が可能になるが、ステレオカメラの数百万画素にわたって上記処理を車載のような組み込み環境で実現するためには、更なる高速化が必要となる。 As the amount of calculation of the Viterbi algorithm, as the transition state, that is, the number of nodes increases, the amount of processing increases exponentially. In the case of a stereo camera, the number of transition states is equal to the number of parallaxes (usually several tens to several hundreds or more), so that the amount of calculation increases. For such a problem, paying attention to the algorithm and reusing the result of the adjacent transition state that has already been calculated, the calculation amount that was proportional to the square of the number of nodes in the past can be doubled. There has been considered a method for realizing a reduction in the amount of calculation (see, for example, Patent Document 1). According to such a method, the processing time can be shortened. However, in order to realize the above processing in a built-in environment such as an in-vehicle environment over several million pixels of a stereo camera, further speedup is required. .
ビタビ演算の高速化の課題に対し、ビタビ演算の基本処理要素である加算・比較・選択(以下、ACSと呼ぶ)回路を直列に接続した専用回路が提案されている(例えば、特許文献2参照)。この手法によれば、単一のACS回路を再帰的に用いる場合に比べ、クロックの受け渡しでの処理時間のオーバーヘッドを減らせる分だけ高速化が期待できる。しかし、この場合、通過するACS回路の段数は少なくなっておらず、スループットの向上には限界がある。 To solve the problem of speeding up Viterbi operations, a dedicated circuit in which addition, comparison, and selection (hereinafter referred to as ACS) circuits, which are basic processing elements of Viterbi operations, are connected in series has been proposed (for example, see Patent Document 2). ). According to this method, compared with the case where a single ACS circuit is used recursively, it can be expected to increase the speed by reducing the processing time overhead in clock transfer. However, in this case, the number of stages of ACS circuits that pass through has not decreased, and there is a limit to improving the throughput.
本発明は上記事情に鑑みてなされたものであり、その目的は、演算の精度を良好に維持しつつ、演算の高速化を実現することができる演算装置を提供することにある。 The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an arithmetic device capable of realizing high-speed calculation while maintaining good calculation accuracy.
請求項1に記載の演算装置(12)は、複数の入力データのそれぞれに対し、前段の演算結果を用いる演算処理を所定の順序に従い実行する。その演算処理は、複数の入力データのうちいずれか1つの入力データと、前段の演算結果に所定の定数を加算したデータとを比較し、それら各データのうち予め定めた条件を満たす値を選択して演算結果として出力する加算比較選択演算である。上記演算装置は、複数の入力データに対する一連の演算処理を上記順序に沿って複数に分割し、それぞれを並列に実行する分割部(21、22、31〜34)と、上記順序が隣り合う2つの分割部のうち順序が後の分割部の各段から出力される演算結果のそれぞれに対し順序が前の分割部の最終段から出力される演算結果を一括比較して予め定めた条件を満たす値を選択して出力する統合処理を実行する統合部(23、35、41)と、を備える。 According to the first aspect of the present invention, the arithmetic device (12) executes arithmetic processing using the previous arithmetic result for each of the plurality of input data in a predetermined order. The calculation process compares any one of the plurality of input data with data obtained by adding a predetermined constant to the previous calculation result, and selects a value satisfying a predetermined condition from each of the data Thus, the addition comparison selection calculation is output as the calculation result. The arithmetic device divides a series of arithmetic processes for a plurality of input data into a plurality of parts in the order described above, and a division unit (21, 22, 31 to 34) that executes each in parallel, and the order is adjacent to 2 Out of the two division units, the calculation results output from the last stage of the previous division unit are collectively compared with the calculation results output from the respective division units of the later division unit, and the predetermined condition is satisfied. And an integration unit (23, 35, 41) that executes an integration process for selecting and outputting values .
このような構成によれば、一連の演算処理を複数に分割して並列に実行するので、一連の演算処理を逐次的に処理する場合に比べ、演算処理に要する時間が短縮される。また、統合部を設けたことにより、順序が後の分割部から出力される演算結果についても、順序が前の分割部における演算結果を考慮したものとなり、演算が不正確になることはない。したがって、本手段によれば、演算の精度を良好に維持しつつ、演算の高速化を実現することができる。 According to such a configuration, since a series of arithmetic processing is divided into a plurality of pieces and executed in parallel, the time required for the arithmetic processing is shortened compared to a case where the series of arithmetic processing is sequentially processed. Further, since the integration unit is provided, the calculation result output from the division unit having the next order also takes into consideration the calculation result in the division unit having the previous order, and the calculation does not become inaccurate. Therefore, according to the present means, it is possible to realize high-speed calculation while maintaining good calculation accuracy.
以下、本発明の複数の実施形態について図面を参照して説明する。なお、各実施形態において実質的に同一の構成には同一の符号を付して説明を省略する。
(第1実施形態)
以下、本発明の第1実施形態について図1〜図6を参照して説明する。
図1に示す距離検出装置1は、複数の撮像画像の視差を検出することによって撮像画像中の各点までの距離を検出する装置である。距離検出装置1では、動的計画法であるビタビアルゴリズムを複数の方向に適用することで複数の撮像画像を構成する画素間の対応関係、つまり視差を高精度に求めることができるように配慮されている。
Hereinafter, a plurality of embodiments of the present invention will be described with reference to the drawings. In each embodiment, substantially the same components are denoted by the same reference numerals and description thereof is omitted.
(First embodiment)
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS.
A
距離検出装置1は、乗用車などの車両に搭載されており、2つの撮像部2、3、処理部4および車両制御部5を備えている。なお、撮像部2、3は、2つに限らずともよく、例えば3つ以上設けられていてもよい。撮像部2、3は、それぞれ車両の進行方向が撮像範囲内となる周知のカメラとして構成されている。撮像部2、3は、ステレオカメラを構成しており、周期的に同時に撮像を行うように設定されている。
The
処理部4は、撮像部2、3により撮像された撮像画像を取得し、後述する各種処理を実行する。車両制御部5は、処理部4による処理結果を用いて車両を制御する処理を実行する。例えば、車両制御部5は、撮像部2、3による撮像範囲内の各点における距離の情報を処理部4から取得し、その距離の情報に基づいて物標位置および相対速度を認識する。そして、車両制御部5は、物標が走行に支障をきたすおそれがある場合、走行軌道を変更するなどの車両制御を実行する。
The
処理部4の機能は、例えば、図2に示すような構成により実現することができる。すなわち、この場合、処理部4は、バス6を介して通信可能に接続されたCPU7、DMAコントローラ8、メインメモリ9および専用アクセラレータ10により構成される。専用アクセラレータ10は、プログラム制御部11、コスト補正処理回路12、その他演算回路13、ロードストア制御回路14、ローカルメモリ15およびデータレジスタ16を備えている。
The function of the
上記構成の基本的な動作および機能は、次の通りである。すなわち、ホストCPU7は、専用アクセラレータ10に対し、対象とする処理依頼を通知する。また、メインメモリ9から処理対象のデータがDMAコントローラ8を介して専用アクセラレータ10のローカルメモリ15に順次転送される。
The basic operation and function of the above configuration are as follows. That is, the host CPU 7 notifies the
プログラム制御部11は、CPU7からの処理依頼に基づいて対象の処理プログラムを読み出し、各回路に対して対象処理や対象レジスタなどを指定する制御信号を送信する。ロードストア制御回路14は、上記制御信号に基づいてローカルメモリ15から複数データを単位とした配列をデータレジスタにロードまたはストアする。
The program control unit 11 reads a target processing program based on a processing request from the CPU 7 and transmits a control signal for specifying a target process, a target register, and the like to each circuit. The load /
コスト補正処理回路12およびその他演算回路13は、上記制御信号に基づいて対象レジスタのデータを読み出して処理を行い、レジスタに書き戻す。プログラム制御部11は、処理プログラムが完了すると、CPU7およびDMAコントローラ8に完了通知を転送する。また、ローカルメモリ15から完了した処理データがDMAコントローラ8を介してメインメモリ9に転送される。その後、ホストCPU7は、次の処理を判断し、次の処理依頼を専用アクセラレータ10に転送する。処理部4は、以上のような動作を繰り返すことにより、各種の処理を実行する。
The cost
本実施形態の距離検出装置1において、処理部4は、特開2015−114269号公報(以下、文献1とも呼ぶ)に開示された距離演算処理と同様の処理を行う。すなわち、図3に示すように、まず、ステップS1では、撮像部2、3により撮像された撮像画像が取得される。続くステップS2では、撮像画像のレンズによる画像の歪や姿勢のずれを補正するなどの処理が行われ、撮像された画像が平行化される。
In the
ステップS3では、対応点探索処理が実施される。対応点探索処理は、例えば撮像部2による撮像画像である基準画像を構成する各画素と、例えば撮像部3による撮像画像である比較画像を構成する各画素との対応関係、つまり同じものが写っている場所を関連付ける処理である。対応点探索処理の具体的な内容は、文献1に開示されているため、ここでの説明は省略する。続いて、ステップS4では、各画素における対応点の視差に応じて各画素に写っている物標までの距離が算出される。そして、ステップS5では、これらの画素と距離との対応データが車両制御部5に対して出力される。
In step S3, a corresponding point search process is performed. In the corresponding point search process, for example, the correspondence between each pixel constituting a reference image that is a captured image by the
ただし、本実施形態では、対応点探索処理に対し、以下に説明するような工夫を加えることで、演算の更なる高速化を実現している。すなわち、文献1の対応点探索処理では、1つ前までの最小コスト結果を再利用することで総当たり計算を二項比較の反復に直し、処理負荷の削減が図られている。そして、本願の発明者は、このような文献1では「s(u,v)=u-v」としているが、「s(u,v)=λ│u-v│」であれば線形性が保たれることを見出した。ただし、λは所定の定数である。この場合、前の結果にλを加算して次のノードの値と比較し、小さいほうの値を次の結果とする、といったことが繰り返される。つまり、この場合、ACS演算が基本の繰り返し単位となる。
However, in the present embodiment, further speeding up of the calculation is realized by adding a device as described below to the corresponding point search processing. In other words, in the corresponding point search process of
ここで、ACS演算を行うACS回路を直列に接続する従来技術を用いると、1つ前の結果を用いる演算および選択が直列に反復処理される、つまり逐次的に処理されるため、多段接続による回路遅延などに起因する速度低下の影響が大きい。そこで、このような逐次処理を分割して並列に実行することが考えられる。しかし、演算結果がその後の演算に依存するような逐次処理を、単純に分割して並列化すると、計算が不正確になり、精度が低下するといった懸念がある。 Here, when using the conventional technology in which ACS circuits for performing ACS operations are connected in series, the operation and selection using the previous result are repeatedly processed in series, that is, sequentially processed. The effect of speed reduction due to circuit delay and the like is large. Therefore, it can be considered that such sequential processing is divided and executed in parallel. However, there is a concern that if the sequential processing in which the calculation result depends on the subsequent calculation is simply divided and parallelized, the calculation becomes inaccurate and the accuracy is lowered.
これらの点を考慮し、本実施形態では、遷移コストの線形性を導入することを前提として、逐次処理を行う回路を複数のブロックに分割して並列動作させ、それら並列動作させた各ブロックにおける結果を一括比較して統合するようにした。具体的には、本実施形態のコスト補正処理回路12は、図4に示すような構成を有している。なお、コスト補正処理回路12は、複数の入力データのそれぞれに対し、前段の演算結果を用いる演算処理を所定の順序に従い実行する演算装置に相当する。
In consideration of these points, in this embodiment, on the premise of introducing the linearity of the transition cost, the circuit that performs the sequential processing is divided into a plurality of blocks and operated in parallel, and each of the blocks that are operated in parallel The results were compared and integrated. Specifically, the cost
コスト補正処理回路12は、逐次処理を行う回路を前半の分割部21と後半の分割部22とに分割して並列処理し、最後に統合部23により各段の結果を統合する。なお、以下では、コスト補正処理回路12に入力される入力データ配列の各データのことを入力データ[1],入力データ[2],…,入力データ[N]と呼び、コスト補正処理回路12から出力される出力データ配列の各データのことを出力データ[1],出力データ[2],…,出力データ[N]と呼ぶこととする。また、本実施形態では、これらのデータ数Nは、偶数となっている。
The cost
前半の分割部21は、入力データ[2]〜[N/2]をそれぞれ入力データとするACS回路24[2]〜24[N/2]を備えている。また、後半の分割部22は、入力データ[N/2+2]〜[N]をそれぞれ入力データとするACS回路24[N/2+2]〜24[N]を備えている。なお、以下では、ACS回路24[2]〜ACS回路24[N]のことをACS回路24と総称することがある。
The first-
ACS回路24は、図5に示すような構成となっている。すなわち、ACS回路24は、加算器25および比較選択器26を備えている。加算器25は、前段から出力される演算結果に定数λを加算する。なお、本実施形態では、定数λは正の値となっており、加算器25は純粋に加算を行うものである。また、定数λの値は、レジスタ設定などにより適宜変更することが可能となっている。比較選択器26は、加算器25の出力データと本段の入力データとを比較し、それら各データのうち予め定めた条件を満たす値を選択して本段の演算結果として出力する。具体的には、比較選択器26は、各データのうちいずれか小さいほうの値を選択して本段の演算結果として出力する。
The
例えば、ACS回路24[2]は、入力データ[1]に定数λを加算して入力データ[2]と比較し、小さいほうの値を本段の演算結果として出力するとともに、次段のACS回路24[3]に対し前段の演算結果として出力する。そして、次段のACS回路24[3]は、ACS回路24[2]から出力された前段の演算結果に定数λを加算して入力データ[3]と比較し、いずれか小さいほうの値を本段の演算結果として出力するとともに、次段のACS回路24[4]に対し前段の演算結果として出力する。 For example, the ACS circuit 24 [2] adds the constant λ to the input data [1] and compares it with the input data [2], and outputs the smaller value as the operation result of the main stage and the ACS of the next stage. Output to the circuit 24 [3] as the previous calculation result. Then, the ACS circuit 24 [3] in the next stage adds a constant λ to the operation result in the previous stage output from the ACS circuit 24 [2] and compares it with the input data [3]. While outputting as the calculation result of this stage, it outputs as the calculation result of the previous stage to the ACS circuit 24 [4] of the next stage.
また、ACS回路24[N/2+2]は、入力データ[N/2+1]に定数λを加算して入力データ[N/2+2]と比較し、小さいほうの値を本段の演算結果として統合部23に出力するとともに、次段のACS回路24[N/2+3]に対し前段の演算結果として出力する。そして、次段のACS回路24[N/2+3]は、ACS回路24[N/2+2]から出力された前段の演算結果に定数λを加算して入力データ[N/2+3]と比較し、いずれか小さいほうの値を本段の演算結果として統合部23に出力するとともに、次段のACS回路24[N/2+4]に対し前段の演算結果として出力する。 Further, the ACS circuit 24 [N / 2 + 2] adds a constant λ to the input data [N / 2 + 1] and compares it with the input data [N / 2 + 2], and uses the smaller value as the operation result of this stage. And output to the next stage ACS circuit 24 [N / 2 + 3] as the calculation result of the previous stage. Then, the next stage ACS circuit 24 [N / 2 + 3] adds the constant λ to the previous stage calculation result output from the ACS circuit 24 [N / 2 + 2] and compares it with the input data [N / 2 + 3]. The smaller value is output to the integration unit 23 as the calculation result of the main stage and is output as the calculation result of the previous stage to the ACS circuit 24 [N / 2 + 4] of the next stage.
このような構成において、入力データ[1]がそのまま出力データ[1]となり、前半の分割部21が備えるACS回路24[2]〜24[N/2]から出力される演算結果が、それぞれ出力データ[2]〜[N/2]となる。ただし、ACS回路24[N/2]から出力される演算結果は、統合部23にも与えられる。
In such a configuration, the input data [1] becomes the output data [1] as it is, and the calculation results output from the ACS circuits 24 [2] to 24 [N / 2] included in the
統合部23は、分割部22の各段の出力をそれぞれ入力データとするACS回路27[N/2+1]〜27[N]を備えている。なお、以下では、ACS回路27[N/2+1]〜ACS回路27[N]のことをACS回路27と総称することがある。
The integrating unit 23 includes ACS circuits 27 [N / 2 + 1] to 27 [N] that use the output of each stage of the dividing
ACS回路27は、図6に示すような構成となっている。すなわち、ACS回路27は、加算器28および比較選択器29を備えている。加算器28は、前半の最終段の結果、つまりACS回路24[N/2]から出力される演算結果にαを加算する。αは、後半における順番を表す数に定数λを乗じた値である。
The
例えば、ACS回路27[N/2+1]の場合、後半における順番が「1」であるため「α=1×λ」となり、ACS回路27[N/2+2]の場合、後半における順番が「2」であるため「α=2×λ」となり、ACS回路27[N]の場合、後半における順番が「N/2」であるため「α=(N/2)×λ」となる。したがって、ACS回路27[X]とすると、αは下記(1)で表される。
α=(X−N/2)×λ …(1)
For example, in the case of the ACS circuit 27 [N / 2 + 1], the order in the second half is “1”, so “α = 1 × λ”. In the case of the ACS circuit 27 [N / 2 + 2], the order in the second half is “2”. Therefore, “α = 2 × λ”, and in the case of the ACS circuit 27 [N], since the order in the latter half is “N / 2”, “α = (N / 2) × λ”. Therefore, when the ACS circuit 27 [X] is used, α is expressed by the following (1).
α = (X−N / 2) × λ (1)
比較選択器29は、加算器28の出力データと分割部22の各段から出力される演算結果とを比較し、いずれか小さいほうの値を後半の各段の最終結果として出力する。例えば、ACS回路27[N/2+1]は、前半の最終段の演算結果にα(=1×λ)を加算して入力データ[N/2+1]と比較し、小さいほうの値を本段の最終結果、つまり出力データ[N/2+1]として出力する。また、ACS回路27[N/2+2]は、前半の最終段の演算結果にα(=2×λ)を加算してACS回路24[N/2+2]から出力される演算結果と比較し、小さいほうの値を本段の最終結果、つまり出力データ[N/2+2]として出力する。
The
このようなACS回路27を有する統合部23は、分割部21の最終段の演算結果と比例関係にあるデータ(=加算器28の出力データ)と、分割部22の各段から出力される演算結果とを比較し、いずれか小さいほうの値を一連のACS演算処理における後半の各段の最終結果として出力するようになっている。つまり、統合部23は、後半の分割部22の各段から出力される演算結果のそれぞれに対し前半の分割部21の最終段から出力される演算結果を一括比較して統合するようになっている。
The integration unit 23 having such an
以上説明した本実施形態によれば、次のような効果が得られる。
本実施形態のコスト補正処理回路12は、入力データ配列の各入力データ[1]〜[N]のそれぞれに対し、前段の演算結果を用いるACS演算を入力データ配列の順序に従い実行する。そして、コスト補正処理回路12は、複数の入力データ[1]〜[N]に対する一連のACS演算処理を上記順序に沿って前半と後半に分割し、それぞれを並列に実行する分割部21、22と、後半の分割部22の各段から出力される演算結果のそれぞれに対し前半の分割部21の最終段から出力される演算結果を一括比較して統合する統合部23と、を備えている。
According to this embodiment described above, the following effects can be obtained.
The cost
このような構成によれば、一連のACS演算処理を2つに分割して並列に実行するので、一連のACS演算処理を逐次的に処理する場合に比べ、回路遅延の短縮などを期待することができ、その結果、演算処理に要する時間が約半分程度に短縮される。しかも一連のACS演算処理を単純に並列化しただけでなく、統合部23を設けているため、後半の分割部22から出力される演算結果についても、前半の分割部21での演算結果を考慮したものとなり、演算が不正確になるおそれはない。したがって、本実施形態によれば、演算の精度を良好に維持しつつ、演算の高速化を実現することができる。このような演算の高速化、つまり処理時間の削減による効果は、車載のような組み込み環境において、一層有益なものとなる。
According to such a configuration, since a series of ACS arithmetic processing is divided into two and executed in parallel, a reduction in circuit delay or the like is expected compared to a case where a series of ACS arithmetic processing is sequentially processed. As a result, the time required for the arithmetic processing is reduced to about half. In addition to simply parallelizing a series of ACS calculation processes, since the integration unit 23 is provided, the calculation result in the
(第2実施形態)
第1実施形態では、コスト補正処理回路12は、複数の入力データ[1]〜[N]に対する一連のACS演算処理を前半と後半の2つに分割していたが、この分割数は3つ以上でもよい。本実施形態では、一連のACS演算処理を4つに分割した2つの構成例について図7および図8を参照して説明する。
(Second Embodiment)
In the first embodiment, the cost
<第1構成例>
図7に示すように、第1構成例では、一連のACS演算処理を入力データ配列の順序に沿って4つの分割部31〜34に分割して並列処理し、最後に統合部35により各段の結果を統合する。分割部31は、入力データ[2]〜[N/4]をそれぞれ入力データとするACS回路24[2]〜24[N/4]を備えている。分割部32は、入力データ[N/4+2]〜[N/2]をそれぞれ入力データとするACS回路24[N/4+2]〜24[N/2]を備えている。
<First configuration example>
As shown in FIG. 7, in the first configuration example, a series of ACS arithmetic processing is divided into four
分割部33は、入力データ[N/2+2]〜[3N/4]をそれぞれ入力データとするACS回路24[N/2+2]〜24[3N/4]を備えている。分割部34は、入力データ[3N/4+2]〜[N]をそれぞれ入力データとするACS回路24[3N/4+2]〜24[N]を備えている。
The dividing
このような構成において、入力データ[1]がそのまま出力データ[1]となり、分割部31が備えるACS回路24[2]〜24[N/4]から出力される演算結果が、それぞれ出力データ[2]〜[N/4]となる。ただし、ACS回路24[N/4]から出力される演算結果は、統合部35にも与えられる。
In such a configuration, the input data [1] becomes the output data [1] as it is, and the calculation results output from the ACS circuits 24 [2] to 24 [N / 4] included in the dividing
統合部35は、第1統合ブロック35a、第2統合ブロック35bおよび第3統合ブロック35cを備えている。第1統合ブロック35aは、分割部32の各段の出力をそれぞれ入力データとするACS回路27[N/4+1]〜27[N/2]を備えている。ACS回路27[N/4+1]〜27[N/2]の加算器28は、分割部31の最終段の結果、つまりACS回路24[N/4]から出力される演算結果にαを加算するようになっている。したがって、第1統合ブロック35aは、分割部31の最終段の演算結果と比例関係にあるデータと、分割部32の各段から出力される演算結果とを比較し、いずれか小さいほうの値を選択して出力データ[N/4+1]〜[N/2]として出力する。
The
第2統合ブロック35bは、分割部33の各段の出力をそれぞれ入力データとするACS回路27[N/2+1]〜27[3N/4]を備えている。ACS回路27[N/2+1]〜27[3N/4]の加算器28は、第1統合ブロック35aの最終段の結果、つまりACS回路27[N/2]から出力される演算結果にαを加算するようになっている。したがって、第2統合ブロック35bは、分割部32の最終段から出力されて第1統合ブロック35aを介して統合が行われた後の演算結果である出力データ[N/2]と比例関係にあるデータと、分割部33の各段から出力される演算結果とを比較し、いずれか小さいほうの値を選択して出力データ[N/2+1]〜[3N/4]として出力する。
The second
第3統合ブロック35cは、分割部34の各段の出力をそれぞれ入力データとするACS回路27[3N/4+1]〜27[N]を備えている。ACS回路27[3N/4+1]〜27[N]の加算器28は、第2統合ブロック35bの最終段の結果、つまりACS回路27[3N/4]から出力される演算結果にαを加算するようになっている。したがって、第3統合ブロック35cは、分割部33の最終段から出力されて第2統合ブロック35bを介して統合が行われた後の演算結果である出力データ[3N/4]と比例関係にあるデータと、分割部34の各段から出力される演算結果とを比較し、いずれか小さいほうの値を選択して出力データ[3N/4+1]〜[N]として出力する。
The third
このように、第1構成例の統合部35は、順序が1番目、2番目の分割部31、32を組にして統合処理を行い、順序が3番目以降の分割部33、34の各段から出力される演算結果のそれぞれに対し、それらより順序が1つ前の分割部から出力されて統合処理が行われた後の演算結果を一括比較して統合し、最終結果として出力するようになっている。なお、この場合、統合部35では、「(1)第1統合ブロック35aによる統合→(2)第2統合ブロック35bによる統合→(3)第3統合ブロック35cによる統合」という順に、3段階で統合処理が行われることになる。
As described above, the
<第2構成例>
図8に示すように、第2構成例では、第1構成例と同様に、一連のACS演算処理を入力データ配列の順序に沿って4つの分割部31〜34に分割して並列処理し、最後に統合部41により各段の結果を統合する。統合部41は、第1統合ブロック41a、第2統合ブロック41bおよび第3統合ブロック41cを備えている。
<Second configuration example>
As shown in FIG. 8, in the second configuration example, as in the first configuration example, a series of ACS calculation processing is divided into four
第1統合ブロック41aは、第1構成例の第1統合ブロック35aと同様の構成となっている。したがって、第1統合ブロック41aは、分割部31の最終段の演算結果と比例関係にあるデータと、分割部32の各段から出力される演算結果とを比較し、いずれか小さいほうの値を選択して出力データ[N/4+1]〜[N/2]として出力する。
The first
第2統合ブロック41bは、分割部34の各段の出力をそれぞれ入力データとするACS回路27[3N/4+1]〜27[N]を備えている。ACS回路27[3N/4+1]〜27[N]の加算器28は、分割部33の最終段の結果、つまりACS回路24[3N/4]から出力される演算結果にαを加算するようになっている。したがって、第2統合ブロック41bは、分割部33の最終段の演算結果と比例関係にあるデータと、分割部34の各段から出力される演算結果とを比較し、いずれか小さいほうの値を選択して出力する。
The second
第3統合ブロック41cは、分割部33の各段の出力をそれぞれ入力データとするACS回路27[N/2+1]〜27[3N/4]と、第2統合ブロック41bの各段の出力をそれぞれ入力データとするACS回路42[3N/4+1]〜42[N]と、を備えている。なお、ACS回路42[3N/4+1]〜42[N]は、ACS回路27と同様の構成である。また、以下では、ACS回路42[3N/4+1]〜42[N]のことをACS回路42と総称することがある。
The third
ACS回路27[N/2+1]〜27[3N/4]およびACS回路42[3N/4+1]〜42[N]の加算器28は、第1統合ブロック41aの最終段の結果、つまりACS回路27[N/2]から出力される演算結果にαを加算するようになっている。したがって、第3統合ブロック41cは、分割部32の最終段から出力されて第1統合ブロック41aを介して統合が行われた後の演算結果である出力データ[N/2]と比例関係にあるデータと、分割部33の各段から出力される演算結果とを比較し、いずれか小さいほうの値を選択して出力データ[N/2+1]〜[3N/4]として出力する。また、第3統合ブロック41cは、出力データ[N/2]と比例関係にあるデータと、分割部34の各段から出力されて第2統合ブロック41bを介して統合が行われた後の演算結果とを比較し、いずれか小さいほうの値を選択して出力データ[3N/4+1]〜[N]として出力する。
The
このように、第2構成例の統合部41は、順序が隣り合う2つの分割部31、32を組にして統合処理を行うとともに、順序が隣り合う2つの分割部33、34を組にして統合処理を行う。そして、統合部41は、統合処理が行われた2つの組に対してさらに統合処理を行い、最終結果として出力するようになっている。なお、この場合、統合部41では、「(1)第1統合ブロック41aによる統合および第2統合ブロック41bによる統合→(2)第3統合ブロック41cによる統合」という順に、2段階で統合処理が行われることになる。
As described above, the
以上説明した本実施形態によっても、第1実施形態と同様に、演算の精度を良好に維持しつつ、演算の高速化を実現することができる。なお、第1構成例および第2構成例は、それぞれにメリットがある。すなわち、第1構成例の統合部35は、第2構成例の統合部41に比べ、ACS回路の数を少なくできるため、その回路規模を小さくすることができる。また、第2構成例の統合部41は、第1構成例の統合部35に比べ、ACS回路を通過する段数を小さく抑えることができるため、演算処理に要する時間を更に短縮することができる。したがって、一連のACS演算処理の分割数を4以上にする場合、このような点を考慮したうえで、回路規模や処理時間などの仕様を満たすように、最適な構成を用いればよい。
According to the present embodiment described above, as in the first embodiment, it is possible to realize high-speed calculation while maintaining good calculation accuracy. Each of the first configuration example and the second configuration example has merits. That is, the
(その他の実施形態)
なお、本発明は上記し且つ図面に記載した各実施形態に限定されるものではなく、その要旨を逸脱しない範囲で任意に変形、組み合わせ、あるいは拡張することができる。
上記各実施形態では、ACS演算は「加算→最小比較」であったが、「減算→最大比較」としてもよい。すなわち、上記各実施形態では定数λを正の値としていたが、これを負の値としてもよい。そうすると、加算器25、28は、実質的に減算を行うものとなる。この場合、比較選択器26、29は、2つの入力値のうち、いずれか大きいほうの値を選択して演算結果として出力すればよい。つまり、この場合、いずれか大きい値が「予め定めた条件を満たす値」となる。
上記各実施形態では、一連のACS演算処理を分割する際、それぞれの分割部を等分するようにしていたが、必ずしも等分する必要はない。また、上記各実施形態では、入力データ配列のデータ数Nは偶数としていたが、データ数Nは奇数でもよい。
(Other embodiments)
In addition, this invention is not limited to each embodiment described above and described in drawing, In the range which does not deviate from the summary, it can change, combine or expand arbitrarily.
In each of the above embodiments, the ACS operation is “addition → minimum comparison”, but may be “subtraction → maximum comparison”. That is, in each of the above embodiments, the constant λ is a positive value, but it may be a negative value. Then, the
In each of the above embodiments, when dividing a series of ACS calculation processes, each division unit is equally divided, but it is not always necessary to equally divide. In each of the above embodiments, the number of data N in the input data array is an even number, but the number of data N may be an odd number.
上記各実施形態では一連のACS演算処理を、入力データ配列の順序に沿って複数に分割していたが、これに限らずともよく、所定の順序に沿って複数に分割すればよい。
統合部23、35、41のACS回路のうち、後段部分を省略することも可能である。例えば、統合部における所定のACS回路での比較選択において加算器側のデータが最小値ではないとされて一旦棄却された場合、その後段のACS回路での比較選択においても必ず加算器側のデータは棄却される。そこで、予め実験やシミュレーションなどで、統合部の後半のある所で非常に高い確率で加算器側のデータが棄却されることが判明していれば、それ以降はACS回路を省略し、前段の演算結果を一括比較して統合する処理を行わないことも可能である。このようにすれば、回路規模を小さくできるという効果が得られる。なお、このようにした場合でも、大きく演算の精度が低下することはない。
In each of the embodiments described above, a series of ACS calculation processes are divided into a plurality along the order of the input data array. However, the present invention is not limited to this, and may be divided into a plurality according to a predetermined order.
Of the ACS circuits of the
12…コスト補正処理回路、21、22、31〜34…分割部、23、35、41…統合部。 12 ... Cost correction processing circuit, 21, 22, 31-34 ... division unit, 23, 35, 41 ... integration unit.
Claims (4)
前記演算処理は、前記複数の入力データのうちいずれか1つの入力データと、前段の演算結果に所定の定数を加算したデータとを比較し、それら各データのうち予め定めた条件を満たす値を選択して演算結果として出力する加算比較選択演算であり、
前記複数の入力データに対する一連の前記演算処理を、前記順序に沿って複数に分割し、それぞれを並列に実行する分割部(21、22、31〜34)と、
前記順序が隣り合う2つの分割部のうち前記順序が後の分割部の各段から出力される演算結果のそれぞれに対し前記順序が前の分割部の最終段から出力される演算結果を一括比較して予め定めた条件を満たす値を選択して出力する統合処理を実行する統合部(23、35、41)と、
を備える演算装置。 An arithmetic device (12) that executes arithmetic processing using a previous operation result according to a predetermined order for each of a plurality of input data,
The calculation process compares any one of the plurality of input data with data obtained by adding a predetermined constant to the previous calculation result, and sets a value satisfying a predetermined condition among the data. It is an addition comparison selection operation that is selected and output as the operation result.
A division unit (21, 22, 31 to 34) that divides a series of the arithmetic processing on the plurality of input data into a plurality of pieces along the order and executes them in parallel;
Comparing the operation results output from the last stage of the division unit with the previous order for each operation result output from each stage of the division unit with the next order among the two division units having the adjacent order. An integration unit (23, 35, 41) for executing an integration process of selecting and outputting values satisfying a predetermined condition ;
An arithmetic device comprising:
前記統合部(23)は、後半の前記分割部の各段から出力される演算結果のそれぞれに対し、前半の前記分割部の最終段から出力される演算結果を一括比較して予め定めた条件を満たす値を選択して出力する請求項1に記載の演算装置。 The dividing unit (21, 22) divides a series of the arithmetic processing for the plurality of input data into two parts of the first half and the second half of the order, and executes each in parallel.
The integration unit (23) preliminarily compares a calculation result output from the final stage of the first half of the division unit with a predetermined condition for each of the calculation results output from the second stage of the division unit. The arithmetic unit according to claim 1, wherein a value satisfying the condition is selected and output .
前記統合部(35)は、前記順序が3番目以降の分割部の各段から出力される演算結果のそれぞれに対し、当該分割部より前記順序が1つ前の分割部から出力されて前記統合が行われた後の演算結果を一括比較して予め定めた条件を満たす値を選択して出力する請求項1に記載の演算装置。 The division unit (31 to 34) divides a series of the arithmetic processing for the plurality of input data into three or more along the order, and executes each in parallel.
The integration unit (35) outputs the integration result output from the division unit one order earlier than the division unit with respect to each of the calculation results output from each stage of the division unit after the third order. The arithmetic unit according to claim 1, wherein the calculation results after the operation are performed are collectively compared and a value satisfying a predetermined condition is selected and output .
前記統合部(41)は、前記順序が隣り合う2つの分割部を組に対して前記統合処理を実行し、前記統合処理が実行された組のうち順序が隣り合う2つの組に対してさらに前記統合処理を実行する請求項1に記載の演算装置。 The division unit (31 to 34) divides a series of the arithmetic processing for the plurality of input data into three or more along the order, and executes each in parallel.
The integration unit (41) performs the integration process on a group of two division units adjacent to each other in the order, and further performs a combination on two groups adjacent in the order among the groups on which the integration process is executed. The arithmetic device according to claim 1, wherein the integration process is executed.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016079586A JP6583111B2 (en) | 2016-04-12 | 2016-04-12 | Arithmetic unit |
| PCT/JP2017/002127 WO2017179260A1 (en) | 2016-04-12 | 2017-01-23 | Computation device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016079586A JP6583111B2 (en) | 2016-04-12 | 2016-04-12 | Arithmetic unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2017191405A JP2017191405A (en) | 2017-10-19 |
| JP6583111B2 true JP6583111B2 (en) | 2019-10-02 |
Family
ID=60042510
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016079586A Expired - Fee Related JP6583111B2 (en) | 2016-04-12 | 2016-04-12 | Arithmetic unit |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP6583111B2 (en) |
| WO (1) | WO2017179260A1 (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2003085566A (en) * | 2001-09-10 | 2003-03-20 | Nippon Hoso Kyokai <Nhk> | Corresponding point search method and matching device using the same |
-
2016
- 2016-04-12 JP JP2016079586A patent/JP6583111B2/en not_active Expired - Fee Related
-
2017
- 2017-01-23 WO PCT/JP2017/002127 patent/WO2017179260A1/en not_active Ceased
Also Published As
| Publication number | Publication date |
|---|---|
| JP2017191405A (en) | 2017-10-19 |
| WO2017179260A1 (en) | 2017-10-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10909418B2 (en) | Neural network method and apparatus | |
| US10474908B2 (en) | Unified deep convolutional neural net for free-space estimation, object detection and object pose estimation | |
| US20190095212A1 (en) | Neural network system and operating method of neural network system | |
| JP6921079B2 (en) | Neural network equipment, vehicle control systems, decomposition processing equipment, and programs | |
| US20190065934A1 (en) | Apparatus and methods for forward propagation in fully connected layers of convolutional neural networks | |
| CN108074211B (en) | Image processing device and method | |
| CN114066958B (en) | Method and device for predicting target depth information, electronic device and storage medium | |
| CN115136149B (en) | Information processing apparatus and in-vehicle control apparatus | |
| US20200401871A1 (en) | Object detection system and object detection method | |
| JP2021532449A (en) | Lane attribute detection | |
| JP6986503B2 (en) | Electronic control device, neural network update system | |
| US20230101250A1 (en) | Method for generating a graph structure for training a graph neural network | |
| US10026148B2 (en) | Image recognition method, image recognition device and image recognition program | |
| CN111989541A (en) | Stereo camera device | |
| US10229472B2 (en) | Image processing apparatus, image processing method, and vehicle control apparatus | |
| JP6583111B2 (en) | Arithmetic unit | |
| CN113447031B (en) | Slope point screening method, terminal device and medium, and slope calculation method and system | |
| US20120281930A1 (en) | Flexible pixel-neighbourhood-based reconfigurable computation device | |
| US20220309351A1 (en) | Structure transformation device, structure transformation method, and computer readable medium | |
| CN110097183B (en) | Information processing method and information processing system | |
| CN116385369A (en) | Depth image quality evaluation method, device, electronic equipment and storage medium | |
| Ćorić et al. | Implementation of different image edge detection algorithms on a real embedded ADAS platform | |
| US20240256901A1 (en) | Information processing apparatus, information processing method and non-transitory computer-readable storage medium | |
| CN114676211B (en) | Method, device, equipment and storage medium for generating vehicle driving data | |
| CN116342911B (en) | Foreground target detection method and device based on Gaussian mixture model, and electronic equipment |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180316 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190416 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190521 |
|
| 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: 20190806 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190819 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 6583111 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |