JP5916136B2 - Screen change detection apparatus, method and program - Google Patents
Screen change detection apparatus, method and program Download PDFInfo
- Publication number
- JP5916136B2 JP5916136B2 JP2013039205A JP2013039205A JP5916136B2 JP 5916136 B2 JP5916136 B2 JP 5916136B2 JP 2013039205 A JP2013039205 A JP 2013039205A JP 2013039205 A JP2013039205 A JP 2013039205A JP 5916136 B2 JP5916136 B2 JP 5916136B2
- Authority
- JP
- Japan
- Prior art keywords
- scan line
- screen
- change
- pattern
- capture
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- User Interface Of Digital Computer (AREA)
- Transforming Electric Information Into Light Information (AREA)
- Controls And Circuits For Display Device (AREA)
Description
本発明は、コンピュータの表示装置に表示された画面(表示画面)を短い時間間隔で定期的にキャプチャ(画像データ取得)し、最新の画像データとそれ以前の画像データとの間で内容に違いがあるかどうかによって、画面の変化を検知するための技術に関するものである。 The present invention periodically captures (image data acquisition) a screen (display screen) displayed on a display device of a computer at short time intervals, and there is a difference in content between the latest image data and previous image data. The present invention relates to a technique for detecting a screen change depending on whether or not there is.
一般に、表示画面のキャプチャの時間間隔を50msecなどに設定することで、画面の変化を即時に検知することが可能である。また、表示画面の全領域をキャプチャすることにより、変化を漏れなく検出することが保証される。しかしながら、短周期かつ全領域で画像をキャプチャする処理は、処理能力が向上した現在のコンピュータ(PC)であっても、その負荷を無視できるほど軽くはない。本来の計算処理の負荷が重い場合は、ユーザ(オペレータ)がキャプチャの設定を変更し、検知精度を下げる必要がある。 Generally, it is possible to immediately detect a change in the screen by setting the time interval for capturing the display screen to 50 msec or the like. In addition, by capturing the entire area of the display screen, it is guaranteed that changes can be detected without omission. However, the process of capturing an image in a short period and in the entire area is not light enough to ignore the load even with a current computer (PC) with improved processing capability. When the load of the original calculation processing is heavy, it is necessary for the user (operator) to change the capture setting to lower the detection accuracy.
一方で、検知の目的によっては、あえて検知精度を下げたい場合もある。 On the other hand, depending on the purpose of detection, there is a case where it is desired to lower the detection accuracy.
例えば、表示画面の全領域をキャプチャすると、テキスト編集の位置を表すカーソルの点滅表示、現在時刻表示、ネットワーク接続状態表示など、ユーザの操作に関係なく随時変化する領域が含まれる場合が多い。 For example, if the entire area of the display screen is captured, there are many areas that change at any time regardless of the user's operation, such as blinking display of the cursor indicating the text editing position, current time display, and network connection status display.
また、例えば、短周期でキャプチャして最新の画像データとその直前の画像データだけで差異を比較すると、マウスのホバリングによってGUI要素の表示が変化(ボタンの上をポインタが移動するだけで、ハイライト表示されるなど)する状態が一瞬であっても検知されるため、単にマウスがGUI上を通過した程度でも画面の変化として逐一反応してしまう。 In addition, for example, when the difference between the latest image data and the image data immediately before it is captured in a short cycle and the difference is compared, the display of the GUI element is changed by hovering the mouse (the pointer only moves on the button, the high Even when the mouse passes over the GUI, it reacts as a screen change.
このように、本来、検知したい画面の変化とは関係ないものも含んだ検知が頻繁に行われる。ここでは実用上の目的に照らして検出を望まない、これらの画面状態の変化を「背景雑音的な画面変化」と呼ぶ。 In this way, the detection is frequently performed including those that are not related to the change of the screen to be detected. Here, these changes in the screen state that are not desired for practical purposes are called “background noise-like screen changes”.
これに対する従来技術として、小さい面積や短時間の変化を、変化検知の対象から外すために、所定の設定により閾値を与えてフィルタをかける対処が行われる。具体的には、面積に対しては、一旦、画面の全領域をキャプチャして変化領域を検出し、これに対してその面積や縦横の長さを算出し、閾値以下であれば無視するなど、また時間に対しては、比較画像の差異の持続時間を算出し、閾値以下であれば無視するなどであり、フィルタをかける必要が実用的に発生する。 As a prior art for this, in order to exclude small area and short-time changes from the target of change detection, a countermeasure is applied by applying a threshold by a predetermined setting. Specifically, for the area, once the entire area of the screen is captured and the change area is detected, the area and vertical and horizontal lengths are calculated. Also, with respect to time, the duration of the difference between the comparison images is calculated and ignored if the difference is less than or equal to the threshold value, which necessitates the need for filtering.
また、負荷を抑制することと上記フィルタをかけることとを兼ねた対策として、画面変化の検知を実行する環境(PCの性能やウィンドウシステム上で発生する背景雑音的な画面変化の内容)や目的(検知させたい画面変化の内容)に応じて、キャプチャする領域の範囲や時間間隔の長さをユーザが設定する手段を提供することも行われる。ユーザはこの手段を使って、所定の幅で設定値を変化させ、実際の画面と検知結果を観察しながら、設定値を決定する。 In addition, as a countermeasure that combines the suppression of the load and the above-mentioned filter, the environment for detecting the screen change (the content of the background noise-like screen change that occurs on the PC performance and the window system) and the purpose Depending on (content of the screen change to be detected), a means for the user to set the range of the area to be captured and the length of the time interval is also provided. Using this means, the user changes the set value within a predetermined width, and determines the set value while observing the actual screen and the detection result.
そのほかの検知方法としては、画面上にランダムもしくは所定のパターンでサンプリングピクセルを設定し、それらの画素値の変化を比較する方法が考えられる。 As another detection method, a method of setting sampling pixels in a random or predetermined pattern on the screen and comparing changes in the pixel values can be considered.
PCの表示画面の画像データをオペレーティングシステム(OS)を介して取得し、そのデータを応用するソフトウェアが存在する。例えば、従来技術1(特許文献1参照)では、PCの操作を自動的に実行するエージェント(ソフトウェア)が、自動実行の操作の合間の画像データを取得し、操作の対象となるウィンドウの位置や状態を知る手がかりとする。 There is software that acquires image data of a display screen of a PC through an operating system (OS) and applies the data. For example, in Prior Art 1 (see Patent Document 1), an agent (software) that automatically executes a PC operation acquires image data between automatic execution operations, and the position of a window to be operated or Use as a clue to know the state.
この場合、PC上でのユーザの操作やアプリケーションプログラム(AP)のプロセスの実行と並行してリアルタイムに画像データを取得することが求められる。そして、ユーザが入力デバイス(マウス、キーボードなど)を通して発行する操作イベントや、AP自身がソフトウェア的に発行する内部イベントをもとにしたタイミングで取得することが考えられるが、後述する図1、図2に示すような問題が発生する。表示画面上の画像内容の変化の開始や完了を監視し、データ取得タイミングを検知できれば有用である。 In this case, it is required to acquire image data in real time in parallel with the user operation on the PC and the execution of the process of the application program (AP). Then, it may be acquired at a timing based on an operation event issued by a user through an input device (mouse, keyboard, etc.) or an internal event issued by the AP itself in software. The problem shown in 2 occurs. It is useful if the start and completion of changes in the image content on the display screen can be monitored and the data acquisition timing can be detected.
またこれらエージェントの機能としてPCの表示画面の監視を行う場合、当該PCのハードウェア的な構成変更や、OSおよびデバイスドライバなどのソフトウェア構成上の低レベルの改造・変更、具体的にはPCのグラフィックボードを監視のための特別なものに差し替える、OSのグラフィック処理に特別なパッチをあてる、特別なグラフィックスデバイスドライバをインストールする、OSがAPに提供するランタイムライブラリを特別なものに差し替える等が必要かどうかは重要なポイントである。 In addition, when monitoring the display screen of a PC as a function of these agents, the hardware configuration change of the PC, low-level modifications / changes in software configuration such as OS and device drivers, specifically, the PC Replace the graphics board with a special one for monitoring, apply a special patch to the graphics processing of the OS, install a special graphics device driver, replace the runtime library provided by the OS to the AP, etc. Whether it is necessary is an important point.
これらの改造や変更が必要であれば、その導入費用や準備作業を必要とするというだけではなく、当該PC上での任意のAP実行に必要なリソースに変更を与えることになり、PC、OS、AP等の提供元のサポート(バージョンアップや障害対応支援)を受けられなくなったり、エージェント導入前の状態に完全に戻すことが技術的に難しくなり、何らかの影響を残す場合があるなどの問題を生じる。 If these modifications and changes are necessary, not only the introduction cost and preparation work are required, but also the resources necessary for executing any AP on the PC are changed. , Problems such as being unable to receive support (upgrading and troubleshooting support) of providers such as APs, and technically difficult to completely return to the state before the introduction of the agent, may leave some influence Arise.
このように、画面変化の検知を実行するに際して、PC環境の改造や変更を必要としないことは、不特定の一般ユーザが所有するPCや既存の業務運用中の端末などに導入する観点では、必須の要件といえる。 As described above, when executing the detection of the screen change, it is not necessary to modify or change the PC environment in terms of introducing it into a PC owned by an unspecified general user or a terminal that is in operation. This is an essential requirement.
画像の時系列変化を検知するために標本点を設定する手法(従来技術2:特許文献2参照)が存在する。そこではこの手法を基本として、検知対象が存在する画像領域に対し高密度に標本点を設定することで、検知精度を向上する工夫も行われている。 There is a method for setting a sample point to detect a time-series change of an image (refer to Prior Art 2: Patent Document 2). Therefore, on the basis of this method, a device for improving detection accuracy has been devised by setting sample points at a high density for an image region where a detection target exists.
本発明が前提とする表示画面の主な変化は、ウィンドウシステムのデスクトップ上で発生する頻度の高い変化に相当し、標本点を高密度に配置しても検知することができない場合が多く存在する。デスクトップ上で発生する変化の主な事例は、
・フレームウィンドウに相当する矩形領域の出現、移動、変形、消滅
・フレームウィンドウのアクティブ時のハイライト色の表示
・ポップアップウィンドウに相当する矩形領域の出現、消滅
・スクロールビュー内部のイメージの上下左右のスクロール移動
・テキストの文字描画内容の変化
・テキスト選択によるハイライト色の表示
・テキスト入力待機のキャレットの点滅
・GUI要素のアクション時のボタン押下など見た目の変化
・GUI要素のフォーカス時のハイライト色の表示
・GUI要素のマウスホバリング時のハイライト色の表示
などである。
The main change of the display screen assumed by the present invention corresponds to a high-frequency change that occurs on the desktop of the window system, and there are many cases where detection is not possible even if sample points are arranged at high density. . The main examples of changes that occur on the desktop are:
-Appearance, movement, transformation, and disappearance of the rectangular area corresponding to the frame window-Display of highlight color when the frame window is active-Appearance and disappearance of the rectangular area corresponding to the pop-up window-Up, down, left, and right of the image inside the scroll view Scroll movement ・ Changes in text drawing contents ・ Highlight color display by text selection ・ Blink of caret waiting for text input ・ Changes in appearance such as button press during GUI element action ・ Highlight color when focus of GUI element・ Highlight color display during mouse hover of GUI elements.
これらは考え得る事例にすぎず、これらに限定されるものではない。例えば、フレームウィンドウ上に配置されるGUI要素(ボタン、テキストフィールド、タブパネル、スクロールパネルなど)の出現、消滅が動的に行われるAPも考えられる。さらに一般的ではないが、それらの移動や変形が行われるAPも稀に存在する。これらは、フレームウィンドウの出現、消滅並びに移動、変形と類似したイメージ変化になると考えられる。異なる特徴としては、GUI要素同士はフレームウィンドウのように、相互の重なり合いがないため、均一の背景色の上に、たまたま描画要素が重なりなく存在する状況に相当するという違いになる。このように、個々の表示更新事象を全て列挙することはできないが、イメージの変化の特徴は、上記事例に含まれると考えられる。 These are only possible examples and are not limited to these. For example, an AP in which the appearance and disappearance of GUI elements (buttons, text fields, tab panels, scroll panels, etc.) arranged on the frame window are dynamically considered is also conceivable. Although it is not common, there are rare APs that are moved or deformed. These are considered to be image changes similar to the appearance, disappearance, movement, and deformation of the frame window. A different feature is that the GUI elements do not overlap each other like the frame window, which corresponds to a situation in which drawing elements do not overlap on a uniform background color. As described above, it is not possible to enumerate all individual display update events, but the feature of image change is considered to be included in the above case.
なお、上記においてポップアップウィンドウとは、メニュー選択時に表示されるメニューウィンドウやサブメニューウィンドウ、コンボボックス選択時に表示されるリストウィンドウ、マウス右ボタン押下時に表示されるコンテキストメニューウィンドウ、などを総称している。また、GUI要素とは、ボタン、テキストフィールド、タブパネル、スクロールパネル、メニューアイテム、ウィンドウそのものも含めて総称している。また、ウィンドウとはフレームウィンドウやポップアップウィンドウを総称している。 In the above, the pop-up window is a generic term for a menu window or submenu window displayed when a menu is selected, a list window displayed when a combo box is selected, a context menu window displayed when the right mouse button is pressed, or the like. . The GUI element is a generic term including buttons, text fields, tab panels, scroll panels, menu items, and windows themselves. A window is a generic term for a frame window or a pop-up window.
これら変化の事例において、標本点を用いる方法では検知できない場合を以下に列挙する。 Examples of these changes are listed below when they cannot be detected by the method using sample points.
・例えば、フレームの幅が小さく(フレームウィンドウの境界部分として描画される帯状のイメージが幅方向に占めるピクセル数が少なく)、標本点に重ならない場合は検知できない。特に、ウィンドウ内部のイメージが変化せず、フレーム部分だけのイメージが変化するケース(ウィンドウがアクティブ時のハイライト表示になった場合など)では、ウィンドウ全体の占有領域が標本点に重なっていても、変化を検知できない場合が発生し得る。 For example, it cannot be detected when the frame width is small (the number of pixels occupied in the width direction of the band-like image drawn as the boundary portion of the frame window is small) and does not overlap the sample point. Especially in cases where the image inside the window does not change and only the frame part changes (such as when the window is highlighted when active), even if the occupied area of the entire window overlaps the sample point In some cases, a change cannot be detected.
・例えば、スクロールパネル内のテキストエリアに文字がまばらに存在する場合、スクロール移動した前後で、標本点が全て背景に位置していて、偶然にも検知できない場合が発生し得る。 For example, when characters are sparsely present in the text area in the scroll panel, there may be a case where all the sample points are located in the background before and after the scroll movement and cannot be detected by chance.
・例えば、横書き文字列の高さが小さく、標本点に重ならない場合は検知できない。 • For example, if the horizontal character string is small and does not overlap the sample point, it cannot be detected.
・例えば、GUI要素の矩形領域が小さく、標本点に重ならない場合は検知できない。 For example, when the rectangular area of the GUI element is small and does not overlap the sample point, it cannot be detected.
・例えば、キャレットが小さく、標本点に重ならない場合は検知できない。 ・ For example, if the caret is small and does not overlap the sample point, it cannot be detected.
標本点の間隔を狭くしても、これらのケースが発生する最悪の場合の確率を抑えることはできない。これは、極端に縦長もしくは横長の矩形に対しては、対象の位置によって標本点に重ならない場合があり、検知できるかどうかが実行時の状況に依存するためである。 Even if the interval between the sampling points is reduced, the probability of the worst case in which these cases occur cannot be suppressed. This is because an extremely vertically or horizontally long rectangle may not overlap the sample point depending on the position of the object, and whether it can be detected depends on the situation at the time of execution.
本発明のスキャンラインは縦横の組み合わせからなる格子状のパターンであるため、このような検知対象の位置への依存性が小さく、間隔を狭くすると効果的に検知感度を向上できる。また、格子の1マスの縦横の長さが、確実に検知できる変化矩形の最小サイズに相当するため、検知を保証できる対象の条件が明確・簡潔に与えられる。これは、従来技術2のような自然界の対象物のイメージではなく、本発明がデスクトップ上のGUI要素のイメージに由来する画像特徴を利用していることによる。
Since the scan line of the present invention is a lattice-like pattern composed of vertical and horizontal combinations, the dependency on the position of the detection target is small, and the detection sensitivity can be effectively improved by narrowing the interval. In addition, since the vertical and horizontal lengths of one square of the lattice correspond to the minimum size of the change rectangle that can be detected reliably, the conditions for the object that can guarantee detection are given clearly and concisely. This is because the present invention uses image features derived from the image of the GUI element on the desktop, not the image of the natural object as in the
また、カメラ画像を監視し、差異を検出する手段において、「サンプリング画像と基準画像とを比較して当該サンプリング画像と基準画像とが互いに異なる状態が検出された後、所定時間以上、サンプリング画像が同じである状態が継続した場合に撮像手段を異常動作状態と判断する異常検出手段」並びに「撮像手段により撮像された監視対象の画像のうちの一部を部分画像として抽出する部分画像抽出手段をさらに備え、基準画像記録手段が監視対象に異常がない状態において、部分画像抽出手段により抽出された部分画像を基準画像として記録するものであり、画像取得手段も監視対象について、部分画像抽出手段により抽出された部分画像をサンプリング画像として取得するもの」が存在する(従来技術3:特許文献3参照)。 Further, in the means for monitoring the camera image and detecting the difference, “after comparing the sampling image with the reference image and detecting that the sampling image and the reference image are different from each other, the sampling image is “Abnormality detection means for determining that the imaging means is in an abnormal operation state when the same state continues” and “partial image extraction means for extracting a part of the monitored image captured by the imaging means as a partial image. In addition, the reference image recording means records the partial image extracted by the partial image extraction means as a reference image in a state where there is no abnormality in the monitoring target, and the image acquisition means also uses the partial image extraction means for the monitoring target. There is a technique for acquiring an extracted partial image as a sampling image (see Prior Art 3: Patent Document 3).
本発明では、時系列上の直近とその前の画像の比較により差異が発見された場合、画面変化の開始と判定し、所定時間以上、画像が同じである状態が継続した場合、画像変化の終了と判定する、というように、判定の結果として上位モジュールに通知する状態が2種類存在する。また、監視対象を部分画像に分割してサンプリングする際のパターンが、タイル状の矩形領域ではなく、スキャンライン状の帯状領域の格子で構成する。これによって、縦長・横長の領域の変化を検知することができる。さらに、異なる分解能のパターンを重ね合せたものを動的に生成する。これによって計算負荷を軽減しながら画面全体をカバーできる。 In the present invention, when a difference is found by comparing the latest image in the time series with the previous image, it is determined that the screen change has started, and when the state where the images remain the same for a predetermined time or longer, the image change There are two types of statuses to be notified to the upper module as a result of the determination, such as determining to end. In addition, the pattern used when the monitoring target is divided into partial images and sampled is configured by a grid of scanline-like band-like regions, not tile-like rectangular regions. This makes it possible to detect a change in a vertically long / horizontal region. Furthermore, a superposition of patterns with different resolutions is dynamically generated. This can cover the entire screen while reducing the calculation load.
「画像の取込み時間間隔をΔtとしたときに、連続して取込んだそれぞれの画像に対して、n×Δt(n≧2、nは整数)離れた画像間で所定の演算を行うことにより、侵入物体の検知(変化領域の抽出)を行うことによって、侵入物体の検知性能が従来と変わらない一方で、速い時間間隔で侵入物体の検知結果が得られる」方法が存在する(従来技術4:特許文献4参照)。画像の取り込みと画像間の演算は、全てのタイミングで画像領域全体が対象となっている。ここでは速い時間間隔で検知結果が得られる状況を、検知の反応速度が高いと呼ぶこととする。 “By performing a predetermined calculation between images separated by n × Δt (n ≧ 2, n is an integer) with respect to each successively captured image, where Δt is an image capture time interval. By detecting an intruding object (extracting a change area), there is a method in which the detecting performance of an intruding object is not different from the conventional one, while an intruding object detection result can be obtained at a fast time interval (prior art 4). : Patent Document 4). The entire image area is targeted for image capture and computation between images at all timings. Here, a situation in which detection results are obtained at fast time intervals is referred to as a high detection reaction speed.
本発明では、1つのタイミングで対象とするのは全画像領域ではなく、その中の所定の部分であり、処理負荷を低く抑えることができる。また、検知性能について一律に速い時間間隔で検知結果を得ることはできないが、条件によって適応的に速い時間間隔で検知結果が得られる。この特徴は実用において重要である。理想的にいえば、検知の反応速度は、速い時間間隔であることが望ましいが、このために検知処理の負荷が大きくなってしまっては、当該PCにおけるAP処理に割り当てる能力を低下させることになり、本来の目的をはたせない。このため、性能に影響のない負荷の範囲で、大きい領域ほどできるだけ遅れの少ない検知ができ、小さい領域については検知の反応速度は多少犠牲にして、全体的な負荷を小さくできるほうが実用上重要である。 In the present invention, the target at one timing is not the entire image area, but a predetermined portion thereof, and the processing load can be kept low. In addition, the detection result cannot be obtained at a uniform fast time interval, but the detection result can be adaptively obtained at a fast time interval depending on conditions. This feature is important in practice. Ideally, it is desirable that the detection reaction speed be a fast time interval. However, if the load of the detection process increases for this reason, the ability to allocate to the AP process in the PC is reduced. It will not serve its original purpose. For this reason, it is practically important that the detection can be performed with as little delay as possible in the large area within the load range that does not affect the performance, and the overall load can be reduced in the small area at the expense of the detection reaction speed. is there.
具体的には、ある分解能におけるスキャンラインパターンを取り上げて考えた場合、次のことが言える。パターンの中の1つのスキャンラインについて着目すると、その取り込みと画像間の演算は、1周期(16分割の場合、16×△t)の間隔があいている。従ってその領域内の1つのピクセルだけについて考えると、実際に変化があってから最悪の場合((16−1)+16)×△tの時間後に変化の検知が行われる。これは従来技術4を適用しない、従来の方法と同じである。
Specifically, when a scan line pattern at a certain resolution is taken up and considered, the following can be said. When attention is paid to one scan line in the pattern, there is an interval of one cycle (16 × Δt in the case of 16 divisions) between the capture and calculation between images. Therefore, considering only one pixel in the region, the change is detected after the worst case ((16-1) +16) × Δt after the actual change. This is the same as the conventional method in which the
その代わりに本発明では、1周期内の各キャプチャタイミング(△t)のそれぞれで、取り込む画像領域がキャプチャパターンの各スキャンラインに対応し、位置が少しずつずれている。検知対象の変化は、実用の場面においては実際には1ピクセルだけではなく、多くのピクセルがまとまって変化する。これら変化領域の縦横のサイズが大きければ大きいほど、複数のスキャンラインに同時に重なる本数が多くなるため、実際には1周期よりも速い時間間隔で検知結果が得られる。 Instead, in the present invention, at each capture timing (Δt) within one period, the captured image area corresponds to each scan line of the capture pattern, and the position is slightly shifted. The change in the detection target actually changes not only one pixel but a large number of pixels in a practical situation. As the vertical and horizontal sizes of these change areas are larger, the number of lines that simultaneously overlap a plurality of scan lines increases, so that the detection result is actually obtained at a time interval faster than one cycle.
ここで注意すべきなのは、本発明では、検知対象に応じて単に確率的に分解能や検知速度を変えるのではなく、その最悪値を分解能ごとのキャプチャパターンに応じて厳密に保証できる点である。例えば、4分割のキャプチャパターンのスキャンラインの間隔が256ピクセルでそれぞれのスキャンラインについて40msecごとに画像の取り込みと前後画像間の比較演算などの処理を行い、16分割のキャプチャパターンのスキャンラインの間隔が64ピクセルで同様に160msecごとに処理を行う場合、長辺が256ピクセルを超える矩形は最悪でも実際の変化開始後80msec未満の遅れで検知でき、64ピクセルを超える矩形は最悪でも320msec未満の遅れで検知できる。 It should be noted here that in the present invention, the worst value can be strictly guaranteed according to the capture pattern for each resolution, instead of simply changing the resolution and the detection speed in a probabilistic manner according to the detection target. For example, the scan line interval of a 4-division capture pattern is 256 pixels, and each scan line is subjected to processing such as image capture and comparison between the previous and next images every 40 msec, and the scan line interval of the 16-division capture pattern. Similarly, when processing is performed every 160 msec with 64 pixels, a rectangle whose long side exceeds 256 pixels can be detected with a delay of less than 80 msec after the start of actual change at worst, and a rectangle with more than 64 pixels has a delay of less than 320 msec at worst Can be detected.
小さい領域になるほど検知が遅れる時間は長くなるが、領域の長辺の長さの範囲に応じて最悪の場合の時間が保証される。このことは、本発明を、GUIの自動操作やユーザの操作監視のように、不特定の対象APに対して別プロセスからアタッチし、CPUリソースをシェアしながら実時間で動作することが求められる汎用的なエージェント型プロダクトとして実現する場合には、検知にかかる時間が実行時タイミングや表示内容などの偶然性に依存し明確な保証が与えられない従来の方法に比較すると、有用なアプローチである。そして、自動操作や操作監視の性能を利用者に対して明確に提示し、その実行時の制限をユーザサポートの際に合意する観点から、エージェント型プロダクトの特性上重要である。 The smaller the region, the longer the detection delay time, but the worst case time is guaranteed according to the range of the long side of the region. This requires that the present invention be attached to an unspecified target AP from another process, such as automatic GUI operation or user operation monitoring, and operate in real time while sharing CPU resources. When implemented as a general-purpose agent-type product, it is a useful approach compared to the conventional method in which the time required for detection depends on the contingency such as the timing at the time of execution and the display contents and does not give a clear guarantee. From the viewpoint of clearly presenting the performance of automatic operation and operation monitoring to the user, and agreeing on the restrictions at the time of execution at the time of user support, it is important in the characteristics of the agent type product.
また、「画面を横方向のラインで間引くことにより監視する領域を設定し、前記領域を順次ずらして前記画面の監視を行うことを特徴とする」方法が存在する(従来技術5:特許文献5参照)。 In addition, there is a method of “characterizing that the screen is monitored by setting a region to be monitored by thinning the screen with a horizontal line, and sequentially shifting the region” (Prior Art 5: Patent Document 5). reference).
本発明では、スキャンラインを横方向だけではなく縦方向にも設定する。また、複数の分解能で同時に判定可能とするため、複数のパターンを重畳して設定する。また、細かい分解能のパターンは長い周期で、粗い分解能のパターンは短い周期でキャプチャする。これにより、検知対象の領域の大きさに応じた分解能を同時に実現できる。 In the present invention, the scan line is set not only in the horizontal direction but also in the vertical direction. In addition, a plurality of patterns are superimposed and set so that determination can be made simultaneously with a plurality of resolutions. A fine resolution pattern is captured with a long period, and a coarse resolution pattern is captured with a short period. Thereby, the resolution according to the size of the region to be detected can be realized simultaneously.
またこれは、2つの点に配慮した実装が可能である。1つは、細かい分解のパターンが粗い分解能のパターンを含むことを利用して、キャプチャ回数を半分にできる。1つは、キャプチャタイミングごとのスキャンライン本数のばらつきをなくし、負荷を平準化できる。 This can be implemented in consideration of two points. One is that the number of captures can be halved by utilizing the fact that fine resolution patterns include patterns with coarse resolution. For one, it is possible to eliminate variations in the number of scan lines at each capture timing and level the load.
またその他には、1つの周期において、どの順序でスキャンラインをキャプチャするかを動的に制御することで、変化中の領域を優先的に判定することができる。 In addition, it is possible to preferentially determine a changing area by dynamically controlling in which order the scan lines are captured in one cycle.
またその他には、実際にキャプチャするスキャンライン状の矩形領域の幅を動的に制御することで、画面変化中やCPU使用率が高いときの負荷は低減したまま、画面静止中やCPU使用率が低いときの分解能を適応的に向上することができる。通常の方法ではどちらか一方を犠牲にした実装となる。 In addition, by dynamically controlling the width of the scan-line-shaped rectangular area that is actually captured, the load when the screen is changing or when the CPU usage rate is high is reduced, while the screen is stationary or the CPU usage rate is reduced. Can be adaptively improved when the resolution is low. In the normal method, it is an implementation that sacrifices either one.
また、画面変化がおさまるかあるいはCPU使用率が低下する度合に応じて連続的に分解能を調節することで、自然な判定動作を実現することができる。通常の方法では設定値が粗い段階値であるため、動的制御の切り替えによって判定動作が不自然に変化する。 In addition, a natural determination operation can be realized by continuously adjusting the resolution according to the degree to which the screen change subsides or the CPU usage rate decreases. In the normal method, since the set value is a coarse step value, the determination operation changes unnaturally by switching dynamic control.
また、分解能の動的な制御のための閾値や重みなどの設定値が細かい段階値の中から選択できるため、本発明を適用するPCの性能や画面の画素数、GUI画像の変化傾向など(適用先の環境条件)に応じた調整が可能である。通常の方法では、適用先の環境条件が変わると、それに応じて、要求される分解能や許容されるCPU負荷のバランスをとりながら、キャプチャ周期やキャプチャパターン(領域の形状や面積)や判定ロジック(比較アルゴリズムにおける判定の基準・条件や判定の位置・周期)を実装し直す必要がある。 Further, since the setting values such as the threshold value and weight for dynamic control of the resolution can be selected from fine step values, the performance of the PC to which the present invention is applied, the number of pixels of the screen, the change tendency of the GUI image, etc. Adjustment according to the environmental conditions of the application destination is possible. In the normal method, when the environmental condition of the application destination changes, the capture period, capture pattern (region shape and area), and judgment logic (balance) while balancing the required resolution and allowable CPU load accordingly. It is necessary to re-implement the judgment criteria / conditions and judgment position / cycle in the comparison algorithm.
背景雑音的な画面変化は、一般的に考えると、ユーザに対してあまり目立たない表示とすることで、ユーザに伝えたい表示内容やその変化に対する人の認識を邪魔しないようになっている。ウィンドウシステムで提供される各種の表示形式やアプリケーションの開発者が設計するUIは、結果的にこれに沿ったものになっていると考えられる。従って、領域の面積が小さいほど、また、表示が変化してからさらに別の内容に変化しあるいは元の内容に戻るなどまでの持続時間が短かいほど、検知したい状態である度合が低いと仮定できる。この考え方(段階検知モデル)に基づいたフィルタ設定が可能な検知方法が望まれる。 In general, a background noise-like screen change is made so as not to be noticeable to the user so that the display content desired to be transmitted to the user and human recognition of the change are not disturbed. Various display formats provided by the window system and UIs designed by application developers are considered to be consistent with this. Therefore, it is assumed that the smaller the area is, and the shorter the duration from when the display changes to another content or the original content is shorter, the lower the degree of detection is desired. it can. A detection method capable of setting a filter based on this concept (stage detection model) is desired.
従来の方法の課題として、この仮定に基づいた段階的・複合的なフィルタ閾値を扱うことができない。例えば、面積的、時間的な閾値は1つの組み合わせしか設定できないため、面積が大きいものであれば短時間の変化であっても通知したり、小さいものであれば長時間の変化にならないと通知しない、などの設定はできない。 As a problem of the conventional method, it is not possible to handle a stepwise and complex filter threshold based on this assumption. For example, only one combination of area and time thresholds can be set, so if the area is large, it will be notified even if it changes for a short time, and if it is small, it will be notified that it will not change for a long time. You cannot make settings such as
ランダムにサンプリングピクセルを設定する方法では、確率的に上記仮定に沿った検知を行うことができるが、検知漏れの最悪値も確率的にしか保証できない。これは、エージェントの設定値に対して動作保証を必要とする場合、例えば画面履歴を開発者によるテストやユーザによる重要操作のエビデンスとして用いる場合や、エージェントにミッションクリティカルな自動操作を実行させる場合、などに実際的(契約規定上、責任分界上)に問題となる。 In the method of setting sampling pixels at random, detection according to the above assumption can be performed probabilistically, but the worst value of detection omission can be guaranteed only probabilistically. This is because when the operation setting is required for the set value of the agent, for example, when the screen history is used as evidence for the test by the developer or the important operation by the user, or when the agent executes the mission critical automatic operation, For example, it becomes a practical problem (in terms of contract provisions, on the demarcation of responsibility).
所定パターンでサンプリングピクセルを設定する方法では、極端に縦長・横長な矩形領域の画面変化を見逃す場合がある。また、段階的・複合的なフィルタ閾値を提供するパターンは提示されていない。さらにこれらパターンを設定値によって変化させる手段は提示されていない。さらにその設定値と検知できる領域面積や変化時間との直感的な対応がとれる検知モデルも提示されていない。 In the method of setting sampling pixels in a predetermined pattern, there are cases where a screen change in an extremely vertically or horizontally long rectangular area is missed. Also, no pattern is provided that provides a stepwise and complex filter threshold. Furthermore, no means for changing these patterns according to the set values is presented. Furthermore, no detection model that can intuitively correspond to the set value and the area and change time that can be detected is not presented.
また、このような段階的なフィルタ閾値を扱うにあたっては、フィルタを粗くすることにより負荷を抑制する対策は、一般に有効に働かない。つまり、段階的なフィルタ閾値の精細な方の設定に基づいて、キャプチャの面積(あるいは領域的な粒度)や時間(あるいは周期的な粒度)を固定して処理を行う必要がある。これによって得られるデータはオーバースペックであり、条件を満たさない変化を大量に無視することになる。すなわち、無駄なキャプチャ処理実行や画像データ領域確保が頻発することを意味する。結果として、コンピュータの負荷は、最も重いフィルタ設定の組み合わせに支配されるため、期待したように低くはならない。 Further, in handling such a stepwise filter threshold, a measure for suppressing the load by roughening the filter generally does not work effectively. In other words, it is necessary to fix the capture area (or regional granularity) and time (or periodic granularity) based on the finer setting of the stepwise filter threshold. The data obtained by this is over-spec, and a large amount of changes that do not satisfy the conditions are ignored. In other words, it means that wasteful capture processing and image data area reservation frequently occur. As a result, the computer load is dominated by the heaviest combination of filter settings and will not be as low as expected.
本発明では、前記課題を解決するため、
コンピュータの表示画面の変化を検知する装置であって、
表示画面のX方向またはY方向またはその両方に所定の間隔を空けて指定したスキャンラインの組み合わせによりパターンを生成するスキャンラインパターン生成部と、
スキャンラインごとに画面上の帯状の矩形の画像をキャプチャするキャプチャ処理部と、
キャプチャした画像のデータを蓄積するキャプチャ結果蓄積部と、
以前の周期で蓄積した結果と最新の結果との差異を比較するスキャンライン差異比較部と、
画面変化の継続状態の開始および終了の時点を外部へ向けて通知する画面変化通知部とを少なくとも備えており、
前記スキャンラインパターン生成部は、所定の変化サイズ感度および変化タイミング分解能のスキャンラインパターンを生成し、
前記スキャンライン差異比較部は、スキャンラインごとに関連付けられた直近変化時刻のタイムスタンプを参照する
ことを特徴とする。
In the present invention, in order to solve the above problem,
A device for detecting changes in the display screen of a computer,
A scan line pattern generation unit that generates a pattern by a combination of scan lines specified with a predetermined interval in the X direction or the Y direction or both of the display screen;
A capture processing unit that captures a rectangular image on the screen for each scan line;
A capture result storage unit for storing captured image data;
A scanline difference comparison unit that compares the difference between the results accumulated in the previous cycle and the latest results,
A screen change notification unit for notifying the start and end of the screen change continuation state to the outside ,
The scan line pattern generation unit generates a scan line pattern having a predetermined change size sensitivity and change timing resolution,
The scan line difference comparison unit refers to a time stamp of the latest change time associated with each scan line .
また、本発明では、前記課題を解決するため、
コンピュータの表示画面の変化を検知する方法であって、
スキャンラインパターン生成部により、表示画面のX方向またはY方向またはその両方に所定の間隔を空けて指定したスキャンラインの組み合わせによりパターンを生成する工程と、
キャプチャ処理部により、スキャンラインごとに画面上の帯状の矩形の画像をキャプチャする工程と、
キャプチャ結果蓄積部により、キャプチャした画像のデータを蓄積する工程と、
スキャンライン差異比較部により、以前の周期で蓄積した結果と最新の結果との差異を比較する工程と、
画面変化通知部により、画面変化の継続状態の開始および終了の時点を外部へ向けて通知する工程とを少なくとも含み、
前記スキャンラインパターン生成工程では、所定の変化サイズ感度および変化タイミング分解能のスキャンラインパターンを生成し、
前記スキャンライン差異工程では、スキャンラインごとに関連付けられた直近変化時刻のタイムスタンプを参照する
ことを特徴とする。
In the present invention, in order to solve the above-mentioned problem,
A method for detecting changes in a display screen of a computer,
A step of generating a pattern by a combination of scan lines specified with a predetermined interval in the X direction or the Y direction or both of the display screen by the scan line pattern generation unit;
A step of capturing a band-shaped rectangular image on the screen for each scan line by the capture processing unit;
A step of storing captured image data by a capture result storage unit;
A step of comparing the difference between the result accumulated in the previous cycle and the latest result by the scan line difference comparison unit,
The screen change notification unit, at least viewed including the step of notifying towards the point beginning and end of the continuous state of the screen changes to the outside,
In the scan line pattern generation step, a scan line pattern having a predetermined change size sensitivity and change timing resolution is generated,
In the scan line difference step, the time stamp of the latest change time associated with each scan line is referred to.
本発明によれば、サンプルピクセルではなく、スキャンラインのパターンで画面状態を取得することにより、検出漏れのないことが保証される変化領域の最小高・最小幅を与えることができる。 According to the present invention, it is possible to provide the minimum height and the minimum width of the change region in which it is ensured that there is no omission of detection by acquiring the screen state with the pattern of the scan line instead of the sample pixel.
また、パターンを分解能ごとに複数用意し、所定の周期・頻度で重ね合せて適用することにより、前述した段階検出モデルに基づいた検出を可能にする。 In addition, by preparing a plurality of patterns for each resolution and applying them by overlapping them at a predetermined cycle / frequency, detection based on the above-described step detection model can be performed.
また、高分解能のパターンは分解し、1周期内に複数回に分けて適用することにより、キャプチャ処理の負荷を平滑化することができる。 Further, the load of the capture process can be smoothed by decomposing the high-resolution pattern and applying the pattern in a plurality of times within one period.
また、画面検知の状況に応じて、動的にパターンを変更することにより、処理の枠組みを変えることなく、キャプチャ処理の許容負荷と要求検知精度に応じて、動作を適応させることができる。 Further, by dynamically changing the pattern according to the state of screen detection, the operation can be adapted according to the allowable load of the capture process and the required detection accuracy without changing the processing framework.
さらにまた、スキャンラインの幅を静的もしくは動的に増大させることにより、スキャンラインに変化領域がかかる割合を拡大し、実効的な感度を向上させることができる。 Furthermore, by increasing the width of the scan line statically or dynamically, it is possible to increase the ratio that the change area is applied to the scan line and to improve the effective sensitivity.
図1は、従来の画面キャプチャ処理での課題の一例、ここでは一のウィンドウを他のウィンドウの前面にもってくる場合の例を示している。従来の画面キャプチャでは、表示更新途中の画像データを取得してしまう場合があった。これに対して、予め設定した待機時間を空けてキャプチャする方法が一般的であるが、動作環境や対象とするアプリケーションやウィンドウによって最適な待機時間が異なる。また実行時の状況によって、表示更新にかかる時間が変動する場合もあり、固定的な時間設定では途中の状態をキャプチャしてしまう可能性が常にある。本発明は、画像内容の変化を監視し、変化の開始を検知するとともに、所定の条件で変化が継続しているかどうかを観察し、変化の終了を検知する、ことを目的とする(背景技術の項では変化の開始の検知を念頭に説明しているが、実際には、変化の継続の認識と変化の終了の検知も目的とする。)。 FIG. 1 shows an example of a problem in a conventional screen capture process, in which an example of bringing one window to the front of another window. In conventional screen capture, image data in the middle of display update may be acquired. On the other hand, a method of capturing with a standby time set in advance is common, but the optimal standby time differs depending on the operating environment, the target application, and the window. In addition, the time required for display update may vary depending on the situation at the time of execution, and there is always a possibility that a state in the middle will be captured with a fixed time setting. An object of the present invention is to monitor a change in image content, detect the start of the change, observe whether the change continues under a predetermined condition, and detect the end of the change (background art). In this section, detection of the start of change is described in mind, but in reality, the purpose is to recognize the continuation of change and detect the end of change.)
図2は、ウィンドウを前面化する場合の一般的な表示更新処理のシーケンスを示している。この図からわかるように、操作イベントを検知できたとしても表示更新、すなわち描画処理の終了のタイミングと同期をとることが、処理フローを工夫することによっても原理的に不可能である。 FIG. 2 shows a general display update processing sequence when the window is brought to the front. As can be seen from this figure, even if an operation event can be detected, it is theoretically impossible to synchronize the display update, that is, the timing of the end of the drawing process, even by devising the processing flow.
その理由として最も大きなものは、図中(1)に示すように、OS仕様でフック返却を待たずに非同期に続行することがあり、実行時の状況に大きく依存するためである。具体的には、Windows(登録商標) XP,Vista,7などのMicrosoft(登録商標)社のOSでは、GUIに関するオペレーションのイベントを、他のプロセスで検知する目的で、Windows(登録商標)メッセージのグローバルフックのしくみを使用するのが一般的である。このしくみの仕様として、当該イベントを発生したプロセスをフリーズさせることのないよう、一定時間以上フックプロシージャから処理が戻らない場合、その返却を待つことなく次の処理を続行するようになっている。従って、キャプチャ処理などの時間がかかる処理を行うと、キャプチャ完了時点で既に描画処理が開始されている可能性がある。Windows(登録商標)メッセージで「ウィンドウアクティベイトをこれから開始する」(操作開始直前)というイベントを検知し、操作開始直前の画像を取得しようとしても、実際には既に操作直後のイメージの描画が開始されている状態が発生する場合を避けることができない。 The biggest reason for this is that, as indicated by (1) in the figure, the OS specification may continue asynchronously without waiting for the hook return, and is largely dependent on the situation at the time of execution. Specifically, in the OS of Microsoft (registered trademark) such as Windows (registered trademark) XP, Vista, 7, etc., in order to detect an operation event related to the GUI by another process, a Windows (registered trademark) message is displayed. It is common to use the global hook mechanism. As a specification of this mechanism, in order not to freeze the process that generated the event, when the process does not return from the hook procedure for a certain period of time, the next process is continued without waiting for the return. Therefore, if a process that takes time such as a capture process is performed, there is a possibility that the drawing process has already started at the time of capture completion. Even if you try to acquire the image immediately before the start of operation by detecting the event “Start window activation from now on” (just before the start of operation) in the Windows® message, the drawing of the image immediately after the operation has already started. The case where the state that has been done occurs cannot be avoided.
一方でWindows(登録商標)メッセージで「ウィンドウアクティベイトを実行し完了した」(操作完了直後)というイベントを検知し、操作完了直後の画像を取得しようとしても、実際にはまだ描画が途中の状態が発生する場合を避けることもできない。これは、図中(2)〜(5)に示すことから、キャプチャが描画完了のタイミングよりも早くなることがあり、実行時の状況に大きく依存するためである。これが前記に次ぐ理由である。具体的には、(2)、(4)で処理の契機がキューに登録され、別のスレッドからこれを取り出して後続の処理を実行する点や、(3)、(5)でそれぞれの当該処理の実際の効果を得るまでに必要な実行時間が異なったり、当該処理部の内部での他の処理依頼との優先順位が異なったりする点に由来する。 On the other hand, even if you try to acquire the image immediately after the completion of the operation by detecting the event “Windows activation is completed and completed” (immediately after the operation is completed) in the Windows (registered trademark) message, the drawing is still in progress It is not possible to avoid the case where this occurs. This is because, as shown in (2) to (5) in the figure, the capture may be earlier than the drawing completion timing, and greatly depends on the situation at the time of execution. This is the second reason. Specifically, the processing trigger is registered in the queue in (2) and (4), this is taken out from another thread and the subsequent processing is executed, and each corresponding in (3) and (5) This is because the execution time required to obtain the actual effect of the process is different, or the priority order of other processing requests within the processing unit is different.
(2)〜(5)について個々の実際の処理内容は以下の通りである。(2)については、検知対象APのGUIプラットフォームにおけるリペイント(repaint)アルゴリズムによるが、一般にはリペイントを依頼したスレッドで再描画が必要なGUI要素にフラグをたてることのみを行い、GUIプラットフォームのウィンドウマネージャにおけるイベントループのスレッドに制御が渡った時点で、実際の描画処理が実行される。(3)については、GUIプラットフォームとOSのグラフィック環境の仕様によるが、ハードウェアアクセラレーションが有効な場合などは、描画処理で生成された図形の描画命令が、Open GLなどの描画エンジンに送信・蓄積され、それがハードウェア的に実行されるというように、グラフィックメモリ上に書き込まれるまでの一連の処理が、所定の実行時間を使って行われる。 The actual processing contents of (2) to (5) are as follows. (2) is based on the repaint algorithm on the GUI platform of the detection target AP, but generally only the flag is set to the GUI element that needs to be redrawn in the thread that requested the repaint, and the GUI platform window When control is passed to the event loop thread in the manager, the actual drawing process is executed. For (3), depending on the specifications of the GUI platform and the OS's graphics environment, when hardware acceleration is enabled, graphics drawing commands generated by drawing processing are sent to a drawing engine such as Open GL. A series of processes until the data is stored and executed on the graphic memory is performed using a predetermined execution time.
(4)については、前記の通りフックプロシージャでの処理時間を短くするために、イベントをエージェント内部の独自のイベントキューに登録し処理を速やかに返却する実装とし、エージェント自身のポーリングイベントで当該登録内容を取り出すことにより、イベント内容に応じた処理が行われる。エージェントは、単に画面キャプチャを行うだけではなく、同じイベントフックの機構を使って、ユーザ操作のログを取得・蓄積したり、シナリオに基づいた自動操作を実行するなど、他の処理も行う。このため、前記イベントキューから取り出したイベント内容に応じた処理にかかるエージェントの実行時間は異なっており、イベント内容によっては処理順序の優先順位を変えるなどの制御も行う必要がある。これにより、画面キャプチャが必要なイベントがキューに登録されてから、実際にOSにキャプチャ処理依頼を送信するまでのタイミングは、エージェントの内部実装や前後のイベント内容など実行時の状況に依存する。 For (4), in order to shorten the processing time in the hook procedure as described above, the event is registered in the original event queue inside the agent and the processing is returned promptly, and the registration is performed by the agent's own polling event. By extracting the contents, processing corresponding to the event contents is performed. In addition to screen capture, the agent uses the same event hook mechanism to acquire and store user operation logs, and to perform other processes such as executing automatic operations based on scenarios. For this reason, the execution time of the agent for processing corresponding to the event content extracted from the event queue is different, and control such as changing the priority of the processing order is required depending on the event content. As a result, the timing from when an event requiring screen capture is registered in the queue to when the capture processing request is actually transmitted to the OS depends on the execution situation such as the internal implementation of the agent and the contents of events before and after.
さらに、(2)と(3)については、検知対象のAPの内部実装やGUIプラットフォームに依存し、またエージェントとは異なる外部の開発ベンダが提供するものであるため、それらに改造を加えることはもちろん、ソースコードを見ることも不可能であること、(4)と(5)については、複数種類の検知対象に汎用的に適用できる実装とする必要があり、従って特定の検知対象や実行時条件に特化した実装が許されないこと、などに注意すべきである。 In addition, (2) and (3) depend on the internal implementation of the AP to be detected and the GUI platform, and are provided by an external development vendor different from the agent. Of course, it is impossible to see the source code, and (4) and (5) must be implemented universally for multiple types of detection targets. It should be noted that special implementations are not allowed.
なお、別途記載した通り、本発明の前提として、OSやハードウェアに手を加えるような対応も許容されない点に留意する必要がある。また、以上はWindows(登録商標) OSとその上でのGUIプラットフォームの環境を前提に述べたが、Linux(登録商標) OSとその上でのGUIプラットフォームなど、別の環境においても同様の問題が発生すると考えられる。しかしながら、それを前記の表示更新の一般的な処理フロー上での工夫として対応しようとすると、個別の実装となり、開発にもコストがかかる。さらにまた、ウィンドウ前面化以外の表示更新の場合(ボタンの押下など)についても、上記と処理フローは共通するが、必要な工夫は個々に異なり、それぞれに対応方法を検討することも現実的に困難である。このため、画像内容の変化を画面キャプチャを通して直接監視し比較検知する方法は、実用性の観点から重要な方法である。 It should be noted that, as described separately, it is not permissible as a premise of the present invention to handle the OS and hardware. In addition, the above has been described on the assumption that the environment of the Windows (registered trademark) OS and the GUI platform thereon is the same, but the same problem occurs in other environments such as the Linux (registered trademark) OS and the GUI platform on the same. It is thought to occur. However, if it tries to cope with it as a device on the general processing flow of the display update described above, it becomes an individual implementation and the development is costly. Furthermore, in the case of display updates other than window fronting (such as button presses), the processing flow is the same as the above, but the necessary devices differ individually, and it is realistic to consider the corresponding method for each. Have difficulty. For this reason, a method of directly monitoring and comparing and detecting changes in image content through screen capture is an important method from the viewpoint of practicality.
図3は、画面全体もしくは指定された所定の部分領域をキャプチャすることにより、画面の変化を検知する方法の基本的なフローを示している。この方法では、キャプチャする矩形領域が広すぎると処理負荷が重くなる。またキャプチャ周期が短いと変化の検知感度は高まるが、表示更新の途中で瞬間的に静止するなどがあるとそれを逐一検知してしまい、人が変化を認識できる粒度の時間の流れの中で、全体的な変化が収まったかどうかを判定できない。さらに、矩形領域をビットマップにより画像データ取得すると、1ピクセルも漏らさずに比較する点では有利であるが、微小領域の変化に対して全て検知を行ってしまうために感度が高すぎ、やはり領域の広がりの中での全体的な変化が収まったかどうかを判定できない。 FIG. 3 shows a basic flow of a method for detecting a change in the screen by capturing the entire screen or a specified predetermined partial area. In this method, if the rectangular area to be captured is too large, the processing load becomes heavy. In addition, if the capture cycle is short, the change detection sensitivity increases, but if there is a momentary pause in the middle of the display update, it is detected one by one, and in the flow of granularity that humans can recognize the change Cannot determine whether the overall change has subsided. Furthermore, obtaining image data from a rectangular area using a bitmap is advantageous in that it compares without leaking even one pixel, but the sensitivity is too high because all the changes are detected for changes in a minute area. It is not possible to judge whether the overall change within the spread of
図示はしていないが、ランダムに位置指定したピクセルサンプリングでは、確率的に上記の要件を満たす検知が可能であるが、最低検知感度を保証することができない。 Although not shown in the figure, pixel sampling with randomly specified positions can detect the above requirements stochastically, but cannot guarantee the minimum detection sensitivity.
図4(a)は、規則的に位置指定したピクセルサンプリングの事例である。ピクセルの間隔によって検知感度の保証を与えることができる。しかしながら、ピクセル単位での比較では、破線で示す領域のように、検知できる変化領域の最小高または最小幅のどちらか一方でも下回ると、検知を保証できない。これは表示画面上で発生する画像変化に対して人の直感に反するもので、実用に際して適用環境と設定との適切性の判断が難しい。例えば、図1で示したウィンドウ前面化の際の最初に行われるウィンドウ枠の表示更新に対して、検知漏れの可能性が高いことがわかる。 FIG. 4A shows an example of pixel sampling that is regularly positioned. The detection sensitivity can be guaranteed by the pixel interval. However, in comparison in units of pixels, detection cannot be guaranteed if it falls below either the minimum height or the minimum width of the change area that can be detected, such as the area indicated by the broken line. This is contrary to human intuition with respect to image changes that occur on the display screen, and it is difficult to determine the appropriateness of the application environment and settings in practical use. For example, it can be seen that there is a high possibility of omission of detection for the display update of the window frame that is first performed when the window is brought into front as shown in FIG.
そこで、図4(b)、(c)、(d)に示す考え方でキャプチャ矩形領域を1ピクセル幅(複数ピクセル幅で設定することは本発明内での工夫の範囲である)のスキャンライン状にすることで処理負荷を抑えながら、上記課題を解決できる。なお、図4(b)は縦方向のスキャンラインパターン(X方向に一定間隔)、図4(c)は横方向のスキャンラインパターン(Y方向に一定間隔)、図4(d)は同図(b)、(c)のスキャンラインパターンを重畳した例をそれぞれ示す。 Therefore, a scan rectangular shape having a capture rectangular area of 1 pixel width (setting a plurality of pixel widths is within the scope of the invention) according to the concept shown in FIGS. 4B, 4C, and 4D. This makes it possible to solve the above problems while reducing the processing load. 4B is a vertical scan line pattern (fixed in the X direction), FIG. 4C is a horizontal scan line pattern (fixed in the Y direction), and FIG. 4D is the same figure. Examples in which the scan line patterns of (b) and (c) are superimposed are shown.
さらに、図5に示す考え方で、検知できる変化領域の最小高、最小幅(分解能)を変えた複数のスキャンラインパターンを生成する。また、図6に示す考え方で、キャプチャ周期上の各タイミングにおいて、分解能ごとのスキャンラインパターンを適切な間隔で重畳したパターンに基づいてキャプチャ処理を行うことで、面積が大きいものであれば短時間の変化であっても通知したり、小さいものであれば長時間の変化にならないと通知しないといった動作を実現できる。さらに、図7に示す考え方で、パターン上の多数のスキャンラインをキャプチャ周期上の各タイミングに分散配置し、1つのスキャンラインは1周期で再キャプチャ・比較が行われることを保証すれば、負荷の平準化を実現できる。 Furthermore, a plurality of scan line patterns in which the minimum height and minimum width (resolution) of the change area that can be detected are changed are generated based on the concept shown in FIG. Further, according to the concept shown in FIG. 6, at each timing on the capture cycle, a capture process is performed based on a pattern in which scan line patterns for each resolution are superimposed at appropriate intervals. It is possible to realize an operation such as notifying even if there is a change in the number, or not informing if the change is small for a long time. Furthermore, with the concept shown in FIG. 7, if a large number of scan lines on the pattern are distributed and arranged at each timing on the capture cycle and it is guaranteed that one scan line is recaptured and compared in one cycle, Leveling can be realized.
さらに図8に示すように、分解能の細かいパターンは分解能の粗いパターンと重なるスキャンラインを持つため、図7で複数回のタイミングに分散配置する際に処理すべきスキャンラインの本数を、半分にできるという効果が得られる。また、これによって、図9に示すように、複数の分解能の異なるパターンを重ね合せながら、1周期内にキャプチャタイミングを分散する場合、各タイミングでキャプチャするライン数を平準化できる、という効果も得られる。 Further, as shown in FIG. 8, since the fine resolution pattern has a scan line that overlaps the coarse resolution pattern, the number of scan lines to be processed when distributed and arranged at a plurality of times in FIG. 7 can be halved. The effect is obtained. In addition, as shown in FIG. 9, when the capture timings are distributed within one period while overlapping a plurality of patterns having different resolutions, the number of lines captured at each timing can be leveled. It is done.
図10は、本発明の画面変化検知装置(画面変化検知エージェント)を含むPC環境の構成図であり、図中、1はコンピュータ、2はディスプレイ(表示装置)、3はキーボード(入力装置)、4はマウス(入力装置)である。また、コンピュータ1は、ハードディスク(記憶装置)5、内部メモリ6、システムバス7およびCPU8を含み、内部メモリ6上にはWindows(登録商標) OS(オペレーティングシステム)10とともに本発明の画面変化検知装置20が実装される。
FIG. 10 is a configuration diagram of a PC environment including a screen change detection device (screen change detection agent) according to the present invention, in which 1 is a computer, 2 is a display (display device), 3 is a keyboard (input device),
図11は、本発明の画面変化検知装置20の実施の形態の一例を示す機能構成図であり、表示画面のX方向およびY方向に所定の間隔を空けて指定したスキャンラインの組み合わせによりパターンを生成するスキャンラインパターン生成部21と、スキャンラインごとに画面上の帯状の矩形の画像をキャプチャするキャプチャ処理部22と、キャプチャした画像のデータを蓄積するキャプチャ結果蓄積部23と、以前の周期で蓄積した結果と最新の結果との差異を比較するスキャンライン差異比較部24と、画面変化の開始または継続または終了を装置外部へ向けて通知する画面変化通知部25と、画面変化通知部25の通知内容を記憶し、現在の表示画面上の状態および/または外部環境の状態の組み合わせに応じて検知モードを変更し保持する検知モード制御部26とを備えている。
FIG. 11 is a functional configuration diagram showing an example of an embodiment of the screen
図12は、本発明の画面変化検知装置20における処理の流れを示すものである。s1では、スキャンライン生成部21においてスキャンラインパターンを生成する。スキャンライン生成部21では、キャプチャ処理部22で参照されるパターンをカレントパターンとして保持する。以前のパターンと同じであれば、以降の処理のためのカレントパターンは更新しない。異なっていれば更新する。処理の詳細は図13に示す。s2ではスキャンラインごとの画像のキャプチャを行う。処理の詳細は図14に示す。s3では取得したキャプチャ内容(画像)と前回のキャプチャ内容とを比較する。これは、後述の画面バッファ上のキャプチャ領域と当該キャプチャ内容との比較によって実現できるが、キャプチャ内容の1つ前の取得内容を保持する配列を用意して比較するなど、他の実装方法でも等価な処理が実現できる。
FIG. 12 shows the flow of processing in the screen
s4では、1つ前のキャプチャ内容と現在のキャプチャ内容を比較し、1つでも差異が生じているか否かの条件分岐を行う。前記分岐がYes(1つでも差異が生じている)の場合、s5で現在の更新中フラグがOFFならばONに設定し、画面の変化開始を上位機能に通知する。通知は画面変化通知部25を介して実行される。前記分岐がNo(差異が1つも生じていない)の場合、s6以降を実行する。
In s4, the previous captured content is compared with the current captured content, and a conditional branch is made as to whether or not there is any difference. If the branch is Yes (at least one difference occurs), if the current updating flag is OFF in s5, it is set to ON and the start of the screen change is notified to the higher function. The notification is executed via the screen
s6では、各スキャンラインごとに保持されている直近変化時刻のタイムスタンプを参照し、現在の時刻と比較する。1つでも時間差が1周期の時間差を超えるものがあれば条件分岐を行う。これは、s4の結果である変化開始時刻lastTime[]を参照し、全てがnull、すなわち未設定の場合をもって判定が可能である。前記が偽の場合、s7で現在の更新中フラグがONならばOFFに設定し、画面の変化終了を上位機能に通知する。前記が真の場合、更新中フラグは変更せず上位機能への通知も特に行わない。これは変化途中であることを意味する。 In s6, the time stamp of the latest change time held for each scan line is referred to and compared with the current time. If even one of them has a time difference exceeding a time difference of one cycle, a conditional branch is performed. This can be determined by referring to the change start time lastTime [] that is the result of s4, and all are null, that is, not set. When the above is false, if the current updating flag is ON in s7, it is set to OFF, and the end of the screen change is notified to the higher function. When the above is true, the updating flag is not changed and no notification is given to the upper function. This means that it is in the middle of change.
ここで、s4とs6の判定で条件分岐したフローは、以上の処理を経て、s8で合流する。ここでは、現在のキャプチャ内容を後の比較のため保存する。その具体的な方法は、s3の説明でも述べたように、多様に考えられる。ここでは、画面サイズと同じ画面バッファとしてイメージオブジェクトを予め生成しておき、そこに現在キャプチャした内容を所定の位置にコピーする。この位置は、スキャンラインごとの矩形領域のx,y、w、h(x,yは画面左上隅を起点(0,0)とする領域左上隅の座標位置、wは領域の幅、hは領域の高さ)を保持したスキャンライン領域rect[]配列に予め準備しておき、これを参照することで決定する。 Here, the flow branched conditionally by the determination of s4 and s6 joins in s8 through the above process. Here, the current capture content is saved for later comparison. The specific method can be considered variously as described in the explanation of s3. Here, an image object is generated in advance as a screen buffer having the same screen size, and the currently captured content is copied to a predetermined position. This position is defined as x, y, w, h in the rectangular area for each scan line (x, y are the coordinate positions of the upper left corner of the area starting from the upper left corner of the screen, w is the width of the area, h is The scan line area rect [] array holding the area height) is prepared in advance and determined by referring to this.
図13に検知モード制御部26およびスキャンラインパターン生成部21の動作フローの詳細を示す。ここでは、検知モード制御部26の機能により、現時点での画面変化検知の状態として更新フラグの値とCPU負荷の値を取得している。そして、その値の範囲によって条件分岐を行い、スキャンラインパターン生成部21の機能により、適切なパターンを生成し(s11,s12)、ループ処理においてここまでで用いてきたカレントパターンとの比較を行い、必要があれば更新する(s13)。この実施の形態では、画像内容の変化の状態に加えて、当該PCのCPU負荷を計測し、それが閾値より上か下かによってパターンを適応させている。
FIG. 13 shows details of the operation flow of the detection
すなわち、負荷が高いときは、画像変化が瞬間的に停止しても表示更新は継続している可能性が高いため、分解能を落とすことで、無駄に静止を検知しないようにしている。具体的には、負荷が低い場合は、できるだけ早く静止を検知するため2〜64分割パターンを生成する(s11)。負荷が高い場合は、特定の変化サイズ分解能、変化タイミング分解能の分割パターンのみに処理を限定して検知するため16分割パターンのみを有効にし、他を休止させたパターンを生成する(s12)。 That is, when the load is high, there is a high possibility that the display update is continued even if the image change is momentarily stopped. Therefore, the resolution is lowered so that stillness is not detected unnecessarily. Specifically, when the load is low, a 2-64 divided pattern is generated to detect stillness as soon as possible (s11). When the load is high, only the 16 divided patterns are validated to detect only the divided patterns having a specific change size resolution and change timing resolution, and a pattern in which the others are paused is generated (s12).
図14にスキャンライン差異比較部の動作フローの詳細を示す。s21ではloopIndexをインクリメントし、1周期の最大値Tmax以上ならばゼロに再初期化する。s22では、関数calcIndex()を呼び出し、現在のloopIndexとpatternIndexに対応するインデックス番号をscanIndex変数に代入する。s23では、画面上で実際にキャプチャする矩形領域をscanRect[]配列から取得し、その領域をキャプチャする。s24では、画面バッファscreenBufferイメージ上から以前のキャプチャ内容を再取得し、前記キャプチャ内容と比較する。s25では、画像の比較の結果、差異があった場合、変化開始のタイムスタンプを直近変化時刻lastTime[]に記憶する。具体的には当該時点でキャプチャしたスキャンラインごとに変化開始時刻lastTime[]を参照し、画像の比較結果が差異なしで、現在の時刻から1周期の時間差を超えていた場合は、nullで上書きし未設定とする。また画像の比較結果が差異ありの場合は、新たに現在の時刻で上書きする。s26では、2,4,8,16,32,64の各分割パターンについて、patternIndexのループにおいて対応するパターンに関する処理を完了したかにより、条件分岐を行う。 FIG. 14 shows the details of the operation flow of the scan line difference comparison unit. In s21, loopIndex is incremented, and if it exceeds the maximum value Tmax of one cycle, it is reinitialized to zero. In s22, the function calcIndex () is called, and the index number corresponding to the current loopIndex and patternIndex is assigned to the scanIndex variable. In s23, a rectangular area to be actually captured on the screen is acquired from the scanRect [] array, and the area is captured. In s24, the previous captured content is re-acquired from the screen buffer screenBuffer image and compared with the captured content. In s25, if there is a difference as a result of the image comparison, the time stamp of the change start is stored in the latest change time lastTime []. Specifically, refer to the change start time lastTime [] for each scan line captured at that time, and if there is no difference in the image comparison result and it exceeds the time difference of one cycle from the current time, it is overwritten with null. Not set. If there is a difference between the image comparison results, the image is newly overwritten with the current time. In s26, for each of the 2, 4, 8, 16, 32, and 64 divided patterns, conditional branching is performed depending on whether the processing related to the corresponding pattern in the patternIndex loop is completed.
図15にキャプチャ結果蓄積部の動作フローの詳細を示す。s31では、スキャンラインごとにキャプチャ内容を次のループで比較対象とするため、メモリ上に保存する。具体的には、画面バッファのイメージオブジェクト上の当該領域にキャプチャ内容を上書きする。 FIG. 15 shows the details of the operation flow of the capture result storage unit. In s31, the captured content is stored in the memory for comparison in the next loop for each scan line. Specifically, the captured content is overwritten in the area on the image object in the screen buffer.
ここで、フローの内容を理解する上で、注意すべき点がある。まず、図14の詳細フローは、図12のs2とs3の2つに対応する。また、図15の詳細フローは、図12のs8に対応するが、実際の処理は図14のs24とs26の間で実施しても良い。さらに、図12のs4、s6の条件分岐は、実質的な比較処理が図14のs24で行われており、その結果をlastTime[]に格納して参照しているだけである。これらの点は、図12のフローを説明上分かり易くするために、従来の方法である図3のフローとの対応を残した構造としているために生じている。詳細な処理内容としては、上記の通り表記としては異なる箇所があるが、フローとしては実質同じものである。 Here, there are points to be noted in understanding the contents of the flow. First, the detailed flow of FIG. 14 corresponds to two of s2 and s3 of FIG. The detailed flow in FIG. 15 corresponds to s8 in FIG. 12, but the actual processing may be performed between s24 and s26 in FIG. Further, in the conditional branching of s4 and s6 in FIG. 12, the substantial comparison processing is performed in s24 in FIG. 14, and the result is only stored and referred to in lastTime []. These points occur because the structure of FIG. 12 is left in correspondence with the flow of FIG. 3, which is a conventional method, in order to facilitate understanding of the flow of FIG. As detailed processing contents, there are different parts as described above, but the flow is substantially the same.
図16は、上記で説明した内部処理で必要となる作業用変数、固定変数値、関数を示している。Pattern class,Rectangle class,Image classは、それぞれ実装プログラミング言語がオブジェクト指向言語であることを想定し、当該実行環境で既に存在すればそのライブラリクラスを、存在しなければ個別に定義したクラスを意味している。Pattern classは2〜64分割のスキャンラインパターンごとの作業用変数や固定変数値をオブジェクト化するためのクラスである。これらにインスタンスは内部処理において1つずつ、すなわちsingletonとして生成される。Rectangle classは表示画面の座標上での矩形図形の幾何情報をオブジェクト化するためのクラスである。左上隅のx座標、y座標、並びに矩形の幅w(widthの略)、高さh(heightの略)を内部変数として保持する。Image classは当該実装における画像イメージデータをオブジェクト化するためのクラスである。 FIG. 16 shows work variables, fixed variable values, and functions that are necessary for the internal processing described above. Pattern class, Rectangle class, and Image class mean that the implementation programming language is an object-oriented language, respectively, and the library class if it already exists in the execution environment, and the class that is individually defined if it does not exist. ing. Pattern class is a class for converting work variables and fixed variable values into objects for each scan line pattern of 2 to 64 divisions. Instances are generated one by one in internal processing, that is, as singletons. Rectangle class is a class for converting the geometric information of a rectangular figure on the coordinates of the display screen into an object. The x coordinate and y coordinate of the upper left corner, and the width w (abbreviation of width) and height h (abbreviation of height) of the rectangle are held as internal variables. The Image class is a class for converting the image data in the implementation into an object.
他の実施の形態として、変化の開始の検知において、変化サイズ感度(所定時間での検知を保証する最小サイズ)を粗くする代わりに、変化タイミング分解能(検知の反応速度、すなわち速い時間間隔で検知結果を得る能力)を細かくする事例を説明する。 In another embodiment, instead of coarsening the change size sensitivity (minimum size that guarantees detection at a given time) in detecting the start of change, change timing resolution (detection reaction speed, ie, detection at a fast time interval) Explain the case where the ability to obtain results) is fine.
図17は、図13のs11、s12を基本に、実行時状況やユーザ設定による適応的な制御方法について示している。 FIG. 17 shows an adaptive control method based on the runtime situation and user settings based on s11 and s12 of FIG.
ここで、s41は、上記の考え方を反映するために追加するステップである。これは更新中フラグがOFFで表示更新が行われていない状態においては、無駄な負荷を避ける観点で、一定以上の領域が一気に変化した場合のみに更新開始とみなす方法である。これを実現するために、小さい領域の変化に対してあえて変化開始の検知を行わないよう、変化サイズ分解能が高いパターンを休止させる。具体的には、8分割パターンのみを動作させ、残りの2、4、16、32分割パターンを休止させることで、処理負荷は5分の1になる。そこで、空いた処理余力を使って、当該の変化サイズ分解能について、変化タイミング分解能を高くする。具体的には、1回のタイミングで8分割パターンを4スキャンライン分キャプチャすることにより、従来の2分割パターンと同じ変化タイミング分解能を実現する。この図中ではこれを4倍速型のパターンと呼んでいる。 Here, s41 is a step added to reflect the above-mentioned idea. This is a method in which, in the state where the updating flag is OFF and the display is not updated, it is considered that the update is started only when a certain region or more changes at a stroke from the viewpoint of avoiding unnecessary load. In order to realize this, a pattern having a high change size resolution is paused so as not to detect the start of change for a change in a small region. Specifically, the processing load is reduced to 1/5 by operating only the 8-division pattern and pausing the remaining 2, 4, 16, 32 division patterns. Therefore, the change timing resolution is increased for the change size resolution using the available processing capacity. Specifically, the same change timing resolution as that of the conventional two-division pattern is realized by capturing the eight-division pattern for four scan lines at one timing. In the figure, this is called a quadruple speed pattern.
これはウィンドウの前面化の表示更新を想定している。ウィンドウの前面化では、図1で明らかなように、まずウィンドウフレーム(枠)の表示によって表示更新が開始され(すなわち変化領域の高さ、幅が大きい)、表示更新が進むに従い内部の領域が変化していく、という特性に基づいており、更新の開始をできるだけタイムラグがないよう検知し、更新の終了をできるだけキャプチャ処理負荷が抑えられるような制御を意図している。 This assumes a display update for fronting the window. As shown in FIG. 1, when the window is brought to the front, display update is started by displaying a window frame (ie, the height and width of the change area is large), and the internal area is changed as the display update progresses. It is based on the characteristic of changing, and it is intended to perform control so that the start of the update is detected with as little time lag as possible, and the end of the update is suppressed as much as possible.
s42は、上記においてさらに、変化タイミング分解能は悪いながらも最低限の変化サイズ分解能を保証するために追加するステップである。これは、予めユーザ設定によって、小領域の変化を無視する設定がOFFにされ、最悪時においての検知感度を従来レベルに維持する指示がされることで有効となる。具体的には、上記8分割パターン4倍速型と並行して32分割パターンを動作させ、1回のタイミングで5スキャンライン分キャプチャすることにより、処理負荷はs11に相当する従来と同じ負荷レベルでありながら、最悪の場合の変化サイズ、変化タイミングの検知感度も同程度となる検知処理が実現できる。 s42 is a step added to guarantee the minimum change size resolution although the change timing resolution is poor. This is effective when the setting for ignoring the change in the small area is turned off in advance by the user setting, and an instruction is given to maintain the detection sensitivity at the worst level at the conventional level. Specifically, by operating a 32 divided pattern in parallel with the 8 divided pattern quadruple speed type and capturing 5 scan lines at one timing, the processing load is the same as the conventional load level corresponding to s11. However, it is possible to realize a detection process in which the detection sensitivity of the change size and change timing in the worst case is comparable.
このようにして生成されるパターンは、格子状であるため小領域の検知漏れは本来的に不可避である。本発明において、変化サイズ分解能をどこまでも細かく設定できれば、小さい領域の検知漏れは理論上極限まで少なくできる。しかし、一般的な表示画面のサイズである1024ピクセルもしくは2048ピクセルをカバーするには、1回のタイミングで10本もしくは11本のスキャンラインを扱う必要がある。グラフィックスエンジンの特性・性能によっては、数多くの細長い矩形領域をキャプチャするよりも、ある程度広い面積の矩形領域を1回でキャプチャする方が、処理時間や消費記憶の観点で負荷が小さい場合もある。また、実用上も一定以上に検知保証される矩形領域サイズが小さくなると、検知遅れ時間の保証をきめ細かい段階を刻んで設定する有用性はほとんどないと考えられる。 Since the pattern generated in this way is in a lattice shape, a small area detection is inherently inevitable. In the present invention, if the change size resolution can be set as finely as possible, the detection omission in a small region can be reduced to the theoretical limit. However, in order to cover a general display screen size of 1024 pixels or 2048 pixels, it is necessary to handle 10 or 11 scan lines at one time. Depending on the characteristics and performance of the graphics engine, capturing a rectangular area with a relatively large area at a time may have a smaller load in terms of processing time and memory consumption than capturing many elongated rectangular areas. . Also, in practice, when the rectangular area size that is guaranteed to be more than a certain level is reduced, it is considered that there is almost no utility for setting the guarantee of the detection delay time in fine steps.
そこで、一定以上の分割パターンについては、スキャンラインを太くすることで表示画面領域全体を隙間なくカバーすることが考えられる。s43はその考え方を反映するために追加するステップである。具体的には、CPU負荷が50%未満の場合のみ、スキャンラインの幅を16ピクセル(表示画面の辺が1024以下の方向)もしくは32ピクセル(表示画面の辺が2048以下の方向)にすることで、これを実現する。ここでは画面全面をマスクするパターンという意味で、これをスキャンラインパターンのマスク版と表記している。 Therefore, it is conceivable to cover the entire display screen area without a gap by making the scan line thicker for a certain division pattern or more. s43 is a step added to reflect the idea. Specifically, only when the CPU load is less than 50%, the scan line width should be 16 pixels (the direction of the display screen is 1024 or less) or 32 pixels (the direction of the display screen is 2048 or less). And this is realized. Here, this means a pattern that masks the entire screen, and this is referred to as a mask version of a scan line pattern.
以上のように、検知モード制御部26の状態定義とスキャンラインパターン生成部21の生成ロジックによって、これらの調整は、適用対象に応じた変更が容易に行える。特に動的変更も可能であるため、適応的な制御も本発明の構成において、簡易に実装・カスタマイズが可能である。例えば、64分割、256分割など、とびとびに高分解能のパターンのスキャンラインを追加したり、256分割のパターンを1回のタイミングで2本ずつスキャンラインを処理する2倍速型とするなど、PCやグラフィックスエンジンの性能に応じて選択組み合わせが可能であり、多段階に設定された各分解能の間のロジック的な依存性はないため、扱いが簡単である、という効果がある。
As described above, according to the state definition of the detection
図18は実際の画面変化が発生してから検知結果を得るまでの時間差が、従来の方法より短く抑えられる様子を示している。変化開始の検知についての効果は明らかであるが、変化完了の検知については従来と変わらず1周期の時間差が存在する。しかし、変化完了の可能性が存在することは、従来よりも短い時間差で検知できる。これは、図面下部の実線の矢印が短い時間差で現れていることから明らかである。そのため、変化完了の可能性が存在する状態になったら、適応的に分解能を上げることにより、短い時間差での検知が可能となる。 FIG. 18 shows how the time difference from when an actual screen change occurs until a detection result is obtained can be suppressed to be shorter than in the conventional method. Although the effect of detecting the start of change is clear, there is a one-cycle time difference as in the conventional case for detecting change completion. However, the existence of the possibility of completion of the change can be detected with a shorter time difference than in the past. This is apparent from the fact that the solid arrows at the bottom of the drawing appear with a short time difference. For this reason, when there is a possibility of completion of the change, it is possible to detect with a short time difference by adaptively increasing the resolution.
図19は、上記状態において、分解能の高いパターンを有効にし、2倍速、4倍速に設定した様子を示している。さらに、分解能の高いパターンのスキャンラインの幅を拡大し、ライン間の隙間がないようにすることで、表示画面全体をカバーした検知判定が可能となる。一方、CPU負荷が大きい場合は、適応的に分解能の高いパターンを休止させることで、当該端末上で画面変化検知エージェントが他の処理のCPUリソースを奪わないようにすることができる。 FIG. 19 shows a state in which a pattern with high resolution is enabled and set to 2 × speed or 4 × speed in the above state. Furthermore, by increasing the width of the scan line of a pattern with high resolution so that there is no gap between the lines, detection determination covering the entire display screen becomes possible. On the other hand, when the CPU load is large, it is possible to prevent the screen change detection agent from taking away the CPU resources of other processes on the terminal by suspending the pattern with high resolution adaptively.
なお、以上の説明では、表示画面上の1方向のスキャンラインについて述べているが、実際には、縦方向、横方向の2方向について同じ方法・実装を行い、両方を同時に動作させることを前提としている。これは本発明が適用対象としている問題領域で、極端に横方向に細長い矩形や縦方向に細長い矩形の両方に対応するためであり、検知対象がどちらか一方について対応すれば良い場合に他方を省略して用いても、本発明の効果は基本的に有効である。 In the above description, scan lines in one direction on the display screen are described. However, in reality, it is assumed that the same method and implementation are performed in the vertical direction and the horizontal direction, and both are operated simultaneously. It is said. This is a problem area to which the present invention is applied, because it corresponds to both extremely elongated rectangles in the horizontal direction and elongated rectangles in the vertical direction. When the detection target only needs to correspond to one of the other, Even if omitted, the effect of the present invention is basically effective.
画面キャプチャを行う際に必要な、スキャンラインを格子状に配置したパターンを生成するアルゴリズムについて、具体的な事例を説明する。 A specific example of an algorithm for generating a pattern in which scan lines are arranged in a grid pattern necessary for screen capture will be described.
ここでは横方向についてだけ考慮しており、1回にキャプチャするスキャンラインの本数を5、画面のサイズを1024ピクセルとした場合の考え方を示す。パターンは、検知が保証される変化領域のサイズが1024の2分の1の場合、4分の1の場合、というように2分の1ずつ分解能が詳細になるものとする。また、1つの分解能のパターンにおける各タイミングでのスキャンラインの位置は、単純に左から右に移動していくものとする。これらの前提を変えて、既に他の部分で述べたように、画面全体がキャプチャ周期内で分散したタイミングで調査されるよう順序を入れ替えたり、逆に領域ごと変化ごとに重点的に前倒しもしくは先延ばしで調査されるよう順位を制御したり、任意に変えて実装することが考えられる。また、設定ファイル等の内容により起動ごとに変化させるよう実装することも、実行時の状況に適応して動的に変化するよう実装することも可能である。これらは、ここで説明するアルゴリズムを基本として任意に応用することで容易に実現できる。 Here, only the horizontal direction is taken into consideration, and the concept when the number of scan lines captured at one time is 5 and the screen size is 1024 pixels is shown. It is assumed that the resolution of the pattern is detailed in half, such as when the size of the change region in which detection is guaranteed is 1/2 of 1024, and when the size is 1/4. Further, it is assumed that the position of the scan line at each timing in one resolution pattern simply moves from left to right. By changing these assumptions, as already described elsewhere, the order is changed so that the entire screen is examined at the timing dispersed within the capture cycle. It may be possible to control the order so that it is investigated by extending the length or to change it arbitrarily. In addition, it can be implemented so as to change at each activation depending on the contents of the setting file or the like, or can be implemented so as to dynamically change according to the situation at the time of execution. These can be easily realized by arbitrarily applying the algorithm described here as a basis.
生成アルゴリズムを実際のプログラミング言語上で処理する場合、キャプチャタイミングごとにカウンターをインクリメントし、その数値を引数として関数を呼び出すことで実行する。計算結果は、当該タイミングでキャプチャすべきスキャンラインの位置が、横方向の座標値として得られる。1回のタイミングで複数のスキャンラインをキャプチャするため、複数の結果を返す必要があり、関数の返却値の型は整数の配列変数となる。 When the generation algorithm is processed on an actual programming language, it is executed by incrementing the counter at each capture timing and calling a function with the numeric value as an argument. As the calculation result, the position of the scan line to be captured at the timing is obtained as a horizontal coordinate value. Since a plurality of scan lines are captured at a single timing, it is necessary to return a plurality of results, and the return value type of the function is an integer array variable.
図20に上記関数の疑似コードを示す。この関数内では、当該アルゴリズムで計算する分解能ごとのパターン数だけ、ループを実行する。以下では具体的事例としてi=2のときの計算過程を説明する。このときの考え方を、図21および図22に示す。 FIG. 20 shows pseudo code of the above function. Within this function, a loop is executed for the number of patterns for each resolution calculated by the algorithm. Hereinafter, the calculation process when i = 2 will be described as a specific example. The idea at this time is shown in FIG. 21 and FIG.
このアルゴリズム上でi=2を計算するときは、スキャンラインの位置が移動する周期は4(変数freqに代入される)であり、分解能は細かいほうから3番目のパターンに相当する。予め本処理で扱う表示画面の横方向のピクセル数を考慮して、ssize=10と設定されているものとし、分解能はこれをもとに計算で得られる(変数resoに代入される)。この事例では、counter=2791のときのタイミングとする。 When i = 2 is calculated on this algorithm, the period during which the position of the scan line moves is 4 (assigned to the variable freq), and the resolution corresponds to the third pattern from the finest. Considering the number of pixels in the horizontal direction of the display screen handled in this process in advance, it is assumed that ssize = 10 is set, and the resolution is obtained by calculation based on this (substituted in the variable reso). In this case, the timing is counter = 2791.
couterを4で剰余した結果「3」は、図21から、当該分解能パターンにおける「0」を初期値とする「3」、すなわち4番目のタイミングに相当する。図22から、表示画面の横方向を分解能の幅で分割した場合の4番目の座標位置を、分解能の半分の幅だけ右にずらした座標値が、算出すべき数値となる。上記アルゴリズムでは、この計算をiを扱うべき分解能パターンの数だけ繰り返すことで、必要とする複数のスキャンラインの座標位置を算出する。 The result “3” obtained by dividing couter by 4 corresponds to “3”, that is, the fourth timing from FIG. 21 with “0” in the resolution pattern as an initial value. From FIG. 22, the coordinate value obtained by shifting the fourth coordinate position to the right by half the resolution when the horizontal direction of the display screen is divided by the resolution width is a numerical value to be calculated. In the above algorithm, the necessary coordinate positions of a plurality of scan lines are calculated by repeating this calculation for the number of resolution patterns to handle i.
なお、タイミングを表すcounter変数は正の整数でなければならない。よって、当該アルゴリズムを動作させる上で最も長い周期(この例では、25=32)の任意の倍数(例えば、320や2048など)を超えたら0に再初期化する必要がある。 Note that the counter variable representing the timing must be a positive integer. Therefore, when an arbitrary multiple (for example, 320 or 2048) of the longest cycle (2 5 = 32 in this example) is exceeded in operating the algorithm, it is necessary to reinitialize to 0.
なお、本発明は、周知のコンピュータに媒体もしくは通信回線を介して、図11の構成図に示された機能を実現するプログラムあるいは図12〜図15、図17のフローチャートに示された手順を備えるプログラムをインストールすることによっても実現可能である。 The present invention includes a program for realizing the functions shown in the configuration diagram of FIG. 11 or the procedures shown in the flowcharts of FIGS. 12 to 15 and 17 in a known computer via a medium or a communication line. It can also be realized by installing a program.
1:コンピュータ、2:ディスプレイ、3:キーボード、4:マウス、5:ハードディスク、6:内部メモリ、7:システムバス、8:CPU、10:オペレーティングシステム、20:画面変化検知装置(画面変化検知エージェント)、21:スキャンラインパターン生成部、22:キャプチャ処理部、23:キャプチャ結果蓄積部、24:スキャンライン差異比較部、25:画面変化通知部、26:検知モード制御部。 1: Computer, 2: Display, 3: Keyboard, 4: Mouse, 5: Hard Disk, 6: Internal Memory, 7: System Bus, 8: CPU, 10: Operating System, 20: Screen Change Detection Device (Screen Change Detection Agent ), 21: scan line pattern generation unit, 22: capture processing unit, 23: capture result accumulation unit, 24: scan line difference comparison unit, 25: screen change notification unit, and 26: detection mode control unit.
Claims (7)
表示画面のX方向またはY方向またはその両方に所定の間隔を空けて指定したスキャンラインの組み合わせによりパターンを生成するスキャンラインパターン生成部と、
スキャンラインごとに画面上の帯状の矩形の画像をキャプチャするキャプチャ処理部と、
キャプチャした画像のデータを蓄積するキャプチャ結果蓄積部と、
以前の周期で蓄積した結果と最新の結果との差異を比較するスキャンライン差異比較部と、
画面変化の継続状態の開始および終了の時点を外部へ向けて通知する画面変化通知部とを少なくとも備えており、
前記スキャンラインパターン生成部は、所定の変化サイズ感度および変化タイミング分解能のスキャンラインパターンを生成し、
前記スキャンライン差異比較部は、スキャンラインごとに関連付けられた直近変化時刻のタイムスタンプを参照する
ことを特徴とする画面変化検知装置。 A device for detecting changes in the display screen of a computer,
A scan line pattern generation unit that generates a pattern by a combination of scan lines specified with a predetermined interval in the X direction or the Y direction or both of the display screen;
A capture processing unit that captures a rectangular image on the screen for each scan line;
A capture result storage unit for storing captured image data;
A scanline difference comparison unit that compares the difference between the results accumulated in the previous cycle and the latest results,
A screen change notification unit for notifying the start and end of the screen change continuation state to the outside ,
The scan line pattern generation unit generates a scan line pattern having a predetermined change size sensitivity and change timing resolution,
The scan line difference comparison unit refers to a time stamp of the latest change time associated with each scan line .
スキャンラインパターン生成部が、分解能の異なる複数のスキャンラインを重畳したパターンを、キャプチャ周期の所定のタイミングで生成する
ことを特徴とする画面変化検知装置。 The screen change detection device according to claim 1,
A screen change detection device, wherein the scan line pattern generation unit generates a pattern in which a plurality of scan lines having different resolutions are superimposed at a predetermined timing of a capture cycle.
スキャンラインパターン生成部が、高分解能のパターンのスキャンラインの集合を、キャプチャ周期内の各タイミングに分散配置する
ことを特徴とする画面変化検知装置。 In the screen change detection device according to claim 1 or 2,
A screen change detection device, characterized in that the scan line pattern generation unit disperses and arranges a set of scan lines of a high resolution pattern at each timing within a capture cycle.
前記に加え、
画面変化通知部の通知内容を記憶し、現在の表示画面上の状態および/または外部環境の状態の組み合わせに応じて検知モードを変更し保持する検知モード制御部を備え、
スキャンラインパターン生成部で当該検知モードを参照し生成するパターンを変化させる
ことを特徴とする画面変化検知装置。 In the screen change detection device according to any one of claims 1 to 3,
In addition to the above
A notification mode control unit that stores notification contents of the screen change notification unit and changes and maintains the detection mode according to a combination of the current state on the display screen and / or the state of the external environment,
A screen change detection apparatus, wherein a scan line pattern generation unit changes a pattern to be generated with reference to the detection mode.
スキャンラインの幅を、設定によって所定の固定幅に増大する、または検知モード制御部およびスキャンラインパターン生成部によって実行時の状況に応じて動的に増大する
ことを特徴とする画面変化検知装置。 The screen change detection device according to claim 4,
A screen change detection device, wherein the width of a scan line is increased to a predetermined fixed width by setting, or is dynamically increased according to a situation at the time of execution by a detection mode control unit and a scan line pattern generation unit.
スキャンラインパターン生成部により、表示画面のX方向またはY方向またはその両方に所定の間隔を空けて指定したスキャンラインの組み合わせによりパターンを生成する工程と、
キャプチャ処理部により、スキャンラインごとに画面上の帯状の矩形の画像をキャプチャする工程と、
キャプチャ結果蓄積部により、キャプチャした画像のデータを蓄積する工程と、
スキャンライン差異比較部により、以前の周期で蓄積した結果と最新の結果との差異を比較する工程と、
画面変化通知部により、画面変化の継続状態の開始および終了の時点を外部へ向けて通知する工程とを少なくとも含み、
前記スキャンラインパターン生成工程では、所定の変化サイズ感度および変化タイミング分解能のスキャンラインパターンを生成し、
前記スキャンライン差異工程では、スキャンラインごとに関連付けられた直近変化時刻のタイムスタンプを参照する
ことを特徴とする画面変化検知方法。 A method for detecting changes in a display screen of a computer,
A step of generating a pattern by a combination of scan lines specified with a predetermined interval in the X direction or the Y direction or both of the display screen by the scan line pattern generation unit;
A step of capturing a band-shaped rectangular image on the screen for each scan line by the capture processing unit;
A step of storing captured image data by a capture result storage unit;
A step of comparing the difference between the result accumulated in the previous cycle and the latest result by the scan line difference comparison unit,
The screen change notification unit, at least viewed including the step of notifying towards the point beginning and end of the continuous state of the screen changes to the outside,
In the scan line pattern generation step, a scan line pattern having a predetermined change size sensitivity and change timing resolution is generated,
In the scan line difference step, a screen change detection method is characterized in that a time stamp of the latest change time associated with each scan line is referred to .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2013039205A JP5916136B2 (en) | 2013-02-28 | 2013-02-28 | Screen change detection apparatus, method and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2013039205A JP5916136B2 (en) | 2013-02-28 | 2013-02-28 | Screen change detection apparatus, method and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2014167711A JP2014167711A (en) | 2014-09-11 |
| JP5916136B2 true JP5916136B2 (en) | 2016-05-11 |
Family
ID=51617371
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2013039205A Expired - Fee Related JP5916136B2 (en) | 2013-02-28 | 2013-02-28 | Screen change detection apparatus, method and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5916136B2 (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101765432B1 (en) * | 2017-01-17 | 2017-08-04 | 조승훈 | Method for Determining Win-Loss of Game for Operating Process of Game Conference |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102313532B1 (en) * | 2015-01-13 | 2021-10-18 | 에스케이플래닛 주식회사 | System for cloud streaming service, method of image cloud streaming service using animation message and apparatus for the same |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3909634B2 (en) * | 1999-05-18 | 2007-04-25 | 小糸工業株式会社 | Fire occurrence position detection device |
| JP2004280697A (en) * | 2003-03-18 | 2004-10-07 | Seiko Epson Corp | Image processing device and program |
| JP4559043B2 (en) * | 2003-06-27 | 2010-10-06 | Kddi株式会社 | Image monitoring device |
| JP4394595B2 (en) * | 2005-03-17 | 2010-01-06 | Necディスプレイソリューションズ株式会社 | Image transmission apparatus and image transmission method |
| JP5267636B2 (en) * | 2011-11-07 | 2013-08-21 | セイコーエプソン株式会社 | CHANGE IMAGE DETECTION DEVICE, CHANGE IMAGE DETECTION METHOD, COMPUTER PROGRAM FOR IMPLEMENTING THE FUNCTIONS, AND RECORDING MEDIUM CONTAINING THE COMPUTER PROGRAM |
-
2013
- 2013-02-28 JP JP2013039205A patent/JP5916136B2/en not_active Expired - Fee Related
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR101765432B1 (en) * | 2017-01-17 | 2017-08-04 | 조승훈 | Method for Determining Win-Loss of Game for Operating Process of Game Conference |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2014167711A (en) | 2014-09-11 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11016641B2 (en) | Method and apparatus for taking screenshot of screen of application in mobile terminal | |
| US20140258872A1 (en) | Passive Monitoring of Live Virtual Desktop Infrastructure (VDI) Deployments | |
| EP2807541B1 (en) | Image-based application automation | |
| US8176433B2 (en) | Application window area change surveillance | |
| JP2017522659A (en) | Intelligent GPU scheduling in virtualized environment | |
| US10613965B2 (en) | Method and system of visually combining profiling data from instrumentation and sampling | |
| CN112379963B (en) | Remote application window control method and device and computer equipment | |
| US20110249862A1 (en) | Image display device, image display method, and image display program | |
| GB2505406A (en) | A method and system of localising a pointer to the corner of a window when using virtual network computing (VNC) to control a client device. | |
| US10303349B2 (en) | Image-based application automation | |
| CN111078020A (en) | Multi-specification display screen layout system and method for KVM system and coordinate mapping method | |
| JP5916136B2 (en) | Screen change detection apparatus, method and program | |
| CN113868090A (en) | Application monitoring method and device | |
| JP2000200180A (en) | Display Widget Interaction Using Child Graphics Context in Embedded Systems | |
| CN103677883A (en) | Method and device for displaying dock icon | |
| CN112540711B (en) | Control method, device and equipment for selecting three-dimensional space object at webpage end | |
| CN113986107B (en) | Touch processing method and device based on graphic display system, electronic device, and storage medium | |
| CN117421242A (en) | Application detection methods, devices, computer equipment and computer-readable storage media | |
| US9406283B2 (en) | Display control device, display control method, and control system | |
| JP2000200179A (en) | Displaying Applets and Applications Using Bufferless Child Graphics Contexts in Embedded Systems | |
| CN112882857B (en) | Performance problem positioning method, device, electronic equipment and storage medium | |
| CN110489318B (en) | Systrace information grabbing method and device, storage medium and terminal | |
| CN104159103B (en) | Device and method for providing sampling data, and device and method for displaying diagnosis interface | |
| JP2009259275A (en) | Scenario generation device, and scenario generation program | |
| JP2018063564A (en) | Display control device, display control method, and display control program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150108 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20151125 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20151202 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160126 |
|
| 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: 20160330 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160401 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5916136 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |