JP2018084966A - Information processing device and information processing method - Google Patents
Information processing device and information processing method Download PDFInfo
- Publication number
- JP2018084966A JP2018084966A JP2016227786A JP2016227786A JP2018084966A JP 2018084966 A JP2018084966 A JP 2018084966A JP 2016227786 A JP2016227786 A JP 2016227786A JP 2016227786 A JP2016227786 A JP 2016227786A JP 2018084966 A JP2018084966 A JP 2018084966A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- information processing
- unit
- mathematical expression
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、数式をプログラムコードに変換する情報処理装置および情報処理方法に関する。 The present invention relates to an information processing apparatus and an information processing method for converting mathematical expressions into program codes.
従来、数式をプログラムコードに変換するために様々な工夫がなされてきた。 Conventionally, various ideas have been made to convert mathematical expressions into program codes.
例えば、特許文献1において開示されている技術では、プログラマブルロジックコントローラー(PLC)を制御するためのラダーコードを作成するにあたり、ラダーダイアグラム中の数式を解析し、数式中のアドレスシンボルを実アドレスに変換したラダーコードを生成している。 For example, in the technique disclosed in Patent Document 1, in creating a ladder code for controlling a programmable logic controller (PLC), a mathematical expression in a ladder diagram is analyzed and an address symbol in the mathematical expression is converted into a real address. Generated ladder code.
また、例えば、特許文献2の技術では、入力データを解析して文字定数、変数、数式、ルール、および画面イメージに分解し、それぞれのルーチンを作成して、これらルーチンを統合することによりソースプログラムを作成している。
Further, for example, in the technique of
しかし、上述した特許文献の技術では、数式を入力するにあたり、特殊な形式で数式を記述しなければならず、手間であった。 However, in the technique of the above-mentioned patent document, when inputting a mathematical formula, the mathematical formula must be described in a special format, which is troublesome.
以上のような事情に鑑み、本発明の目的は、通常の一般的な方法で記述された数式を画像入力してプログラムコードに変換できる情報処理装置および情報処理方法を提供することにある。 In view of the circumstances as described above, an object of the present invention is to provide an information processing apparatus and an information processing method capable of inputting a mathematical expression described by a general general method and converting it into a program code.
上記目的を達成するため、本発明の一形態に係る情報処理装置は、数式が写された画像データを取得する画像データ取得部と、前記画像データ取得部により取得された前記画像データから前記数式を抽出し、抽出した前記数式を解析する画像解析部と、前記画像解析部による前記解析の結果に基づき、前記数式に対応したプログラムを自動生成するプログラム生成部とを備える。 In order to achieve the above object, an information processing apparatus according to an aspect of the present invention includes an image data acquisition unit that acquires image data in which a mathematical formula is copied, and the mathematical formula from the image data acquired by the image data acquisition unit. And an image analysis unit that analyzes the extracted mathematical expression, and a program generation unit that automatically generates a program corresponding to the mathematical expression based on the result of the analysis by the image analysis unit.
そのため、通常の一般的な方法で記述された数式を画像入力してプログラムコードに変換できる。 For this reason, mathematical expressions described in a general general method can be converted into program codes by inputting images.
上記目的を達成するため、本発明の一形態に係る情報処理装置は、操作入力部と、表示部と、ユーザーによる前記画像データ内で前記数式が写っている領域の指定を受け付ける領域指定部とをさらに備え、前記画像解析部は、手動抽出モードが指定されたとき、前記ユーザーにより指定された前記領域の中から前記数式を抽出、抽出した前記数式を解析する構成でもよい。 In order to achieve the above object, an information processing apparatus according to an aspect of the present invention includes an operation input unit, a display unit, and a region specification unit that receives a specification of a region in which the mathematical expression is reflected in the image data by a user. The image analysis unit may be configured to analyze the mathematical formula extracted and extracted from the region designated by the user when the manual extraction mode is designated.
上記目的を達成するため、本発明の一形態に係る情報処理方法では、画像データ取得部が、数式が写された画像データを取得し、画像解析部が、前記画像データ取得部により取得された前記画像データから前記数式を抽出し、抽出した前記数式を解析し、プログラム生成部が、前記画像解析部による前記解析の結果に基づき、前記数式に対応したプログラムを自動生成する。 In order to achieve the above object, in an information processing method according to an aspect of the present invention, an image data acquisition unit acquires image data in which a mathematical expression is copied, and an image analysis unit is acquired by the image data acquisition unit. The mathematical expression is extracted from the image data, the extracted mathematical expression is analyzed, and the program generation unit automatically generates a program corresponding to the mathematical expression based on the analysis result by the image analysis unit.
以上のように、本発明によれば、通常の一般的な方法で記述された数式を画像入力してプログラムコードに変換できる。 As described above, according to the present invention, mathematical expressions described in a normal general method can be converted into program codes by inputting images.
以下、図面を参照しながら、本発明の実施形態を説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[情報処理装置の構成]
最初に、本発明の一実施形態に係る情報処理装置10の構成について説明する。情報処理装置10は、専用のハードウェアやソフトウェアにより構成されていてもよいし、一般的なコンピューターにより構成されてもよい。情報処理装置10が一般的なコンピューターにより構成される場合の構成図を図1に示す。
[Configuration of information processing device]
First, the configuration of the
同図に示すように、情報処理装置10は、CPU(Central Processing Unit)11、ROM(Read Only Memory)12、RAM(Random Access Memory)13、操作入力部14、通信部15、表示部16、記憶部17、および撮像部19を有し、これら各ブロックがバス18を介して接続されている。
As shown in the figure, the
ROM12は、各種の処理を実行するためのファームウェア等の複数のプログラムやデータを記憶する。RAM13は、CPU11の作業用領域として用いられ、OS(Operating System)、実行中の各種アプリケーション、処理中の各種データを一時的に保持する。
The
記憶部17は、例えばHDD(Hard Disk Drive)や、フラッシュメモリー、その他の不揮発性メモリーである。記憶部17には、OSや各種アプリケーション、各種データが記憶される。
The
通信部15は、ネットワーク上の他の機器と情報のやりとりを行う為のネットワークと結ばれている。
The
CPU11は、ROM12や記憶部17に格納された複数のプログラムのうち、操作入力部14から与えられる命令に対応するプログラムをRAM13に展開し、この展開されたプログラムにしたがって、表示部16及び記憶部17を適宜制御する。
The
操作入力部14は、例えばマウス等のポインティングデバイス、キーボード、タッチパネル、その他の操作装置である。
The
表示部16は、例えば液晶ディスプレイ、EL(Electro-Luminescence)ディスプレイ、プラズマディスプレイ等である。
The
撮像部19は、カメラなどであり、紙の上に書かれた数式や他の機器の表示部に表示された数式を撮像し、画像データとして取り込む。なお、撮像部19は必須の構成ではなく、撮像部19が無い場合、情報処理装置10の外部から画像データを取得することも出来る。
The
次に、CPU11においてプログラムが実行されることにより実現される機能ブロックについて説明する。
Next, functional blocks realized by executing a program in the
情報処理装置10のCPU11において実現される機能ブロックは、画像データ取得部11a、領域指定部11b、画像解析部11c、およびプログラム生成部11dである。
The functional blocks realized in the
画像データ取得部11aは、生成するプログラムの基になる数式を画像データとして取得する。なお、画像の取得方法としては、ユーザーが情報処理装置10内で作成した数式の画像を取得してもよいし、撮像部19により数式を撮像してもよいし、外部の記憶装置に保存された画像データをネットワーク経由で取得してもよいし、外部のカメラ等で撮像された画像データを取得してもよい。
The image
領域指定部11bは、画像データ取得部11aにより取得された画像データに数式以外の文字列等が含まれていて、数式部分の抽出が困難であると考えられるような場合に、ユーザーが手動抽出モードを指定すると、ユーザーの指示に基づいて数式部分の領域を決定する。
The
画像解析部11cは、画像データから自動的に数式を抽出するか、ユーザーにより指定された領域から数式を抽出し、数式を認識するために画像データを解析する。なお、画像解析技術は、公知の技術を用いる。
The
プログラム生成部11dは、画像解析部11cによる画像データの解析結果に基づいて、プログラムを自動生成する。プログラム生成には公知の技術を用いる。プログラムの言語は、C言語、Java(登録商標)など、プログラム自動生成の公知の技術があるものであれば、どのような言語を指定することも出来る。
The program generation unit 11d automatically generates a program based on the analysis result of the image data by the
以上、情報処理装置10の構成について説明した。
The configuration of the
[手動抽出モードについて]
次に、領域指定部11bにおいて実行される手動抽出モードについて説明する。図2は、領域指定部11bにおいて実行される手動抽出モードについて説明するための図である。
[About manual extraction mode]
Next, the manual extraction mode executed in the
この図にあるように、画像データに数式以外の文字列が含まれている場合、ユーザーは、手動抽出モードを指定することにより、画像データ内の数式部分を明示的に線で囲んで領域指定することが出来る。 As shown in this figure, if the image data contains a character string other than a mathematical expression, the user can specify the region by explicitly surrounding the mathematical expression portion in the image data by specifying the manual extraction mode. I can do it.
このように、手動抽出モードを用いることにより、数式以外の文字列が含まれた画像データを処理する場合、数式の領域を自動判定することによる誤認識を防止することが出来る。 As described above, by using the manual extraction mode, when image data including a character string other than a mathematical expression is processed, erroneous recognition due to automatic determination of a mathematical expression region can be prevented.
以上、領域指定部11bにおいて実行される手動抽出モードについて説明した。
The manual extraction mode executed in the
[処理の例]
次に、情報処理装置1における処理の例について説明する。図3から図5は、情報処理装置1における処理の例について説明するための図である。
[Example of processing]
Next, an example of processing in the information processing apparatus 1 will be described. 3 to 5 are diagrams for explaining an example of processing in the information processing apparatus 1.
まず、図3に示す数式が画像データとして与えられたとする。 First, it is assumed that the mathematical formula shown in FIG. 3 is given as image data.
次に、画像解析部11cは、例えば、図4に示す順序で数式を解析する。すなわち、sinθ、cosθの部分を三角関数として、またθを変数として式1として認識する。
Next, the
次に、θが0から10まで変化させた総和を式2として、式1と関連させて認識する。
Next, the sum obtained by changing θ from 0 to 10 is recognized as
次に、aの二乗を式3として認識する。 Next, the square of a is recognized as Equation 3.
次に、式2を式3で除する分数を式4として認識する。
Next, the fraction obtained by dividing
次に、プログラム生成部11dが、上記の解析結果に基づいて、図5に示すC言語のプログラムを自動生成する。 Next, the program generation unit 11d automatically generates the C language program shown in FIG. 5 based on the analysis result.
以上、情報処理装置1における処理の例について説明した。 Heretofore, an example of processing in the information processing apparatus 1 has been described.
[処理の流れ]
次に、情報処理装置10における処理の流れについて説明する。図6は、情報処理装置10における処理の流れについて説明するためのフローチャートである。
[Process flow]
Next, the flow of processing in the
まず、画像データ取得部11aが、情報処理装置10の内部または外部から数式が写された画像データを取得する(ステップS1)。
First, the image
次に、領域指定部11bが、ユーザーにより手動抽出モードが指定されているか否かを判断する(ステップS2)。
Next, the
手動抽出モードが指定されている場合(ステップS2のY)、領域指定部11bが、ユーザーから画像データ内の数式が写っている領域の指定を受け付け、画像解析部11cが、指定された領域から数式を抽出する(ステップS3)。
When the manual extraction mode is designated (Y in step S2), the
手動抽出モードが指定されていない場合(ステップS2のN)、画像解析部11cが、画像データから数式の写っている領域を自動的に判断し、判断した領域から数式を抽出する(ステップS4)。
When the manual extraction mode is not designated (N in Step S2), the
次に、画像解析部11cが、抽出した数式を解析する(ステップS5)。
Next, the
次に、プログラム生成部11dが、画像解析部11cによる解析結果に基づいて、数式に対応するプログラムを自動生成する(ステップS6)。
Next, the program generation unit 11d automatically generates a program corresponding to the mathematical expression based on the analysis result by the
以上、情報処理装置10における処理の流れについて説明した。
The flow of processing in the
[補足事項]
以上のように、本発明に係る情報処理装置10は、数式が写された画像データを取得する画像データ取得部11aと、前記画像データ取得部11aにより取得された前記画像データから前記数式を抽出し、抽出した前記数式を解析する画像解析部11cと、前記画像解析部11cによる前記解析の結果に基づき、前記数式に対応したプログラムを自動生成するプログラム生成部11dとを備える。
[Additional notes]
As described above, the
そのため、通常の一般的な方法で記述された数式を画像入力してプログラムコードに変換できる。 For this reason, mathematical expressions described in a general general method can be converted into program codes by inputting images.
その他、本発明は、上述の実施形態にのみ限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々変更を加え得ることは勿論である。 In addition, this invention is not limited only to the above-mentioned embodiment, Of course, various changes can be added within the range which does not deviate from the summary of this invention.
10 … 情報処理装置
11 … CPU
11a… 画像データ取得部
11b… 領域指定部
11c… 画像解析部
11d… プログラム生成部
12 … ROM
13 … RAM
14 … 操作入力部
15 … 通信部
16 … 表示部
17 … 記憶部
18 … バス
19 … 撮像部
10 ...
11a ... Image
13 ... RAM
DESCRIPTION OF
Claims (3)
前記画像データ取得部により取得された前記画像データから前記数式を抽出し、抽出した前記数式を解析する画像解析部と、
前記画像解析部による前記解析の結果に基づき、前記数式に対応したプログラムを自動生成するプログラム生成部と
を備えた
情報処理装置。 An image data acquisition unit for acquiring image data in which a mathematical expression is copied;
An image analysis unit that extracts the mathematical expression from the image data acquired by the image data acquisition unit and analyzes the extracted mathematical expression;
An information processing apparatus comprising: a program generation unit that automatically generates a program corresponding to the mathematical expression based on a result of the analysis by the image analysis unit.
操作入力部と、
表示部と、
ユーザーによる前記画像データ内で前記数式が写っている領域の指定を受け付ける領域指定部と
をさらに備え、
前記画像解析部は、
手動抽出モードが指定されたとき、
前記ユーザーにより指定された前記領域の中から前記数式を抽出、抽出した前記数式を解析する
情報処理装置。 The information processing apparatus according to claim 1,
An operation input section;
A display unit;
An area designating unit that accepts designation of an area in the image data by the user in which the mathematical expression is shown;
The image analysis unit
When manual extraction mode is specified,
An information processing apparatus that extracts the mathematical expression from the region designated by the user and analyzes the extracted mathematical expression.
画像解析部が、前記画像データ取得部により取得された前記画像データから前記数式を抽出し、抽出した前記数式を解析し、
プログラム生成部が、前記画像解析部による前記解析の結果に基づき、前記数式に対応したプログラムを自動生成する
情報処理方法。 The image data acquisition unit acquires the image data in which the mathematical formula is copied,
The image analysis unit extracts the mathematical formula from the image data acquired by the image data acquisition unit, analyzes the extracted mathematical formula,
An information processing method in which a program generation unit automatically generates a program corresponding to the mathematical expression based on a result of the analysis by the image analysis unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016227786A JP2018084966A (en) | 2016-11-24 | 2016-11-24 | Information processing device and information processing method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2016227786A JP2018084966A (en) | 2016-11-24 | 2016-11-24 | Information processing device and information processing method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2018084966A true JP2018084966A (en) | 2018-05-31 |
Family
ID=62238343
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2016227786A Pending JP2018084966A (en) | 2016-11-24 | 2016-11-24 | Information processing device and information processing method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2018084966A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112083909A (en) * | 2020-08-07 | 2020-12-15 | 清华大学 | Engineering structure design standard formula recognition and calculation program automatic generation method |
CN112907569A (en) * | 2021-03-24 | 2021-06-04 | 北京房江湖科技有限公司 | Head image area segmentation method and device, electronic equipment and storage medium |
-
2016
- 2016-11-24 JP JP2016227786A patent/JP2018084966A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112083909A (en) * | 2020-08-07 | 2020-12-15 | 清华大学 | Engineering structure design standard formula recognition and calculation program automatic generation method |
CN112083909B (en) * | 2020-08-07 | 2022-01-28 | 清华大学 | Engineering structure design standard formula recognition and calculation program automatic generation method |
CN112907569A (en) * | 2021-03-24 | 2021-06-04 | 北京房江湖科技有限公司 | Head image area segmentation method and device, electronic equipment and storage medium |
CN112907569B (en) * | 2021-03-24 | 2024-03-15 | 贝壳找房(北京)科技有限公司 | Head image region segmentation method, device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6337973B2 (en) | Additional learning device, additional learning method, and additional learning program | |
JP6878034B2 (en) | Information processing equipment, control methods, and programs | |
US20120116750A1 (en) | Translation display apparatus | |
US20170147546A1 (en) | Information processing apparatus, information processing method, and information processing program | |
JP2018084966A (en) | Information processing device and information processing method | |
JP2009104342A (en) | Data flow analysis apparatus, data flow analysis method and data flow analyzing program | |
CN110858302B (en) | System and method for editing monitoring script in picture image | |
CN109242929B (en) | Conversion method, device, storage medium and equipment of path coordinate graph | |
CN112396314A (en) | Task allocation method and device, electronic equipment and storage medium | |
CN110163975B (en) | Method, device and equipment for drawing space straight line and storage medium | |
JP6655331B2 (en) | Electronic equipment and methods | |
JP2020198023A (en) | Information processing apparatus, method, and program | |
CN114443022A (en) | Method for generating page building block and electronic equipment | |
JP2017091383A (en) | Image forming apparatus, image forming method, and image forming program | |
CN110047117B (en) | Method, device and equipment for drawing curved surface graph and storage medium | |
JP7386560B2 (en) | Software testing methods | |
JP2020205012A (en) | Document image processing apparatus, information processing method, and program | |
JP2020160746A (en) | Website design support device, website design support method, and program | |
KR101593791B1 (en) | Scientific calculator using a Charge Coupled Device sensor | |
Safdar et al. | Object Character Recognition in C# using Tesseract | |
JP2006279285A (en) | Image processing apparatus, image processing method, and image processing program | |
JP2010049585A (en) | Automatic program generating apparatus | |
US11875588B2 (en) | Document processing apparatus and non-transitory computer readable medium storing program | |
WO2020090356A1 (en) | Ink data generation device, method, and program | |
WO2023074008A1 (en) | Document masking device, document masking method, and program storage medium |