JP7370575B2 - Calculation device, method and program for calculating the absolute value of complex numbers - Google Patents

Calculation device, method and program for calculating the absolute value of complex numbers Download PDF

Info

Publication number
JP7370575B2
JP7370575B2 JP2019198315A JP2019198315A JP7370575B2 JP 7370575 B2 JP7370575 B2 JP 7370575B2 JP 2019198315 A JP2019198315 A JP 2019198315A JP 2019198315 A JP2019198315 A JP 2019198315A JP 7370575 B2 JP7370575 B2 JP 7370575B2
Authority
JP
Japan
Prior art keywords
complex number
absolute value
unit
calculation
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019198315A
Other languages
Japanese (ja)
Other versions
JP2021071934A (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.)
Niigata University NUC
Original Assignee
Niigata University NUC
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 Niigata University NUC filed Critical Niigata University NUC
Priority to JP2019198315A priority Critical patent/JP7370575B2/en
Publication of JP2021071934A publication Critical patent/JP2021071934A/en
Application granted granted Critical
Publication of JP7370575B2 publication Critical patent/JP7370575B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Complex Calculations (AREA)

Description

特許法第30条第2項適用 発行者名:一般社団法人映像情報メディア学会、刊行物名:映像情報メディア学会技術報告 VOL.43,NO.26、発行年月日:2019年8月19日 集会名:サマーセミナー2019「ビジョン技術の今を知り、未来を切り拓く」、主催:公益社団法人精密工学会 画像応用技術専門委員会 共催:一般社団法人映像情報メディア学会 メディア工学研究会、開催日:2019年8月26日Article 30, Paragraph 2 of the Patent Act applies Publisher name: Institute of Image Information and Media Engineers, Publication name: Institute of Image Information and Media Engineers Technical Report VOL. 43, NO. 26. Publication date: August 19, 2019 Meeting name: Summer Seminar 2019 “Understanding the current state of vision technology and opening up the future”, Sponsor: Japan Society for Precision Engineering, Image Application Technology Specialist Committee Co-sponsor: General Institute of Image Information and Television Engineers, Media Engineering Research Group, Date: August 26, 2019

本発明は、計算装置、複素数の絶対値の計算方法及びプログラムに関する。 The present invention relates to a calculation device, a method for calculating the absolute value of a complex number, and a program.

画像処理をはじめとする様々な分野において、複素数の信号処理に対する需用がある。例えば特許文献1は、複素数の絶対値を近似により計算する手法を開示している。 There is a need for complex signal processing in various fields including image processing. For example, Patent Document 1 discloses a method of calculating the absolute value of a complex number by approximation.

特開平02-170274号公報Japanese Patent Application Publication No. 02-170274

複素数の絶対値は、理論的には、実部と虚部の自乗和の平方根を計算することにより得られる。そのため、計算機において複素数の絶対値を計算するためには、自乗及び平方根の計算が必要になる。しかしながら、自乗の計算は、定数乗算に比べて大きな回路規模及び電力消費を必要とする。一方で、平方根の計算は、多項式近似、区分線形近似(折れ線近似)、CORDIC(Coordinate Rotation Digital Computer)等のような近似計算の手法を利用することができるが、いずれも複素数の実部と虚部の自乗和の計算を避けることはできない。そのため、自乗及び平方根の計算を必要とせずに複素数の絶対値を計算することが求められている。 Theoretically, the absolute value of a complex number can be obtained by calculating the square root of the sum of the squares of the real and imaginary parts. Therefore, in order to calculate the absolute value of a complex number on a computer, it is necessary to calculate the square and the square root. However, calculating the square requires a larger circuit size and power consumption than constant multiplication. On the other hand, to calculate the square root, approximate calculation methods such as polynomial approximation, piecewise linear approximation (broken line approximation), CORDIC (Coordinate Rotation Digital Computer), etc. can be used, but all of these methods calculate the real and imaginary parts of complex numbers. The calculation of the sum of squares of parts cannot be avoided. Therefore, there is a need to calculate the absolute value of a complex number without requiring the calculation of squares and square roots.

本発明は、上記実情に鑑みてなされたものであり、自乗及び平方根の計算を必要とせずに複素数の絶対値を計算することが可能な計算装置、複素数の絶対値の計算方法及びプログラムを提供することを目的とする。 The present invention has been made in view of the above-mentioned circumstances, and provides a calculation device, a method for calculating the absolute value of a complex number, and a program that can calculate the absolute value of a complex number without requiring the calculation of squares and square roots. The purpose is to

上記目的を達成するため、本発明の第1の観点に係る計算装置は、
与えられた角度の正弦値と余弦値とのうちの一方と計算対象となる複素数の実部との積と、前記角度の正弦値と余弦値とのうちの他方と前記複素数の虚部との積と、の和を計算し、前記角度の正弦値と余弦値とのうちの前記他方と前記複素数の実部との積と、前記角度の正弦値と余弦値とのうちの前記一方と前記複素数の虚部との積と、の差を計算し、更に、前記和の絶対値と前記差の絶対値とを加算する計算処理を、異なる複数の角度のそれぞれについて実行する計算部と、
前記計算部が前記複数の角度のそれぞれについて前記計算処理を実行することにより得られた複数の値のうちの最大値を、前記複素数の絶対値に対応する値と決定する決定部と、を備える。
In order to achieve the above object, a computing device according to a first aspect of the present invention includes:
The product of one of the sine and cosine values of a given angle and the real part of the complex number to be calculated, and the product of the other of the sine and cosine values of the angle and the imaginary part of the complex number. and the product of the other of the sine and cosine values of the angle and the real part of the complex number, and the product of the one of the sine and cosine values of the angle and the a calculation unit that calculates the difference between the product of the complex number and the imaginary part thereof, and further adds the absolute value of the sum and the absolute value of the difference for each of a plurality of different angles;
a determining unit that determines the maximum value of the plurality of values obtained by the calculating unit executing the calculation process for each of the plurality of angles as the value corresponding to the absolute value of the complex number. .

前記計算部は、固定小数点演算により、前記複数の角度のそれぞれについて前記計算処理を実行しても良い。 The calculation unit may perform the calculation process for each of the plurality of angles using fixed-point arithmetic.

前記計算装置は、前記複数の角度の正弦値及び余弦値が少なくとも格納された三角比テーブルを記憶する記憶部、を更に備え、
前記計算部は、前記記憶部に記憶された前記三角比テーブルを参照して、前記計算処理を実行しても良い。
The calculation device further includes a storage unit that stores a trigonometric ratio table in which at least sine values and cosine values of the plurality of angles are stored,
The calculation unit may perform the calculation process by referring to the trigonometric ratio table stored in the storage unit.

前記計算装置は、前記複数の角度の個数を設定する設定部、を更に備え、
前記計算部は、前記設定部により設定された前記個数の前記複数の角度のそれぞれについて、前記計算処理を実行しても良い。
The calculation device further includes a setting unit that sets the number of the plurality of angles,
The calculation unit may perform the calculation process for each of the plurality of angles of the number set by the setting unit.

前記複数の角度のそれぞれは、0からπ/2までの範囲で互いに等しい間隔を空けた角度であっても良い。 Each of the plurality of angles may be an angle spaced at equal intervals in a range from 0 to π/2.

前記計算装置は、前記決定部により決定された前記複素数の絶対値に対応する値に基づいて、信号処理を実行する信号処理部と、
前記信号処理部により実行された前記信号処理の結果を示す出力情報を出力する出力部と、を更に備えても良い。
The calculation device includes a signal processing unit that performs signal processing based on a value corresponding to the absolute value of the complex number determined by the determination unit;
The apparatus may further include an output section that outputs output information indicating a result of the signal processing performed by the signal processing section.

前記信号処理部は、前記信号処理として、観測画像から復元画像を復元する画像復元処理を実行し、
前記出力部は、前記出力情報として、前記復元画像を出力しても良い。
The signal processing unit executes image restoration processing for restoring a restored image from an observed image as the signal processing,
The output unit may output the restored image as the output information.

前記信号処理部は、前記画像復元処理において、繰り返しソフト閾値アルゴリズムを用いて前記観測画像から係数ベクトルを推定し、推定された前記係数ベクトルから前記復元画像を復元しても良い。 In the image restoration process, the signal processing unit may estimate a coefficient vector from the observed image using an iterative soft threshold algorithm, and restore the restored image from the estimated coefficient vector.

上記目的を達成するため、本発明の第2の観点に係る複素数の絶対値の計算方法は、
計算装置が実行する計算方法であって、
与えられた角度の正弦値と余弦値とのうちの一方と計算対象となる複素数の実部との積と、前記角度の正弦値と余弦値とのうちの他方と前記複素数の虚部との積と、の和を計算し、前記角度の正弦値と余弦値とのうちの前記他方と前記複素数の実部との積と、前記角度の正弦値と余弦値とのうちの前記一方と前記複素数の虚部との積と、の差を計算し、更に、前記和の絶対値と前記差の絶対値とを加算する計算処理を、異なる複数の角度のそれぞれについて実行し、
前記複数の角度のそれぞれについて前記計算処理を実行することにより得られた複数の値のうちの最大値を、前記複素数の絶対値に対応する値と決定する。
In order to achieve the above object, the method for calculating the absolute value of a complex number according to the second aspect of the present invention is as follows:
A calculation method performed by a calculation device, comprising:
The product of one of the sine and cosine values of a given angle and the real part of the complex number to be calculated, and the product of the other of the sine and cosine values of the angle and the imaginary part of the complex number. and the product of the other of the sine and cosine values of the angle and the real part of the complex number, and the product of the one of the sine and cosine values of the angle and the Calculating the product of the complex number with the imaginary part and the difference, and further performing a calculation process of adding the absolute value of the sum and the absolute value of the difference for each of a plurality of different angles,
The maximum value of the plurality of values obtained by executing the calculation process for each of the plurality of angles is determined as the value corresponding to the absolute value of the complex number.

上記目的を達成するため、本発明の第3の観点に係るプログラムは、
コンピュータを、
与えられた角度の正弦値と余弦値とのうちの一方と計算対象となる複素数の実部との積と、前記角度の正弦値と余弦値とのうちの他方と前記複素数の虚部との積と、の和を計算し、前記角度の正弦値と余弦値とのうちの前記他方と前記複素数の実部との積と、前記角度の正弦値と余弦値とのうちの前記一方と前記複素数の虚部との積と、の差を計算し、更に、前記和の絶対値と前記差の絶対値とを加算する計算処理を、異なる複数の角度のそれぞれについて実行する計算部、
前記計算部が前記複数の角度のそれぞれについて前記計算処理を実行することにより得られた複数の値のうちの最大値を、前記複素数の絶対値に対応する値と決定する決定部、として機能させる。
In order to achieve the above object, a program according to a third aspect of the present invention,
computer,
The product of one of the sine and cosine values of a given angle and the real part of the complex number to be calculated, and the product of the other of the sine and cosine values of the angle and the imaginary part of the complex number. and the product of the other of the sine and cosine values of the angle and the real part of the complex number, and the product of the one of the sine and cosine values of the angle and the a calculation unit that calculates the difference between the product of the complex number and the imaginary part thereof, and further adds the absolute value of the sum and the absolute value of the difference for each of a plurality of different angles;
The calculation unit functions as a determination unit that determines a maximum value among the plurality of values obtained by performing the calculation processing for each of the plurality of angles as a value corresponding to the absolute value of the complex number. .

本発明によれば、自乗及び平方根の計算を必要とせずに複素数の絶対値を計算することができる。 According to the present invention, the absolute value of a complex number can be calculated without requiring calculation of squares and square roots.

本発明の実施形態1に係る計算装置の構成を示すブロック図である。1 is a block diagram showing the configuration of a computing device according to Embodiment 1 of the present invention. FIG. 実施形態1に係る計算装置に記憶されている三角比テーブルの例を示す図である。FIG. 3 is a diagram showing an example of a trigonometric ratio table stored in the calculation device according to the first embodiment. 複素数の絶対値と実部及び虚部との理論的な関係を3次元座標により示す図である。FIG. 2 is a diagram showing the theoretical relationship between the absolute value of a complex number and the real and imaginary parts using three-dimensional coordinates. 実施形態1において複素数の絶対値を計算するために用いられる関数と実部及び虚部との関係を3次元座標により示す図である。FIG. 3 is a diagram showing the relationship between a function used to calculate the absolute value of a complex number and a real part and an imaginary part in the first embodiment using three-dimensional coordinates. 実施形態1に係る計算装置により実行される複素数の絶対値の計算処理の流れを示すフローチャートである。7 is a flowchart showing the flow of calculation processing of the absolute value of a complex number executed by the calculation device according to the first embodiment. 本発明の実施形態2に係る計算装置の構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of a computing device according to Embodiment 2 of the present invention. 実施形態2に係る計算装置により実行される画像復元処理の概要を示す図である。3 is a diagram illustrating an overview of image restoration processing executed by a computing device according to a second embodiment. FIG. 実施形態2に係る計算装置により実行される画像復元処理の流れを示すフローチャートである。7 is a flowchart showing the flow of image restoration processing executed by the computing device according to the second embodiment. (a)は、複素数の絶対値の近似手法を用いなかった場合におけるソフト閾値関数の出力の絶対値を3次元座標により示す図である。(b)は、実施形態2に係る近似手法を用いた場合におけるソフト閾値関数の出力の絶対値を3次元座標により示す図である。(c)は、(a)と(b)との差分を示す図である。(a) is a diagram showing the absolute value of the output of the soft threshold function using three-dimensional coordinates when the approximation method for the absolute value of a complex number is not used. (b) is a diagram showing the absolute value of the output of the soft threshold function using three-dimensional coordinates when the approximation method according to the second embodiment is used. (c) is a diagram showing the difference between (a) and (b). 本発明の性能評価におけるシミュレーションの諸元を示す図である。It is a figure showing the specifications of simulation in performance evaluation of the present invention. 本発明の性能評価における画像復元処理の諸元を示す図である。FIG. 3 is a diagram showing specifications of image restoration processing in performance evaluation of the present invention. (a)は、性能評価に用いた原画像の実部を示す図である。(b)は、性能評価に用いた観測画像の実部を示す図である。(c)は、近似手法を用いずに複素数の絶対値を計算した場合における復元画像の実部を示す図である。(d)は、実施形態2に係る近似手法を用いて複素数の絶対値を計算した場合における復元画像の実部を示す図である。(a) is a diagram showing the real part of the original image used for performance evaluation. (b) is a diagram showing the real part of the observed image used for performance evaluation. (c) is a diagram showing the real part of a restored image when the absolute value of a complex number is calculated without using an approximation method. (d) is a diagram showing the real part of a restored image when the absolute value of a complex number is calculated using the approximation method according to the second embodiment. (a)は、性能評価に用いた原画像の虚部を示す図である。(b)は、性能評価に用いた観測画像の虚部を示す図である。(c)は、近似手法を用いずに複素数の絶対値を計算した場合における復元画像の虚部を示す図である。(d)は、実施形態2に係る近似手法を用いて複素数の絶対値を計算した場合における復元画像の虚部を示す図である。(a) is a diagram showing the imaginary part of the original image used for performance evaluation. (b) is a diagram showing the imaginary part of the observed image used for performance evaluation. (c) is a diagram showing the imaginary part of a restored image when the absolute value of a complex number is calculated without using an approximation method. (d) is a diagram showing the imaginary part of the restored image when the absolute value of a complex number is calculated using the approximation method according to the second embodiment. 近似手法を用いずに複素数の絶対値を計算した場合における復元画像と、実施形態2に係る近似手法を用いて複素数の絶対値を計算した場合における復元画像と、の間におけるピーク信号対雑音比の差分のヒストグラムを示す図である。Peak signal-to-noise ratio between a restored image when the absolute value of a complex number is calculated without using an approximation method and a restored image when the absolute value of a complex number is calculated using the approximation method according to the second embodiment It is a figure which shows the histogram of the difference of. 固定小数点演算の小数部の幅を変えた場合における復元画像のピーク信号対雑音比の推移を示す図である。FIG. 6 is a diagram showing a change in the peak signal-to-noise ratio of a restored image when the width of the decimal part of fixed-point calculation is changed. 固定小数点演算の小数部の幅を変えた場合における素子の使用量を示す図である。FIG. 7 is a diagram showing the amount of elements used when the width of the decimal part of fixed-point arithmetic is changed.

以下、本発明の実施形態について、図面を参照して説明する。なお、図中同一又は相当する部分には同一符号を付す。 Embodiments of the present invention will be described below with reference to the drawings. In addition, the same reference numerals are given to the same or corresponding parts in the figures.

(実施形態1)
図1に、実施形態1に係る計算装置10の構成を示す。計算装置10は、計算対象として与えられた複素数の絶対値を近似手法により計算する装置である。計算装置10は、一例として、パーソナルコンピュータ、タブレット、サーバ等の情報処理装置である。或いは、計算装置10は、FPGA(Field-Programmable Gate Array)、GPU(Graphics Processing Unit)、AI(Artificial Intelligence)チップ等のような組み込み機器であっても良い。いずれの場合であっても、同様に説明することができる。
(Embodiment 1)
FIG. 1 shows the configuration of a computing device 10 according to the first embodiment. The calculation device 10 is a device that calculates the absolute value of a complex number given as a calculation target using an approximation method. The computing device 10 is, for example, an information processing device such as a personal computer, a tablet, or a server. Alternatively, the computing device 10 may be an embedded device such as an FPGA (Field-Programmable Gate Array), a GPU (Graphics Processing Unit), an AI (Artificial Intelligence) chip, or the like. In either case, the same explanation can be given.

図1に示すように、計算装置10は、制御部11と、記憶部12と、入力受付部13と、出力部14と、を備える。 As shown in FIG. 1, the computing device 10 includes a control section 11, a storage section 12, an input reception section 13, and an output section 14.

制御部11は、計算装置10の各部と制御バスを介して接続されており、計算装置10全体の動作を統括制御する。具体的に説明すると、制御部11は、CPU(Central Processing Unit)、ROM(Read Only Memory)及びRAM(Random Access Memory)を備える。CPUは、例えばマイクロプロセッサ等を備えており、様々な処理及び演算を実行する中央演算処理部として機能する。制御部11において、CPUが、ROMに記憶されている制御プログラムを読み出して、RAMをワークメモリとして用いながら、各種の処理を実行する。 The control unit 11 is connected to each unit of the computing device 10 via a control bus, and centrally controls the operation of the computing device 10 as a whole. Specifically, the control unit 11 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), and a RAM (Random Access Memory). The CPU includes, for example, a microprocessor, and functions as a central processing unit that executes various processes and calculations. In the control unit 11, the CPU reads a control program stored in the ROM and executes various processes while using the RAM as a work memory.

記憶部12は、フラッシュメモリ、ハードディスク等の不揮発性メモリを備える。記憶部12は、オペレーションシステム、アプリケーションプログラム等の、制御部11が各種処理を行うために使用するプログラム及びデータを記憶する。また、記憶部12は、制御部11が各種処理を行うことにより生成又は取得するデータを記憶する。 The storage unit 12 includes nonvolatile memory such as a flash memory and a hard disk. The storage unit 12 stores programs and data used by the control unit 11 to perform various processes, such as an operating system and application programs. Furthermore, the storage unit 12 stores data generated or acquired by the control unit 11 performing various processes.

記憶部12は、複素数の絶対値を計算するために必要となる各種の定数値を記憶している。具体的には、記憶部12は、図2に示すような三角比テーブル190を記憶している。三角比テーブル190は、0からπ/2の範囲における複数の角度θのそれぞれについて、正弦値sinθ及び余弦値cosθが対応付けて格納されたテーブルである。 The storage unit 12 stores various constant values necessary for calculating the absolute value of a complex number. Specifically, the storage unit 12 stores a trigonometric ratio table 190 as shown in FIG. The trigonometric ratio table 190 is a table in which a sine value sin θ and a cosine value cos θ are stored in association with each other for each of a plurality of angles θ in the range of 0 to π/2.

ここで、三角比テーブル190における複数の角度θは、互いに一定の角度差をつけられている。複数の角度θの個数をどの程度に設定するか、すなわち0からπ/2の範囲でどの程度の細かい角度差で区切って三角比の値を三角比テーブル190に格納しておくかは、後述する角度θの離散化数Nをどの程度の大きさに設定するかにより異なる。三角比テーブル190により多くの角度θの三角比の値が格納されているほど、離散化数Nとして大きな値が設定可能になる。三角比テーブル190には、計算装置10により計算処理に用いられる可能性がある複数の角度の正弦値及び余弦値が少なくとも格納される。 Here, the plurality of angles θ in the trigonometric ratio table 190 are set at a certain angle difference from each other. How many angles θ should be set, that is, how finely angular differences in the range from 0 to π/2 should be used to store trigonometric ratio values in the trigonometric ratio table 190 will be discussed later. It depends on how large the discretization number N of the angle θ is set. The more trigonometric ratio values of the angle θ are stored in the trigonometric ratio table 190, the larger the value that can be set as the discretization number N. The trigonometric ratio table 190 stores at least sine and cosine values of a plurality of angles that may be used in calculation processing by the calculation device 10.

図1に戻って、入力受付部13は、計算装置10の外部からの入力を受け付ける。例えば、入力受付部13は、キーボード、ボタン等の入力デバイスを備えており、入力デバイスを介してユーザからの入力を受け付ける。また、入力受付部13は、広域ネットワーク、LAN(Local Area Network)、USB(Universal Serial Bus)等の有線又は無線による通信を介して、入力を受け付ける。 Returning to FIG. 1, the input accepting unit 13 accepts input from outside the computing device 10. For example, the input reception unit 13 includes input devices such as a keyboard and buttons, and receives input from the user via the input devices. The input receiving unit 13 also receives input via wired or wireless communication such as a wide area network, LAN (Local Area Network), or USB (Universal Serial Bus).

具体的には、入力受付部13は、計算装置10において絶対値を計算する対象となる複素数の入力を受け付ける。また、入力受付部13は、角度θの離散化数Nの設定入力を受け付ける。入力受付部13は、受け付けた入力を制御部11に供給する。 Specifically, the input receiving unit 13 receives an input of a complex number whose absolute value is to be calculated in the calculation device 10 . The input receiving unit 13 also receives a setting input for the number N of discretizations of the angle θ. The input receiving unit 13 supplies the received input to the control unit 11 .

出力部14は、計算装置10において計算された複素数の絶対値の計算結果を出力する。例えば、出力部14は、液晶ディスプレイ、有機EL(Electro Luminescence)ディスプレイ等の表示デバイスを備えており、制御部11による制御のもとで、計算結果を示す画像を表示する。また、出力部14は、広域ネットワーク、LAN、USB等の有線又は無線による通信を介して、計算結果を示す出力情報を計算装置10の外部に出力する。 The output unit 14 outputs the calculation result of the absolute value of the complex number calculated by the calculation device 10. For example, the output unit 14 includes a display device such as a liquid crystal display or an organic EL (Electro Luminescence) display, and displays an image showing the calculation result under the control of the control unit 11. Further, the output unit 14 outputs output information indicating the calculation result to the outside of the calculation device 10 via wired or wireless communication such as a wide area network, LAN, or USB.

計算装置10は、固定小数点演算により、計算対象となる複素数の絶対値の近似値を計算する。ここで、複素数の絶対値は、理論的には下記(1)式のように、複素数zの実部Re(z)と虚部Im(z)との自乗和の平方根により定められる。 The calculation device 10 calculates an approximate value of the absolute value of a complex number to be calculated using fixed-point arithmetic. Here, the absolute value of a complex number is theoretically determined by the square root of the sum of squares of the real part Re(z) and the imaginary part Im(z) of the complex number z, as shown in equation (1) below.

Figure 0007370575000001
Figure 0007370575000001

図3に、上記(1)式で定められる複素数zの絶対値と実部Re(z)及び虚部Im(z)との関係を3次元座標により示す。図3に示す3次元座標は、水平面内の2方向(x方向及びy方向)に複素数zの実部Re(z)及び虚部Im(z)の値を表し、高さ方向(z方向)に複素数zの絶対値を表している。 FIG. 3 shows the relationship between the absolute value of the complex number z defined by the above equation (1), the real part Re(z), and the imaginary part Im(z) using three-dimensional coordinates. The three-dimensional coordinates shown in FIG. 3 represent the values of the real part Re(z) and imaginary part Im(z) of the complex number z in two directions (x direction and y direction) in the horizontal plane, and the values in the height direction (z direction). represents the absolute value of the complex number z.

図3に示すように、実部Re(z)及び虚部Im(z)の値が様々に変化した場合、上記(1)式で定められる複素数zの絶対値は、原点を頂点とし、中心軸が高さ方向に延びる円錐によって表現される。この円錐を水平面に平行な面で切断した場合における切断面は、半径√(Re(z)+Im(z))の円になる。 As shown in FIG. 3, when the values of the real part Re(z) and the imaginary part Im(z) change variously, the absolute value of the complex number z determined by the above equation (1) has the origin as the apex and the center as the It is represented by a cone whose axis extends in the height direction. When this cone is cut along a plane parallel to the horizontal plane, the cut plane becomes a circle with radius √(Re 2 (z)+Im 2 (z)).

上記(1)式で定められるように、複素数の絶対値の計算は、自乗及び平方根の計算を含む。自乗の計算は、定数乗算に比べて大きな回路規模及び電力消費を必要とする。一方で、平方根の計算は、多項式近似、区分線形近似(折れ線近似)、CORDIC等のような近似計算の手法を利用することができるが、いずれも複素数の実部と虚部の自乗和の計算を避けることはできない。そのため、(1)式に従って複素数の絶対値を計算するには、相対的に大きな回路規模及び電力消費を必要とする。このような平方根と自乗和の計算は、実数の絶対値演算では現れない複素数特有の課題である。 As defined by the above equation (1), calculation of the absolute value of a complex number includes calculation of a square and a square root. Calculation of squares requires larger circuit size and power consumption than constant multiplication. On the other hand, to calculate the square root, approximate calculation methods such as polynomial approximation, piecewise linear approximation (broken line approximation), CORDIC, etc. can be used, but all of them involve calculating the sum of squares of the real and imaginary parts of a complex number. cannot be avoided. Therefore, calculating the absolute value of a complex number according to equation (1) requires a relatively large circuit scale and power consumption. Calculation of such square roots and sums of squares is a problem unique to complex numbers that does not appear in absolute value calculations of real numbers.

特に、FPGA、GPU、AIチップ等のような組み込み機器や高並列計算機器では、計算速度、回路規模、電力消費等の観点から、固定小数点演算を採用することが望まれる。しかしながら、固定小数点演算は、浮動小数点演算と比べて、ビット幅に対して表現できる実数の範囲が限られるため、自乗及び平方根の計算に適していない。そのため、固定小数点演算では、実数の絶対値を計算することは容易であるのに対して、複素数の絶対値を上記(1)式に従って計算することは容易ではない。 In particular, in embedded devices and highly parallel computing devices such as FPGAs, GPUs, and AI chips, it is desirable to employ fixed-point arithmetic from the viewpoints of calculation speed, circuit scale, power consumption, and the like. However, fixed-point arithmetic is not suitable for calculating squares and square roots because the range of real numbers that can be expressed with respect to bit width is limited compared to floating-point arithmetic. Therefore, in fixed-point arithmetic, it is easy to calculate the absolute value of a real number, but it is not easy to calculate the absolute value of a complex number according to equation (1) above.

そこで、実施形態1に係る計算装置10は、複素数の絶対値の近似値を、自乗及び平方根の計算を必要としない方法で計算する。具体的に説明すると、計算装置10は、複素数zの絶対値が、下記(2)式に示されるように、関数aθ(z)の0≦θ<π/2の範囲における上限値として表現可能であることを利用する。ここで、下記(2)式で定められる関数aθ(z)は、下記(3)式に示されるように、予め与えられた角度θに対する複素数zの関数である。 Therefore, the calculation device 10 according to the first embodiment calculates an approximate value of the absolute value of a complex number using a method that does not require calculation of squares and square roots. Specifically, the calculation device 10 expresses the absolute value of the complex number z as the upper limit value of the function a θ (z) in the range of 0≦θ<π/2, as shown in equation (2) below. Take advantage of what is possible. Here, the function a θ (z) defined by the following equation (2) is a function of the complex number z with respect to a predetermined angle θ, as shown in the following equation (3).

Figure 0007370575000002
Figure 0007370575000002

Figure 0007370575000003
Figure 0007370575000003

ここで、複素数zの絶対値が上記(2)式で表現されることについて説明する。上記(3)式で定められる関数aθ(z)は、下記(4)式のように変形することができる。なお、(4)式において、αは、cosα=Re(z)/|z|、且つ、sinα=Im(z)/|z|を満たす角度である。 Here, it will be explained that the absolute value of the complex number z is expressed by the above equation (2). The function a θ (z) defined by the above equation (3) can be transformed as shown in the following equation (4). Note that in equation (4), α is an angle that satisfies cos α=Re(z)/|z| and sin α=Im(z)/|z|.

Figure 0007370575000004
Figure 0007370575000004

θ=α-π/4の関係が成立する場合、(4)式で表される関数aθ(z)は、下記(5)式のように、複素数zの絶対値に等しくなる。また、関数aθ(z)を角度θに関する偏微分を表す下記(6)式から、0≦α-θ<π/2の範囲において、関数aθ(z)は、θ=α-π/4で極大値をとることが分かる。 When the relationship θ=α−π/4 holds, the function a θ (z) expressed by equation (4) becomes equal to the absolute value of the complex number z, as shown in equation (5) below. Furthermore, from equation (6) below, which expresses the partial differential of the function a θ (z) with respect to the angle θ, in the range 0≦α−θ<π/2, the function a θ (z) is θ=α−π/ It can be seen that the maximum value is reached at 4.

Figure 0007370575000005
Figure 0007370575000005

Figure 0007370575000006
Figure 0007370575000006

ここで、任意の整数kに対して、aθ(z)=aθ+πk/2(z)の関係が成立することに注意すると、上記(2)式に示したように、0≦θ<π/2の範囲における関数aθ(z)の上限値が複素数zの絶対値に等しくなることが導かれる。 Here, if we note that for any integer k, the relationship a θ (z)=a θ+πk/2 (z) holds true, as shown in equation (2) above, 0≦θ<π It is derived that the upper limit of the function a θ (z) in the range /2 is equal to the absolute value of the complex number z.

図4に、上記(3)式で定められる関数aθ(z)と複素数zの実部Re(z)及び虚部Im(z)との関係を3次元座標により示す。図4に示す3次元座標は、図3と同様に、水平面内の2方向(x方向及びy方向)に複素数zの実部Re(z)及び虚部Im(z)の値を表し、高さ方向(z方向)に関数aθ(z)の値を表している。 FIG. 4 shows the relationship between the function a θ (z) defined by the above equation (3) and the real part Re(z) and imaginary part Im(z) of the complex number z using three-dimensional coordinates. The three-dimensional coordinates shown in FIG. 4 represent the values of the real part Re(z) and imaginary part Im(z) of the complex number z in two directions (x direction and y direction) in the horizontal plane, and The value of the function a θ (z) is shown in the horizontal direction (z direction).

図4に示すように、実部Re(z)及び虚部Im(z)の値が様々に変化した場合、上記(1)式で定められる複素数zの絶対値は、原点を頂点とし、中心軸が高さ方向に延びる正四角錐によって表現される。この正四角錐を水平面に平行な面で切断した場合における切断面の各頂点と正四角錐の中心軸との距離は、図3に示した円錐の半径√(Re(z)+Im(z))と一致する。 As shown in FIG. 4, when the values of the real part Re(z) and the imaginary part Im(z) vary, the absolute value of the complex number z determined by the above equation (1) is It is represented by a square pyramid whose axis extends in the height direction. When this square pyramid is cut along a plane parallel to the horizontal plane, the distance between each vertex of the cut plane and the center axis of the square pyramid is the radius of the cone shown in Fig. 3√(Re 2 (z) + Im 2 (z) ) matches.

角度θを様々に変化させた場合、図4に示す正四角錐は、中心軸の周りに回転する。そして、正四角錐が中心軸の周りに回転した場合、正四角錐の斜辺の軌跡は、図3に示した円錐と一致する。言い換えると、上記(2)式のように0≦θ<π/2の範囲における関数aθ(z)の上限値(最大値)により複素数zの絶対値を計算する方法は、正四角錐の回転軌跡で円錐を表現することに相当する。 When the angle θ is varied, the square pyramid shown in FIG. 4 rotates around the central axis. When the regular square pyramid rotates around the central axis, the locus of the hypotenuse of the regular square pyramid coincides with the cone shown in FIG. 3. In other words, the method of calculating the absolute value of the complex number z using the upper limit (maximum value) of the function a θ (z) in the range 0≦θ<π/2 as in equation (2) above is based on the rotation of a regular square pyramid. This corresponds to expressing a cone with a locus.

関数aθ(z)は、正四角錐を用いた複素数zのスカラー評価と言うことができ、角度θが与えられると、自乗及び平方根の計算を必要とすることなく、定数乗算と実数の絶対値の和によって計算することができる。したがって、固定小数点演算で容易に実現することができる。このように、実施形態1に係る計算装置10は、円錐を正四角錐の回転軌跡で表現できることを利用して、複素数zの絶対値を計算する。 The function a θ (z) can be said to be a scalar evaluation of the complex number z using a square pyramid, and given the angle θ, it can be calculated by constant multiplication and the absolute value of the real number without the need to calculate squares and square roots. It can be calculated by the sum of Therefore, it can be easily implemented using fixed-point arithmetic. In this manner, the calculation device 10 according to the first embodiment calculates the absolute value of the complex number z by utilizing the fact that a cone can be expressed by a rotation locus of a regular square pyramid.

具体的には、計算装置10は、関数aθ(z)を計算する際に、角度θを、0からπ/2までの範囲で互いに等しい間隔を空けたN個の角度θ,θ,…,θN-1に離散化する。そして、計算部120は、下記(7)式に従って、離散化されたN個の角度θ,θ,…,θN-1のそれぞれについて計算された関数aθ(z)の値のうちの最大値によって、複素数zの絶対値を近似する。 Specifically, when calculating the function a θ (z), the calculation device 10 divides the angle θ into N angles θ 0 , θ 1 that are equally spaced from each other in the range from 0 to π/2. , ..., θ N-1 . Then, the calculation unit 120 calculates the value of the function a θ (z) calculated for each of the N discretized angles θ 0 , θ 1 , ..., θ N-1 according to the following equation (7). Approximate the absolute value of the complex number z by the maximum value of z.

Figure 0007370575000007
Figure 0007370575000007

図1に戻って、計算装置10の制御部11は、機能的に、設定部110と、計算部120と、決定部130と、を備える。制御部11において、CPUがROMに記憶されたプログラムをRAMに読み出して実行することにより、これら各部として機能する。 Returning to FIG. 1, the control unit 11 of the calculation device 10 functionally includes a setting unit 110, a calculation unit 120, and a determination unit 130. In the control unit 11, the CPU reads a program stored in the ROM into the RAM and executes it, thereby functioning as each of these units.

設定部110は、離散化された複数の角度θの個数、すなわち角度θの離散化数Nを設定する。具体的に説明すると、設定部110は、入力受付部13により受け付けられた入力に基づいて、離散化数Nを設定する。ユーザは、入力受付部13のキー、ボタン等を操作することで、離散化数Nを設定することができる。 The setting unit 110 sets the number of discretized angles θ, that is, the number N of discretizations of angles θ. Specifically, the setting unit 110 sets the discretization number N based on the input received by the input receiving unit 13. The user can set the discretization number N by operating keys, buttons, etc. of the input reception unit 13.

ここで、離散化数Nをより大きく設定するほど近似精度がより向上するが、計算量がより増大する。言い換えると、近似精度と計算量とはトレードオフの関係にある。そのため、近似精度と計算量の低減とのどちらを優先するかに応じて、ユーザは、所望の離散化数Nを設定することができる。設定部110は、離散化数Nを設定すると、0からπ/2までの範囲で互いに等しい間隔を空けたN個の角度θ=πk/2N(k=0,1,2,…,N-1)を設定する。 Here, the larger the discretization number N is set, the more the approximation accuracy improves, but the amount of calculation increases. In other words, there is a trade-off relationship between the approximation accuracy and the amount of calculation. Therefore, the user can set a desired discretization number N depending on whether to give priority to approximation accuracy or reduction in calculation amount. When setting the discretization number N, the setting unit 110 sets N angles θ k =πk/2N (k=0, 1, 2, ..., N -1).

計算部120は、設定部110により設定されたN個の角度θ,θ,θ,…,θN-1のそれぞれについて、上記(3)式に従った計算処理を実行し、関数aθk(z)の値を計算する。 The calculation unit 120 executes calculation processing according to the above equation (3) for each of the N angles θ 0 , θ 1 , θ 2 , ..., θ N−1 set by the setting unit 110, and calculates the function Calculate the value of a θk (z).

第1に、計算部120は、与えられた角度θ(kは0からN-1までの整数)の余弦値cosθと計算対象となる複素数zの実部Re(z)との積と、角度θの正弦値sinθと複素数zの虚部Im(z)との積と、の和を計算する。第2に、計算部120は、角度θの正弦値sinθと複素数zの実部Re(z)との積と、角度θの余弦値cosθと複素数zの虚部Im(z)との積と、の差を計算する。このとき、計算部120は、記憶部12に記憶されている三角比テーブル190を参照して、角度θに対応する正弦値sinθと余弦値cosθとを特定する。 First, the calculation unit 120 calculates the product of the cosine value cosθ k of a given angle θ k (k is an integer from 0 to N-1) and the real part Re(z) of the complex number z to be calculated. , the product of the sine value sin θ k of the angle θ k and the imaginary part Im(z) of the complex number z. Second, the calculation unit 120 calculates the product of the sine value sin θ k of the angle θ k and the real part Re (z) of the complex number z, the product of the cosine value cos θ k of the angle θ k and the imaginary part Im (z) of the complex number z. Calculate the product of and the difference between. At this time, the calculation unit 120 refers to the trigonometric ratio table 190 stored in the storage unit 12 and specifies the sine value sin θ k and cosine value cos θ k corresponding to the angle θ k .

第3に、計算部120は、計算した和の絶対値“|cosθ・Re(z)+sinθ・Im(z)|”と差の絶対値“|sinθ・Re(z)-cosθ・Im(z)|”とを加算する。そして、計算部120は、得られた加算値を2の平方根“√2”で除する、すなわち“√2”の逆数を乗ずることにより、関数aθk(z)の値を計算する。以下では、角度θに対して計算された関数aθk(z)の値を“a”と表す。 Third, the calculation unit 120 calculates the absolute value of the calculated sum “|cosθ k ·Re(z)+sinθ k ·Im(z)|” and the absolute value of the difference “|sinθ k ·Re(z)−cosθ k・Im(z)|” is added. Then, the calculation unit 120 calculates the value of the function a θk (z) by dividing the obtained added value by the square root of 2 “√2”, that is, by multiplying it by the reciprocal of “√2”. In the following, the value of the function a θk (z) calculated for the angle θ k will be expressed as “a k ”.

計算部120は、このような計算処理を、離散化されたN個の角度θ,θ,θ,…,θN-1のそれぞれについて実行する。これにより、計算部120は、N個の値a,a,a,…,aN-1を得る。 The calculation unit 120 performs such calculation processing for each of the N discretized angles θ 0 , θ 1 , θ 2 , . . . , θ N−1 . As a result, the calculation unit 120 obtains N values a 0 , a 1 , a 2 , . . . , a N-1 .

角度θの正弦値sinθ及び余弦値cosθは、予め三角比テーブル190に記憶されているため、固定小数点の定数として扱うことができる。また、√2の逆数も同様に、その値が予め記憶部12に記憶されることで、固定小数点の定数として扱うことができる。そのため、a,a,a,…,aN-1の計算は、自乗及び平方根の演算はもちろん、変数の乗算も必要とせず、定数乗算、加減算、及び実数絶対値計算という簡便な演算によって実現できる。 Since the sine value sin θ k and cosine value cos θ k of the angle θ k are stored in advance in the trigonometric ratio table 190, they can be treated as fixed-point constants. Similarly, the reciprocal of √2 can be treated as a fixed-point constant by storing its value in the storage unit 12 in advance. Therefore, the calculation of a 0 , a 1 , a 2 , ..., a N-1 does not require the calculation of squares and square roots, nor does it require multiplication of variables, but can be performed simply by constant multiplication, addition/subtraction, and real number absolute value calculation. This can be achieved by calculation.

なお、N個の値a,a,a,…,aN-1の計算は、角度θ毎に独立且つ並列に計算ができる。そのため、計算部120は、1個の角度θに対して1個の値aを計算する場合に比べて、それほど大きく計算速度を低下させることなく、計算処理を実行することができる。 Note that the N values a 0 , a 1 , a 2 , . . . , a N-1 can be calculated independently and in parallel for each angle θ k . Therefore, the calculation unit 120 can perform the calculation process without greatly reducing the calculation speed, compared to the case where one value a k is calculated for one angle θ k .

決定部130は、計算部120がN個の角度θ,θ,θ,…,θN-1のそれぞれについて上記の計算処理を実行することにより得られたN個の値a,a,a,…,aN-1のうちの最大値を、計算対象となる複素数zの絶対値に対応する値と決定する。具体的に説明すると、決定部130は、計算部120の計算処理により得られたN個の値a,a,a,…,aN-1を比較する。比較の結果、決定部130は、上記(7)式に従って、N個の値a,a,a,…,aN-1のうちの最大値を、複素数zの絶対値の近似値と決定する。 The determining unit 130 calculates the N values a 0 , which are obtained by the calculation unit 120 performing the above calculation process for each of the N angles θ 0 , θ 1 , θ 2 , ..., θ N-1 . The maximum value among a 1 , a 2 , ..., a N-1 is determined as the value corresponding to the absolute value of the complex number z to be calculated. Specifically, the determining unit 130 compares N values a 0 , a 1 , a 2 , . . . , a N−1 obtained by the calculation process of the calculating unit 120. As a result of the comparison, the determining unit 130 determines the maximum value of the N values a 0 , a 1 , a 2 , ..., a N-1 as an approximate value of the absolute value of the complex number z, according to equation (7) above. I decide.

以上のように構成される計算装置10によって実行される複素数zの絶対値の計算処理の流れについて、図5に示すフローチャートを参照して説明する。図5に示す計算処理は、計算装置10が絶対値の計算対象となる複素数zの入力を受け付けたことに応答して、開始する。 The flow of the calculation process of the absolute value of the complex number z executed by the calculation device 10 configured as above will be explained with reference to the flowchart shown in FIG. 5. The calculation process shown in FIG. 5 starts in response to the calculation device 10 receiving an input of a complex number z whose absolute value is to be calculated.

図5に示す計算処理を開始すると、制御部11は、設定部110として機能し、入力受付部13を介してユーザから受け付けた設定入力に従って、角度θの離散化数Nを設定する(ステップS11)。離散化数Nを設定すると、制御部11は、カウンタ変数kの値を0に初期化する(ステップS12)。 When the calculation process shown in FIG. 5 is started, the control unit 11 functions as the setting unit 110 and sets the discretization number N of the angle θ according to the setting input received from the user via the input reception unit 13 (step S11 ). After setting the discretization number N, the control unit 11 initializes the value of the counter variable k to 0 (step S12).

カウンタ変数kを初期化すると、制御部11は、記憶部12に記憶されている三角比テーブル190を参照して、角度θ(=πk/2N)に対応する余弦値cosθ及び正弦値sinθを特定する。そして、制御部11は、特定したcosθ及び正弦値sinθを、それぞれ変数c,sに代入する(ステップS13)。 When the counter variable k is initialized, the control unit 11 refers to the trigonometric ratio table 190 stored in the storage unit 12 and calculates the cosine value cosθ k and sine value sinθ corresponding to the angle θ k (=πk/2N). Identify k . Then, the control unit 11 assigns the specified cos θ k and sine value sin θ k to variables c k and s k , respectively (step S13).

変数c,sに値を代入すると、制御部11は、計算部120として機能し、(3)式に従って関数a(=aθk(z))の値を計算する(ステップS14)。具体的に説明すると、制御部11は、変数cと複素数zの実部Re(z)との積と、変数sと複素数zの虚部Im(z)との積と、の和を計算し、変数sと複素数zの実部Re(z)との積と、変数cと複素数zの虚部Im(z)との積と、の差を計算する。そして、制御部11は、計算した和の絶対値と差の絶対値とを加算した加算値を2の平方根で除した値を、関数aの値として計算する。 After assigning values to the variables c k and s k , the control unit 11 functions as the calculation unit 120 and calculates the value of the function a k (=a θk (z)) according to equation (3) (step S14). Specifically, the control unit 11 calculates the sum of the product of the variable c k and the real part Re(z) of the complex number z, and the product of the variable s k and the imaginary part Im(z) of the complex number z. The difference between the product of the variable sk and the real part Re(z) of the complex number z and the product of the variable ck and the imaginary part Im(z) of the complex number z is calculated. Then, the control unit 11 calculates a value obtained by adding the calculated absolute value of the sum and the calculated absolute value of the difference, divided by the square root of 2, as the value of the function a k .

関数aの値を計算すると、制御部11は、カウンタ変数kの値をインクリメントする(ステップS15)。そして、制御部11は、カウンタ変数kが離散化数Nよりも小さいか否かを判定する(ステップS16)。カウンタ変数kが離散化数Nよりも小さい場合(ステップS16;YES)、制御部11は、処理をステップS13に戻し、インクリメントされたカウンタ変数kに対してステップS13~S15の処理を実行する。 After calculating the value of the function a k , the control unit 11 increments the value of the counter variable k (step S15). Then, the control unit 11 determines whether the counter variable k is smaller than the discretization number N (step S16). If the counter variable k is smaller than the discretization number N (step S16; YES), the control unit 11 returns the process to step S13 and executes the processes of steps S13 to S15 on the incremented counter variable k.

このように、制御部11は、カウンタ変数kが離散化数Nに達するまで、カウンタ変数kの値を0から1ずつインクリメントしながらステップS13~S15の処理を繰り返す。これにより、制御部11は、N個の値a,a,a,…,aN-1を計算する。 In this way, the control unit 11 repeats the processing of steps S13 to S15 while incrementing the value of the counter variable k by 1 from 0 until the counter variable k reaches the discretization number N. Thereby, the control unit 11 calculates N values a 0 , a 1 , a 2 , . . . , a N-1 .

最終的に、カウンタ変数kが離散化数Nに達した場合(ステップS16;NO)、制御部11は、決定部130として機能し、繰り返し処理におけるステップS14で計算されたN個の値a,a,a,…,aN-1のうちの最大値を、複素数zの絶対値の近似値と決定する(ステップS17)。以上により、図5に示した複素数zの絶対値の計算処理は終了する。 Finally, when the counter variable k reaches the discretization number N (step S16; NO), the control unit 11 functions as the determining unit 130, and sets the N values a 0 calculated in step S14 in the iterative process. , a 1 , a 2 , ..., a N-1 is determined to be the approximate value of the absolute value of the complex number z (step S17). With the above, the calculation process of the absolute value of the complex number z shown in FIG. 5 is completed.

以上説明したように、実施形態1に係る計算装置10は、角度θの余弦値cosθと複素数zの実部Re(z)との積と、角度θの正弦値sinθと複素数zの虚部Im(z)との積と、の和を計算し、角度θの正弦値sinθと複素数zの実部Re(z)との積と、角度θの余弦値cosθと複素数zの虚部Im(z)との積と、の差を計算し、更に、計算した和の絶対値と差の絶対値とを加算する計算処理を実行する。そして、計算装置10は、このような計算処理を複数の角度θ,θ,θ,…,θN-1のそれぞれについて実行することにより得られた複数の値a,a,a,…,aN-1のうちの最大値を、複素数zの絶対値の近似値と決定する。これにより、自乗及び平方根の計算を必要とせずに、定数乗算、加減算、及び実数絶対値計算によって複素数の絶対値の近似値を計算することができる。そのため、大きな回路規模及び消費電力を必要とせずに、複素数の絶対値の近似値を計算することができる。 As explained above, the calculation device 10 according to the first embodiment calculates the product of the cosine value cosθ k of the angle θ k and the real part Re(z) of the complex number z, the product of the sine value sinθ k of the angle θ k and the complex number z The product of the sine value sinθ k of the angle θ k and the real part Re (z) of the complex number z, the cosine value cosθ k of the angle θ k and A calculation process is performed in which the product of the complex number z and the imaginary part Im(z) and the difference are calculated, and the absolute value of the calculated sum and the absolute value of the difference are added. Then, the calculation device 10 calculates a plurality of values a 0 , a 1 , and The maximum value among a 2 , ..., a N-1 is determined to be the approximate value of the absolute value of the complex number z. Thereby, an approximate value of the absolute value of a complex number can be calculated by constant multiplication, addition/subtraction, and real number absolute value calculation without requiring calculation of squares and square roots. Therefore, an approximate value of the absolute value of a complex number can be calculated without requiring a large circuit scale or power consumption.

特に、固定小数点演算では、ビット幅に対して表現できる実数の範囲が限られるため、自乗及び平方根の計算に適していない。これに対して、実施形態1に係る計算装置10によれば、自乗及び平方根の計算を必要としないため、固定小数点演算でも複素数の絶対値の近似値を容易に計算することができる。 In particular, fixed-point arithmetic is not suitable for calculating squares and square roots because the range of real numbers that can be expressed with respect to bit width is limited. On the other hand, according to the calculation device 10 according to the first embodiment, since the calculation of squares and square roots is not required, it is possible to easily calculate an approximate value of the absolute value of a complex number even with fixed-point arithmetic.

(実施形態2)
次に、本発明の実施形態2について説明する。実施形態2では、実施形態1で説明した複素数の絶対値を計算する手法を、画像復元処理に適用する。なお、実施形態1と同様の事項については適宜説明を省略する。
(Embodiment 2)
Next, a second embodiment of the present invention will be described. In the second embodiment, the method of calculating the absolute value of a complex number described in the first embodiment is applied to image restoration processing. Note that descriptions of matters similar to those in Embodiment 1 will be omitted as appropriate.

図6に、実施形態2に係る計算装置20の構成を示す。図6に示すように、計算装置20は、制御部21と、記憶部12と、入力受付部13と、出力部14と、を備える。制御部21は、機能的に、設定部110と、計算部120と、決定部130と、信号処理部210と、を備える。制御部21において、CPUがROMに記憶されたプログラムをRAMに読み出して実行することにより、計算部120、決定部130及び信号処理部210の各部として機能する。設定部110、計算部120及び決定部130の処理は、実施形態1と同様であるため説明を省略する。 FIG. 6 shows the configuration of a computing device 20 according to the second embodiment. As shown in FIG. 6, the computing device 20 includes a control section 21, a storage section 12, an input reception section 13, and an output section 14. The control unit 21 functionally includes a setting unit 110, a calculation unit 120, a determination unit 130, and a signal processing unit 210. In the control unit 21, the CPU reads a program stored in the ROM into the RAM and executes it, thereby functioning as each unit of the calculation unit 120, the determination unit 130, and the signal processing unit 210. The processing of the setting unit 110, the calculation unit 120, and the determination unit 130 is the same as in the first embodiment, so a description thereof will be omitted.

信号処理部210は、決定部130により決定された複素数の絶対値に対応する値に基づいて、信号処理を実行する。具体的に説明すると、信号処理部210は、信号処理として、観測画像から復元画像を復元する画像復元処理を実行する。実施形態2に係る計算装置20は、信号処理(画像復元処理)を実行する信号処理装置(画像復元装置)と呼ぶこともできる。 The signal processing unit 210 performs signal processing based on the value corresponding to the absolute value of the complex number determined by the determining unit 130. Specifically, the signal processing unit 210 executes image restoration processing for restoring a restored image from an observed image as signal processing. The computing device 20 according to the second embodiment can also be called a signal processing device (image restoration device) that performs signal processing (image restoration processing).

図7に、信号処理部210により実行される画像復元処理の概要を示す。図7において、原画像y、観測画像v及び復元画像y’は、各画素の画素値が複素数により表現される複素画像であって、それぞれの複素画像における複素数の画素値を要素(成分)として有する複素ベクトルにより表される。信号処理部210は、画像復元処理を実行することにより、原画像yが観測過程で劣化した画像である観測画像vから復元画像y’を復元する。 FIG. 7 shows an overview of the image restoration process executed by the signal processing unit 210. In FIG. 7, the original image y, the observed image v, and the restored image y' are complex images in which the pixel value of each pixel is expressed by a complex number, and the pixel value of the complex number in each complex image is expressed as an element (component). represented by a complex vector with The signal processing unit 210 restores the restored image y' from the observed image v, which is an image in which the original image y has been degraded during the observation process, by executing image restoration processing.

入力受付部13は、観測画像vの入力を受け付ける。例えば、入力受付部13は、無線通信又は有線通信を介して、信号処理部210による処理の対象となる観測画像vを計算装置20の外部から受け付ける。或いは、観測画像vは、記憶部12に予め記憶されていても良い。 The input accepting unit 13 accepts input of the observed image v. For example, the input reception unit 13 receives an observation image v to be processed by the signal processing unit 210 from outside the calculation device 20 via wireless communication or wired communication. Alternatively, the observation image v may be stored in the storage unit 12 in advance.

