JP2016200992A - Display position acquisition program, display position acquisition device and display position acquisition method - Google Patents
Display position acquisition program, display position acquisition device and display position acquisition method Download PDFInfo
- Publication number
- JP2016200992A JP2016200992A JP2015081041A JP2015081041A JP2016200992A JP 2016200992 A JP2016200992 A JP 2016200992A JP 2015081041 A JP2015081041 A JP 2015081041A JP 2015081041 A JP2015081041 A JP 2015081041A JP 2016200992 A JP2016200992 A JP 2016200992A
- Authority
- JP
- Japan
- Prior art keywords
- display
- image
- position acquisition
- elements
- display data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims description 52
- 238000012545 processing Methods 0.000 claims abstract description 34
- 230000008569 process Effects 0.000 claims description 31
- 238000012015 optical character recognition Methods 0.000 description 41
- 238000010586 diagram Methods 0.000 description 16
- 230000004044 response Effects 0.000 description 13
- 230000006870 function Effects 0.000 description 10
- 230000000694 effects Effects 0.000 description 6
- 230000008859 change Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 1
- 239000003973 paint Substances 0.000 description 1
- 238000010422 painting Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000000126 substance Substances 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Character Discrimination (AREA)
- Information Transfer Between Computers (AREA)
- Document Processing Apparatus (AREA)
Abstract
Description
本発明は、表示位置取得プログラム、表示位置取得装置、及び表示位置取得方法に関する。 The present invention relates to a display position acquisition program, a display position acquisition device, and a display position acquisition method.
インターネットの普及ととともに、インターネットを介して取得されるHTML文書を表示させるWebブラウザの種類が増加している。Webブラウザの種類に加え、Webブラウザのバージョン及び動作OS等の違いを考慮すると多数の組み合わせが存在する。 With the spread of the Internet, the types of Web browsers that display HTML documents obtained via the Internet are increasing. In addition to the types of Web browsers, there are many combinations in consideration of differences in Web browser versions and operating OSs.
各Webブラウザは、相互に描画特性が異なったり、独自の拡張機能を有していたりする。また、HTMLに関してWebブラウザごとに解釈が異なる定義が有る。その結果、一つのHTML文書に関して、Webブラウザごとに表示結果が異なる場合が有る。 Each Web browser has different drawing characteristics from each other or has a unique extension function. Further, there is a definition regarding HTML that is interpreted differently for each Web browser. As a result, the display result may differ for each Web browser with respect to one HTML document.
そのため、HTML文書の作成者は、各Webブラウザにおいて自らの意図した通りにHTML文書が表示されるか否か、すなわち、各Webブラウザ間でHTML文書の表示結果が同じになるか否かについて、テストの実施が要求される。 Therefore, the creator of the HTML document determines whether or not the HTML document is displayed as intended by each Web browser, that is, whether or not the display result of the HTML document is the same between the Web browsers. Tests are required to be performed.
現状では、各WebブラウザにおいてHTML文書を実際に表示させ、表示結果が他のWebブラウザと一致するか否かが目視で確認されることでテストが行われるのが一般的である。しかし、この方法では、熟練者でなければ、HTML文書内におけるいずれの記述が、表示結果の相違の発生要因となっているのかを特定するのに時間を要する。 At present, the test is generally performed by actually displaying an HTML document in each Web browser and visually confirming whether the display result matches that of another Web browser. However, in this method, it takes time to specify which description in the HTML document causes the difference in the display result unless it is an expert.
WebブラウザによるHTML文書の表示結果に含まれている各表示要素の座標は、例えば、オープンソースソフトウェアであるWebDriverを用いて取得することができる。WebDriverは、Webブラウザを外部からコントロールするプラグインソフトであり、その内容は、http://docs.seleniumhq.org/projects/webdriver/に詳しい。 The coordinates of each display element included in the display result of the HTML document by the Web browser can be acquired using, for example, WebDriver that is open source software. WebDriver is plug-in software that controls a Web browser from the outside, and its contents are detailed in http://docs.seleniumhq.org/projects/webdriver/.
WebDriverを用いると、Webブラウザ上に表示されたHTML文書に記述されている各タグが支配する領域、すなわち、各タグに係る表示領域の矩形座標を取得することができる。例えば、表示領域が<div>タグで分割されている場合には、各<div>タグで分割される領域ごとに矩形座標を取得することができる。<p>タグで段落が定義されている場合には、当該<p>タグで定義される段落の表示領域の矩形座標を取得することができる。 By using WebDriver, it is possible to acquire the area controlled by each tag described in the HTML document displayed on the Web browser, that is, the rectangular coordinates of the display area related to each tag. For example, when the display area is divided by <div> tags, rectangular coordinates can be acquired for each area divided by each <div> tag. When a paragraph is defined by the <p> tag, the rectangular coordinates of the display area of the paragraph defined by the <p> tag can be acquired.
また、HTML文書において表示要素とされている画像は、一つの<img>タグで定義される。したがって、WebDriverを用いて、或る<img>タグの表示領域の矩形座標を取得すれば、当該矩形座標は、当該<img>タグに係る画像の表示領域であるとみなすことができる。厳密には、padding属性やborder属性により、<img>タグの表示領域と、実際の画像の表示領域とが異なる場合もあるが、WebDriverにより、padding属性の値やborder属性の値も取得できるため、実際の画像の表示領域を正確に計算することができる。 An image that is a display element in an HTML document is defined by a single <img> tag. Therefore, if the rectangular coordinates of the display area of a certain <img> tag are acquired using WebDriver, the rectangular coordinates can be regarded as the display area of the image related to the <img> tag. Strictly speaking, the <img> tag display area may differ from the actual image display area depending on the padding attribute and the border attribute, but the value of the padding attribute and the border attribute can also be acquired by WebDriver. The actual image display area can be accurately calculated.
しかしながら、文字列の場合は、画像と異なり、一つの文字列が一つのHTMLタグによって定義されているとは限らない。また、Webブラウザ上に表示される文字列は、HTML文書の<body>部に予め記述されている静的な文字列に限られない。例えば、JavaScript(登録商標)等のプログラムにより、HTML文書の表示時にWebブラウザ側において動的に生成される文字列もWebブラウザ上に表示される場合が有る。すなわち、HTMLソースコードの<body>部に記述されていない文字列もWebブラウザ上に表示されうる。 However, in the case of a character string, unlike an image, one character string is not always defined by one HTML tag. Further, the character string displayed on the Web browser is not limited to the static character string described in advance in the <body> portion of the HTML document. For example, a character string dynamically generated on the Web browser side when an HTML document is displayed by a program such as JavaScript (registered trademark) may be displayed on the Web browser. That is, a character string not described in the <body> portion of the HTML source code can also be displayed on the Web browser.
そこで、一側面では、表示データの表示要素のうちの文字要素の表示位置を取得可能とすることを目的とする。 Accordingly, an object of one aspect is to make it possible to acquire the display position of a character element among display elements of display data.
一つの案では、表示位置取得プログラムは、コンピュータに、文字要素と画像要素とを表示要素として含む表示データを表示し、前記表示データの表示結果を示す画像を取得し、取得された画像において、前記画像要素の表示を無効化し、前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、処理を実行させる。 In one proposal, the display position acquisition program displays display data including a character element and an image element as display elements on a computer, acquires an image indicating a display result of the display data, and in the acquired image, The display of the image element is invalidated, and the character recognition is performed on the image in which the display of the image element is invalidated, thereby obtaining the position information of each character element included in the display data. .
一側面によれば、表示データの表示要素のうちの文字要素の表示位置を取得可能とすることができる。 According to one aspect, it is possible to obtain the display position of the character element among the display elements of the display data.
以下、図面に基づいて本発明の実施の形態を説明する。図1は、第1の実施の形態におけるシステム構成例を示す図である。図1において、HTTPサーバ20と表示位置取得装置10とは、インターネット又はLAN(Local Area Network)等のネットワークを介して通信可能に接続される。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a diagram illustrating an example of a system configuration in the first embodiment. In FIG. 1, the
HTTPサーバ20は、1以上のHTML文書を記憶するコンピュータである。HTTPサーバ20は、HTTPリクエストを受信すると、当該HTTPリクエストに係るURL(Uniform Resource Locator)に対応するHTML文書を返信する。
The HTTP
表示位置取得装置10は、HTTPサーバ20に記憶されたHTML文書がWebブラウザ11によって表示された状態において、HTML文書に含まれている表示要素(HTML要素)のうちの各文字の表示位置を取得するコンピュータである。
The display
なお、表示位置取得装置10に、HTTPサーバ20に対応する機能が実装されてもよい。すなわち、表示位置取得装置10とHTTPサーバ20とは、一つの装置によって実現されてもよい。
Note that a function corresponding to the
図2は、第1の実施の形態における表示位置取得装置のハードウェア構成例を示す図である。図2の表示位置取得装置10は、それぞれバスBで相互に接続されているドライブ装置100、補助記憶装置102、メモリ装置103、CPU104、インタフェース装置105、表示装置106、及び入力装置107等を有する。
FIG. 2 is a diagram illustrating a hardware configuration example of the display position acquisition apparatus according to the first embodiment. 2 includes a
表示位置取得装置10での処理を実現するプログラムは、記録媒体101によって提供される。プログラムを記録した記録媒体101がドライブ装置100にセットされると、プログラムが記録媒体101からドライブ装置100を介して補助記憶装置102にインストールされる。但し、プログラムのインストールは必ずしも記録媒体101より行う必要はなく、ネットワークを介して他のコンピュータよりダウンロードするようにしてもよい。補助記憶装置102は、インストールされたプログラムを格納すると共に、必要なファイルやデータ等を格納する。
A program that realizes processing in the display
メモリ装置103は、プログラムの起動指示があった場合に、補助記憶装置102からプログラムを読み出して格納する。CPU104は、メモリ装置103に格納されたプログラムに従って表示位置取得装置10に係る機能を実現する。インタフェース装置105は、ネットワークに接続するためのインタフェースとして用いられる。表示装置106はプログラムによるGUI(Graphical User Interface)等を表示する。入力装置107はキーボード及びマウス等であり、様々な操作指示を入力させるために用いられる。
The
なお、記録媒体101の一例としては、CD−ROM、DVDディスク、又はUSBメモリ等の可搬型の記録媒体が挙げられる。また、補助記憶装置102の一例としては、HDD(Hard Disk Drive)又はフラッシュメモリ等が挙げられる。記録媒体101及び補助記憶装置102のいずれについても、コンピュータ読み取り可能な記録媒体に相当する。
An example of the
図3は、第1の実施の形態における表示位置取得装置の機能構成例を示す図である。図3において、表示位置取得装置10は、複数のWebブラウザ11、画像取得部12、OCR部13、及び出力部14等を有する。これら各部は、表示位置取得装置10にインストールされた1以上のプログラムが、CPU104に実行させる処理により実現される。
FIG. 3 is a diagram illustrating a functional configuration example of the display position acquisition apparatus according to the first embodiment. In FIG. 3, the display
Webブラウザ11は、HTML文書をHTMLサーバから取得し、取得されたHTML文書の表示を制御する。また、Webブラウザ11は、JavaScript(登録商標)等のスクリプトがHTML文書に含まれている場合には、当該スクリプトを実行する。各Webブラウザ11は、例えば、相互に異なる種類のWebブラウザ11である。
The
画像取得部12は、Webブラウザ11によるHTML文書の表示結果に係る画像であって、HTML文書中の表示要素(HTML要素)のうち、画像要素(イメージ要素)の表示領域が無効化された画像を取得する。図3において、画像取得部12は、ブラウザ表示部121、画面キャプチャ部122、及び画像要素無効化部123等を含む。
The
ブラウザ表示部121は、評価対象のHTML文書に対応するURLをWebブラウザ11に入力して、当該HTML文書の表示をWebブラウザ11に実行させる。画面キャプチャ部122は、Webブラウザ11によるHTML文書の表示結果を示す画像を、例えば、画面キャプチャによって取得する。画面キャプチャ部122によって取得される画像を、「キャプチャ画像」という。画像要素無効化部123は、キャプチャ画像の領域において、HTML文書の表示要素のうちの画像要素の表示を無効化する。画像要素とは、HTML文書中における<img>タグに基づいて表示された画像をいう。
The
OCR部13は、画像要素無効化部123によって画像要素が無効化されたキャプチャ画像に対してOCR(Optical Character Reader)処理を実行し、キャプチャ画像に含まれている各文字の文字コードと当該文字の位置情報とを取得する。出力部14は、OCR部13によって取得された情報を出力する。
The
以下、表示位置取得装置10が実行する処理手順について説明する。図4は、第1の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。
Hereinafter, a processing procedure executed by the display
ステップS101において、ブラウザ表示部121は、表示位置取得装置10にインストールされている複数のWebブラウザ11のうちの1つのWebブラウザ11を起動し、当該Webブラウザ11に対して、評価対象のHTML文書のURLを入力する。その結果、当該HTML文書が当該Webブラウザ11によって表示される。なお、Webブラウザ11の動作環境は、Webブラウザ11の製品の種類や、OS(Operating System)、Webブラウザ11の表示サイズ、及びそれらの組み合わせ等により、様々なものが存在するが、評価したい任意の環境が予め設定された後に、Webブラウザ11が起動されればよい。
In step S <b> 101, the
図5は、評価対象のHTML文書の一例を示す図である。図5において、HTML文書d1は、center要素e1、div要素e2、div要素e3、img要素e4、div要素e5、img要素e6、img要素e7の7つのHTML要素(表示要素)を含む。 FIG. 5 is a diagram illustrating an example of an HTML document to be evaluated. In FIG. 5, an HTML document d1 includes seven HTML elements (display elements) including a center element e1, a div element e2, a div element e3, an img element e4, a div element e5, an img element e6, and an img element e7.
続いて、画面キャプチャ部122は、Webブラウザ11のウィンドウ内の表示領域の画像を取得する(S102)。すなわち、HTML文書d1の表示結果を示す画像が取得される。斯かる画像の取得は、WebDriverを使用することで行われてもよい。WebDriverとは、Webブラウザ11を外部からコントロールするプラグインソフトであり、HTML文書d1を表示しているWebブラウザ11から、その表示内容に関する様々な情報を引き出すことができる。WebDriverについては、http://docs.seleniumhq.org/projects/webdriver/に詳しい。なお、ステップS102において取得された画像を、以下「キャプチャ画像」という。
Subsequently, the
HTML文書d1に関しては、例えば、図6に示されるようなキャプチャ画像が取得される。図6は、キャプチャ画像の一例を示す図である。図6に示されるキャプチャ画像c1において、画像g1は、img要素e4に基づいて表示される。画像g2は、img要素e6に基づいて表示される。画像g3は、img要素e7に基づいて表示される。 For the HTML document d1, for example, a captured image as shown in FIG. 6 is acquired. FIG. 6 is a diagram illustrating an example of a captured image. In the captured image c1 shown in FIG. 6, the image g1 is displayed based on the img element e4. The image g2 is displayed based on the img element e6. The image g3 is displayed based on the img element e7.
続いて、画像要素無効化部123は、HTML文書d1に含まれているHTMLタグのうちの一つのHTMLタグを、処理対象として選択する(S103)。以下、選択されたHTMLタグを、「対象タグ」という。HTML文書d1に含まれているタグの情報についても、WebDriverが利用された取得されてもよいし、他の方法によって取得されてもよい。
Subsequently, the image
続いて、画像要素無効化部123は、対象タグが、<img>タグであるか否かを判定する(S104)。対象タグが、<img>タグでない場合(S104でNo)、ステップS107に進む。対象タグが、<img>タグである場合(S104でYes)、画像要素無効化部123は、<img>タグに対応する画像要素の表示領域(キャプチャ画像c1中における領域)の座標値を、算出する(S105)。当該表示領域の座標値についても、WebDriverを利用して算出されてもよい。続いて、画像要素無効化部123は、キャプチャ画像c1中における、対象タグの表示領域を白で塗りつぶす(S106)。その結果、当該表示領域に表示される予定の画像の表示は、無効化(非表示に)される。なお、白以外の色によって塗りつぶされてもよい。
Subsequently, the image
HTML文書d1中における全てのタグについて処理が終了すると(S107でYes)、キャプチャ画像c1は、図7に示されるようになる。 When the processing is completed for all the tags in the HTML document d1 (Yes in S107), the captured image c1 is as shown in FIG.
図7は、画像要素が無効化された状態のキャプチャ画像の一例を示す図である。図7に示されるキャプチャ画像c2では、図6のキャプチャ画像c1に含まれていた画像g1、g2、及びg3が無効化されている(非表示にされている)。 FIG. 7 is a diagram illustrating an example of a captured image in a state where image elements are invalidated. In the captured image c2 shown in FIG. 7, the images g1, g2, and g3 included in the captured image c1 in FIG. 6 are invalidated (hidden).
続いて、OCR部13は、キャプチャ画像c2に対してOCRを適用する(S108)。その結果、キャプチャ画像c2に含まれている文字ごとに、文字コード及び位置情報(表示座標の値)が取得される。続いて、出力部14は、OCR部13によって文字ごとに取得された文字コード及び位置情報を出力する(S109)。例えば、HTML文書d1の表示に利用されたWebブラウザ11の識別情報等に対応付けられて、各文字の文字コード及び位置情報を含むファイルが、補助記憶装置102に記憶されてもよい。
Subsequently, the
上述したように、第1の実施の形態によれば、HTML文書d1の表示結果を示す画像であるキャプチャ画像c2が取得され、キャプチャ画像c2に対してOCRが適用される。その結果、HTML文書d1に含まれる表示要素のうちの文字要素の表示位置を取得することができる。すなわち、文字要素ごとにタグが付加されていない場合や、JavaScript(登録商標)等のスクリプトによって動的に表示される文字要素に関しても、表示位置を取得することができる。 As described above, according to the first embodiment, the capture image c2 that is an image indicating the display result of the HTML document d1 is acquired, and OCR is applied to the capture image c2. As a result, the display position of the character element among the display elements included in the HTML document d1 can be acquired. That is, the display position can be acquired even when a tag is not added to each character element or for a character element that is dynamically displayed by a script such as JavaScript (registered trademark).
また、本実施の形態では、OCR処理において誤認識の原因になりやすい画像要素が除去された状態で、キャプチャ画像c2に対してOCRが適用される。したがって、OCR処理において、文字の配置位置を調べるためのレイアウト解析のエラー等を低減することができる。その結果、Webブラウザ11によるHTML文書d1の表示結果に対する文字認識の精度の向上を期待することができる。
In the present embodiment, OCR is applied to the captured image c2 in a state where image elements that are likely to cause misrecognition in the OCR processing are removed. Therefore, in the OCR process, it is possible to reduce layout analysis errors and the like for checking the character arrangement position. As a result, it can be expected that the accuracy of character recognition with respect to the display result of the HTML document d1 by the
なお、図4に示した処理が、Webブラウザ11ごとに実行されることにより、Webブラウザ11ごとに、同一のHTML文書d1について、各文字の位置情報を取得することができる。Webブラウザ11ごとの各文字の位置情報を相互に比較することで、各Webブラウザ11による表示結果の相違の有無を確認することができる。各位置情報の比較は、公知の方法を用いて行われればよい。この際、厳密に、座標値の一致までが要求されなくてもよい。例えば、各文字の上下左右方向の関係が一致していれば、比較された表示結果は相互に一致するものとして判定されてもよい。
4 is executed for each
次に、第2の実施の形態について説明する。第2の実施の形態では第1の実施の形態と異なる点について説明する。第2の実施の形態において、特に言及されない点については、第1の実施の形態と同様でもよい。 Next, a second embodiment will be described. In the second embodiment, differences from the first embodiment will be described. In the second embodiment, points that are not particularly mentioned may be the same as those in the first embodiment.
図8は、第2の実施の形態における表示位置取得装置の機能構成例を示す図である。図8中、図3と同一部分又は対応する部分には同一符号を付し、その説明は省略する。 FIG. 8 is a diagram illustrating a functional configuration example of the display position acquisition apparatus according to the second embodiment. In FIG. 8, the same or corresponding parts as in FIG.
図8では、画像要素無効化部123と画面キャプチャ部122との配置関係が、図3と異なっている。第2の実施の形態において、画像要素無効化部123による処理と画面キャプチャ部122による処理との実タイミング、及び当該処理の内容が、第1の実施の形態と異なるからである。
In FIG. 8, the arrangement relationship between the image
図9は、第2の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。 FIG. 9 is a flowchart for explaining an example of a processing procedure executed by the display position acquisition apparatus according to the second embodiment.
ステップS201は、ステップS101と同じでよい。ステップS202において、画像要素無効化部123は、HTML文書d1に含まれているHTMLタグのうちの一つのHTMLタグを、処理対象として選択する(S202)。HTMLタグの選択には、図4のステップS103と同様に、WebDriverが利用されてもよい。なお、ステップS202において選択されたHTMLタグを、以下「対象タグ」という。
Step S201 may be the same as step S101. In step S202, the image
続いて、画像要素無効化部123は、対象タグが、<img>タグであるか否かを判定する(S203)。対象タグが、<img>タグである場合(S203でYes)、画像要素無効化部123は、対象タグのstyle属性のvisibilityの値をhiddenに設定する(S204)。そうすることにより、対象タグのHTML要素を非表示にすることができる。すなわち、画像要素を非表示にすることができる。
Subsequently, the image
一方、対象タグが、<img>タグでない場合(S203でNo)、画像要素無効化部123は、対象タグのstyle属性のbackground−imageの値をnoneに設定する(S205)。そうすることで、対象タグのHTML要素の背景に画像が表示されないようにすることができる。但し、ステップS205の処理は必須ではない。なお、ステップS204及びS205は、WebDriverを利用して実行されてもよい。そうすることで、タグの属性の変更を、表示結果に直ちに反映することができる。すなわち、ステップS204又はS205の実行結果を、即時的に、Webブラウザ11によるHTML文書d1の表示結果に反映させることができる。
On the other hand, when the target tag is not the <img> tag (No in S203), the image
ステップS204又はS205が、HTML文書d1中の全てのタグに対して実行されると(S206でYes)、画面キャプチャ部122は、Webブラウザ11のウィンドウ内の表示領域の画像を取得する(S207)。ステップS207の実行方法は、図4のステップS102と同様でもよい。ステップS207では、<img>タグのHTML要素が非表示にされた状態でのHTML文書d1の表示結果の画像が取得される。すなわち、ステップS207では、図7に示したキャプチャ画像c2が取得される。
When Step S204 or S205 is executed for all the tags in the HTML document d1 (Yes in S206), the
続いて、ステップS208及びS209において、図4のステップS108及びS109と同様の処理が実行される。 Subsequently, in steps S208 and S209, processing similar to that in steps S108 and S109 in FIG. 4 is executed.
上述したように、第2の実施の形態によれば、第1の実施の形態と同様の効果を得ることができる。 As described above, according to the second embodiment, the same effect as that of the first embodiment can be obtained.
次に、第3の実施の形態について説明する。第3の実施の形態では第1又は第2の実施の形態と異なる点について説明する。第3の実施の形態において、特に言及されない点については、第1又は第2の実施の形態と同様でもよい。 Next, a third embodiment will be described. In the third embodiment, differences from the first or second embodiment will be described. In the third embodiment, points not particularly mentioned may be the same as those in the first or second embodiment.
図10は、第3の実施の形態におけるシステム構成例を示す図である。図10中、図1と同一部分には同一符号を付し、その説明は省略する。 FIG. 10 is a diagram illustrating a system configuration example according to the third embodiment. 10, the same parts as those in FIG. 1 are denoted by the same reference numerals, and the description thereof is omitted.
図10において、表示位置取得装置10とHTTPプロキシ30とは、LAN又はインターネット等のネットワークを介して通信可能に接続される。また、HTTPプロキシ30とHTTPサーバ20とは、LAN又はインターネット等のネットワークを介して通信可能に接続される。
In FIG. 10, the display
HTTPプロキシ30は、表示位置取得装置10からのHTTPリクエストを中継してHTTPサーバ20に転送し、当該HTTPリクエストに対するHTTPサーバ20からのHTTPレスポンスを中継して表示位置取得装置10に転送するコンピュータである。なお、第1の実施の形態では、HTTPプロキシは明示されていないが、このことは、第1の実施の形態が、HTTPサーバ20と表示位置取得装置10との間にHTTPプロキシが介在しない形態に限定されることを意図する趣旨ではない。
The
図11は、第3の実施の形態における表示位置取得装置の機能構成例を示す図である。図11中、図3と同一部分又は対応する部分には同一符号を付し、その説明は省略する。 FIG. 11 is a diagram illustrating a functional configuration example of the display position acquisition apparatus according to the third embodiment. In FIG. 11, the same or corresponding parts as those in FIG.
図11において、HTTPプロキシ30は、プロキシ部31及び画像要素無効化部32等を有する。プロキシ部31は、表示位置取得装置10とHTTPサーバ20との間のHTTPリクエスト及びHTTPレスポンスの中継を行う。画像要素無効化部32は、HTTPサーバ20からのHTTPレスポンスに画像データが含まれている場合、当該画像データを、当該画像データと同サイズの透明画像又は白一色の画像の画像データに置き換える。
In FIG. 11, the
すなわち、第3の実施の形態では、HTML文書d1から参照されている各画像データが、HTTPプロキシ30の画像要素無効化部32によって、透明画像又は白一色の画像データに置換される。
In other words, in the third embodiment, each piece of image data referred to from the HTML document d1 is replaced with a transparent image or white-color image data by the image
一方、図11において、表示位置取得装置10の画像取得部12は、画像要素無効化部123を含まない。第3の実施の形態において、HTML文書d1の画像要素は、HTTPプロキシ30において無効化されるからである。
On the other hand, in FIG. 11, the
図12は、第3の実施の形態においてHTTPプロキシが実行する処理手順の一例を説明するためのフローチャートである。 FIG. 12 is a flowchart for explaining an example of a processing procedure executed by the HTTP proxy in the third embodiment.
プロキシ部31は、HTTPサーバ20から表示位置取得装置10宛のHTTPレスポンスを受信すると(S301)、当該HTTPレスポンスに画像データが含まれているか否かを判定する(S302)。すなわち、当該HTTPレスポンスの実体が、画像データであるか否かが判定される。HTTPレスポンスの実体が画像データであるか否かは、例えば、HTTPレスポンスのHTTPヘッダのContent−typeを参照することで判定可能である。
When the
HTTPレスポンスに画像データが含まれている場合(S302でYes)、画像要素無効化部32は、画像のサイズ(縦横のサイズ)が、当該画像データ(以下、「元画像データ」という。)と同じ透明画像又は白一色の画像の画像データを生成し、HTTPレスポンス内の元画像データを、生成された画像データと入れ替える(S303)。
When image data is included in the HTTP response (Yes in S302), the image
なお、Webブラウザ11に対してHTML文書d1のURLが入力されると、Webブラウザ11は、当該URLに対応するHTML文書d1をHTTPサーバ20から取得する。その後で、Webブラウザ11は、HTML文書d1から参照されている画像データ等を、HTTPサーバ20から取得する。例えば、<img>タグによって参照されている画像データや、背景に利用される画像データ等が、HTTPサーバ20から取得される。ステップS303では、この際のHTTPレスポンスが処理対象とされる。
Note that when the URL of the HTML document d1 is input to the
ステップS303又はステップS302でNoの場合に続いて、プロキシ部31は、HTTPレスポンスを表示位置取得装置10に送信する(S304)。
Following the case of No in step S303 or step S302, the
図13は、第3の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。図13中、図4と同一ステップには同一ステップ番号を付し、その説明は省略する。 FIG. 13 is a flowchart for explaining an example of a processing procedure executed by the display position acquisition apparatus according to the third embodiment. In FIG. 13, the same steps as those in FIG. 4 are denoted by the same step numbers, and the description thereof is omitted.
図13のステップS101では、HTTPプロキシ30による処理の効果により、HTML文書d1の各画像要素は、透明又は白一色で表示される。したがって、ステップS108では、画像要素が含まれないキャプチャ画像c2に対してOCRが適用される。
In step S101 of FIG. 13, each image element of the HTML document d1 is displayed in a transparent or white color due to the effect of the processing by the
上述したように、第3の実施の形態においても、第1又は第2の実施の形態と同様の効果を得ることができる。更に、第3の実施の形態では、<img>タグだけでなく、背景画像や画像で表示されたボタン等も透明画像又は白一色にすることができ、文字認識精度について、更なる向上が期待できる。 As described above, also in the third embodiment, the same effect as in the first or second embodiment can be obtained. Furthermore, in the third embodiment, not only the <img> tag but also a background image, a button displayed in the image, and the like can be made into a transparent image or white color, and further improvement in character recognition accuracy is expected. it can.
なお、表示位置取得装置10に、HTTPプロキシ30に対応する機能が実装されてもよい。すなわち、表示位置取得装置10とHTTPプロキシ30とは、一つの装置によって実現されてもよい。更に、表示位置取得装置10に、HTTPサーバ20に対応する機能が実装されてもよい。
Note that a function corresponding to the
次に、第4の実施の形態について説明する。第4の実施の形態では第1〜第3の実施の形態と異なる点について説明する。第4の実施の形態において、特に言及されない点については、第1〜第3の実施の形態のいずれかの形態と同様でもよい。 Next, a fourth embodiment will be described. In the fourth embodiment, differences from the first to third embodiments will be described. In the fourth embodiment, points not particularly mentioned may be the same as those in any of the first to third embodiments.
図14は、第4の実施の形態における表示位置取得装置の機能構成例を示す図である。図14中、図3、図8、又は図11と同一部分又は対応する部分には同一符号を付し、その説明は省略する。 FIG. 14 is a diagram illustrating a functional configuration example of the display position acquisition apparatus according to the fourth embodiment. In FIG. 14, the same or corresponding parts as those in FIG. 3, FIG. 8, or FIG.
図14において、画像取得部12は、ブラックボックス化されている。これは、第4の実施の形態において、画像取得部12の構成は、図3、図8、及び図11のいずれに示したものでもよいからである。すなわち、図1に示したシステム構成が採用される場合、画像取得は、図3又は図8に示した構成を有していればよい。図10に示したシステム構成が採用される場合、画像取得部12は、図11に示した構成を有していればよい。
In FIG. 14, the
図14において、表示位置取得装置10は、更に、タグ表示領域取得部15を有する。タグ表示領域取得部15は、表示位置取得装置10にインストールされたプログラムが、CPU104に実行させる処理により実現される。タグ表示領域取得部15は、HTML文書d1内の各タグに対応するHTML要素について、当該HTML文書d1の表示結果の画像における表示領域の矩形座標を取得(特定)する。矩形座標とは、例えば、当該表示領域に係る矩形領域の対角の頂点の座標値でもよいし、いずれか1つの頂点の座標値と当該矩形領域の幅及び高さとであってもよい。
In FIG. 14, the display
図15は、第4の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。 FIG. 15 is a flowchart for explaining an example of a processing procedure executed by the display position acquisition apparatus according to the fourth embodiment.
ステップS410において、画像取得部12は、HTML文書d1の画像要素が無効化されたキャプチャ画像c2を取得する。キャプチャ画像c2の取得方法は、第1から第3の実施の形態のいずれの方法が採用されてもよい。
In step S410, the
続いて、タグ表示領域取得部15は、HTML文書d1に含まれている各タグに対応する各HTML要素の表示領域の矩形座標を取得する(S420)。
Subsequently, the tag display
図16は、各HTML要素の表示領域の一例を示す図である。図16では、HTML文書d1(図5)に含まれているHTML要素e1〜e7のそれぞれに順番に対応する表示領域a1〜a7が矩形によって示されている。なお、図16では、便宜上、img要素に対応する画像も示されている。 FIG. 16 is a diagram illustrating an example of the display area of each HTML element. In FIG. 16, display areas a1 to a7 corresponding to the HTML elements e1 to e7 included in the HTML document d1 (FIG. 5) in order are indicated by rectangles. In FIG. 16, for convenience, an image corresponding to the img element is also shown.
また、図17は、各HTML要素の表示領域の矩形座標の取得結果の一例を示す図である。図17には、各HTML要素のXPathの値に対応付けられて、当該HTML要素の表示領域の矩形座標が示されている。ステップS420では、図17に示されるような情報が取得される。なお、図17に示されるような情報は、例えば、WebDriverを用いて取得されてもよい。または、図10に示したシステム構成が採用される場合、HTTPプロキシ30において、HTML文書d1中の各HTMLタグに係るHTML要素の表示領域の矩形座標を取得するためのJavaScript(登録商標)が、HTML文書d1に対して挿入されてもよい。そうすることで、各HTML要素の表示領域の矩形座標が取得されてもよい。
FIG. 17 is a diagram illustrating an example of the acquisition result of the rectangular coordinates of the display area of each HTML element. FIG. 17 shows the rectangular coordinates of the display area of the HTML element in association with the XPath value of each HTML element. In step S420, information as shown in FIG. 17 is acquired. Note that the information as illustrated in FIG. 17 may be acquired using WebDriver, for example. Alternatively, when the system configuration shown in FIG. 10 is adopted, in the
続いて、OCR部13は、HTML文書d1に含まれているHTMLタグのうちの一つのHTMLタグを、処理対象(対象タグ)として選択する(S430)。続いて、OCR部13は、キャプチャ画像c2のうち、対象タグに係るHTML要素に関して取得された矩形座標が示す表示領域に対してOCRを適用する(S440)。例えば、対象タグが、HTML要素e1に対応するタグであれば、図16の表示領域a1に対してOCRが適用される。続いて、出力部14は、取得された文字コード及び位置情報を出力する(S450)。
Subsequently, the
ステップS430〜S450が全てのHTMLタグについて実行されると(S460でYes)、出力部14は、同じ文字に関して重複して記録されているOCR結果を削除する(S470)。すなわち、HTML要素は、階層構造を有するため、或るHTML要素(子要素)が他のHTML要素(親要素)の内部に存在する場合が有る。このような場合、子要素については、親要素の表示領域に対するOCR処理と、当該子要素の表示領域に対するOCR処理とによって重複してOCR結果が得られることになる。例えば、図16の例において、表示領域a5に含まれる「文字列6」及び「文字列7」については、表示領域a3に対するOCR処理と、表示領域a5に対するOCR処理とのそれぞれにおいて、OCR結果が得られる。そこで、ステップS470では、斯かる重複が排除される。
When Steps S430 to S450 are executed for all the HTML tags (Yes in S460), the
上述したように、第4の実施の形態によれば、HTML文書d1に含まれる各HTML要素の表示領域ごとに、OCRが適用される。一般的に、属性(大きさ等)の異なる文字列が混在した範囲に対してOCRが適用される場合よりも、属性が共通する文字列ごとにOCRが適用された場合の方が、高い精度で文字認識結果を得られる可能性が高い。本実施の形態によれば、キャプチャ画像c2の全面にではなく、各HTML要素の表示領域ごとにOCRが適用されるため、属性が共通する文字列ごとにOCRが実行される可能性を高めることができる。その結果、文字認識の精度の更なる向上を期待することができる。 As described above, according to the fourth embodiment, OCR is applied for each display area of each HTML element included in the HTML document d1. Generally, higher accuracy is obtained when OCR is applied to each character string having the same attribute than when OCR is applied to a range in which character strings having different attributes (sizes, etc.) are mixed. There is a high possibility that a character recognition result can be obtained. According to the present embodiment, since OCR is applied not for the entire captured image c2 but for each display area of each HTML element, the possibility that OCR is executed for each character string having a common attribute is increased. Can do. As a result, further improvement in the accuracy of character recognition can be expected.
例えば、以下のようなケースについて、第4の実施の形態によれば、OCR処理における誤認識の可能性を低減することができる。図18は、第4の実施の形態による効果を具体的に説明するための図である。 For example, in the following cases, according to the fourth embodiment, the possibility of erroneous recognition in the OCR process can be reduced. FIG. 18 is a diagram for specifically explaining the effect of the fourth embodiment.
図18では、(1)に示されるように、大きな文字と小さな文字が混在している例が示されている。このような場合に、(1)に示される破線の矩形の範囲に対してOCRが適用されると、誤認識が発生しやすくなる。例えば、 "2"及び"0"と同じ大きさの文字が、"0"の後にも続いていると仮定して解析された結果、"%OF"が一文字であると判定され、"%OF"に最も近似する文字が探索されてしまう可能性が有る。その結果、"%OF"の部分に関して誤認識が発生する可能性が高くなる。 FIG. 18 shows an example in which large characters and small characters are mixed as shown in (1). In such a case, if OCR is applied to the dashed rectangular range shown in (1), erroneous recognition is likely to occur. For example, as a result of analysis on the assumption that characters having the same size as “2” and “0” continue after “0”, it is determined that “% OF” is one character, and “% OF There is a possibility that the character closest to "will be searched. As a result, the possibility of erroneous recognition regarding the “% OF” portion increases.
一方、第4の実施の形態では、HTMLソースコード上では、"20"と、"%"と、"OFF"とは、HTML要素が区別されていることを利用し、(2)に示される破線の矩形単位でOCRが適用される。その結果、(1)に関して発生するような誤認識の発生の可能性を低下させることができる。 On the other hand, in the fourth embodiment, on the HTML source code, “20”, “%”, and “OFF” are shown in (2) using the fact that HTML elements are distinguished. OCR is applied in units of broken-line rectangles. As a result, it is possible to reduce the possibility of occurrence of erroneous recognition that occurs with respect to (1).
次に、第5の実施の形態について説明する。第5の実施の形態では第4の実施の形態と異なる点について説明する。第5の実施の形態において、特に言及されない点については、第4の実施の形態と同様でもよい。 Next, a fifth embodiment will be described. In the fifth embodiment, differences from the fourth embodiment will be described. In the fifth embodiment, points not particularly mentioned may be the same as those in the fourth embodiment.
図19は、第5の実施の形態における表示位置取得装置の機能構成例を示す図である。図19中、図14と同一部分又は対応する部分には同一符号を付し、その説明は省略する。 FIG. 19 is a diagram illustrating a functional configuration example of the display position acquisition apparatus according to the fifth embodiment. In FIG. 19, the same or corresponding parts as in FIG.
図19において、表示位置取得装置10は、更に、タグ階層構造解析部16、画像更新部17、及びタグ階層構造更新部18等を有する。これら各部は、表示位置取得装置10にインストールされる1以上のプログラムが、CPU104に実行させる処理により実現される。
In FIG. 19, the display
タグ階層構造解析部16は、HTML文書d1を解析して、HTML文書d1内のタグ(HTML要素)の階層構造又は親子関係(以下、「タグ階層情報」という。)を示す情報を生成(特定)する。タグ階層情報は、タグ(HTML要素)をノードとし、階層関係を有するタグ(HTML要素)に対応するノード間に枝を有するツリー構造の情報である。
The tag hierarchy
画像更新部17は、キャプチャ画像c2中において、OCR処理が終了したHTML要素の表示領域内の文字列を無効化する。
The
タグ階層構造更新部18は、OCR処理が終了したHTML要素に対応するノードをタグ階層情報から削除する。
The tag hierarchy
図20は、第5の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。図20中、図15と同一ステップには同一ステップ番号を付し、その説明は省略する。 FIG. 20 is a flowchart for explaining an example of a processing procedure executed by the display position acquisition apparatus according to the fifth embodiment. In FIG. 20, the same steps as those of FIG.
ステップS420に続いて、タグ階層構造解析部16は、Webブラウザ11からHTMLソースコードを取得して、当該HTMLソースコードに含まれているタグの階層構造を解析し、タグ階層情報を生成する(S421)。本実施の形態において、HTMLソースコードとは、HTML文書d1中に含まれているスクリプト等の実行後の状態のHTMLデータである。すなわち、当該スクリプト等が実行されることで、HTML文書d1中には、動的にHTML要素が追加されうる。ステップS421では、動的に追加されたHTML要素をも含むHTMLソースコードが取得される。すなわち、HTMLソースコードは、Webブラウザ11での表示状態に対応したHTMLデータである。斯かるHTMLソースコードの取得には、WebDriverが利用されてもよい。
Subsequent to step S420, the tag hierarchy
図21は、タグ階層情報の一例を示す図である。図21に示されるタグ階層情報において、各ノードの符号は、当該ノードに対応するHTML要素に対して図5において付されている符号に一致する。また、各ノードには、当該ノードに対応するタグ(HTML要素)のXPathの値が付されている。 FIG. 21 is a diagram illustrating an example of tag hierarchy information. In the tag hierarchy information shown in FIG. 21, the code of each node matches the code attached in FIG. 5 to the HTML element corresponding to the node. Each node is assigned the XPath value of a tag (HTML element) corresponding to the node.
ステップS430の代わりに実行されるステップS430aにおいて、OCR部13は、タグ階層情報における末端のタグのうちの一つのタグを、処理対象として選択する。
In step S430a executed instead of step S430, the
図22は、タグ階層情報における末端のタグを説明するための図である。図22において、破線の矩形に係るノードが、タグ階層情報における末端のタグに対応するノードである。すなわち、タグ階層情報における末端のタグとは、タグ階層情報を構成するノードのうち、子ノードを有さないノードに対応するタグをいう。 FIG. 22 is a diagram for explaining a terminal tag in the tag hierarchy information. In FIG. 22, a node associated with a broken-line rectangle is a node corresponding to the terminal tag in the tag hierarchy information. That is, the terminal tag in the tag hierarchy information refers to a tag corresponding to a node having no child node among the nodes constituting the tag hierarchy information.
ステップS450において、画像更新部17は、キャプチャ画像c2において、ステップS430aにおいて選択されたタグ(HTML要素)の表示領域を、例えば、白色一色で塗りつぶす。当該表示領域は、ステップS420において取得された矩形座標に基づいて特定可能である。なお、当該タグが、img要素に対応するタグである場合、当該img要素に対応する画像要素は、既に無効化されている。したがって、当該img要素の表示領域を白色で塗りつぶすことについて、特段の意義が無い。そこで、ステップS440〜S451は、<img>タグが処理対象の場合には実行されなくてもよい。
In step S450, the
続いて、タグ階層構造更新部18は、ステップS430aにおいて選択されたタグに対応するノードを、タグ階層情報から削除する(S452)。その結果、それまで末端のタグでなかったHTMLタグが、末端のタグになる可能性が有る。
Subsequently, the tag hierarchy
上述したように、第5の実施の形態によれば、第4の実施の形態と同様の効果を得ることができる。但し、第5の実施の形態では、タグの階層構造において、末端のタグに係る表示領域から順に、OCRが適用される。また、OCRが適用された表示領域は、無効化される。したがって、第4の実施の形態(図15)におけるステップS470の処理を不要とすることができる。また、他のタグを包含するタグに対応する表示領域に対してOCRが実行される時点では、当該他のタグに含まれる文字の部分は、既に無効化されている。したがって、属性が共通する文字に対してOCRが適用される可能性を高めることができる。 As described above, according to the fifth embodiment, the same effect as that of the fourth embodiment can be obtained. However, in the fifth embodiment, OCR is applied in order from the display area related to the terminal tag in the tag hierarchical structure. In addition, the display area to which the OCR is applied is invalidated. Therefore, the process of step S470 in the fourth embodiment (FIG. 15) can be made unnecessary. Further, at the time when the OCR is performed on the display area corresponding to the tag including another tag, the character portion included in the other tag has already been invalidated. Therefore, the possibility that OCR is applied to characters having common attributes can be increased.
なお、上記では、ステップS410において、画像要素が無効化されたキャプチャ画像c2が取得される例について説明したが、ステップS410では、画像要素の無効化前のキャプチャ画像c1が取得されてもよい。この場合、ステップS440及びS450は、処理対象のタグが<img>タグである場合には実行せずに、ステップS451は、処理対象のタグが<img>タグである場合であっても実行されるようにすればよい。 In the above description, the example in which the captured image c2 in which the image element is invalidated is obtained in step S410. However, in step S410, the captured image c1 before invalidation of the image element may be obtained. In this case, steps S440 and S450 are not executed when the tag to be processed is an <img> tag, and step S451 is executed even when the tag to be processed is an <img> tag. You can do so.
なお、上記各実施の形態において、HTML文書は、表示データの一例である。HTML要素は、表示要素の一例である。すなわち、HTML文書以外の表示データであって、相互に包含関係又は階層構造を有する複数の表示要素を含む表示データに関して、本実施の形態が適用されてもよい。この場合、Webブラウザの代わりに、当該表示データに適したブラウザが用いられればよい。また、Webブラウザ11は、表示制御部の一例である。画像要素無効化部123は、無効化部の一例である。画面キャプチャ部122は、画像取得部の一例である。OCR部13は、位置取得部の一例である。
In each of the above embodiments, the HTML document is an example of display data. The HTML element is an example of a display element. That is, the present embodiment may be applied to display data other than an HTML document, which is display data including a plurality of display elements having an inclusion relationship or a hierarchical structure. In this case, a browser suitable for the display data may be used instead of the Web browser. The
以上、本発明の実施例について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。 As mentioned above, although the Example of this invention was explained in full detail, this invention is not limited to such specific embodiment, In the range of the summary of this invention described in the claim, various deformation | transformation・ Change is possible.
以上の説明に関し、更に以下の項を開示する。
(付記1)
コンピュータに、
文字要素と画像要素とを表示要素として含む表示データを表示し、
前記表示データの表示結果を示す画像を取得し、
取得された画像において、前記画像要素の表示を無効化し、
前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行させることを特徴とする表示位置取得プログラム。
(付記2)
コンピュータに、
文字要素と画像要素とを表示要素として含む表示データを表示し、
前記表示データの表示要素のうち、画像要素の表示を無効化し、
前記表示データの表示結果について、画像要素の表示が無効化された状態の画像を取得し、
取得された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行させることを特徴とする表示位置取得プログラム。
(付記3)
前記表示データに含まれる各表示要素の表示領域を特定する処理を前記コンピュータに実行させ、
前記位置情報を取得する処理は、前記表示領域ごとに文字認識を行う、
ことを特徴とする付記1又は2記載の表示位置取得プログラム。
(付記4)
前記表示データに含まれる表示要素間の階層構造を特定する処理と、
前記表示領域ごとに文字認識が行われるたびに、文字認識が行われた表示領域を無効化する処理と、
を前記コンピュータに実行させ、
前記位置情報を取得する処理は、前記階層構造において末端の表示要素に係る表示領域から順に、文字認識を行う、
ことを特徴とする付記3記載の表示位置取得プログラム。
(付記5)
文字要素と画像要素とを表示要素として含む表示データを表示する表示制御部と、
前記表示データの表示結果を示す画像を取得する画像取得部と、
取得された画像において、前記画像要素の表示を無効化する無効化部と、
前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する位置取得部と、
を有することを特徴とする表示位置取得装置。
(付記6)
文字要素と画像要素とを表示要素として含む表示データを表示する表示制御部と、
前記表示データの表示要素のうち、画像要素の表示を無効化する無効化部と、
前記表示データの表示結果について、画像要素の表示が無効化された状態の画像を取得する画像取得部と、
取得された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する位置取得部と、
を有することを特徴とする表示位置取得装置。
(付記7)
前記表示データに含まれる各表示要素の表示領域を特定する第1の特定部を有し、
前記位置取得部は、前記表示領域ごとに文字認識を行う、
ことを特徴とする付記5又は6記載の表示位置取得装置。
(付記8)
前記表示データに含まれる表示要素間の階層構造を特定する第2の特定部と、
前記表示領域ごとに文字認識が行われるたびに、文字認識が行われた表示領域を無効化する第2の無効化部と、
を有し、
前記位置取得部は、前記階層構造において末端の表示要素に係る表示領域から順に、文字認識を行う、
ことを特徴とする付記7記載の表示位置取得装置。
(付記9)
コンピュータが、
文字要素と画像要素とを表示要素として含む表示データを表示し、
前記表示データの表示結果を示す画像を取得し、
取得された画像において、前記画像要素の表示を無効化し、
前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行することを特徴とする表示位置取得方法。
(付記10)
コンピュータが、
文字要素と画像要素とを表示要素として含む表示データを表示し、
前記表示データの表示要素のうち、画像要素の表示を無効化し、
前記表示データの表示結果について、画像要素の表示が無効化された状態の画像を取得し、
取得された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行することを特徴とする表示位置取得方法。
(付記11)
前記表示データに含まれる各表示要素の表示領域を特定する処理を前記コンピュータが実行し、
前記位置情報を取得する処理は、前記表示領域ごとに文字認識を行う、
ことを特徴とする付記9又は10記載の表示位置取得方法。
(付記12)
前記表示データに含まれる表示要素間の階層構造を特定する処理と、
前記表示領域ごとに文字認識が行われるたびに、文字認識が行われた表示領域を無効化する処理と、
を前記コンピュータが実行し、
前記位置情報を取得する処理は、前記階層構造において末端の表示要素に係る表示領域から順に、文字認識を行う、
ことを特徴とする付記11記載の表示位置取得方法。
Regarding the above description, the following items are further disclosed.
(Appendix 1)
On the computer,
Display the display data including the text element and the image element as display elements,
Obtaining an image indicating a display result of the display data;
In the acquired image, disable the display of the image element,
By performing character recognition on an image in which display of the image element is invalidated, position information of each character element included in the display data is acquired.
A display position acquisition program characterized by causing a process to be executed.
(Appendix 2)
On the computer,
Display the display data including the text element and the image element as display elements,
Among the display elements of the display data, invalidate the display of the image element,
For the display result of the display data, obtain an image in a state where the display of the image element is invalidated,
By performing character recognition on the acquired image, position information of each character element included in the display data is acquired.
A display position acquisition program characterized by causing a process to be executed.
(Appendix 3)
Causing the computer to execute a process of specifying a display area of each display element included in the display data;
The process of acquiring the position information performs character recognition for each display area.
The display position acquisition program according to
(Appendix 4)
Processing for specifying a hierarchical structure between display elements included in the display data;
Each time character recognition is performed for each display area, a process for invalidating the display area for which character recognition has been performed;
To the computer,
The process of acquiring the position information performs character recognition in order from the display area related to the terminal display element in the hierarchical structure.
The display position acquisition program according to
(Appendix 5)
A display control unit for displaying display data including character elements and image elements as display elements;
An image acquisition unit for acquiring an image indicating a display result of the display data;
In the acquired image, an invalidation unit for invalidating the display of the image element;
A position acquisition unit that acquires position information of each character element included in the display data by performing character recognition on an image in which display of the image element is invalidated;
A display position acquisition apparatus comprising:
(Appendix 6)
A display control unit for displaying display data including character elements and image elements as display elements;
Among the display elements of the display data, an invalidation unit for invalidating display of the image element,
For the display result of the display data, an image acquisition unit that acquires an image in a state where display of image elements is invalidated;
A position acquisition unit that acquires position information of each character element included in the display data by performing character recognition on the acquired image;
A display position acquisition apparatus comprising:
(Appendix 7)
A first specifying unit that specifies a display area of each display element included in the display data;
The position acquisition unit performs character recognition for each display area.
The display position acquisition device according to
(Appendix 8)
A second specifying unit for specifying a hierarchical structure between display elements included in the display data;
A second invalidation unit that invalidates the display area in which character recognition is performed each time character recognition is performed for each display area;
Have
The position acquisition unit performs character recognition in order from the display area related to the terminal display element in the hierarchical structure.
The display position acquisition device according to appendix 7, wherein
(Appendix 9)
Computer
Display the display data including the text element and the image element as display elements,
Obtaining an image indicating a display result of the display data;
In the acquired image, disable the display of the image element,
By performing character recognition on an image in which display of the image element is invalidated, position information of each character element included in the display data is acquired.
A display position acquisition method characterized by executing processing.
(Appendix 10)
Computer
Display the display data including the text element and the image element as display elements,
Among the display elements of the display data, invalidate the display of the image element,
For the display result of the display data, obtain an image in a state where the display of the image element is invalidated,
By performing character recognition on the acquired image, position information of each character element included in the display data is acquired.
A display position acquisition method characterized by executing processing.
(Appendix 11)
The computer executes a process of specifying a display area of each display element included in the display data,
The process of acquiring the position information performs character recognition for each display area.
The display position acquisition method according to
(Appendix 12)
Processing for specifying a hierarchical structure between display elements included in the display data;
Each time character recognition is performed for each display area, a process for invalidating the display area for which character recognition has been performed;
The computer executes,
The process of acquiring the position information performs character recognition in order from the display area related to the terminal display element in the hierarchical structure.
The display position acquisition method according to
10 表示位置取得装置
11 Webブラウザ
12 画像取得部
13 OCR部
14 出力部
15 タグ表示領域取得部
16 タグ階層構造解析部
17 画像更新部
18 タグ階層構造更新部
20 HTTPサーバ
30 HTTPプロキシ
31 プロキシ部
32 画像要素無効化部
100 ドライブ装置
101 記録媒体
102 補助記憶装置
103 メモリ装置
104 CPU
105 インタフェース装置
106 表示装置
107 入力装置
121 ブラウザ表示部
122 画面キャプチャ部
123 画像要素無効化部
B バス
DESCRIPTION OF
105
Claims (8)
文字要素と画像要素とを表示要素として含む表示データを表示し、
前記表示データの表示結果を示す画像を取得し、
取得された画像において、前記画像要素の表示を無効化し、
前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行させることを特徴とする表示位置取得プログラム。 On the computer,
Display the display data including the text element and the image element as display elements,
Obtaining an image indicating a display result of the display data;
In the acquired image, disable the display of the image element,
By performing character recognition on an image in which display of the image element is invalidated, position information of each character element included in the display data is acquired.
A display position acquisition program characterized by causing a process to be executed.
文字要素と画像要素とを表示要素として含む表示データを表示し、
前記表示データの表示要素のうち、画像要素の表示を無効化し、
前記表示データの表示結果について、画像要素の表示が無効化された状態の画像を取得し、
取得された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行させることを特徴とする表示位置取得プログラム。 On the computer,
Display the display data including the text element and the image element as display elements,
Among the display elements of the display data, invalidate the display of the image element,
For the display result of the display data, obtain an image in a state where the display of the image element is invalidated,
By performing character recognition on the acquired image, position information of each character element included in the display data is acquired.
A display position acquisition program characterized by causing a process to be executed.
前記位置情報を取得する処理は、前記表示領域ごとに文字認識を行う、
ことを特徴とする請求項1又は2記載の表示位置取得プログラム。 Causing the computer to execute a process of specifying a display area of each display element included in the display data;
The process of acquiring the position information performs character recognition for each display area.
The display position acquisition program according to claim 1 or 2.
前記表示領域ごとに文字認識が行われるたびに、文字認識が行われた表示領域を無効化する処理と、
を前記コンピュータに実行させ、
前記位置情報を取得する処理は、前記階層構造において末端の表示要素に係る表示領域から順に、文字認識を行う、
ことを特徴とする請求項3記載の表示位置取得プログラム。 Processing for specifying a hierarchical structure between display elements included in the display data;
Each time character recognition is performed for each display area, a process for invalidating the display area for which character recognition has been performed;
To the computer,
The process of acquiring the position information performs character recognition in order from the display area related to the terminal display element in the hierarchical structure.
The display position acquisition program according to claim 3.
前記表示データの表示結果を示す画像を取得する画像取得部と、
取得された画像において、前記画像要素の表示を無効化する無効化部と、
前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する位置取得部と、
を有することを特徴とする表示位置取得装置。 A display control unit for displaying display data including character elements and image elements as display elements;
An image acquisition unit for acquiring an image indicating a display result of the display data;
In the acquired image, an invalidation unit for invalidating the display of the image element;
A position acquisition unit that acquires position information of each character element included in the display data by performing character recognition on an image in which display of the image element is invalidated;
A display position acquisition apparatus comprising:
前記表示データの表示要素のうち、画像要素の表示を無効化する無効化部と、
前記表示データの表示結果について、画像要素の表示が無効化された状態の画像を取得する画像取得部と、
取得された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する位置取得部と、
を有することを特徴とする表示位置取得装置。 A display control unit for displaying display data including character elements and image elements as display elements;
Among the display elements of the display data, an invalidation unit for invalidating display of the image element,
For the display result of the display data, an image acquisition unit that acquires an image in a state where display of image elements is invalidated;
A position acquisition unit that acquires position information of each character element included in the display data by performing character recognition on the acquired image;
A display position acquisition apparatus comprising:
文字要素と画像要素とを表示要素として含む表示データを表示し、
前記表示データの表示結果を示す画像を取得し、
取得された画像において、前記画像要素の表示を無効化し、
前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行することを特徴とする表示位置取得方法。 Computer
Display the display data including the text element and the image element as display elements,
Obtaining an image indicating a display result of the display data;
In the acquired image, disable the display of the image element,
By performing character recognition on an image in which display of the image element is invalidated, position information of each character element included in the display data is acquired.
A display position acquisition method characterized by executing processing.
文字要素と画像要素とを表示要素として含む表示データを表示し、
前記表示データの表示要素のうち、画像要素の表示を無効化し、
前記表示データの表示結果について、画像要素の表示が無効化された状態の画像を取得し、
取得された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行することを特徴とする表示位置取得方法。 Computer
Display the display data including the text element and the image element as display elements,
Among the display elements of the display data, invalidate the display of the image element,
For the display result of the display data, obtain an image in a state where the display of the image element is invalidated,
By performing character recognition on the acquired image, position information of each character element included in the display data is acquired.
A display position acquisition method characterized by executing processing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015081041A JP6565287B2 (en) | 2015-04-10 | 2015-04-10 | Display position acquisition program, display position acquisition device, and display position acquisition method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015081041A JP6565287B2 (en) | 2015-04-10 | 2015-04-10 | Display position acquisition program, display position acquisition device, and display position acquisition method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2016200992A true JP2016200992A (en) | 2016-12-01 |
JP6565287B2 JP6565287B2 (en) | 2019-08-28 |
Family
ID=57424328
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015081041A Active JP6565287B2 (en) | 2015-04-10 | 2015-04-10 | Display position acquisition program, display position acquisition device, and display position acquisition method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6565287B2 (en) |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1166192A (en) * | 1997-08-12 | 1999-03-09 | Casio Comput Co Ltd | Slip processor and storage medium |
JP2007526566A (en) * | 2004-03-01 | 2007-09-13 | ブコデ ピーティーワイ リミテッド | Encoding and decoding character data |
JP2009031952A (en) * | 2007-07-25 | 2009-02-12 | Tokai Television Broadcasting Co Ltd | Information providing system and information providing method |
JP2010086075A (en) * | 2008-09-29 | 2010-04-15 | Nec Personal Products Co Ltd | Retrieval apparatus, information processing apparatus, retrieval method, program, and recording medium |
US20110194770A1 (en) * | 2010-02-05 | 2011-08-11 | Samsung Electronics Co., Ltd. | Document editing apparatus and method |
JP2012009000A (en) * | 2010-05-24 | 2012-01-12 | Pfu Ltd | Business form processing system, ocr device, ocr processing program, business form creation device, business form creation program, and business form processing method |
JP2013020491A (en) * | 2011-07-12 | 2013-01-31 | Sharp Corp | Content creation support device, content creation support method, program and recording medium |
JP2016018254A (en) * | 2014-07-04 | 2016-02-01 | 富士通株式会社 | Correction candidate determining device, correction candidate determining method, and program |
JP2016045545A (en) * | 2014-08-20 | 2016-04-04 | 株式会社日立製作所 | Influence investigation system, influence investigation method, and influence investigation program |
JP2016066227A (en) * | 2014-09-24 | 2016-04-28 | 富士通株式会社 | Incompatibility detecting device, incompatibility detecting method and program |
-
2015
- 2015-04-10 JP JP2015081041A patent/JP6565287B2/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH1166192A (en) * | 1997-08-12 | 1999-03-09 | Casio Comput Co Ltd | Slip processor and storage medium |
JP2007526566A (en) * | 2004-03-01 | 2007-09-13 | ブコデ ピーティーワイ リミテッド | Encoding and decoding character data |
JP2009031952A (en) * | 2007-07-25 | 2009-02-12 | Tokai Television Broadcasting Co Ltd | Information providing system and information providing method |
JP2010086075A (en) * | 2008-09-29 | 2010-04-15 | Nec Personal Products Co Ltd | Retrieval apparatus, information processing apparatus, retrieval method, program, and recording medium |
US20110194770A1 (en) * | 2010-02-05 | 2011-08-11 | Samsung Electronics Co., Ltd. | Document editing apparatus and method |
JP2012009000A (en) * | 2010-05-24 | 2012-01-12 | Pfu Ltd | Business form processing system, ocr device, ocr processing program, business form creation device, business form creation program, and business form processing method |
JP2013020491A (en) * | 2011-07-12 | 2013-01-31 | Sharp Corp | Content creation support device, content creation support method, program and recording medium |
JP2016018254A (en) * | 2014-07-04 | 2016-02-01 | 富士通株式会社 | Correction candidate determining device, correction candidate determining method, and program |
JP2016045545A (en) * | 2014-08-20 | 2016-04-04 | 株式会社日立製作所 | Influence investigation system, influence investigation method, and influence investigation program |
JP2016066227A (en) * | 2014-09-24 | 2016-04-28 | 富士通株式会社 | Incompatibility detecting device, incompatibility detecting method and program |
Also Published As
Publication number | Publication date |
---|---|
JP6565287B2 (en) | 2019-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200401431A1 (en) | Adaptive web-based robotic process automation | |
CN104850388B (en) | web page rendering method and device | |
JP6036100B2 (en) | Step-by-step visual comparison of web browser screens | |
US20210103515A1 (en) | Method of detecting user interface layout issues for web applications | |
JP6514244B2 (en) | Difference detection device and program | |
US10049095B2 (en) | In-context editing of output presentations via automatic pattern detection | |
CN104252410A (en) | Method and equipment for testing control in page | |
US11403078B2 (en) | Interface layout interference detection | |
WO2020235085A1 (en) | Operation log visualization device, operation log visualization method, and operation log visualization program | |
CN109189686A (en) | Automation regression testing method, apparatus, storage medium and computer equipment | |
CN104679495A (en) | Method and device for recognizing software | |
WO2016095502A1 (en) | Mathematical formula processing method, device, apparatus and computer storage medium | |
CN117093386B (en) | Page screenshot method, device, computer equipment and storage medium | |
US9736323B2 (en) | Method of using address book of image forming apparatus on web browser and image forming apparatus for performing the same | |
WO2019144259A1 (en) | Transformation of resource files using mapped keys for tracking content location | |
JP2018506783A (en) | Generating element identifiers | |
CN116795377A (en) | Code data processing method and device | |
US10445290B1 (en) | System and method for a smart configurable high performance interactive log file viewer | |
JP6565287B2 (en) | Display position acquisition program, display position acquisition device, and display position acquisition method | |
JP5702265B2 (en) | Program automatic generation apparatus and program automatic generation method | |
WO2022259561A1 (en) | Identification device, identification method, and identification program | |
CN112783483B (en) | Function creation method, device, equipment and medium based on suspension button assembly | |
JP7260150B2 (en) | WEBSITE DESIGN SUPPORT DEVICE, WEBSITE DESIGN SUPPORT METHOD, AND PROGRAM | |
JP6446945B2 (en) | Incompatible detection device, incompatible detection method, and program | |
CN106227713A (en) | Document processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180206 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20181130 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20181218 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190117 |
|
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: 20190702 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190715 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6565287 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |