JP6565287B2 - 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 PDF

Info

Publication number
JP6565287B2
JP6565287B2 JP2015081041A JP2015081041A JP6565287B2 JP 6565287 B2 JP6565287 B2 JP 6565287B2 JP 2015081041 A JP2015081041 A JP 2015081041A JP 2015081041 A JP2015081041 A JP 2015081041A JP 6565287 B2 JP6565287 B2 JP 6565287B2
Authority
JP
Japan
Prior art keywords
display
image
character
position acquisition
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.)
Active
Application number
JP2015081041A
Other languages
Japanese (ja)
Other versions
JP2016200992A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2015081041A priority Critical patent/JP6565287B2/en
Publication of JP2016200992A publication Critical patent/JP2016200992A/en
Application granted granted Critical
Publication of JP6565287B2 publication Critical patent/JP6565287B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Character Discrimination (AREA)
  • Information Transfer Between Computers (AREA)
  • Document Processing Apparatus (AREA)

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.

特開2010−39815号公報JP 2010-39815 A 特開2006−171851号公報JP 2006-171851 A

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の実施の形態におけるシステム構成例を示す図である。It is a figure which shows the system configuration example in 1st Embodiment. 第1の実施の形態における表示位置取得装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of the display position acquisition apparatus in 1st Embodiment. 第1の実施の形態における表示位置取得装置の機能構成例を示す図である。It is a figure which shows the function structural example of the display position acquisition apparatus in 1st Embodiment. 第1の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence which the display position acquisition apparatus in 1st Embodiment performs. 評価対象のHTML文書の一例を示す図である。It is a figure which shows an example of the HTML document of evaluation object. キャプチャ画像の一例を示す図である。It is a figure which shows an example of a captured image. 画像要素が無効化された状態のキャプチャ画像の一例を示す図である。It is a figure which shows an example of the capture image in the state where the image element was invalidated. 第2の実施の形態における表示位置取得装置の機能構成例を示す図である。It is a figure which shows the function structural example of the display position acquisition apparatus in 2nd Embodiment. 第2の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence which the display position acquisition apparatus in 2nd Embodiment performs. 第3の実施の形態におけるシステム構成例を示す図である。It is a figure which shows the system configuration example in 3rd Embodiment. 第3の実施の形態における表示位置取得装置の機能構成例を示す図である。It is a figure which shows the function structural example of the display position acquisition apparatus in 3rd Embodiment. 第3の実施の形態においてHTTPプロキシが実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence which an HTTP proxy performs in 3rd Embodiment. 第3の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence which the display position acquisition apparatus in 3rd Embodiment performs. 第4の実施の形態における表示位置取得装置の機能構成例を示す図である。It is a figure which shows the function structural example of the display position acquisition apparatus in 4th Embodiment. 第4の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence which the display position acquisition apparatus in 4th Embodiment performs. 各HTML要素の表示領域の一例を示す図である。It is a figure which shows an example of the display area of each HTML element. 各HTML要素の表示領域の矩形座標の取得結果の一例を示す図である。It is a figure which shows an example of the acquisition result of the rectangular coordinate of the display area of each HTML element. 第4の実施の形態による効果を具体的に説明するための図である。It is a figure for demonstrating the effect by 4th Embodiment concretely. 第5の実施の形態における表示位置取得装置の機能構成例を示す図である。It is a figure which shows the function structural example of the display position acquisition apparatus in 5th Embodiment. 第5の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。It is a flowchart for demonstrating an example of the process sequence which the display position acquisition apparatus in 5th Embodiment performs. タグ階層情報の一例を示す図である。It is a figure which shows an example of tag hierarchy information. タグ階層情報における末端のタグを説明するための図である。It is a figure for demonstrating the terminal tag in tag hierarchy information.

以下、図面に基づいて本発明の実施の形態を説明する。図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 server 20 and the display position acquisition device 10 are communicably connected via a network such as the Internet or a LAN (Local Area Network).

HTTPサーバ20は、1以上のHTML文書を記憶するコンピュータである。HTTPサーバ20は、HTTPリクエストを受信すると、当該HTTPリクエストに係るURL(Uniform Resource Locator)に対応するHTML文書を返信する。   The HTTP server 20 is a computer that stores one or more HTML documents. When receiving the HTTP request, the HTTP server 20 returns an HTML document corresponding to a URL (Uniform Resource Locator) related to the HTTP request.

表示位置取得装置10は、HTTPサーバ20に記憶されたHTML文書がWebブラウザ11によって表示された状態において、HTML文書に含まれている表示要素(HTML要素)のうちの各文字の表示位置を取得するコンピュータである。   The display position acquisition device 10 acquires the display position of each character among the display elements (HTML elements) included in the HTML document in a state where the HTML document stored in the HTTP server 20 is displayed by the Web browser 11. Computer.

なお、表示位置取得装置10に、HTTPサーバ20に対応する機能が実装されてもよい。すなわち、表示位置取得装置10とHTTPサーバ20とは、一つの装置によって実現されてもよい。   Note that a function corresponding to the HTTP server 20 may be implemented in the display position acquisition apparatus 10. That is, the display position acquisition device 10 and the HTTP server 20 may be realized by a single device.

図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 drive device 100, an auxiliary storage device 102, a memory device 103, a CPU 104, an interface device 105, a display device 106, an input device 107, and the like, which are mutually connected by a bus B. .

表示位置取得装置10での処理を実現するプログラムは、記録媒体101によって提供される。プログラムを記録した記録媒体101がドライブ装置100にセットされると、プログラムが記録媒体101からドライブ装置100を介して補助記憶装置102にインストールされる。但し、プログラムのインストールは必ずしも記録媒体101より行う必要はなく、ネットワークを介して他のコンピュータよりダウンロードするようにしてもよい。補助記憶装置102は、インストールされたプログラムを格納すると共に、必要なファイルやデータ等を格納する。   A program that realizes processing in the display position acquisition apparatus 10 is provided by the recording medium 101. When the recording medium 101 on which the program is recorded is set in the drive device 100, the program is installed from the recording medium 101 to the auxiliary storage device 102 via the drive device 100. However, the program need not be installed from the recording medium 101 and may be downloaded from another computer via a network. The auxiliary storage device 102 stores the installed program and also stores necessary files and data.

メモリ装置103は、プログラムの起動指示があった場合に、補助記憶装置102からプログラムを読み出して格納する。CPU104は、メモリ装置103に格納されたプログラムに従って表示位置取得装置10に係る機能を実現する。インタフェース装置105は、ネットワークに接続するためのインタフェースとして用いられる。表示装置106はプログラムによるGUI(Graphical User Interface)等を表示する。入力装置107はキーボード及びマウス等であり、様々な操作指示を入力させるために用いられる。   The memory device 103 reads the program from the auxiliary storage device 102 and stores it when there is an instruction to start the program. The CPU 104 realizes functions related to the display position acquisition device 10 according to a program stored in the memory device 103. The interface device 105 is used as an interface for connecting to a network. The display device 106 displays a GUI (Graphical User Interface) or the like by a program. The input device 107 is a keyboard, a mouse, or the like, and is used for inputting various operation instructions.

なお、記録媒体101の一例としては、CD−ROM、DVDディスク、又はUSBメモリ等の可搬型の記録媒体が挙げられる。また、補助記憶装置102の一例としては、HDD(Hard Disk Drive)又はフラッシュメモリ等が挙げられる。記録媒体101及び補助記憶装置102のいずれについても、コンピュータ読み取り可能な記録媒体に相当する。   An example of the recording medium 101 is a portable recording medium such as a CD-ROM, a DVD disk, or a USB memory. An example of the auxiliary storage device 102 is an HDD (Hard Disk Drive) or a flash memory. Both the recording medium 101 and the auxiliary storage device 102 correspond to computer-readable recording media.

図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 position acquisition apparatus 10 includes a plurality of Web browsers 11, an image acquisition unit 12, an OCR unit 13, an output unit 14, and the like. Each of these units is realized by processing that one or more programs installed in the display position acquisition apparatus 10 cause the CPU 104 to execute.

Webブラウザ11は、HTML文書をHTMLサーバから取得し、取得されたHTML文書の表示を制御する。また、Webブラウザ11は、JavaScript(登録商標)等のスクリプトがHTML文書に含まれている場合には、当該スクリプトを実行する。各Webブラウザ11は、例えば、相互に異なる種類のWebブラウザ11である。   The Web browser 11 acquires an HTML document from the HTML server, and controls display of the acquired HTML document. In addition, when a script such as JavaScript (registered trademark) is included in the HTML document, the Web browser 11 executes the script. Each Web browser 11 is, for example, a different type of Web browser 11.

画像取得部12は、Webブラウザ11によるHTML文書の表示結果に係る画像であって、HTML文書中の表示要素(HTML要素)のうち、画像要素(イメージ要素)の表示領域が無効化された画像を取得する。図3において、画像取得部12は、ブラウザ表示部121、画面キャプチャ部122、及び画像要素無効化部123等を含む。   The image acquisition unit 12 is an image related to a display result of an HTML document by the Web browser 11 and is an image in which a display area of an image element (image element) is invalidated among display elements (HTML elements) in the HTML document. To get. 3, the image acquisition unit 12 includes a browser display unit 121, a screen capture unit 122, an image element invalidation unit 123, and the like.

ブラウザ表示部121は、評価対象のHTML文書に対応するURLをWebブラウザ11に入力して、当該HTML文書の表示をWebブラウザ11に実行させる。画面キャプチャ部122は、Webブラウザ11によるHTML文書の表示結果を示す画像を、例えば、画面キャプチャによって取得する。画面キャプチャ部122によって取得される画像を、「キャプチャ画像」という。画像要素無効化部123は、キャプチャ画像の領域において、HTML文書の表示要素のうちの画像要素の表示を無効化する。画像要素とは、HTML文書中における<img>タグに基づいて表示された画像をいう。   The browser display unit 121 inputs a URL corresponding to the HTML document to be evaluated to the Web browser 11 and causes the Web browser 11 to display the HTML document. The screen capture unit 122 acquires an image indicating the display result of the HTML document by the Web browser 11 by screen capture, for example. An image acquired by the screen capture unit 122 is referred to as a “capture image”. The image element invalidation unit 123 invalidates the display of the image elements among the display elements of the HTML document in the capture image area. An image element refers to an image displayed based on an <img> tag in an HTML document.

OCR部13は、画像要素無効化部123によって画像要素が無効化されたキャプチャ画像に対してOCR(Optical Character Reader)処理を実行し、キャプチャ画像に含まれている各文字の文字コードと当該文字の位置情報とを取得する。出力部14は、OCR部13によって取得された情報を出力する。   The OCR unit 13 performs OCR (Optical Character Reader) processing on the captured image in which the image element is invalidated by the image element invalidating unit 123, and the character code of each character included in the captured image and the character To get location information. The output unit 14 outputs information acquired by the OCR unit 13.

以下、表示位置取得装置10が実行する処理手順について説明する。図4は、第1の実施の形態における表示位置取得装置が実行する処理手順の一例を説明するためのフローチャートである。   Hereinafter, a processing procedure executed by the display position acquisition apparatus 10 will be described. FIG. 4 is a flowchart for explaining an example of a processing procedure executed by the display position acquisition apparatus according to the first embodiment.

ステップ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 browser display unit 121 activates one of the plurality of web browsers 11 installed in the display position acquisition apparatus 10, and the HTML document to be evaluated with respect to the web browser 11. Enter the URL. As a result, the HTML document is displayed by the Web browser 11. There are various operating environments of the Web browser 11 depending on the product type of the Web browser 11, the OS (Operating System), the display size of the Web browser 11, combinations thereof, and the like. After the environment is set in advance, the web browser 11 may be activated.

図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 screen capture unit 122 acquires an image of the display area in the window of the Web browser 11 (S102). That is, an image indicating the display result of the HTML document d1 is acquired. Such image acquisition may be performed using a WebDriver. The WebDriver is plug-in software that controls the Web browser 11 from the outside, and can extract various information related to the display contents from the Web browser 11 displaying the HTML document d1. Details on WebDriver can be found at http://docs.seleniumhq.org/projects/webdriver/. The image acquired in step S102 is hereinafter referred to as “capture image”.

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 element invalidation unit 123 selects one HTML tag among the HTML tags included in the HTML document d1 as a processing target (S103). Hereinafter, the selected HTML tag is referred to as a “target tag”. The tag information included in the HTML document d1 may also be acquired using WebDriver or may be acquired by other methods.

続いて、画像要素無効化部123は、対象タグが、<img>タグであるか否かを判定する(S104)。対象タグが、<img>タグでない場合(S104でNo)、ステップS107に進む。対象タグが、<img>タグである場合(S104でYes)、画像要素無効化部123は、<img>タグに対応する画像要素の表示領域(キャプチャ画像c1中における領域)の座標値を、算出する(S105)。当該表示領域の座標値についても、WebDriverを利用して算出されてもよい。続いて、画像要素無効化部123は、キャプチャ画像c1中における、対象タグの表示領域を白で塗りつぶす(S106)。その結果、当該表示領域に表示される予定の画像の表示は、無効化(非表示に)される。なお、白以外の色によって塗りつぶされてもよい。   Subsequently, the image element invalidating unit 123 determines whether the target tag is an <img> tag (S104). If the target tag is not the <img> tag (No in S104), the process proceeds to step S107. When the target tag is the <img> tag (Yes in S104), the image element invalidating unit 123 sets the coordinate value of the display area of the image element (area in the captured image c1) corresponding to the <img> tag. Calculate (S105). The coordinate value of the display area may also be calculated using WebDriver. Subsequently, the image element invalidating unit 123 paints the display area of the target tag in white in the captured image c1 (S106). As a result, the display of the image scheduled to be displayed in the display area is invalidated (hidden). It may be filled with a color other than white.

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 OCR unit 13 applies OCR to the captured image c2 (S108). As a result, the character code and position information (value of display coordinates) are acquired for each character included in the captured image c2. Subsequently, the output unit 14 outputs the character code and position information acquired for each character by the OCR unit 13 (S109). For example, a file including the character code of each character and position information may be stored in the auxiliary storage device 102 in association with the identification information of the Web browser 11 used for displaying the HTML document d1.

上述したように、第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 Web browser 11 is improved.

なお、図4に示した処理が、Webブラウザ11ごとに実行されることにより、Webブラウザ11ごとに、同一のHTML文書d1について、各文字の位置情報を取得することができる。Webブラウザ11ごとの各文字の位置情報を相互に比較することで、各Webブラウザ11による表示結果の相違の有無を確認することができる。各位置情報の比較は、公知の方法を用いて行われればよい。この際、厳密に、座標値の一致までが要求されなくてもよい。例えば、各文字の上下左右方向の関係が一致していれば、比較された表示結果は相互に一致するものとして判定されてもよい。   4 is executed for each Web browser 11, the position information of each character can be acquired for the same HTML document d1 for each Web browser 11. By comparing the position information of each character for each Web browser 11 with each other, it is possible to confirm whether there is a difference in display results between the Web browsers 11. The comparison of the position information may be performed using a known method. At this time, strictly, it is not necessary to require the coordinate values to coincide. For example, if the vertical and horizontal relations of the characters match, the compared display results may be determined as matching each other.

次に、第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 element invalidation unit 123 and the screen capture unit 122 is different from that in FIG. This is because, in the second embodiment, the actual timing between the processing by the image element invalidation unit 123 and the processing by the screen capture unit 122 and the contents of the processing are different from those in the first embodiment.

図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 element invalidating unit 123 selects one HTML tag among the HTML tags included in the HTML document d1 as a processing target (S202). For the selection of the HTML tag, WebDriver may be used as in step S103 of FIG. The HTML tag selected in step S202 is hereinafter referred to as “target tag”.

続いて、画像要素無効化部123は、対象タグが、<img>タグであるか否かを判定する(S203)。対象タグが、<img>タグである場合(S203でYes)、画像要素無効化部123は、対象タグのstyle属性のvisibilityの値をhiddenに設定する(S204)。そうすることにより、対象タグのHTML要素を非表示にすることができる。すなわち、画像要素を非表示にすることができる。   Subsequently, the image element invalidation unit 123 determines whether or not the target tag is an <img> tag (S203). When the target tag is the <img> tag (Yes in S203), the image element invalidating unit 123 sets the visibility value of the style attribute of the target tag to hidden (S204). By doing so, the HTML element of the target tag can be hidden. That is, the image element can be hidden.

一方、対象タグが、<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 element invalidating unit 123 sets the value of background-image of the style attribute of the target tag to none (S205). By doing so, an image can be prevented from being displayed in the background of the HTML element of the target tag. However, the process of step S205 is not essential. Note that steps S204 and S205 may be executed using WebDriver. By doing so, the change in the attribute of the tag can be immediately reflected in the display result. That is, the execution result of step S204 or S205 can be immediately reflected in the display result of the HTML document d1 by the Web browser 11.

ステップ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 screen capture unit 122 acquires an image of the display area in the window of the Web browser 11 (S207). . The execution method of step S207 may be the same as step S102 of FIG. In step S207, an image of the display result of the HTML document d1 in a state where the HTML element of the <img> tag is hidden is acquired. That is, in step S207, the captured image c2 shown in FIG. 7 is acquired.

続いて、ステップ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 position acquisition apparatus 10 and the HTTP proxy 30 are communicably connected via a network such as a LAN or the Internet. Further, the HTTP proxy 30 and the HTTP server 20 are communicably connected via a network such as a LAN or the Internet.

HTTPプロキシ30は、表示位置取得装置10からのHTTPリクエストを中継してHTTPサーバ20に転送し、当該HTTPリクエストに対するHTTPサーバ20からのHTTPレスポンスを中継して表示位置取得装置10に転送するコンピュータである。なお、第1の実施の形態では、HTTPプロキシは明示されていないが、このことは、第1の実施の形態が、HTTPサーバ20と表示位置取得装置10との間にHTTPプロキシが介在しない形態に限定されることを意図する趣旨ではない。   The HTTP proxy 30 is a computer that relays an HTTP request from the display position acquisition device 10 and transfers it to the HTTP server 20, and relays an HTTP response from the HTTP server 20 in response to the HTTP request to the display position acquisition device 10. is there. In the first embodiment, the HTTP proxy is not specified, but this is a form in which the HTTP proxy is not interposed between the HTTP server 20 and the display position acquisition device 10 in the first embodiment. It is not intended to be limited to.

図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 HTTP proxy 30 includes a proxy unit 31 and an image element invalidation unit 32. The proxy unit 31 relays HTTP requests and HTTP responses between the display position acquisition apparatus 10 and the HTTP server 20. When image data is included in the HTTP response from the HTTP server 20, the image element invalidation unit 32 replaces the image data with image data of a transparent image or a white color image having the same size as the image data.

すなわち、第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 element invalidation unit 32 of the HTTP proxy 30.

一方、図11において、表示位置取得装置10の画像取得部12は、画像要素無効化部123を含まない。第3の実施の形態において、HTML文書d1の画像要素は、HTTPプロキシ30において無効化されるからである。   On the other hand, in FIG. 11, the image acquisition unit 12 of the display position acquisition device 10 does not include the image element invalidation unit 123. This is because the image element of the HTML document d1 is invalidated in the HTTP proxy 30 in the third embodiment.

図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 proxy unit 31 receives an HTTP response addressed to the display position acquisition device 10 from the HTTP server 20 (S301), the proxy unit 31 determines whether image data is included in the HTTP response (S302). That is, it is determined whether or not the actual HTTP response is image data. Whether or not the substance of the HTTP response is image data can be determined, for example, by referring to the Content-type of the HTTP header of the HTTP response.

HTTPレスポンスに画像データが含まれている場合(S302でYes)、画像要素無効化部32は、画像のサイズ(縦横のサイズ)が、当該画像データ(以下、「元画像データ」という。)と同じ透明画像又は白一色の画像の画像データを生成し、HTTPレスポンス内の元画像データを、生成された画像データと入れ替える(S303)。   When image data is included in the HTTP response (Yes in S302), the image element invalidation unit 32 indicates that the image size (vertical / horizontal size) is the image data (hereinafter referred to as “original image data”). Image data of the same transparent image or white color image is generated, and the original image data in the HTTP response is replaced with the generated image data (S303).

なお、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 Web browser 11, the Web browser 11 acquires the HTML document d1 corresponding to the URL from the HTTP server 20. Thereafter, the Web browser 11 acquires image data and the like referred to from the HTML document d1 from the HTTP server 20. For example, image data referenced by the <img> tag, image data used for the background, and the like are acquired from the HTTP server 20. In step S303, the HTTP response at this time is processed.

ステップS303又はステップS302でNoの場合に続いて、プロキシ部31は、HTTPレスポンスを表示位置取得装置10に送信する(S304)。   Following the case of No in step S303 or step S302, the proxy unit 31 transmits an HTTP response to the display position acquisition device 10 (S304).

図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.

図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 HTTP proxy 30. Accordingly, in step S108, OCR is applied to the captured image c2 that does not include an image element.

上述したように、第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 HTTP proxy 30 may be implemented in the display position acquisition device 10. That is, the display position acquisition device 10 and the HTTP proxy 30 may be realized by a single device. Furthermore, a function corresponding to the HTTP server 20 may be implemented in the display position acquisition device 10.

次に、第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 image acquisition unit 12 is a black box. This is because, in the fourth embodiment, the configuration of the image acquisition unit 12 may be that shown in any of FIGS. 3, 8, and 11. That is, when the system configuration shown in FIG. 1 is adopted, the image acquisition may have the configuration shown in FIG. 3 or FIG. When the system configuration shown in FIG. 10 is employed, the image acquisition unit 12 only needs to have the configuration shown in FIG.

図14において、表示位置取得装置10は、更に、タグ表示領域取得部15を有する。タグ表示領域取得部15は、表示位置取得装置10にインストールされたプログラムが、CPU104に実行させる処理により実現される。タグ表示領域取得部15は、HTML文書d1内の各タグに対応するHTML要素について、当該HTML文書d1の表示結果の画像における表示領域の矩形座標を取得(特定)する。矩形座標とは、例えば、当該表示領域に係る矩形領域の対角の頂点の座標値でもよいし、いずれか1つの頂点の座標値と当該矩形領域の幅及び高さとであってもよい。   In FIG. 14, the display position acquisition device 10 further includes a tag display area acquisition unit 15. The tag display area acquisition unit 15 is realized by processing executed by the CPU 104 by a program installed in the display position acquisition device 10. The tag display area acquisition unit 15 acquires (identifies) the rectangular coordinates of the display area in the display result image of the HTML document d1 for the HTML element corresponding to each tag in the HTML document d1. The rectangular coordinates may be, for example, coordinate values of diagonal vertices of the rectangular area related to the display area, or may be coordinate values of any one vertex and the width and height of the rectangular area.

図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 image acquisition unit 12 acquires the captured image c2 in which the image element of the HTML document d1 is invalidated. Any method of the first to third embodiments may be adopted as a method of acquiring the captured image c2.

続いて、タグ表示領域取得部15は、HTML文書d1に含まれている各タグに対応する各HTML要素の表示領域の矩形座標を取得する(S420)。   Subsequently, the tag display area acquisition unit 15 acquires the rectangular coordinates of the display area of each HTML element corresponding to each tag included in the HTML document d1 (S420).

図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 HTTP proxy 30, JavaScript (registered trademark) for acquiring the rectangular coordinates of the display area of the HTML element related to each HTML tag in the HTML document d1 is It may be inserted into the HTML document d1. By doing so, the rectangular coordinates of the display area of each HTML element may be acquired.

続いて、OCR部13は、HTML文書d1に含まれているHTMLタグのうちの一つのHTMLタグを、処理対象(対象タグ)として選択する(S430)。続いて、OCR部13は、キャプチャ画像c2のうち、対象タグに係るHTML要素に関して取得された矩形座標が示す表示領域に対してOCRを適用する(S440)。例えば、対象タグが、HTML要素e1に対応するタグであれば、図16の表示領域a1に対してOCRが適用される。続いて、出力部14は、取得された文字コード及び位置情報を出力する(S450)。   Subsequently, the OCR unit 13 selects one HTML tag among the HTML tags included in the HTML document d1 as a processing target (target tag) (S430). Subsequently, the OCR unit 13 applies OCR to the display area indicated by the rectangular coordinates acquired for the HTML element related to the target tag in the captured image c2 (S440). For example, if the target tag is a tag corresponding to the HTML element e1, OCR is applied to the display area a1 in FIG. Subsequently, the output unit 14 outputs the acquired character code and position information (S450).

ステップ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 output unit 14 deletes the OCR result recorded in duplicate for the same character (S470). That is, since an HTML element has a hierarchical structure, a certain HTML element (child element) may exist inside another HTML element (parent element). In such a case, for the child element, an OCR result is obtained by overlapping the OCR process for the display area of the parent element and the OCR process for the display area of the child element. For example, in the example of FIG. 16, for “character string 6” and “character string 7” included in the display area a5, the OCR result is obtained in each of the OCR process for the display area a3 and the OCR process for the display area a5. can get. Therefore, in step S470, such duplication is eliminated.

上述したように、第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 reference numerals are given to the same or corresponding parts as those in FIG. 14 and the description thereof is omitted.

図19において、表示位置取得装置10は、更に、タグ階層構造解析部16、画像更新部17、及びタグ階層構造更新部18等を有する。これら各部は、表示位置取得装置10にインストールされる1以上のプログラムが、CPU104に実行させる処理により実現される。   In FIG. 19, the display position acquisition apparatus 10 further includes a tag hierarchy structure analysis unit 16, an image update unit 17, a tag hierarchy structure update unit 18, and the like. Each of these units is realized by processing that one or more programs installed in the display position acquisition apparatus 10 cause the CPU 104 to execute.

タグ階層構造解析部16は、HTML文書d1を解析して、HTML文書d1内のタグ(HTML要素)の階層構造又は親子関係(以下、「タグ階層情報」という。)を示す情報を生成(特定)する。タグ階層情報は、タグ(HTML要素)をノードとし、階層関係を有するタグ(HTML要素)に対応するノード間に枝を有するツリー構造の情報である。   The tag hierarchy structure analysis unit 16 analyzes the HTML document d1 and generates (specifies) information indicating the hierarchy structure or parent-child relationship (hereinafter referred to as “tag hierarchy information”) of tags (HTML elements) in the HTML document d1. ) The tag hierarchy information is information of a tree structure having a tag (HTML element) as a node and a branch between nodes corresponding to a tag (HTML element) having a hierarchical relationship.

画像更新部17は、キャプチャ画像c2中において、OCR処理が終了したHTML要素の表示領域内の文字列を無効化する。   The image update unit 17 invalidates the character string in the display area of the HTML element for which the OCR processing has been completed in the captured image c2.

タグ階層構造更新部18は、OCR処理が終了したHTML要素に対応するノードをタグ階層情報から削除する。   The tag hierarchy structure update unit 18 deletes the node corresponding to the HTML element for which the OCR processing has been completed from the tag hierarchy information.

図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 in FIG. 15 are denoted by the same step numbers and the description thereof is omitted.

ステップ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 structure analysis unit 16 acquires the HTML source code from the Web browser 11, analyzes the hierarchical structure of the tag included in the HTML source code, and generates tag hierarchy information ( S421). In the present embodiment, the HTML source code is HTML data in a state after execution of a script or the like included in the HTML document d1. That is, by executing the script or the like, an HTML element can be dynamically added to the HTML document d1. In step S421, an HTML source code including the dynamically added HTML element is acquired. That is, the HTML source code is HTML data corresponding to a display state on the Web browser 11. WebDriver may be used to acquire such HTML source code.

図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 OCR unit 13 selects one of the end tags in the tag hierarchy information as a processing target.

図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 image update unit 17 fills the display area of the tag (HTML element) selected in step S430a with, for example, one white color in the capture image c2. The display area can be specified based on the rectangular coordinates acquired in step S420. When the tag is a tag corresponding to the img element, the image element corresponding to the img element has already been invalidated. Therefore, there is no particular significance for painting the display area of the img element in white. Therefore, steps S440 to S451 may not be executed when the <img> tag is a processing target.

続いて、タグ階層構造更新部18は、ステップS430aにおいて選択されたタグに対応するノードを、タグ階層情報から削除する(S452)。その結果、それまで末端のタグでなかったHTMLタグが、末端のタグになる可能性が有る。   Subsequently, the tag hierarchy structure update unit 18 deletes the node corresponding to the tag selected in step S430a from the tag hierarchy information (S452). As a result, there is a possibility that an HTML tag that was not a terminal tag until then becomes a terminal tag.

上述したように、第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. In other words, 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 inclusive relationship or a hierarchical structure. In this case, a browser suitable for the display data may be used instead of the Web browser. The web browser 11 is an example of a display control unit. The image element invalidation unit 123 is an example of an invalidation unit. The screen capture unit 122 is an example of an image acquisition unit. The OCR unit 13 is an example of a position acquisition unit.

以上、本発明の実施例について詳述したが、本発明は斯かる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。   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 supplementary note 1 or 2, characterized by:
(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 supplementary note 3, characterized by:
(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 5 or 6, characterized in that.
(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 9 or 10, characterized in that.
(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 attachment 11, wherein the display position is acquired.

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 SYMBOLS 10 Display position acquisition apparatus 11 Web browser 12 Image acquisition part 13 OCR part 14 Output part 15 Tag display area acquisition part 16 Tag hierarchy structure analysis part 17 Image update part 18 Tag hierarchy structure update part 20 HTTP server 30 HTTP proxy 31 Proxy part 32 Image element invalidation unit 100 Drive device 101 Recording medium 102 Auxiliary storage device 103 Memory device 104 CPU
105 interface device 106 display device 107 input device 121 browser display unit 122 screen capture unit 123 image element invalidation unit B bus

Claims (8)

コンピュータに、
文字要素と画像要素とを表示要素として含み、各表示要素が文字要素か画像要素かを判定するための属性データを有する表示データを表示し、
前記表示データの表示結果を示す画像を取得し、
取得された画像において、前記画像要素の表示を無効化し、
前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する、
処理を実行させることを特徴とする表示位置取得プログラム。
On the computer,
Look including the character element and the image element as a display element, the display element displays the display data having the attribute data for determining whether a character element or image 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,
Look including the character element and the image element as a display element, the display element displays the display data having the attribute data for determining whether a character element or image 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.
文字要素と画像要素とを表示要素として含み、各表示要素が文字要素か画像要素かを判定するための属性データを有する表示データを表示する表示制御部と、
前記表示データの表示結果を示す画像を取得する画像取得部と、
取得された画像において、前記画像要素の表示を無効化する無効化部と、
前記画像要素の表示が無効化された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する位置取得部と、
を有することを特徴とする表示位置取得装置。
Look including the character element and the image element as a display element, a display control unit which each display element displays the display data having the attribute data for determining whether a character element or image 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:
文字要素と画像要素とを表示要素として含み、各表示要素が文字要素か画像要素かを判定するための属性データを有する表示データを表示する表示制御部と、
前記表示データの表示要素のうち、画像要素の表示を無効化する無効化部と、
前記表示データの表示結果について、画像要素の表示が無効化された状態の画像を取得する画像取得部と、
取得された画像に対して文字認識を行うことで、前記表示データに含まれる各文字要素の位置情報を取得する位置取得部と、
を有することを特徴とする表示位置取得装置。
Look including the character element and the image element as a display element, a display control unit which each display element displays the display data having the attribute data for determining whether a character element or image 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
Look including the character element and the image element as a display element, the display element displays the display data having the attribute data for determining whether a character element or image 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
Look including the character element and the image element as a display element, the display element displays the display data having the attribute data for determining whether a character element or image 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.
JP2015081041A 2015-04-10 2015-04-10 Display position acquisition program, display position acquisition device, and display position acquisition method Active JP6565287B2 (en)

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 JP2016200992A (en) 2016-12-01
JP6565287B2 true 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)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
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
PT1730701T (en) * 2004-03-01 2018-10-16 Mobile Tech Holdings Limited Mobile ticketing
JP2009031952A (en) * 2007-07-25 2009-02-12 Tokai Television Broadcasting Co Ltd Information providing system and information providing method
JP5287099B2 (en) * 2008-09-29 2013-09-11 日本電気株式会社 SEARCH DEVICE, INFORMATION PROCESSING DEVICE, SEARCH METHOD, PROGRAM, AND RECORDING MEDIUM
KR20110091296A (en) * 2010-02-05 2011-08-11 삼성전자주식회사 Apparatus and method for generating document
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
JP6446945B2 (en) * 2014-09-24 2019-01-09 富士通株式会社 Incompatible detection device, incompatible detection method, and program

Also Published As

Publication number Publication date
JP2016200992A (en) 2016-12-01

Similar Documents

Publication Publication Date Title
US10970097B2 (en) Adaptive web-based robotic process automation
CN104850388B (en) web page rendering method and device
US20210103515A1 (en) Method of detecting user interface layout issues for web applications
JP6514244B2 (en) Difference detection device and program
CN104252410A (en) Method and equipment for testing control in page
US11403078B2 (en) Interface layout interference detection
CN110221899B (en) User interface adjusting method, device and system
US20140215306A1 (en) In-Context Editing of Output Presentations via Automatic Pattern Detection
WO2020235085A1 (en) Operation log visualization device, operation log visualization method, and operation log visualization program
CN117093386B (en) Page screenshot method, device, computer equipment and storage medium
US11853685B2 (en) Transformation of resource files using mapped keys for tracking content location
CN107621951B (en) View level optimization method and device
JP2018506783A (en) Generating element identifiers
CN104765630A (en) Software installation method and software installation device
CN116795377A (en) Code data processing method and device
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
CN106227713B (en) Document processing method and device
JP7260150B2 (en) WEBSITE DESIGN SUPPORT DEVICE, WEBSITE DESIGN SUPPORT METHOD, AND PROGRAM
JP6446945B2 (en) Incompatible detection device, incompatible detection method, and program
JP2005141641A (en) Information processing system, information processor for information registration, information processor for information retrieval, information processing method for information registration, information processing method for information retrieval, program, and recording medium
JP6965620B2 (en) Content verification computer program, content verification device and content verification method
US20140258835A1 (en) System and method to download images from a website
US20240241621A1 (en) Information processing system, non-transitory computer readable medium storing program, and information processing method

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