観測画像vは、下記(8)式のように、原画像yに行列Pを乗じ、更にベクトルwを加算したベクトルとして表される。ここで、行列Pは、観測過程における画像の劣化を表す行列である。ベクトルwは、加法性白色ガウスノイズ(AWGN:Additive White Gaussian Noise)を表すベクトルである。 The observed image v is expressed as a vector obtained by multiplying the original image y by a matrix P and further adding a vector w, as shown in equation (8) below. Here, the matrix P is a matrix representing image deterioration during the observation process. The vector w is a vector representing additive white Gaussian noise (AWGN).

Figure 0007370575000008
Figure 0007370575000008

原画像yは、下記(9)式のように、係数ベクトルxに辞書行列Dを乗じたベクトルとして表される。ここで、辞書行列Dは、原画像yを複数の基底ベクトルのスパースな線形結合により表現するための行列である。係数ベクトルxは、線形結合の係数を要素とするスパースな(すなわち、ほとんどの要素が0である)ベクトルである。 The original image y is expressed as a vector obtained by multiplying the coefficient vector x by the dictionary matrix D, as shown in equation (9) below. Here, the dictionary matrix D is a matrix for expressing the original image y by a sparse linear combination of a plurality of basis vectors. The coefficient vector x is a sparse vector (that is, most of the elements are 0) whose elements are linear combination coefficients.

Figure 0007370575000009
Figure 0007370575000009

信号処理部210は、画像復元処理において、ISTA(繰り返しソフト閾値アルゴリズム;Iterative Shrinkage Soft-Thresholding Algorithm)を用いて観測画像vから係数ベクトルxを推定し、推定された係数ベクトルxから復元画像y’を復元する。ここで、ISTAは、スパースモデリングで現れる最適化問題を解く手法の1つである。係数ベクトルxを推定するために、信号処理部210は、スパースモデリングの問題設定の1つであるL1ノルム正則化最小自乗法(Lasso)を利用する。 In the image restoration process, the signal processing unit 210 estimates a coefficient vector x from the observed image v using ISTA (Iterative Shrinkage Soft-Thresholding Algorithm), and generates a restored image y' from the estimated coefficient vector x. restore. Here, ISTA is one of the methods for solving optimization problems that appear in sparse modeling. In order to estimate the coefficient vector x, the signal processing unit 210 uses the L1 norm regularized least squares method (Lasso), which is one of the problem settings of sparse modeling.

具体的に、L1ノルム正則化最小自乗法は、係数ベクトルxと観測画像vとを用いて、下記(10)式のように定式化される。下記(10)式において、右辺は、係数ベクトルxに関する関数“||PDx-v||/2+λ||x||”が最小となるときのxを返す関数を表している。すなわち、信号処理部210は、下記(10)式の右辺の値が最小となるときのxを、係数ベクトルxの推定値x’として求める。また、||PDx-v||は、ベクトル“PDx-v”のL2ノルムを表し、||x||は、係数ベクトルxのL1ノルムを表す。λは、正則化パラメータと呼ばれ、誤差と解の大きさとのバランスを調整するパラメータである。正則化パラメータλ、観測過程を表す行列P、及び辞書行列Dは、予め設定されて記憶部12に記憶される。 Specifically, the L1 norm regularized least squares method is formulated as shown in equation (10) below using a coefficient vector x and an observed image v. In equation (10) below, the right side represents a function that returns x when the function “||PDx−v|| 2 /2+λ||x|| 1 ” regarding the coefficient vector x is minimized. That is, the signal processing unit 210 determines x when the value on the right side of equation (10) below is the minimum as the estimated value x' of the coefficient vector x. Further, ||PDx-v|| 2 represents the L2 norm of the vector “PDx-v”, and ||x|| 1 represents the L1 norm of the coefficient vector x. λ is called a regularization parameter and is a parameter that adjusts the balance between the error and the size of the solution. The regularization parameter λ, the matrix P representing the observation process, and the dictionary matrix D are set in advance and stored in the storage unit 12.

Figure 0007370575000010
Figure 0007370575000010

上記(10)式を解くために、信号処理部210は、近接勾配法を利用する。具体的には、信号処理部210は、下記(11)式に従って、kの値をk=0,1,2,…と1ずつ増やしながら、第kベクトルx(k)から第(k+1)ベクトルx(k+1)を計算する。 In order to solve the above equation (10), the signal processing unit 210 uses the proximity gradient method. Specifically, the signal processing unit 210 increases the value of k by 1 as k = 0, 1, 2, ... according to the following equation (11), and converts the k-th vector x (k) to the (k+1)-th vector Calculate x (k+1) .

Figure 0007370575000011
Figure 0007370575000011

ここで、上記(11)式における右辺は、ソフト閾値処理を行うための関数(ソフト閾値関数)である。また、γは、γ≦1/λmax((PD)PD)を満たす定数である。λmax((PD)PD)は、勾配“∇f(x)=(PD)(PDx-v)”のリプシッツ定数であって、(PD)PDの最大固有値である。上付きの“H”は、エルミート転置を意味する。定数γは、適切な値に予め設定されて記憶部12に記憶される。 Here, the right side in the above equation (11) is a function (soft threshold function) for performing soft threshold processing. Further, γ is a constant that satisfies γ≦1/λ max ((PD) H PD). λ max ((PD) H PD) is the Lipschitz constant of the gradient “∇f(x)=(PD) H (PDx−v)” and is the maximum eigenvalue of (PD) H PD. The superscript "H" means Hermitian transposition. The constant γ is preset to an appropriate value and stored in the storage unit 12.

ソフト閾値関数Sτ(z(k))は、具体的には下記(12)式のように定められる。ここで、(12)式におけるz(k)は、下記(13)式で定められるように、観測画像vと第kベクトルx(k)とに基づく複素ベクトルである。 Specifically, the soft threshold function S τ (z (k) ) is determined as shown in equation (12) below. Here, z (k) in equation (12) is a complex vector based on the observed image v and the k-th vector x (k) , as defined by equation (13) below.

Figure 0007370575000012
Figure 0007370575000012

Figure 0007370575000013
Figure 0007370575000013

なお、(12)式において、丸の中に“・”を含む記号は、ベクトルの要素毎の積を意味し、丸の中に“/”を含む記号は、ベクトルの要素毎の商を意味する。また、太字の“0”は全ての要素が0であるベクトルを表し、太字の“1”は全ての要素が1であるベクトルを表す。max(s,0)は、与えられたベクトルsの各要素のうちの値が正又は0の要素はそのままで、値が負の要素が0に置き換えられたベクトルを返す関数である。abs(z(k))は、複素ベクトルz(k)の各要素の絶対値を要素とするベクトルを返す関数である。(12)式におけるτ(>0)は閾値である。 In equation (12), the symbol containing "・" inside a circle means the product of each element of the vector, and the symbol containing "/" inside the circle means the quotient of each element of the vector. do. Furthermore, a bold "0" represents a vector in which all elements are 0, and a bold "1" represents a vector in which all elements are 1. max(s, 0) is a function that returns a vector in which elements of a given vector s whose values are positive or 0 are left unchanged, and elements whose values are negative are replaced with 0. abs(z (k) ) is a function that returns a vector whose elements are the absolute values of each element of the complex vector z (k) . τ (>0) in equation (12) is a threshold value.

信号処理部210は、関数abs(z(k))を計算する際に、実施形態1で説明した近似手法を用いて、複素数の絶対値を計算する。具体的に説明すると、計算部120は、上記(3)式に従った計算処理を、異なる複数の角度θ,θ,θ,…,θN-1のそれぞれについて実行することにより、複数の値a,a,a,…,aN-1を計算する。そして、決定部130は、計算部120により計算された複数の値a,a,a,…,aN-1のうちの最大値を、複素数の絶対値の近似値と決定する。 When calculating the function abs(z (k) ), the signal processing unit 210 calculates the absolute value of a complex number using the approximation method described in the first embodiment. Specifically, the calculation unit 120 executes calculation processing according to the above equation (3) for each of a plurality of different angles θ 0 , θ 1 , θ 2 , ..., θ N-1 , so that A plurality of values a 0 , a 1 , a 2 , ..., a N-1 are calculated. Then, the determining unit 130 determines the maximum value of the plurality of values a 0 , a 1 , a 2 , . . . , a N-1 calculated by the calculating unit 120 as an approximate value of the absolute value of the complex number.

計算部120及び決定部130は、このように複素数の絶対値の近似値を計算する処理を、複素数を要素として有する複素ベクトルz(k)の各要素に対して実行する。信号処理部210は、このようにして計算された複素ベクトルz(k)の各要素の絶対値を用いて、上記(11)式及び(12)式に従って、第kベクトルx(k)から第(k+1)ベクトルx(k+1)を計算する。 The calculation unit 120 and the determination unit 130 thus perform the process of calculating an approximate value of the absolute value of a complex number for each element of a complex vector z (k) having a complex number as an element. The signal processing unit 210 uses the absolute value of each element of the complex vector z ( k) calculated in this way to calculate the (k+1) Calculate vector x (k+1) .

信号処理部210は、kの値を0から順に1ずつ増やしながら、第kベクトルx(k)から第(k+1)ベクトルx(k+1)を計算する処理を繰り返し実行する。そして、信号処理部210は、kの値を増やした場合におけるベクトルx(k)の収束値を、係数ベクトルxの推定値x’と推定する。なお、係数ベクトルの初期値であるk=0のときの第0ベクトルx(0)は、任意に設定することができる。信号処理部210は、このようなISTAの手法により、上記(10)式の最適解を得る。 The signal processing unit 210 repeatedly increases the value of k by 1 from 0 and repeatedly calculates the (k+1)th vector x (k+1) from the k-th vector x (k) . Then, the signal processing unit 210 estimates the convergence value of the vector x (k) when the value of k is increased as the estimated value x' of the coefficient vector x. Note that the 0th vector x (0) when k=0, which is the initial value of the coefficient vector, can be set arbitrarily. The signal processing unit 210 obtains the optimal solution to the above equation (10) using the ISTA method.

このようにして係数ベクトルxの推定値x’を推定すると、信号処理部210は、推定値x’から復元画像y’を復元する。具体的には、信号処理部210は、上記(9)式に従って、推定値x’に辞書行列Dを乗じることにより、復元画像y’を復元する。 After estimating the estimated value x' of the coefficient vector x in this way, the signal processing unit 210 restores the restored image y' from the estimated value x'. Specifically, the signal processing unit 210 restores the restored image y' by multiplying the estimated value x' by the dictionary matrix D according to equation (9) above.

出力部14は、信号処理部210が信号処理を実行することにより得られた結果を示す出力情報を出力する。具体的には、出力部14は、出力情報として、信号処理部210が画像復元処理を実行することにより観測画像vから復元された復元画像y’を出力する。例えば、出力部14は、復元画像y’を液晶ディスプレイ等の表示部に表示する。或いは、出力部14は、復元画像y’を有線又は無線による通信を介して計算装置20の外部の情報処理装置に送信する。 The output unit 14 outputs output information indicating the result obtained when the signal processing unit 210 executes signal processing. Specifically, the output unit 14 outputs, as output information, a restored image y′ restored from the observed image v by the signal processing unit 210 executing image restoration processing. For example, the output unit 14 displays the restored image y' on a display unit such as a liquid crystal display. Alternatively, the output unit 14 transmits the restored image y' to an information processing device external to the computing device 20 via wired or wireless communication.

以上のように構成される実施形態2に係る計算装置20によって実行される画像復元処理の流れについて、図8に示すフローチャートを参照して説明する。図8に示す画像復元処理は、計算装置20が入力受付部13を介して観測画像vの入力を受け付け、更に観測画像vから復元画像y’を復元する指示を受け付けたことに応答して開始する。 The flow of image restoration processing executed by the computing device 20 according to the second embodiment configured as described above will be described with reference to the flowchart shown in FIG. 8. The image restoration process shown in FIG. 8 is started in response to the calculation device 20 receiving input of the observed image v via the input receiving unit 13 and further receiving an instruction to restore the restored image y' from the observed image v. do.

図8に示す画像復元処理を開始すると、制御部21は、カウンタ変数kを0に初期化する(ステップS21)。更に、制御部21は、推定対象となる係数ベクトルxの初期値である第0ベクトルx(0)を任意に設定する(ステップS22)。 When starting the image restoration process shown in FIG. 8, the control unit 21 initializes a counter variable k to 0 (step S21). Further, the control unit 21 arbitrarily sets the 0th vector x (0) , which is the initial value of the coefficient vector x to be estimated (step S22).

次に、制御部21は、観測画像v及び第kベクトルx(k)に基づく複素ベクトルz(k)の各要素の絶対値を計算する(ステップS23)。具体的に説明すると、制御部21は、観測画像v及び第kベクトルx(k)に基づいて、上記(13)式により表される複素ベクトルz(k)を計算する。そして、制御部21は、複素ベクトルz(k)の各要素について、実施形態1の図5に示した複素数の絶対値の計算処理を実行する。 Next, the control unit 21 calculates the absolute value of each element of the complex vector z (k) based on the observed image v and the k-th vector x ( k) (step S23). Specifically, the control unit 21 calculates the complex vector z (k) expressed by the above equation (13) based on the observed image v and the k-th vector x (k) . Then, the control unit 21 executes the calculation process of the absolute value of the complex number shown in FIG. 5 of the first embodiment for each element of the complex vector z (k) .

複素ベクトルz(k)の各要素の絶対値を計算すると、制御部21は、上記(11)式及び(12)式に従って、複素ベクトルz(k)をソフト閾値関数Sτ(z(k))に入力することにより、第(k+1)ベクトルx(k+1)を計算する(ステップS24)。このとき、制御部21は、ソフト閾値関数Sτ(z(k))に含まれる関数abs(z(k))を計算するために、ステップS23で計算した複素ベクトルz(k)の各要素の絶対値を用いる。 After calculating the absolute value of each element of the complex vector z (k) , the control unit 21 converts the complex vector z (k) into a soft threshold function S τ (z (k) ), the (k+1)th vector x (k+1) is calculated (step S24). At this time, the control unit 21 calculates each element of the complex vector z (k) calculated in step S23 in order to calculate the function abs(z (k) ) included in the soft threshold function S τ (z (k) ). The absolute value of is used.

第(k+1)ベクトルx(k+1)を計算すると、制御部21は、第(k+1)ベクトルx(k+1)と第kベクトルx(k)との差の絶対値が、予め定められた基準値よりも小さいか否か、又は、カウンタ変数kの値が予め定められた基準回数よりも大きいか否かのいずれか一方が満たされたか否かを判定する(ステップS25)。 After calculating the (k+1)th vector x (k+1) , the control unit 21 determines that the absolute value of the difference between the (k+1)th vector x (k+1) and the k-th vector It is determined whether either one of the following is satisfied: whether the value of the counter variable k is smaller than a predetermined reference number of times (step S25).

第(k+1)ベクトルx(k+1)と第kベクトルx(k)との差の絶対値が基準値よりも小さくない場合であって、且つ、カウンタ変数kが基準回数以下である場合(ステップS25;NO)、制御部21は、カウンタ変数kをインクリメントする(ステップS26)。そして、制御部21は、処理をステップS23に戻し、インクリメントされたカウンタ変数kに対してステップS23~S24の処理を実行する。 When the absolute value of the difference between the (k+1)th vector x (k+1) and the k-th vector ; NO), the control unit 21 increments the counter variable k (step S26). Then, the control unit 21 returns the process to step S23 and executes the processes of steps S23 to S24 on the incremented counter variable k.

このように、制御部21は、第(k+1)ベクトルx(k+1)と第kベクトルx(k)との差の絶対値が基準値以内に収束するまで、又は、ベクトルx(k)を計算した回数が基準回数を超えるまで、カウンタ変数kの値を0から1ずつインクリメントしながら、ベクトルx(1),x(2),x(3),…を順に計算する。 In this way, the control unit 21 calculates the vector x (k) until the absolute value of the difference between the (k+1)th vector x (k+1) and the k-th vector x (k) converges within the reference value, or The vectors x (1) , x (2) , x (3) , . . . are sequentially calculated while incrementing the value of the counter variable k by 1 from 0 until the number of times exceeds the reference number.

最終的に、第(k+1)ベクトルx(k+1)と第kベクトルx(k)との差の絶対値が基準値よりも小さくなると、又は、カウンタ変数kの値が基準回数より大きくなると(ステップS25;YES)、制御部21は、ステップS24で計算された第(k+1)ベクトルx(k+1)を、係数ベクトルxの推定値x’と推定する(ステップS27)。 Finally, when the absolute value of the difference between the (k+1)th vector x (k+1) and the k-th vector S25; YES), the control unit 21 estimates the (k+1)th vector x (k+1) calculated in step S24 as the estimated value x' of the coefficient vector x (step S27).

係数ベクトルxの推定値x’を推定すると、制御部21は、推定値x’に辞書行列Dを乗じることにより、復元画像y’を復元する(ステップS28)。復元画像y’を復元すると、制御部21は、復元された復元画像y’を出力部14により出力する(ステップS29)。以上により、図8に示した画像復元処理は終了する。 After estimating the estimated value x' of the coefficient vector x, the control unit 21 restores the restored image y' by multiplying the estimated value x' by the dictionary matrix D (step S28). After restoring the restored image y', the control unit 21 outputs the restored restored image y' through the output unit 14 (step S29). With the above steps, the image restoration process shown in FIG. 8 ends.

以上説明したように、実施形態2に係る計算装置20は、ISTAを用いた画像復元処理において、ソフト閾値処理に含まれる複素数の絶対値の計算処理を、実施形態1で説明した近似手法を用いて実行する。これにより、自乗及び平方根の計算を必要とせずに複素数の絶対値を計算することができるため、実施形態2に係る計算装置20は、大きな回路規模及び消費電力を必要とせずに、画像復元処理を実行することができる。 As described above, the calculation device 20 according to the second embodiment uses the approximation method described in the first embodiment to calculate the absolute value of a complex number included in the soft threshold processing in the image restoration process using ISTA. and execute it. As a result, the absolute value of a complex number can be calculated without requiring the calculation of squares and square roots. Therefore, the calculation device 20 according to the second embodiment can perform image restoration processing without requiring large circuit scale and power consumption. can be executed.

特に、組込み機器や高並列計算機器のような環境の制約が厳しいために固定小数演算が必要となる場合であっても、実施形態2に係る計算装置20によれば、複素数の絶対値の近似値を容易に計算することができる。そのため、厳しい環境の制約のもとであっても、回路規模及び電力消費を抑えつつ、高速に画像復元処理が可能となる。 In particular, even in cases where fixed-point arithmetic is required due to severe environmental constraints such as embedded devices or highly parallel computing devices, the computing device 20 according to the second embodiment can approximate the absolute value of a complex number. The value can be easily calculated. Therefore, even under severe environmental constraints, it is possible to perform image restoration processing at high speed while reducing circuit scale and power consumption.

(性能評価)
次に、上記実施形態2で説明した画像復元処理の性能を評価した結果を示す。
(Performance evaluation)
Next, the results of evaluating the performance of the image restoration process described in the second embodiment will be shown.

まず、実施形態2に係る近似手法を図9(a)~(c)に示す3次元座標に可視化して検証した。図9(a)~(c)に示す3次元座標は、水平面内の2方向(x方向及びy方向)に複素数zの実部Re(z)及び虚部Im(z)の値を表し、高さ方向(z方向)にソフト閾値関数Sτ(z)の出力の絶対値を表している。 First, the approximation method according to the second embodiment was visualized and verified using three-dimensional coordinates shown in FIGS. 9(a) to 9(c). The three-dimensional coordinates shown in FIGS. 9(a) to (c) represent the values of the real part Re(z) and imaginary part Im(z) of the complex number z in two directions (x direction and y direction) in the horizontal plane, The absolute value of the output of the soft threshold function S τ (z) is shown in the height direction (z direction).

より詳細には、図9(a)は、浮動小数点演算で近似手法を用いずに複素数zの絶対値を計算した場合におけるソフト閾値関数Sτ(z)の出力の絶対値を示している。一方で、図9(b)は、実施形態2に係る近似手法を用いて複素数zの絶対値を計算した場合におけるソフト閾値関数Sτ(z)の出力の絶対値を示している。図9(c)は、図9(a)と図9(b)と間におけるソフト閾値関数Sτ(z)の出力の絶対値の差分を示している。 More specifically, FIG. 9(a) shows the absolute value of the output of the soft threshold function S τ (z) when the absolute value of the complex number z is calculated by floating point arithmetic without using an approximation method. On the other hand, FIG. 9B shows the absolute value of the output of the soft threshold function S τ (z) when the absolute value of the complex number z is calculated using the approximation method according to the second embodiment. FIG. 9(c) shows the difference in the absolute value of the output of the soft threshold function S τ (z) between FIG. 9(a) and FIG. 9(b).

なお、図9(b)において実施形態2に係る近似手法を用いた場合における角度θの離散化数Nは2に設定した。また、(12)式に示したソフト閾値関数Sτ(z)の入力と出力はそれぞれベクトルであるが、図9(a)~(c)では、ベクトルの一つの要素に対するソフト閾値関数Sτ(z)を計算した。 Note that in FIG. 9(b), the discretization number N of the angle θ was set to 2 when the approximation method according to the second embodiment was used. Furthermore, the input and output of the soft threshold function S τ (z) shown in equation (12) are vectors, but in FIGS. 9(a) to (c), the soft threshold function S τ for one element of the vector is (z) was calculated.

図9(c)に示すように、離散化数Nを2に設定しているため、8方向(2N+1方向)で差分の値が0になった。言い換えると、角度がπ/4ずれる毎に、複素数zの絶対値の近似誤差が0になることが確認された。また、図9(c)に示す範囲内で、近似誤差の最大値は0.0412であった。この結果から、実施形態2で説明した複素数zの絶対値の近似手法は許容できると考えられる。また、このような近似誤差は、離散化数Nを増やすことで減らすことができる。 As shown in FIG. 9(c), since the discretization number N was set to 2, the difference values became 0 in 8 directions (2N+1 directions). In other words, it was confirmed that the approximation error of the absolute value of the complex number z becomes 0 every time the angle shifts by π/4. Moreover, within the range shown in FIG. 9(c), the maximum value of the approximation error was 0.0412. From this result, it is considered that the method of approximating the absolute value of the complex number z described in the second embodiment is acceptable. Furthermore, such approximation errors can be reduced by increasing the number N of discretizations.

次に、近似手法を用いずに浮動小数点演算で複素数の絶対値を計算した場合と、実施形態2に係る近似手法により複素数の絶対値を計算した場合とで、画像復元処理のシミュレーションを実行した。 Next, a simulation of image restoration processing was performed in a case where the absolute value of a complex number was calculated by floating point arithmetic without using an approximation method, and a case where the absolute value of a complex number was calculated by the approximation method according to the second embodiment. .

図10に、シミュレーションの諸元を示す。また、図11に、画像復元モデルの諸元を示す。図10に示すように、シミュレーションにおいて、画像復元モデルの辞書行列Dとして非間引きハール変換を仮定し、観測過程を表す行列Pとして画素欠損率10%の画素欠損を仮定した。 FIG. 10 shows the specifications of the simulation. Further, FIG. 11 shows the specifications of the image restoration model. As shown in FIG. 10, in the simulation, a non-thinning Haar transform was assumed as the dictionary matrix D of the image restoration model, and a pixel loss with a pixel loss rate of 10% was assumed as the matrix P representing the observation process.

図12(a)及び図13(a)に、それぞれ、シミュレーションに用いた原画像の実部及び虚部を示す。図12(a)に示す画像と図13(a)に示す画像との組み合わせにより1枚の複素画像と見立てられる。更に、図12(b)及び図13(b)に、それぞれ、図12(a)及び図13(a)に対応する観測画像を示す。図12(b)に示した観測画像のPSNR(Peak Signal-to-Noise Ratio:ピーク信号対雑音比)は15.81dBであり、図13(b)に示した観測画像のPSNRは15.82dBであった。 12(a) and 13(a) respectively show the real part and imaginary part of the original image used in the simulation. The combination of the image shown in FIG. 12(a) and the image shown in FIG. 13(a) can be regarded as one complex image. Further, FIGS. 12(b) and 13(b) show observed images corresponding to FIGS. 12(a) and 13(a), respectively. The PSNR (Peak Signal-to-Noise Ratio) of the observed image shown in Fig. 12(b) is 15.81 dB, and the PSNR of the observed image shown in Fig. 13(b) is 15.82 dB. Met.

図12(c)及び図13(c)に、それぞれ、図12(b)及び図13(b)に示した観測画像から複素数の絶対値の近似手法を用いずに復元した復元画像を示す。これに対して、図12(d)及び図13(d)に、それぞれ、図12(b)及び図13(b)に示した観測画像から実施形態2に係る近似手法を用いて復元した復元画像を示す。なお、図12(d)及び図13(d)に示す復元画像を復元した際における角度θの離散化数Nは2と設定した。 FIGS. 12(c) and 13(c) show restored images restored from the observed images shown in FIGS. 12(b) and 13(b), respectively, without using the approximation method of the absolute value of a complex number. On the other hand, FIGS. 12(d) and 13(d) show the restorations restored using the approximation method according to the second embodiment from the observed images shown in FIGS. 12(b) and 13(b), respectively. Show images. Note that the discretization number N of the angle θ was set to 2 when the restored images shown in FIGS. 12(d) and 13(d) were restored.

図12(c)及び図13(c)に示した復元画像のPSNRは、それぞれ、29.24dB及び29.49dBであった。これに対して、図12(d)及び図13(d)に示した復元画像のPSNRは、それぞれ、29.23dB及び29.48dBであった。よって、近似手法を用いた場合と用いなかった場合とで、PSNRにほとんど差が見られなかった。また、図12(a)~(d)に示す4つの画像を比較すると、提案手法による近似を行っても画像復元結果に大きな差は見られないことが確認された。図13(a)~(d)でも同様である。 The PSNR of the restored images shown in FIG. 12(c) and FIG. 13(c) was 29.24 dB and 29.49 dB, respectively. On the other hand, the PSNR of the restored images shown in FIG. 12(d) and FIG. 13(d) was 29.23 dB and 29.48 dB, respectively. Therefore, there was almost no difference in PSNR between when the approximation method was used and when it was not used. Furthermore, when the four images shown in FIGS. 12(a) to 12(d) were compared, it was confirmed that there was no significant difference in the image restoration results even if the approximation by the proposed method was performed. The same applies to FIGS. 13(a) to 13(d).

図14に、複素数の絶対値の近似手法を用いなかった場合における復元画像と、実施形態2に係る近似手法を用いた場合における復元画像と、の間におけるPSNRの差分を1000サンプル集めたヒストグラムを示す。このヒストグラムから確認されるように、画素欠損の場所やノイズの乱数シードを変えても、近似誤差の最悪値は0.08以下であった。このことから、実施形態2に係る近似手法は許容できると考えられる。 FIG. 14 shows a histogram that collects 1000 samples of the difference in PSNR between the restored image when the approximation method of the absolute value of complex numbers is not used and the restored image when the approximation method according to the second embodiment is used. show. As confirmed from this histogram, the worst value of the approximation error was 0.08 or less even if the location of the pixel loss or the random number seed of the noise was changed. From this, it is considered that the approximation method according to the second embodiment is acceptable.

次に、固定小数点演算におけるビット数と、実施形態2に係る近似手法を用いた場合における復元画像の画質と、の関係を評価した。第1に、固定小数点演算ではオーバーフローやアンダーフローが発生しやすいため、小数部のビット幅が画像復元に与える影響を調べる必要がある。そのため、固定小数点の小数部のビット幅を変化させて出力画像のPSNRの推移を調べた。固定小数点演算は全て符号付き、整数部は5ビット、量子化モードはNearest、オーバーフローモードはSaturateに設定した。 Next, the relationship between the number of bits in fixed-point arithmetic and the image quality of a restored image when the approximation method according to the second embodiment was used was evaluated. First, since overflow and underflow are likely to occur in fixed-point arithmetic, it is necessary to investigate the effect of the bit width of the fractional part on image restoration. Therefore, we investigated the transition of the PSNR of the output image by changing the bit width of the decimal part of the fixed point. All fixed-point operations were signed, the integer part was 5 bits, the quantization mode was set to Nearest, and the overflow mode was set to Saturate.

図15に、固定小数点演算の小数部の幅を変えた場合における復元画像のPSNRの推移を、実部及び虚部のそれぞれについて示す。図15の結果から、実部及び虚部のいずれの場合も、小数部が12ビット以上でほぼ変化がなくなることが確認できる。よって、小数部のビット幅は12ビット以上が適当といえる。 FIG. 15 shows the transition of the PSNR of the restored image when the width of the decimal part of the fixed-point calculation is changed for the real part and the imaginary part, respectively. From the results in FIG. 15, it can be confirmed that in both the real and imaginary parts, there is almost no change when the decimal part is 12 bits or more. Therefore, it is appropriate for the bit width of the decimal part to be 12 bits or more.

第2に、実施形態2に係る近似手法の一部の処理をハードウェアで実装をし、ビット幅を変化させて回路面積の推移を調べた。具体的には、Slice LUTs、Slice Registers及びDSP48E1の3種類のFPGA素子をハードウェア実装のターゲットとして評価を行った。FPGA素子の使用量は少ないほど経済性及び省電力性が向上する。そこで以下では、小数部のビット幅に対する素子使用量を測定した。 Second, a part of the processing of the approximation method according to the second embodiment was implemented in hardware, and changes in the circuit area were examined by changing the bit width. Specifically, we evaluated three types of FPGA elements: Slice LUTs, Slice Registers, and DSP48E1 as targets for hardware implementation. The smaller the amount of FPGA elements used, the more economical and power saving will be achieved. Therefore, below, we measured the amount of elements used with respect to the bit width of the decimal part.

図16に、固定小数点演算の小数部の幅を変えた場合におけるFPGAに実装された素子の使用量(Utilization[%])の推移を示す。Slice LUTsとSlice Registersの使用量は、ビット幅に応じてほぼ右肩上がりで推移している。一方で、DSP48E1の場合、ビット幅に応じて高位合成の配置結果が異なると考えられる。図16から、いずれの素子の場合であっても、小さなビット幅による合成で回路素子の使用率が抑えられることが確認できる。この結果から、12ビットが最適な小数部のビット幅と考えられる。 FIG. 16 shows changes in the usage amount (Utilization [%]) of elements mounted on the FPGA when the width of the decimal part of fixed-point arithmetic is changed. The usage of Slice LUTs and Slice Registers has been trending upwards depending on the bit width. On the other hand, in the case of DSP48E1, the placement results of high-level synthesis are considered to differ depending on the bit width. From FIG. 16, it can be confirmed that the usage rate of circuit elements can be suppressed by combining with a small bit width in any case of the elements. From this result, 12 bits is considered to be the optimal bit width for the fractional part.

(変形例)
以上に本発明の実施形態について説明したが、上記実施形態は一例であり、本発明の適用範囲はこれに限られない。すなわち、本発明の実施形態は種々の応用が可能であり、あらゆる実施の形態が本発明の範囲に含まれる。
(Modified example)
Although the embodiments of the present invention have been described above, the above embodiments are merely examples, and the scope of application of the present invention is not limited thereto. That is, the embodiments of the present invention can be applied in various ways, and all embodiments are included within the scope of the present invention.

例えば、上記実施形態1,2では、計算部120は、固定小数点演算により計算処理を実行した。しかしながら、本発明では、計算部120は、浮動小数点演算により上記実施形態で説明した計算処理を実行しても良い。浮動小数点演算では固定小数点演算のように自乗及び平方根の演算の制約が大きい訳ではないが、自乗及び平方根の演算をせずに複素数の絶対値に対応する値を計算することで、回路規模及び消費電力を低減させる効果を得ることができる。 For example, in the first and second embodiments described above, the calculation unit 120 executes calculation processing using fixed-point arithmetic. However, in the present invention, the calculation unit 120 may perform the calculation processing described in the above embodiment using floating point arithmetic. Floating-point arithmetic does not have as many restrictions on square and square root operations as fixed-point arithmetic, but by calculating the value corresponding to the absolute value of a complex number without performing square and square root operations, circuit size and The effect of reducing power consumption can be obtained.

上記実施形態1では、計算部120は、複数の角度θ,θ,θ,…,θN-1のそれぞれについて上記(3)式に従った計算処理を実行することで複数の値a,a,a,…,aN-1を計算し、決定部130は、複数の値a,a,a,…,aN-1のうちの最大値を、複素数zの絶対値の近似値と決定した。しかしながら、上記(3)式において正弦値sinθと余弦値cosθとを入れ替えて関数aθ(z)を計算した場合でも、複数の値a,a,a,…,aN-1として同じ組み合わせが得られる。そのため、計算部120は、正弦値sinθと余弦値cosθとを実施形態1で説明した方法とは入れ替えて、関数aθ(z)の値を計算しても良い。具体的に説明すると、本発明において、計算部120は、角度θの正弦値sinθと余弦値cosθとのうちの一方と複素数zの実部Re(z)との積と、角度θの正弦値sinθと余弦値cosθとのうちの他方と複素数zの虚部Im(z)との積と、の和を計算し、角度θの正弦値sinθと余弦値cosθとのうちの他方と複素数zの実部Re(z)との積と、角度θの正弦値sinθと余弦値cosθとのうちの一方と複素数zの虚部Im(z)との積と、の差を計算し、更に、計算した和の絶対値と差の絶対値とを加算する。計算部120は、このような計算処理を異なる複数の角度θ,θ,θ,…,θN-1のそれぞれについて実行することにより、複数の値a,a,a,…,aN-1を計算する。 In the first embodiment described above, the calculation unit 120 calculates a plurality of values by performing calculation processing according to the above equation (3) for each of the plurality of angles θ 0 , θ 1 , θ 2 , ..., θ N-1. a 0 , a 1 , a 2 , ..., a N-1 , and the determining unit 130 converts the maximum value of the plurality of values a 0 , a 1 , a 2 , ..., a N-1 into a complex This value was determined to be an approximate value of the absolute value of z. However, even if the function a θ (z) is calculated by replacing the sine value sin θ and the cosine value cos θ in the above equation (3), the function a θ (z) is calculated as multiple values a 0 , a 1 , a 2 , ..., a N-1. You will get the same combination. Therefore, the calculation unit 120 may calculate the value of the function a θ (z) by replacing the sine value sin θ and the cosine value cos θ with the method described in the first embodiment. Specifically, in the present invention, the calculation unit 120 calculates the product of one of the sine value sin θ k and cosine value cos θ k of the angle θ k and the real part Re(z) of the complex number z, and the angle θ Calculate the sum of the product of the other of the sine value sin θ k and the cosine value cos θ k of k and the imaginary part Im(z) of the complex number z, and calculate the sine value sin θ k and the cosine value cos θ k of the angle θ k . and the real part Re(z) of the complex number z, and the product of the sine value sinθ k and cosine value cosθ k of the angle θ k and the imaginary part Im(z) of the complex number z. The product and the difference are calculated, and the absolute value of the calculated sum and the absolute value of the difference are added. The calculation unit 120 executes such calculation processing for each of a plurality of different angles θ 0 , θ 1 , θ 2 , ..., θ N-1 , thereby calculating a plurality of values a 0 , a 1 , a 2 , ..., a Calculate N-1 .

また、本発明において、計算部120は、関数aθ(z)の値そのものを計算することに限らず、例えば√2で除する処理を省略して、関数aθ(z)の値の√2倍に相当する値を計算しても良い。そして、決定部130は、複数の値√2a,√2a,√2a,…,√2aN-1のうちの最大値を、複素数zの絶対値に対応する値と決定しても良い。このように、計算装置10,20は、複素数zの絶対値に対応する値として、複素数zの絶対値そのものの近似値を計算しても良いし、複素数zの絶対値を定数倍した値、又は複素数zの絶対値に定数を加減した値の近似値を計算しても良い。そして、計算装置10,20は、複素数zそのものの近似値ではなく、複素数zの絶対値を定数倍した値、又は複素数zの絶対値に定数を加減した値の近似値を、後段の処理(例えば信号処理部210による画像復元処理)に引き渡しても良い。 Further, in the present invention, the calculation unit 120 is not limited to calculating the value of the function a θ (z) itself, but, for example, omitting the process of dividing by √2, the calculation unit 120 calculates the value of the function a θ (z) by √ A value equivalent to twice the value may be calculated. Then, the determining unit 130 determines the maximum value of the plurality of values √2a 0 , √2a 1 , √2a 2 , ..., √2a N-1 as the value corresponding to the absolute value of the complex number z. good. In this way, the calculation devices 10 and 20 may calculate, as a value corresponding to the absolute value of the complex number z, an approximate value of the absolute value of the complex number z itself, or a value obtained by multiplying the absolute value of the complex number z by a constant, Alternatively, an approximate value of a value obtained by adding or subtracting a constant to the absolute value of the complex number z may be calculated. Then, the calculation devices 10 and 20 calculate not an approximate value of the complex number z itself, but an approximate value of a value obtained by multiplying the absolute value of the complex number z by a constant, or a value obtained by adding or subtracting a constant to the absolute value of the complex number z, for subsequent processing ( For example, the data may be handed over to image restoration processing by the signal processing unit 210.

上記実施形態2では、信号処理部210は、信号処理として、ISTAを用いた画像復元処理を実行した。しかしながら、本発明において、信号処理部210により実行される信号処理は、実施形態2で説明したISTAに基づく画像復元処理に限らない。例えば、ソフト閾値処理は、ISTAに限らず、SAR(Synthetic Aperture Radar:合成開口レーダ)の受信信号から狭帯域無線周波数干渉を分離するためのRNN(Reweighted Nuclear Norm)又はADMM(Alternating Direction Method of Multipliers)のアルゴリズムでも用いられている。SARが受信する信号は複素画像であるため、実施形態2で説明した手法を適用することができる。 In the second embodiment described above, the signal processing unit 210 executed image restoration processing using ISTA as signal processing. However, in the present invention, the signal processing performed by the signal processing unit 210 is not limited to the image restoration processing based on ISTA described in the second embodiment. For example, soft threshold processing is not limited to ISTA, but also RNN (Reweighted Nuclear Norm) or ADMM (Alternating Direction Method of Multipliers) for separating narrowband radio frequency interference from the received signal of SAR (Synthetic Aperture Radar). ) is also used in the algorithm. Since the signal received by SAR is a complex image, the method described in Embodiment 2 can be applied.

更には、信号処理部210により実行される信号処理は、CT(Computed Tomography)、MRI(Magnetic Resonance Imaging)等の医用画像処理であっても良い。或いは、信号処理部210により実行される信号処理は、画像復元処理に限らず、音声信号処理、通信信号処理、生体信号処理、機械学習処理等であっても良い。このように、本発明に係る複素数の絶対値を計算する手法は、複素数の絶対値を計算することが必要とする様々なデジタル信号の処理に適用することができる。 Furthermore, the signal processing performed by the signal processing unit 210 may be medical image processing such as CT (Computed Tomography) and MRI (Magnetic Resonance Imaging). Alternatively, the signal processing performed by the signal processing unit 210 is not limited to image restoration processing, but may be audio signal processing, communication signal processing, biological signal processing, machine learning processing, or the like. In this way, the method of calculating the absolute value of a complex number according to the present invention can be applied to various digital signal processes that require calculating the absolute value of a complex number.

上記実施形態1,2では、計算装置10,20の制御部11,21において、CPUがROMに記憶されたプログラムを実行することによって、設定部110、計算部120、決定部130及び信号処理部210の各部として機能した。しかしながら、本発明において、制御部11,21は、CPUの代わりに、例えばASIC(Application Specific Integrated Circuit)等の専用のハードウェアを備え、専用のハードウェアが、設定部110、計算部120、決定部130及び信号処理部210の各部として機能しても良い。この場合、各部の機能それぞれを個別のハードウェアで実現しても良いし、各部の機能をまとめて単一のハードウェアで実現しても良い。また、各部の機能のうち、一部を専用のハードウェアによって実現し、他の一部をソフトウェア又はファームウェアによって実現しても良い。 In the first and second embodiments described above, in the control units 11 and 21 of the calculation devices 10 and 20, the CPU executes the program stored in the ROM, thereby controlling the setting unit 110, the calculation unit 120, the determination unit 130, and the signal processing unit. It functioned as each part of 210. However, in the present invention, the control units 11 and 21 are equipped with dedicated hardware such as an ASIC (Application Specific Integrated Circuit) instead of the CPU, and the dedicated hardware includes the setting unit 110, the calculation unit 120, and the determination unit 120. It may function as each part of the section 130 and the signal processing section 210. In this case, the functions of each part may be realized by separate hardware, or the functions of each part may be realized by a single piece of hardware. Moreover, some of the functions of each part may be realized by dedicated hardware, and other parts may be realized by software or firmware.

なお、本発明に係る機能を実現するための構成を予め備えた計算装置として提供できることはもとより、プログラムの適用により、既存の情報処理装置等を、本発明に係る計算装置として機能させることもできる。すなわち、上記実施形態1,2で例示した計算装置10,20による各機能構成を実現させるためのプログラムを、既存の情報処理装置等を制御するCPU等が実行できるように適用することで、本発明に係る計算装置として機能させることができる。 Note that not only can it be provided as a computing device that is pre-equipped with a configuration for realizing the functions according to the present invention, but also an existing information processing device or the like can be made to function as a computing device according to the present invention by applying a program. . That is, by applying the programs for realizing each functional configuration of the computing devices 10 and 20 exemplified in Embodiments 1 and 2 above so that they can be executed by a CPU or the like that controls an existing information processing device, etc., the present invention can be realized. It can be made to function as a computing device according to the invention.

また、このようなプログラムの適用方法は任意である。プログラムを、例えば、フレキシブルディスク、CD(Compact Disc)-ROM、DVD(Digital Versatile Disc)-ROM、メモリカード等のコンピュータ読み取り可能な記憶媒体に格納して適用できる。さらに、プログラムを搬送波に重畳し、インターネットなどの通信媒体を介して適用することもできる。そして、このプログラムを起動し、OS(Operating System)の制御下で、他のアプリケーションプログラムと同様に実行することにより、上記の処理を実行できるように構成してもよい。 Further, the method of applying such a program is arbitrary. The program can be applied by being stored in a computer-readable storage medium such as a flexible disk, a CD (Compact Disc)-ROM, a DVD (Digital Versatile Disc)-ROM, or a memory card. Furthermore, the program can be superimposed on a carrier wave and applied via a communication medium such as the Internet. The above-described process may be executed by starting this program and executing it under the control of an OS (Operating System) in the same way as other application programs.

10,20…計算装置、11,21…制御部、12…記憶部、13…入力受付部、14…出力部、110…設定部、120…計算部、130…決定部、190…三角比テーブル、210…信号処理部 DESCRIPTION OF SYMBOLS 10, 20... Calculating device, 11, 21... Control unit, 12... Storage unit, 13... Input receiving unit, 14... Output unit, 110... Setting unit, 120... Calculating unit, 130... Determining unit, 190... Trigonometric ratio table , 210...signal processing section

Claims (10)

与えられた角度の正弦値と余弦値とのうちの一方と計算対象となる複素数の実部との積と、前記角度の正弦値と余弦値とのうちの他方と前記複素数の虚部との積と、の和を計算し、前記角度の正弦値と余弦値とのうちの前記他方と前記複素数の実部との積と、前記角度の正弦値と余弦値とのうちの前記一方と前記複素数の虚部との積と、の差を計算し、更に、前記和の絶対値と前記差の絶対値とを加算する計算処理を、異なる複数の角度のそれぞれについて実行する計算部と、
前記計算部が前記複数の角度のそれぞれについて前記計算処理を実行することにより得られた複数の値のうちの最大値を、前記複素数の絶対値に対応する値と決定する決定部と、を備える、
計算装置。
The product of one of the sine and cosine values of a given angle and the real part of the complex number to be calculated, and the product of the other of the sine and cosine values of the angle and the imaginary part of the complex number. and the product of the other of the sine and cosine values of the angle and the real part of the complex number, and the product of the one of the sine and cosine values of the angle and the a calculation unit that calculates the difference between the product of the complex number and the imaginary part thereof, and further adds the absolute value of the sum and the absolute value of the difference for each of a plurality of different angles;
a determining unit that determines the maximum value of the plurality of values obtained by the calculating unit executing the calculation process for each of the plurality of angles as the value corresponding to the absolute value of the complex number. ,
computing device.
前記計算部は、固定小数点演算により、前記複数の角度のそれぞれについて前記計算処理を実行する、
請求項1に記載の計算装置。
The calculation unit executes the calculation process for each of the plurality of angles by fixed-point arithmetic.
A computing device according to claim 1.
前記複数の角度の正弦値及び余弦値が少なくとも格納された三角比テーブルを記憶する記憶部、を更に備え、
前記計算部は、前記記憶部に記憶された前記三角比テーブルを参照して、前記計算処理を実行する、
請求項1又は2に記載の計算装置。
further comprising a storage unit storing a trigonometric ratio table in which at least sine values and cosine values of the plurality of angles are stored,
The calculation unit refers to the trigonometric ratio table stored in the storage unit and executes the calculation process.
A computing device according to claim 1 or 2.
前記複数の角度の個数を設定する設定部、を更に備え、
前記計算部は、前記設定部により設定された前記個数の前記複数の角度のそれぞれについて、前記計算処理を実行する、
請求項1から3のいずれか1項に記載の計算装置。
further comprising a setting unit that sets the number of the plurality of angles,
The calculation unit executes the calculation process for each of the plurality of angles of the number set by the setting unit.
A computing device according to any one of claims 1 to 3.
前記複数の角度のそれぞれは、0からπ/2までの範囲で互いに等しい間隔を空けた角度である、
請求項1から4のいずれか1項に記載の計算装置。
Each of the plurality of angles is an angle equally spaced from each other in a range from 0 to π/2,
A computing device according to any one of claims 1 to 4.
前記決定部により決定された前記複素数の絶対値に対応する値に基づいて、信号処理を実行する信号処理部と、
前記信号処理部により実行された前記信号処理の結果を示す出力情報を出力する出力部と、を更に備える、
請求項1から5のいずれか1項に記載の計算装置。
a signal processing unit that performs signal processing based on a value corresponding to the absolute value of the complex number determined by the determining unit;
further comprising: an output unit that outputs output information indicating a result of the signal processing performed by the signal processing unit;
A computing device according to any one of claims 1 to 5.
前記信号処理部は、前記信号処理として、観測画像から復元画像を復元する画像復元処理を実行し、
前記出力部は、前記出力情報として、前記復元画像を出力する、
請求項6に記載の計算装置。
The signal processing unit executes image restoration processing for restoring a restored image from an observed image as the signal processing,
the output unit outputs the restored image as the output information;
The computing device according to claim 6.
前記信号処理部は、前記画像復元処理において、繰り返しソフト閾値アルゴリズムを用いて前記観測画像から係数ベクトルを推定し、推定された前記係数ベクトルから前記復元画像を復元する、
請求項7に記載の計算装置。
In the image restoration process, the signal processing unit estimates a coefficient vector from the observed image using an iterative soft threshold algorithm, and restores the restored image from the estimated coefficient vector.
The computing device according to claim 7.
計算装置が実行する計算方法であって、
与えられた角度の正弦値と余弦値とのうちの一方と計算対象となる複素数の実部との積と、前記角度の正弦値と余弦値とのうちの他方と前記複素数の虚部との積と、の和を計算し、前記角度の正弦値と余弦値とのうちの前記他方と前記複素数の実部との積と、前記角度の正弦値と余弦値とのうちの前記一方と前記複素数の虚部との積と、の差を計算し、更に、前記和の絶対値と前記差の絶対値とを加算する計算処理を、異なる複数の角度のそれぞれについて実行し、
前記複数の角度のそれぞれについて前記計算処理を実行することにより得られた複数の値のうちの最大値を、前記複素数の絶対値に対応する値と決定する、
複素数の絶対値の計算方法。
A calculation method performed by a calculation device, comprising:
The product of one of the sine and cosine values of a given angle and the real part of the complex number to be calculated, and the product of the other of the sine and cosine values of the angle and the imaginary part of the complex number. and the product of the other of the sine and cosine values of the angle and the real part of the complex number, and the product of the one of the sine and cosine values of the angle and the Calculating the product of the complex number with the imaginary part and the difference, and further performing a calculation process of adding the absolute value of the sum and the absolute value of the difference for each of a plurality of different angles,
determining the maximum value of the plurality of values obtained by performing the calculation process for each of the plurality of angles as the value corresponding to the absolute value of the complex number;
How to calculate the absolute value of a complex number.
コンピュータを、
与えられた角度の正弦値と余弦値とのうちの一方と計算対象となる複素数の実部との積と、前記角度の正弦値と余弦値とのうちの他方と前記複素数の虚部との積と、の和を計算し、前記角度の正弦値と余弦値とのうちの前記他方と前記複素数の実部との積と、前記角度の正弦値と余弦値とのうちの前記一方と前記複素数の虚部との積と、の差を計算し、更に、前記和の絶対値と前記差の絶対値とを加算する計算処理を、異なる複数の角度のそれぞれについて実行する計算部、
前記計算部が前記複数の角度のそれぞれについて前記計算処理を実行することにより得られた複数の値のうちの最大値を、前記複素数の絶対値に対応する値と決定する決定部、として機能させる、
プログラム。
computer,
The product of one of the sine and cosine values of a given angle and the real part of the complex number to be calculated, and the product of the other of the sine and cosine values of the angle and the imaginary part of the complex number. and the product of the other of the sine and cosine values of the angle and the real part of the complex number, and the product of the one of the sine and cosine values of the angle and the a calculation unit that calculates the difference between the product of the complex number and the imaginary part thereof, and further adds the absolute value of the sum and the absolute value of the difference for each of a plurality of different angles;
The calculation unit functions as a determination unit that determines a maximum value among the plurality of values obtained by performing the calculation processing for each of the plurality of angles as a value corresponding to the absolute value of the complex number. ,
program.
JP2019198315A 2019-10-31 2019-10-31 Calculation device, method and program for calculating the absolute value of complex numbers Active JP7370575B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019198315A JP7370575B2 (en) 2019-10-31 2019-10-31 Calculation device, method and program for calculating the absolute value of complex numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019198315A JP7370575B2 (en) 2019-10-31 2019-10-31 Calculation device, method and program for calculating the absolute value of complex numbers

Publications (2)

Publication Number Publication Date
JP2021071934A JP2021071934A (en) 2021-05-06
JP7370575B2 true JP7370575B2 (en) 2023-10-30

Family

ID=75713218

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019198315A Active JP7370575B2 (en) 2019-10-31 2019-10-31 Calculation device, method and program for calculating the absolute value of complex numbers

Country Status (1)

Country Link
JP (1) JP7370575B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE3120319C2 (en) * 1981-05-21 1986-07-17 Siemens AG, 1000 Berlin und 8000 München Method for determining a reference signal for the approximate value of the amount of a vector and circuit arrangements for carrying out the method
EP0365226A3 (en) * 1988-10-17 1991-02-20 Raytheon Company Cordic apparatus and method for approximating the magnitude and phase of a complex number
JP3226314B2 (en) * 1992-03-02 2001-11-05 オリンパス光学工業株式会社 Scanning probe microscope data processor

Also Published As

Publication number Publication date
JP2021071934A (en) 2021-05-06

Similar Documents

Publication Publication Date Title
US10929746B2 (en) Low-power hardware acceleration method and system for convolution neural network computation
US11315018B2 (en) Systems and methods for pruning neural networks for resource efficient inference
EP3144805B1 (en) Method and processing apparatus for performing arithmetic operation
US20190251442A1 (en) Pruning convolutional neural networks
Chambolle et al. An upwind finite-difference method for total variation–based image smoothing
US11429838B2 (en) Neural network device for neural network operation, method of operating neural network device, and application processor including the neural network device
Hlawatsch et al. Hierarchical line integration
Woo et al. Alternating minimization algorithm for speckle reduction with a shifting technique
Ullah et al. A new variational approach for restoring images with multiplicative noise
US20220261650A1 (en) Machine learning training in logarithmic number system
Ullah et al. An efficient variational method for restoring images with combined additive and multiplicative noise
CN106981056A (en) One kind strengthens wave filter based on partial fractional differential graph of equation image contrast
US9151842B2 (en) Method and apparatus for time of flight sensor 2-dimensional and 3-dimensional map generation
JP7370575B2 (en) Calculation device, method and program for calculating the absolute value of complex numbers
CN110349074B (en) Edge and depth processing hardware
EP4125042A1 (en) Anisotropic texture filtering using weights of an anisotropic filter
JP6918358B2 (en) Approximate calculation device, approximate calculation method and program
Zhang et al. Fpga implementation of the coupled filtering method and the affine warping method
He et al. Adaptive shearlet-regularized image deblurring via alternating direction method
Yang et al. A nonlinear anisotropic diffusion model with non-standard growth for image segmentation
Xin et al. Order analysis comparison between traditional fourier transform-based atmospheric turbulence compensation methods and new well optimized linear finder methodology
Chen et al. VLSI implementation of anisotropic probabilistic neural network for real-time image scaling
JP2016122430A (en) Image filter arithmetic device, gaussian kernel arithmetic device, and program
Sanchez et al. Hardware acceleration of nonlocal means-based speckle noise removal applied to sar imagery
Ramadevi et al. FPGA realization of an efficient image scalar with modified area generation technique

Legal Events

Date Code Title Description
A80 Written request to apply exceptions to lack of novelty of invention

Free format text: JAPANESE INTERMEDIATE CODE: A80

Effective date: 20191119

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20191219

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220803

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230726

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230801

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230911

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231011

R150 Certificate of patent or registration of utility model

Ref document number: 7370575

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150