JP5003521B2 - Update region detection device with motion compensation - Google Patents

Update region detection device with motion compensation Download PDF

Info

Publication number
JP5003521B2
JP5003521B2 JP2008033045A JP2008033045A JP5003521B2 JP 5003521 B2 JP5003521 B2 JP 5003521B2 JP 2008033045 A JP2008033045 A JP 2008033045A JP 2008033045 A JP2008033045 A JP 2008033045A JP 5003521 B2 JP5003521 B2 JP 5003521B2
Authority
JP
Japan
Prior art keywords
area
update
movement
detected
threshold
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
Application number
JP2008033045A
Other languages
Japanese (ja)
Other versions
JP2009194627A (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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP2008033045A priority Critical patent/JP5003521B2/en
Publication of JP2009194627A publication Critical patent/JP2009194627A/en
Application granted granted Critical
Publication of JP5003521B2 publication Critical patent/JP5003521B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は更新領域検出装置に関し、特にコンピュータ画面の描画データの前後フレームから動き補償に伴う更新領域を検出する更新領域検出装置に関する。   The present invention relates to an update area detection apparatus, and more particularly to an update area detection apparatus that detects an update area associated with motion compensation from frames before and after drawing data on a computer screen.

近年、コンピュータの端末装置からの情報の漏洩の防止と端末側でのアプリケーション管理の容易性を図るため等を目的として、端末装置にて入出力および表示される全てのアプリケーションをサーバ装置で実行させ、これに伴う全ての生成ファイルもサーバ装置で管理するようにしたシン・クライアント・システムが導入されるようになってきた。   In recent years, all applications that are input / output and displayed on a terminal device are executed on a server device for the purpose of preventing leakage of information from the terminal device of the computer and facilitating application management on the terminal side. In addition, a thin client system has been introduced in which all generated files accompanying this are managed by the server device.

このようなシン・クライアント・システムでは、サーバ装置で実行されるアプリケーションプログラムの描画データが、LANなどのネットワークを通じてクライアント側の端末装置へ転送され、端末装置の画面に表示される。このため、描画データの処理量が大きくなったり、サーバ装置に接続される端末装置の台数が多くなると、描画データを端末装置に転送するためのサーバ装置の負荷が増大し、応答時間の低下や端末装置の接続台数の大幅な制限などの問題が生じる。   In such a thin client system, drawing data of an application program executed on a server device is transferred to a terminal device on the client side through a network such as a LAN and displayed on the screen of the terminal device. For this reason, when the processing amount of drawing data increases or the number of terminal devices connected to the server device increases, the load on the server device for transferring drawing data to the terminal device increases, and the response time decreases. Problems such as significant restrictions on the number of connected terminal devices occur.

そこで、ソフトウェアによる描画データの表示制御技術として、1画面内で描画更新された描画データ部分を含む矩形の描画領域のみを切り出し、さらにこれを必要に応じて圧縮して転送することで、コンピュータ画面の描画データの転送に伴うデータ量を削減してサーバ装置の負荷を軽減することが考えられている(例えば特許文献1参照)。しかし、描画データの高精細化やモニタ解像度の飛躍的な向上によって、コンピュータ画面の描画処理量は益々増大しているため、描画品質を低下させることなしにさらなる処理負荷の軽減が求められている。   Therefore, as a display control technique for drawing data by software, only a rectangular drawing area including a drawing data portion updated in one screen is cut out, and further compressed and transferred as necessary, so that the computer screen It is considered to reduce the load of the server device by reducing the amount of data accompanying the transfer of the drawing data (see, for example, Patent Document 1). However, since the amount of drawing processing on computer screens is increasing due to the high definition of drawing data and the dramatic improvement in monitor resolution, further reduction in processing load is required without reducing drawing quality. .

特表2004−503862号公報JP-T-2004-503862 特開2004−129099号公報JP 2004-129099 A

MPEGなどの動画像符号化方式では、符号化すべき画素ブロックが参照画像のどの位置と似ているかを示す移動ベクトルを用いて動き補償を行うことにより、伝送符号量の削減を図っている。移動ベクトルおよび移動領域の検出には、全探索法と呼ばれる手法が一般的に使用される。全探索法では、探したい画像となるテンプレートブロックと探索対象となるサーチウィンドウ全てとの比較を行う。つまり、移動ベクトルと移動領域の検出は8画素×8画素といったブロック単位で行う。比較は、サーチウィンドウをスキャンしながら画素値の差分絶対値和を順に求め、差分絶対値が最小となる場所との動きを移動ベクトルとして検出する。しかし、全探索法は非常に大きな演算量を必要とする。このため、最初に粗く、広く探索し、その評価結果に応じて狭く、高精度に探索する高速化手法も提案されている(例えば特許文献2参照)。   In a moving picture coding system such as MPEG, the amount of transmission code is reduced by performing motion compensation using a movement vector indicating which position of a reference picture is similar to a pixel block to be coded. A technique called a full search method is generally used to detect a movement vector and a movement area. In the full search method, a comparison is made between a template block as an image to be searched and all search windows as search targets. That is, the movement vector and the movement area are detected in units of blocks of 8 pixels × 8 pixels. In the comparison, the difference absolute value sum of the pixel values is obtained in order while scanning the search window, and a motion with a place where the difference absolute value is minimized is detected as a movement vector. However, the full search method requires a very large amount of computation. For this reason, a high-speed method is proposed in which a rough search is first performed broadly, and a narrow search is performed according to the evaluation result with high accuracy (see, for example, Patent Document 2).

シン・クライアント・システムにおけるサーバ装置から端末装置へのコンピュータ画面の描画データの転送においても、ウィンドウ等のオブジェクトの移動を検出し、動き補償を行うことで転送データ量の大幅な削減が期待できる。しかし、ウィンドウ等のオブジェクトが1フレームの時間内に移動する距離は、画素数にして100画素以上に及ぶ可能性もあるが、多くは数画素から数十画素と予想される。従って、サイズの大きなウィンドウ等は移動前後で一般に重複する。このため、動き補償を行った前フレームと現フレームとを比較して更新領域を抽出する際に、画面上に存在する全ての更新箇所を包含する矩形を更新領域として抽出すると、過大は更新領域が検出される結果、符号量が増大するという課題がある。   Even in the transfer of drawing data on a computer screen from a server device to a terminal device in a thin client system, a significant reduction in the amount of transferred data can be expected by detecting the movement of an object such as a window and performing motion compensation. However, the distance that an object such as a window moves within the time of one frame may reach 100 or more in terms of the number of pixels, but many are expected to be several to several tens of pixels. Therefore, large windows generally overlap before and after movement. For this reason, when the update area is extracted by comparing the previous frame and the current frame that have undergone motion compensation, if the rectangle that includes all the update locations existing on the screen is extracted as the update area, the update area is excessive. As a result, the amount of code increases.

本発明の目的は、動き補償後の更新領域を高精度に検出することのできる更新領域検出装置を提供することにある。   An object of the present invention is to provide an update region detection apparatus capable of detecting an update region after motion compensation with high accuracy.

本発明の更新領域検出装置は、前フレームと現フレームの何れにも存在する同一または類似の画像領域であって画面上での位置が変化している画像領域を移動領域として検出する移動領域検出手段と、
該移動領域検出手段で検出された移動領域を前フレーム上で移動後の位置に複写する動き補償手段と、
更新領域検出域を設定する更新領域検出域設定手段と、
該更新領域検出域設定手段により設定された更新領域検出域毎に、前記複写後の前フレームと現フレームとが相違する領域を更新領域として検出する更新領域検出手段とを備え、
前記更新領域検出域設定手段は、前記移動領域検出手段で検出された移動領域の移動方向を判定する移動方向判定手段と、該移動方向判定手段で判定された移動方向が画面の上から下へ向かう成分を含む場合には移動後の移動領域の上端により画面を分割し、前記移動方向判定手段で判定された移動方向が画面の下から上へ向かう成分を含む場合には移動後の移動領域の下端により画面を分割し、各々の分割領域を更新領域検出域に設定する分割手段とを有する。
The update region detection apparatus of the present invention detects a moving region detection that detects, as a moving region, an image region that is the same or similar image region that exists in both the previous frame and the current frame, and whose position on the screen changes. Means,
Motion compensation means for copying the movement area detected by the movement area detection means to a position after movement on the previous frame;
Update area detection area setting means for setting an update area detection area;
For each update area detection area set by the update area detection area setting means, an update area detection means for detecting an area where the previous frame after the copy is different from the current frame as an update area, and
The update area detection area setting means includes a movement direction determination means for determining the movement direction of the movement area detected by the movement area detection means, and the movement direction determined by the movement direction determination means from the top to the bottom of the screen. When the moving direction is included, the screen is divided by the upper end of the moving area after moving, and when the moving direction determined by the moving direction determining means includes the component moving upward from the bottom of the screen, the moving area after moving Dividing means for dividing the screen by the lower end of each and setting each divided area as an update area detection area.

本発明によれば、動き補償後の更新領域を高精度に検出することのできる更新領域検出装置が得られる。また移動領域の移動方向を考慮して分割数を決めるので、分割数を少なくすることができる。   ADVANTAGE OF THE INVENTION According to this invention, the update area | region detection apparatus which can detect the update area | region after motion compensation with high precision is obtained. Further, since the number of divisions is determined in consideration of the moving direction of the movement area, the number of divisions can be reduced.

図1を参照すると、本発明の実施の形態に係る映像信号符号化装置100の一例は、画像入力装置101と、データ記憶装置102と、データ処理装置103と、符号出力装置104とから構成されている。   Referring to FIG. 1, an example of a video signal encoding device 100 according to an embodiment of the present invention includes an image input device 101, a data storage device 102, a data processing device 103, and a code output device 104. ing.

画像入力装置101は、符号化の対象となる映像信号を入力する装置であり、例えば図示しないコンピュータのディスプレイ画面のカラー映像信号をアナログキャプチャあるいはディジタルキャプチャし、データ記憶装置102に記憶する。キャプチャされた1画面分の映像信号は、フレームあるいは画面データと呼ぶ。   The image input device 101 is a device that inputs a video signal to be encoded. For example, a color video signal on a display screen of a computer (not shown) is analog captured or digital captured and stored in the data storage device 102. The captured video signal for one screen is called a frame or screen data.

データ記憶装置102は、画像入力装置101から入力されたフレームを記憶する符号化対象フレーム記憶部111、符号化対象フレーム記憶部111に記憶したフレームの符号化に使用する参照フレームを記憶する参照フレーム記憶部112、フレームの符号化の過程で適宜参照更新される各種データを保持する作業域113を有する。   The data storage device 102 stores an encoding target frame storage unit 111 that stores a frame input from the image input device 101, and a reference frame that stores a reference frame used for encoding the frame stored in the encoding target frame storage unit 111. The storage unit 112 includes a work area 113 that holds various data that are appropriately referenced and updated in the process of frame encoding.

データ処理装置103は、データ記憶装置102に記憶された符号化対象フレームの符号化を行う装置であり、移動ベクトル検出手段121、移動領域検出手段122、動き補償手段123、更新領域検出域設定手段124、更新領域検出手段125および領域符号化手段126を備えている。各手段は、概略以下のような機能を有する。   The data processing device 103 is a device that encodes the encoding target frame stored in the data storage device 102, and includes a movement vector detection unit 121, a movement region detection unit 122, a motion compensation unit 123, and an update region detection region setting unit. 124, an update region detection unit 125, and a region encoding unit 126. Each means generally has the following functions.

移動ベクトル検出手段121は、符号化対象フレームとその直前のフレームとを比較して、主要な1つの移動ベクトルを検出する機能を有する。主要な移動ベクトルとは、換言すれば、1以上の移動ベクトルの内の支配的なものを意味する。例えば、コンピュータの画面で地図スクロールとマウスカーソル移動が同時に発生した場合、移動ベクトルの大部分は地図スクロールが占めるため、地図スクロールによる移動ベクトルが主要な移動ベクトルとなる。   The movement vector detection unit 121 has a function of detecting one main movement vector by comparing the encoding target frame with the immediately preceding frame. In other words, the main movement vector means a dominant one of one or more movement vectors. For example, when a map scroll and a mouse cursor move simultaneously on the computer screen, the map scroll occupies most of the movement vector, so the movement vector by the map scroll becomes the main movement vector.

移動領域検出手段122は、符号化対象フレームとその直前のフレームとの何れにも存在する同一または類似の画像領域であって、画面上での位置が移動ベクトル検出手段121で検出された移動ベクトルだけ変化している画像領域を移動領域として検出する機能を有する。   The movement area detection unit 122 is the same or similar image area that exists in both the encoding target frame and the immediately preceding frame, and the movement vector detected by the movement vector detection unit 121 is the position on the screen. It has a function of detecting an image area that changes only as a moving area.

動き補償手段123は、移動領域検出手段122で検出された移動領域について、符号化対象フレームの符号化に使用する参照フレーム内で移動ベクトルが示す移動先へ複写を行い、動き補償後の参照フレームを生成する機能を有する。   The motion compensation unit 123 copies the movement region detected by the movement region detection unit 122 to the movement destination indicated by the movement vector in the reference frame used for encoding the encoding target frame, and the reference frame after the motion compensation is performed. It has the function to generate.

更新領域検出域設定手段124は、フレーム上に1以上の更新領域検出域を設定する機能を有する。   The update area detection area setting means 124 has a function of setting one or more update area detection areas on the frame.

更新領域検出手段125は、更新領域検出域設定手段124により設定された更新領域検出域毎に、動き補償後の参照フレームと符号化対象フレームとが相違する領域を更新領域として検出する機能を有する。   The update region detection unit 125 has a function of detecting, as an update region, a region where the reference frame after motion compensation is different from the encoding target frame for each update region detection region set by the update region detection region setting unit 124. .

領域符号化手段126は、更新領域検出手段125で検出された更新領域を画像として任意の符号化方式によって符号化した符号を生成する。   The region encoding unit 126 generates a code encoded by an arbitrary encoding method using the update region detected by the update region detection unit 125 as an image.

符号出力装置104は、データ記憶装置102の作業域113から符号化対象フレームについて生成された符号を読み出して出力する装置であり、例えば図示しないクライアント端末と通信する通信装置などで構成される。1つの符号化対象フレームについて生成された符号には、領域符号化手段126で生成された更新領域の符号、移動ベクトル検出手段121と移動領域検出手段122で検出された移動領域情報(移動元の領域の座標と移動ベクトル)とが含まれる。   The code output device 104 is a device that reads and outputs the code generated for the encoding target frame from the work area 113 of the data storage device 102, and is configured by a communication device that communicates with a client terminal (not shown), for example. The code generated for one encoding target frame includes the update region code generated by the region encoding unit 126, the movement region information detected by the movement vector detection unit 121 and the movement region detection unit 122 (the movement source information). Area coordinates and movement vectors).

上記の移動ベクトル検出手段121、移動領域検出手段122、動き補償手段123、更新領域検出域設定手段124、更新領域検出手段125および領域符号化手段126は、データ処理装置103を構成するコンピュータとその上で動作するプログラムとで実現することができる。プログラムは、CD−ROM等のコンピュータ可読記録媒体に記録されて提供され、コンピュータの立ち上げ時などにコンピュータに読み取られ、コンピュータの動作を制御することにより、コンピュータ上に上記の各手段を実現する。   The movement vector detection means 121, the movement area detection means 122, the motion compensation means 123, the update area detection area setting means 124, the update area detection means 125, and the area encoding means 126 are the computer constituting the data processing device 103 and its It can be realized with the program that operates above. The program is provided by being recorded on a computer-readable recording medium such as a CD-ROM, and read by the computer when the computer is started up, etc., and controls the operation of the computer, thereby realizing each of the above means on the computer. .

次に本実施の形態に係る映像信号符号化装置100の全体的な動作を説明する。   Next, the overall operation of video signal encoding apparatus 100 according to the present embodiment will be described.

映像信号符号化装置100の画像入力装置101は、符号化対象となるフレームをキャプチャし、データ記憶装置102の符号化対象フレーム記憶部111に現フレームとして記憶する(図2のステップS101)。   The image input device 101 of the video signal encoding device 100 captures a frame to be encoded and stores it as a current frame in the encoding target frame storage unit 111 of the data storage device 102 (step S101 in FIG. 2).

次に、移動ベクトル検出手段121は、現フレームと、参照フレーム記憶部112に記憶された既に符号化を終えた直前のフレーム(参照フレーム)とを比較し、主要な1つの移動ベクトルを検出する(ステップS102)。例えば、図3の現フレーム131と参照フレーム132との比較から図示した移動ベクトル134が支配的であれば、移動ベクトル134が主要な移動ベクトルとして検出される。検出された移動ベクトル134の情報は作業域113に一時的に保存される。   Next, the movement vector detection means 121 compares the current frame with the frame (reference frame) immediately before encoding, which has been stored in the reference frame storage unit 112, and detects one main movement vector. (Step S102). For example, if the movement vector 134 illustrated from the comparison between the current frame 131 and the reference frame 132 in FIG. 3 is dominant, the movement vector 134 is detected as the main movement vector. Information on the detected movement vector 134 is temporarily stored in the work area 113.

次に移動領域検出手段122は、現フレームから移動ベクトルが検出された場合(ステップS103でYES)、現フレームと参照フレームとの何れにも存在する同一または類似の画像領域であって、画面上での位置が移動ベクトル検出手段121で検出された移動ベクトルだけ変化している画像領域を移動領域として検出する(ステップS104)。例えば、図3の現フレーム131と参照フレーム132とにおいて、領域135と領域136とが同一または類似の画像領域であった場合、領域135、136が移動領域として検出される。検出された移動領域135、136の座標情報は作業域113に一時的に保存される。   Next, when a movement vector is detected from the current frame (YES in step S103), the movement area detection unit 122 is the same or similar image area that exists in both the current frame and the reference frame, The image area where the position at is changed by the movement vector detected by the movement vector detecting means 121 is detected as a movement area (step S104). For example, in the current frame 131 and the reference frame 132 in FIG. 3, when the area 135 and the area 136 are the same or similar image areas, the areas 135 and 136 are detected as moving areas. The detected coordinate information of the moving areas 135 and 136 is temporarily stored in the work area 113.

次に動き補償手段123は、移動領域が検出された場合(ステップS105でYES)、参照フレーム上で移動前の移動領域の画像を移動ベクトルが示す移動後の位置へ複写する動き補償を行うことにより、参照フレーム記憶部112を更新する(ステップS106)。例えば図3の場合、参照フレーム132上で、領域136を現フレーム131における領域135に相当する位置にコピーする。これにより、図3の動き補償後の参照フレーム137が生成される。   Next, when a movement area is detected (YES in step S105), the motion compensation unit 123 performs motion compensation for copying the image of the movement area before movement on the reference frame to the position after movement indicated by the movement vector. Thus, the reference frame storage unit 112 is updated (step S106). For example, in the case of FIG. 3, the area 136 is copied to a position corresponding to the area 135 in the current frame 131 on the reference frame 132. Thereby, the reference frame 137 after motion compensation in FIG. 3 is generated.

ただし、移動ベクトルが検出されなかった場合(ステップS103でNO)、移動領域の検出と動き補償は実行されない。また、移動ベクトルが検出されても移動領域の検出に失敗した場合(ステップS105でNO)、動き補償は実行されない。   However, when the movement vector is not detected (NO in step S103), the detection of the movement area and the motion compensation are not executed. Further, even if the movement vector is detected, if the detection of the movement area fails (NO in step S105), motion compensation is not executed.

次に更新領域検出域設定手段124は、更新領域を検出する1以上の更新領域検出域をフレーム上に設定する(ステップS107)。次に、更新領域検出手段125は、更新領域検出域設定手段124により設定された更新領域検出域毎に、参照フレームと現フレームとが相違する領域を更新領域として検出する(ステップS108)。これにより、例えば図3の場合、更新領域138、139が検出される。検出された更新領域138、139の座標情報は作業域113に一時的に保存される。   Next, the update area detection area setting means 124 sets one or more update area detection areas for detecting the update area on the frame (step S107). Next, the update area detection unit 125 detects, as an update area, an area where the reference frame is different from the current frame for each update area detection area set by the update area detection area setting unit 124 (step S108). Thereby, for example, in the case of FIG. 3, the update areas 138 and 139 are detected. The detected coordinate information of the update areas 138 and 139 is temporarily stored in the work area 113.

次に領域符号化手段126は、更新領域検出手段125で検出された更新領域を画像として符号化した符号を生成する(ステップS109)。生成された符号は、作業域113に記憶された更新領域の座標情報に対応付けて一時的に保存される。   Next, the region encoding unit 126 generates a code obtained by encoding the update region detected by the update region detection unit 125 as an image (step S109). The generated code is temporarily stored in association with the coordinate information of the update area stored in the work area 113.

符号出力装置104は、データ記憶装置102の作業域113から現フレームについて生成された情報、すなわち各更新領域の座標情報とその符号および移動領域情報(移動元の領域の座標情報と移動ベクトル)を読み出し、出力する(ステップS110)。例えば、図3の場合、更新領域138の座標情報とその符号、更新領域139の座標情報とその符号、移動領域136の座標情報と移動ベクトル134が、現フレームに関する符号情報として出力される。   The code output device 104 receives the information generated for the current frame from the work area 113 of the data storage device 102, that is, the coordinate information of each update area and its code and movement area information (coordinate information and movement vector of the movement source area). Read and output (step S110). For example, in the case of FIG. 3, the coordinate information and code of the update area 138, the coordinate information and code of the update area 139, the coordinate information of the movement area 136, and the movement vector 134 are output as code information regarding the current frame.

符号情報からフレームを復号する場合、符号化と逆の手順で行う。例えば図3の現フレーム131を参照フレーム132と符号情報とから復号する場合、まず、参照フレーム132の移動領域136を移動ベクトル134が示す場所へ複写して動き補償後の参照フレーム137を生成し、この参照フレームに対して、符号情報から復号した更新領域138および更新領域139を反映することにより、現フレーム131を生成する。   When decoding a frame from code information, it is performed in the reverse order of encoding. For example, when the current frame 131 in FIG. 3 is decoded from the reference frame 132 and the code information, first, the movement region 136 of the reference frame 132 is copied to the location indicated by the movement vector 134 to generate a reference frame 137 after motion compensation. The current frame 131 is generated by reflecting the update area 138 and the update area 139 decoded from the code information with respect to the reference frame.

次にデータ処理装置103が備える各手段について説明する。ここで、動き補償手段123はコピー手段で実現でき、また領域符号化手段126は、予測符号化、変換符号化、ベクトル量子化、エントロピー符号化など周知の画像符号化技術で実現できるため、以下では、移動ベクトル検出手段121、移動領域検出手段122、更新領域検出域設定手段124および更新領域検出手段125について詳細に説明する。   Next, each unit included in the data processing apparatus 103 will be described. Here, the motion compensation unit 123 can be realized by a copy unit, and the region encoding unit 126 can be realized by a known image encoding technique such as predictive encoding, transform encoding, vector quantization, entropy encoding, and so on. Now, the movement vector detection means 121, the movement area detection means 122, the update area detection area setting means 124, and the update area detection means 125 will be described in detail.

(1)移動ベクトル検出手段121
図4−1を参照すると、移動ベクトル検出手段121の第1の実施例は、エッジ抽出手段201、特徴点抽出手段202、特徴点ペア抽出手段203および移動ベクトル算出手段204とから構成される。各々は、概ね以下のような機能を有する。
(1) Movement vector detection means 121
Referring to FIG. 4A, the first example of the movement vector detection unit 121 includes an edge extraction unit 201, a feature point extraction unit 202, a feature point pair extraction unit 203, and a movement vector calculation unit 204. Each has the following functions in general.

エッジ抽出手段201は、現フレームおよび参照フレーム内で画素値の変化が大きい点をエッジ点として抽出する機能を有する。エッジ点とは、予め定められた直交する2方向(上と左、左と下、下と右、右と上、斜め左上と斜め左下、斜め左下と斜め右下、斜め右下と斜め右上、斜め右上と斜め左上)の隣接画素との画素値の差分が共に予め設定された閾値以上相違している画素である。画素値の差分は例えばR、G、Bの各成分毎に求め、その何れかの成分の差分が閾値以上であれば、2つの画素の画素値の差分が閾値以上相違していると判断する。   The edge extracting unit 201 has a function of extracting a point having a large change in pixel value as an edge point in the current frame and the reference frame. Edge points are two predetermined orthogonal directions (up and left, left and bottom, bottom and right, right and top, diagonal top left and diagonal bottom left, diagonal bottom left and diagonal bottom right, diagonal bottom right and diagonal top right, The pixel values are different from each other by a predetermined threshold or more in the difference between the pixel values of the diagonally upper right and diagonally upper left adjacent pixels. For example, the difference between the pixel values is obtained for each of R, G, and B components, and if the difference between any of the components is equal to or greater than the threshold, it is determined that the difference between the pixel values of the two pixels is equal to or greater than the threshold. .

特徴点抽出手段202は、現フレームおよび参照フレーム中から抽出されたエッジ点のうち、他の1以上のエッジ点との位置関係が当該フレームにおいて一意(ユニークとも言う)なエッジ点(すなわち他の1以上のエッジ点との位置関係が当該フレームにおいて唯一度しか現れないエッジ点)を特徴点として抽出する機能を有する。本実施例では、他の1以上のエッジ点として、フレームのラスタスキャン順で直前に現れた1つのエッジ点を用いる。しかし、他の実施例として、直前1つ目のエッジ点と直前2つ目のエッジ点のように複数のエッジ点を用いても良い。一般に、直前1つのエッジ点だけを用いるよりも直前複数のエッジ点を用いた方が、当該フレームにおいて他のエッジ点との位置関係がユニークになるエッジ点の個数を少なくできるため、後述するようにハッシュ値を使う場合のハッシュ値のビット数を少なくできる利点がある。   The feature point extraction means 202 is an edge point whose position relationship with one or more other edge points is unique (also referred to as unique) among the edge points extracted from the current frame and the reference frame (that is, other points). And a function of extracting, as a feature point, an edge point whose positional relationship with one or more edge points appears only once in the frame. In this embodiment, one edge point that appears immediately before in the raster scan order of the frame is used as the other one or more edge points. However, as another embodiment, a plurality of edge points such as the immediately preceding first edge point and the immediately preceding second edge point may be used. In general, using a plurality of immediately preceding edge points can reduce the number of edge points having a unique positional relationship with other edge points in the frame, rather than using only one immediately preceding edge point. There is an advantage that the number of bits of the hash value can be reduced when using the hash value.

エッジ点と他のエッジ点との位置関係を規定するデータとしては、エッジ点どうしの距離を画素数で表現した値を使用することができる。また、距離そのものでなく、距離を表すビット列の下位何ビットかをハッシュ値とし、このハッシュ値がユニークなエッジ点を特徴点として抽出するようにしても良い。本実施例では、距離を表すビット列のたとえば下位11ビットをハッシュ値として使用する。   As data defining the positional relationship between the edge point and other edge points, a value expressing the distance between the edge points by the number of pixels can be used. Further, not the distance itself but the number of lower bits of the bit string representing the distance may be used as a hash value, and an edge point having this unique hash value may be extracted as a feature point. In the present embodiment, for example, the lower 11 bits of the bit string representing the distance are used as the hash value.

特徴点ペア抽出手段203は、他のエッジ点との位置関係が同一の特徴点のペアを現フレームおよび参照フレームから抽出する機能を有する。好ましくは、特徴点ペア抽出手段203は、他のエッジ点との位置関係が同一かつ画素値の差が閾値以下の特徴点のペアを抽出する。   The feature point pair extracting unit 203 has a function of extracting a pair of feature points having the same positional relationship with other edge points from the current frame and the reference frame. Preferably, the feature point pair extraction unit 203 extracts a pair of feature points having the same positional relationship with other edge points and having a pixel value difference equal to or less than a threshold value.

移動ベクトル算出手段204は、現フレームおよび参照フレームから抽出された特徴点のペアの座標値の差分を移動ベクトルとして算出する機能を有する。好ましくは、移動ベクトル算出手段204は、移動ベクトル候補生成手段205と移動ベクトル選択手段206とで構成される。   The movement vector calculation unit 204 has a function of calculating a difference between coordinate values of feature point pairs extracted from the current frame and the reference frame as a movement vector. Preferably, the movement vector calculation unit 204 includes a movement vector candidate generation unit 205 and a movement vector selection unit 206.

移動ベクトル候補生成手段205は、現フレームと参照フレームから抽出された特徴点のペアが複数存在する場合、各特徴点のペア毎に座標値の差分を移動ベクトル候補として生成する機能を有する。   The movement vector candidate generation unit 205 has a function of generating a difference between coordinate values as a movement vector candidate for each feature point pair when there are a plurality of pairs of feature points extracted from the current frame and the reference frame.

移動ベクトル選択手段206は、移動ベクトル候補のうち最も頻出する移動ベクトル候補を移動ベクトルとして選定する機能を有する。   The movement vector selection means 206 has a function of selecting a movement vector candidate that appears most frequently among the movement vector candidates as a movement vector.

次に本実施例の移動ベクトル検出手段121の動作を説明する。   Next, the operation of the movement vector detection means 121 of this embodiment will be described.

移動ベクトル検出手段121のエッジ抽出手段201は、符号化対象フレーム記憶部111に記憶された現フレームの先頭の画素に注目し(図4−2のステップS201)、注目中の画素がエッジ点かどうかを判定する(ステップS202)。エッジ点でなければ、ラスタスキャン方向の順で次の画素に注目を移し(ステップS206)、注目中の画素がエッジ点かどうかを判定する(ステップS202)。   The edge extraction unit 201 of the movement vector detection unit 121 focuses on the first pixel of the current frame stored in the encoding target frame storage unit 111 (step S201 in FIG. 4B), and determines whether the pixel of interest is an edge point. It is determined whether or not (step S202). If it is not an edge point, attention is shifted to the next pixel in the order of the raster scan direction (step S206), and it is determined whether the pixel being noticed is an edge point (step S202).

注目中の画素がエッジ点であれば(ステップS202でYES)、注目中の画素の座標値と画素値の組をエッジ点情報として作業域113に一時的に保存する(ステップS203)。次に、作業域113に保存されている直前のエッジ点との距離を求め、その距離の下位11ビットをハッシュ値として算出し(ステップS204)、作業域113に記憶されている現フレームに対応するハッシュテーブルを更新する(ステップS205)。例えば図4−3に示すように、ラスタスキャン順に処理を進めて、画素P(1,1)に続き画素P(5,1)がエッジ点として検出された場合、画素P(5,1)と画素P(1,1)の距離は画素数にして4なので、値4のハッシュ値が算出され、当該エッジ点の情報がハッシュテーブルに登録される。   If the pixel of interest is an edge point (YES in step S202), the set of the coordinate value and pixel value of the pixel of interest is temporarily stored in the work area 113 as edge point information (step S203). Next, the distance to the immediately preceding edge point stored in the work area 113 is obtained, and the lower 11 bits of the distance are calculated as a hash value (step S204), corresponding to the current frame stored in the work area 113. The hash table to be updated is updated (step S205). For example, as illustrated in FIG. 4C, when the processing is performed in the raster scan order and the pixel P (5, 1) is detected as the edge point following the pixel P (1, 1), the pixel P (5, 1) Since the distance between the pixel P (1, 1) is 4 in terms of the number of pixels, a hash value of 4 is calculated, and information on the edge point is registered in the hash table.

図4−4を参照すると、現フレームに対応するハッシュテーブルの一例は、0〜2047の各ハッシュ値に1対1に対応するエントリを有し、各エントリに、出現頻度、最終出現座標、画素値が登録される。出現頻度の初期値は0、最終出現座標および画素値の初期値はNULLである。エッジ抽出手段201は、ステップS205のハッシュテーブルの更新処理において、算出したハッシュ値を持つエントリの出現頻度を1だけインクリメントし、検出したエッジ点の座標値と画素値を最終出現座標および画素値の欄に記録する。例えば前述した画素P(5,1)の場合、図4−4のハッシュ値4のエントリにおける出現頻度が1だけインクリメントされ、また画素P(5,1)の座標値と画素値とが同エントリに記録される。   Referring to FIG. 4-4, an example of the hash table corresponding to the current frame has an entry corresponding to each hash value of 0 to 2047 in a one-to-one correspondence, and each entry has an appearance frequency, a final appearance coordinate, and a pixel. A value is registered. The initial value of the appearance frequency is 0, and the initial values of the final appearance coordinates and the pixel value are NULL. In the update process of the hash table in step S205, the edge extracting unit 201 increments the appearance frequency of the entry having the calculated hash value by 1, and the coordinate value and pixel value of the detected edge point are set to the final appearance coordinate and pixel value. Record in the column. For example, in the case of the pixel P (5, 1) described above, the appearance frequency in the entry of the hash value 4 in FIG. 4-4 is incremented by 1, and the coordinate value and the pixel value of the pixel P (5, 1) are the same entry. To be recorded.

エッジ抽出手段201は、以上のような処理を現フレームの最後の画素まで繰り返し実行する。   The edge extraction unit 201 repeatedly executes the above processing up to the last pixel of the current frame.

エッジ抽出手段201の処理が完了すると(ステップS207でYES)、特徴点抽出手段202は、現フレームに対応するハッシュテーブルを参照して、出現頻度が1になっているエントリに座標値と画素値とが記録されているエッジ点を特徴点としてすべて抽出する(ステップS208)。例えば、エッジ抽出手段201の処理完了時点の現フレームに対応するハッシュテーブルが図4−4に示したものであった場合、画素P(5,1)が1つの特徴点として抽出される。   When the processing of the edge extraction unit 201 is completed (YES in step S207), the feature point extraction unit 202 refers to the hash table corresponding to the current frame and sets the coordinate value and the pixel value to the entry whose appearance frequency is 1. Are extracted as feature points (step S208). For example, when the hash table corresponding to the current frame at the time when the processing by the edge extracting unit 201 is completed is the one shown in FIG. 4-4, the pixel P (5, 1) is extracted as one feature point.

次に特徴点ペア抽出手段203は、現フレームに対応するハッシュテーブルおよび前フレームに対応するハッシュテーブルを参照して、ハッシュ値が同一の特徴点のペアをすべて抽出する(ステップS209)。ここで、前フレームに対応するハッシュテーブルは、前フレームが現フレームとして処理された際にエッジ抽出手段201により作成され、作業域113に記憶されている。例えば前フレームに対応するハッシュテーブルが図4−5に示すような内容になっている場合、図4−4に示した現フレームから特徴点として抽出された画素P(5,1)とハッシュ値が同じ4の画素P(5,8)が前フレームに存在するため、前フレームにおける画素P(5,8)と現フレームにおける画素P(5,1)のペアが、1つの特徴点のペアとして抽出される。   Next, the feature point pair extraction unit 203 refers to the hash table corresponding to the current frame and the hash table corresponding to the previous frame, and extracts all feature point pairs having the same hash value (step S209). Here, the hash table corresponding to the previous frame is created by the edge extraction unit 201 when the previous frame is processed as the current frame, and is stored in the work area 113. For example, when the hash table corresponding to the previous frame has contents as shown in FIG. 4-5, the pixel P (5,1) extracted as a feature point from the current frame shown in FIG. 4-4 and the hash value Since four pixels P (5, 8) having the same value exist in the previous frame, a pair of the pixel P (5, 8) in the previous frame and the pixel P (5, 1) in the current frame is a pair of feature points. Extracted as

次に特徴点ペア抽出手段203は、ステップS209で抽出した特徴点のペアのうち、R、G、Bの各色成分の差分が何れも予め設定された閾値以下となるペアは対応可能性が高いので残し、それ以外の特徴点のペアは除外する(ステップS210)。特徴点ペア抽出手段203は、残した特徴点のペアの情報を作業域113に記録する。   Next, the feature point pair extraction unit 203 has a high possibility of correspondence among pairs of feature points extracted in step S209, in which the difference between the R, G, and B color components is less than or equal to a preset threshold value. Therefore, the remaining feature point pairs are excluded (step S210). The feature point pair extraction unit 203 records the remaining feature point pair information in the work area 113.

次に移動ベクトル算出手段204の移動ベクトル候補生成手段205は、作業域113から特徴点のペアの情報を読み出し、各ペア毎に座標値の差分を移動ベクトル候補として生成する(ステップS211)。例えば前述したP(5,8)とP(5,1)の特徴点のペアの場合、(0,−7)が移動ベクトル候補として生成される。なお、静止ベクトルは無視するため、差分が(0,0)となる場合は候補から外す。移動ベクトル候補生成手段205は、移動ベクトル候補の情報を作業域113に記録する。   Next, the movement vector candidate generation means 205 of the movement vector calculation means 204 reads out feature point pair information from the work area 113 and generates a coordinate value difference as a movement vector candidate for each pair (step S211). For example, in the case of the above-described pair of feature points P (5, 8) and P (5, 1), (0, -7) is generated as a motion vector candidate. Since still vectors are ignored, they are excluded from candidates when the difference is (0, 0). The movement vector candidate generation unit 205 records information on movement vector candidates in the work area 113.

次に、移動ベクトル選択手段206は、作業域113から移動ベクトル候補の情報を読み出し、同じ移動ベクトル候補の総数をカウントすることにより各移動ベクトル候補の出現頻度を求め、最も頻出する移動ベクトル候補を主要な移動ベクトルの推定値として選択する(ステップS212)。そして、移動ベクトル選択手段206は、移動ベクトルの検出結果を作業域113に記録する(ステップS213)。   Next, the movement vector selection means 206 reads out information on the movement vector candidates from the work area 113, counts the total number of the same movement vector candidates, obtains the appearance frequency of each movement vector candidate, and determines the most frequently used movement vector candidate. It selects as an estimated value of the main movement vector (step S212). Then, the movement vector selection unit 206 records the detection result of the movement vector in the work area 113 (step S213).

移動ベクトル選択手段206が作業域113に記録した検出結果の一例を図4−6に示す。この例では、推定した移動ベクトル以外に最頻出の移動ベクトル候補の算出元となった特徴点のペアのリストが検出結果に含まれている。図4−7は、検出結果に含まれる特徴点のペアを前フレームおよび現フレームにプロットしたイメージと、推定された移動ベクトルとの関係を示す。このように、最頻出の移動ベクトル候補から推定される移動ベクトルは、現フレームに存在する1以上の移動ベクトルのうちの主要な移動ベクトルとなる。   An example of the detection result recorded in the work area 113 by the movement vector selection unit 206 is shown in FIG. In this example, in addition to the estimated movement vector, a list of feature point pairs from which the most frequent movement vector candidates are calculated is included in the detection result. FIG. 4-7 shows a relationship between an image obtained by plotting a pair of feature points included in the detection result in the previous frame and the current frame, and the estimated movement vector. As described above, the motion vector estimated from the most frequent motion vector candidate is the main motion vector among one or more motion vectors existing in the current frame.

このように本実施例の移動ベクトル検出手段121によれば、コンピュータ画面の映像信号から高速かつ高精度に主要な移動ベクトルを検出することができる。その理由は、第1に、各画素ブロックで様々なベクトルを探索する必要がなく、エッジ点や特徴点の抽出と比較により移動ベクトルを求めていること、第2に、フレーム内ではラスタスキャン順の処理となるためにメモリアクセスの局所性が高いこと、第3に、ブロック単位ではなく画面全体で比較するため、ウィンドウ等、比較的大きなオブジェクト単位での移動ベクトルが主要な移動ベクトルとして検出できること、第4に、エッジ点を元にベクトルを検出しているため移動元と移動先で画素値が正確に一致する必要はなく、アナログキャプチャしたノイズの多い映像信号にも対応可能であることによる。   Thus, according to the movement vector detection means 121 of the present embodiment, it is possible to detect main movement vectors at high speed and with high accuracy from the video signal of the computer screen. The reason is that, firstly, it is not necessary to search various vectors in each pixel block, and the movement vector is obtained by extracting and comparing edge points and feature points, and secondly, the raster scan order in the frame. Because of this processing, the locality of memory access is high, and thirdly, since a comparison is made not on a block basis but on the entire screen, a movement vector in a relatively large object unit such as a window can be detected as a main movement vector. Fourthly, since the vector is detected based on the edge point, it is not necessary to accurately match the pixel value between the movement source and the movement destination, and it is possible to deal with a noisy video signal captured in analog. .

反面、本実施例の移動ベクトル検出手段121は、(1)同時に複数のベクトルは検出しない、(2)サブピクセル単位や変形を伴うオブジェクトの移動ベクトルは検出しない、(3)エッジの少ないオブジェクトの移動ベクトルは検出しないという制約があるが、(1)と(2)はコンピュータ画面で生じる可能性は低く、(3)のような領域はそのまま画像として符号化しても符号量が小さくなるため大きな問題とはならない。   On the other hand, the movement vector detection means 121 of this embodiment (1) does not detect a plurality of vectors at the same time, (2) does not detect a movement vector of an object accompanied by sub-pixel units or deformation, and (3) Although there is a restriction that motion vectors are not detected, (1) and (2) are unlikely to occur on a computer screen, and areas such as (3) are large because the amount of code is small even if they are encoded as images. It doesn't matter.

(2)移動領域検出手段122
図5−1を参照すると、移動領域検出手段122の第1の実施例は、初期候補決定手段301と移動領域決定手段302とから構成される。各々は、概ね以下のような機能を有する。
(2) Moving region detecting means 122
Referring to FIG. 5A, the first example of the moving area detecting unit 122 includes an initial candidate determining unit 301 and a moving area determining unit 302. Each has the following functions in general.

初期候補決定手段301は、移動領域の初期候補を決定する機能を有する。   The initial candidate determination unit 301 has a function of determining an initial candidate for a moving area.

移動領域決定手段302は、初期候補決定手段301で決定された移動領域の初期候補および初期候補の移動領域のサイズを変更した1以上の他の移動領域の候補のうちから動き補償手段123の動き補償に使用する移動領域を決定する機能を有する。   The moving region determining unit 302 is configured to move the motion compensation unit 123 from among the initial moving region candidate determined by the initial candidate determining unit 301 and one or more other moving region candidates whose sizes are changed. It has a function of determining a moving area to be used for compensation.

次に本実施例の移動領域検出手段122の動作を説明する。   Next, the operation of the moving area detecting means 122 of this embodiment will be described.

移動領域検出手段122の初期候補決定手段301は、初期候補の移動領域を決定する(図5−2のステップS301)。初期候補を決定する方法の一例として、移動ベクトル検出手段121が移動ベクトルの推定に使用した移動ベクトル候補の算出元となった特徴点群に外接する矩形を移動領域の初期候補とする方法がある。例えば、移動ベクトル検出手段121の移動ベクトル選択手段206が図4−6に示したような検出結果を生成した場合、移動領域検出手段122は作業域113から上記の検出結果に記述された特徴点を前フレームおよび現フレーム毎に読み出し、例えば図5−3の前フレームに示すように特徴点群に外接する矩形を移動前の移動領域とし、図5−3の現フレームに示すように特徴点群に外接する矩形を移動後の移動領域として検出する。検出した初期候補の移動領域の情報は作業域113に一時的に記録される。   The initial candidate determining means 301 of the moving area detecting means 122 determines the moving area of the initial candidate (step S301 in FIG. 5-2). As an example of a method for determining an initial candidate, there is a method in which a rectangle circumscribing a feature point group that is a calculation source of the movement vector candidate used by the movement vector detecting unit 121 for estimating the movement vector is used as an initial candidate for the movement region. . For example, when the movement vector selection means 206 of the movement vector detection means 121 generates a detection result as shown in FIG. 4-6, the movement area detection means 122 reads the feature points described in the detection result from the work area 113. For each of the previous frame and the current frame, for example, a rectangle circumscribing the feature point group as shown in the previous frame in FIG. 5-3 is set as a movement area before the movement, and the feature points as shown in the current frame in FIG. A rectangle circumscribing the group is detected as a movement area after movement. Information on the detected moving area of the initial candidate is temporarily recorded in the work area 113.

初期候補を決定する方法の他の例としては、移動ベクトル検出手段121が移動ベクトルの推定に使用した移動ベクトル候補に含まれる特徴点群中の何れか3つ以上の特徴点に外接する矩形を移動領域の初期候補とする方法、フレーム全体を移動領域の初期候補とする方法などがある。   As another example of the method of determining the initial candidate, a rectangle circumscribing any three or more feature points in the feature point group included in the motion vector candidate used by the motion vector detection unit 121 for estimating the motion vector is used. There are a method for setting an initial candidate for a moving region, a method for setting an entire frame as an initial candidate for a moving region, and the like.

次に移動領域検出手段122の移動領域決定手段302は、初期候補および他の候補のうちから動き補償に使用する移動領域を決定する(ステップS302)。以下、移動領域決定手段302の構成例について詳細に説明する。   Next, the moving area determining means 302 of the moving area detecting means 122 determines a moving area to be used for motion compensation from among the initial candidates and other candidates (step S302). Hereinafter, a configuration example of the movement area determination unit 302 will be described in detail.

(A)移動領域決定手段302の例1
この例1の移動領域決定手段302の処理例を図5−4に示す。まず移動領域決定手段302は、決定された初期候補の移動領域および移動ベクトルに基づいて実際に動き補償を行って各画素値を比較し、正しく平行移動したものであるかどうかを確認する。具体的には、動き補償によって低減される符号量と、動き補償によって増加する符号量のどちらが大きくなるかを、移動領域が動き補償に使用する移動領域として適している程度および適していない程度をそれぞれ示すメリット値およびデメリット値を評価尺度として使用して、以下のような手法で推定する(ステップS311、S312)。ここで、メリット値は、移動領域が動き補償に使用する移動領域として適している程度を示す評価尺度、デメリット値は、移動領域が動き補償に使用する移動領域として適していない程度を示す評価尺度であり、何れも初期値は0である。
(A) Example 1 of moving area determination means 302
A processing example of the movement area determination means 302 of Example 1 is shown in FIG. First, the moving area determination unit 302 performs motion compensation based on the determined moving area and moving vector of the initial candidate, compares the pixel values, and confirms whether or not the movement is correctly performed. Specifically, whether the code amount reduced by motion compensation or the code amount increased by motion compensation increases depends on whether the moving region is suitable as a moving region used for motion compensation or not. Using the merit values and demerit values shown as evaluation scales, estimation is performed by the following method (steps S311 and S312). Here, the merit value is an evaluation scale indicating the degree to which the moving area is suitable as a moving area used for motion compensation, and the demerit value is an evaluation scale indicating the degree to which the moving area is not suitable as a moving area used for motion compensation. In any case, the initial value is 0.

(ア)「動き補償後の画素値」と「真の画素値」とが異なる場合(例えばR、G、Bの各成分毎の差分の何れかが予め設定された閾値以上異なる場合)、動き補償によって符号量が増える可能性があると見做し、デメリット値を1増やす。
(イ)「動き補償後の画素値」と「真の画素値」とが異ならない場合(例えばR、G、Bの各成分毎の差分の何れもが予め設定された閾値以上異ならない場合)で、かつ、その座標の画素とその隣接する画素との間に閾値以上の輝度勾配がある場合(例えば、上画素および左画素との差分の合計値が閾値以上になる場合や、上画素または左画素との差分が閾値以上になる場合など)、動き補償によって符号量が低減できる可能性があると見做し、メリット値を1増やす。ここで、隣接する画素との間に閾値以上の輝度勾配があることを条件に加えている理由は、輝度勾配がある点が含まれる箇所は差分による符号化では一般に符号量が増えるためである。
(ウ)初期候補の移動領域全体に対して、上記のア、イの処理を行い、メリット値がデメリット値より大きければ、移動領域として採用し、そうでなければ棄却する。
なお、メリット値およびデメリット値を画素値の比較結果に応じて加算し、最終的なメリット値とデメリット値とを比較する処理は、メリット値およびデメリット値の何れか一方だけを使用して加算と減算を使い分ける方法と等価である。具体的には、動き補償後の画素値と真の画素値との差分が所定の閾値以上となる画素が検出される毎にメリット値を所定値だけ減算(またはデメリット値を所定値だけ加算)し、動き補償後の画素値と真の画素値との差分が所定の閾値より小さな画素であって且つ隣接する画素との間に閾値以上の輝度勾配がある画素が検出される毎にメリット値を所定値だけ加算(またはデメリット値を所定値だけ減算)する処理を行い、最終的なメリット値(またはデメリット値)の値の正、負を判定するようにしても良い。
(A) When the “pixel value after motion compensation” and the “true pixel value” are different (for example, when any of the differences for each of R, G, and B components is different from a preset threshold value), the motion Assuming that there is a possibility that the amount of code will increase due to compensation, the demerit value is increased by one.
(A) When the “pixel value after motion compensation” does not differ from the “true pixel value” (for example, when any of the differences for each of R, G, and B components does not differ by a predetermined threshold value or more) And there is a luminance gradient greater than or equal to the threshold between the pixel at that coordinate and the adjacent pixel (for example, if the total difference between the upper pixel and the left pixel is greater than or equal to the threshold, When the difference from the left pixel is equal to or greater than a threshold value), the merit value is increased by 1 considering that there is a possibility that the code amount can be reduced by motion compensation. Here, the reason for adding the condition that there is a luminance gradient equal to or greater than the threshold value between adjacent pixels is that a portion including a point having a luminance gradient generally increases the amount of code in encoding by difference. .
(C) The above-mentioned processes (a) and (b) are performed on the entire moving area of the initial candidate, and if the merit value is larger than the demerit value, it is adopted as the moving area, otherwise it is rejected.
The process of adding the merit value and the demerit value according to the comparison result of the pixel value and comparing the final merit value and the demerit value is the addition using only one of the merit value and the demerit value. It is equivalent to using subtraction properly. Specifically, every time a pixel whose difference between the pixel value after motion compensation and the true pixel value is equal to or greater than a predetermined threshold is detected, the merit value is subtracted by the predetermined value (or the demerit value is added by the predetermined value). And a merit value every time a pixel having a difference between a pixel value after motion compensation and a true pixel value that is smaller than a predetermined threshold and having a luminance gradient greater than or equal to the threshold between adjacent pixels is detected. May be added by a predetermined value (or a demerit value is subtracted by a predetermined value) to determine whether the final merit value (or demerit value) is positive or negative.

移動領域の初期候補が棄却された場合、本例ではもはや移動領域の検出は一切行われず、移動領域の検出が失敗した旨の検出結果を作業域113に記録して(ステップS323)、図5−4の処理を終了する。   If the initial candidate for the moving area is rejected, the detection of the moving area is no longer performed in this example, and the detection result indicating that the detection of the moving area has failed is recorded in the work area 113 (step S323). The process of -4 ends.

他方、移動領域の初期候補が採用された場合、以下の手順により、領域を更に上下左右へ拡張可能かどうかを調べる。   On the other hand, when the initial candidate for the moving area is adopted, it is checked whether the area can be further expanded vertically and horizontally by the following procedure.

(I)移動領域の各ラインについて、領域を右に広げた際に「動き補償後の画素値」と「真の画素値」とが一致する(差分が閾値以下になる)連続画素数を調べ、連続画素数の最小値を右への最大拡大幅として、右端を確定する(ステップS313)。例えば図5−5に示すように、初期候補の右端を右に広げた際、1ライン目と3ライン目は3画素連続して、残りの全ラインは2画素連続して、それぞれ「動き補償後の画素値」と「真の画素値」とが一致したとすると、右への最大拡大幅は連続画素数の最小値である2画素とする。 (I) For each line of the moving area, check the number of consecutive pixels where the “pixel value after motion compensation” and the “true pixel value” match when the area is expanded to the right (the difference is below the threshold). The right end is determined by setting the minimum value of the number of continuous pixels as the maximum enlargement width to the right (step S313). For example, as shown in FIG. 5-5, when the right edge of the initial candidate is expanded to the right, the first line and the third line are 3 consecutive pixels, and the remaining lines are 2 consecutive pixels, respectively. If the “subsequent pixel value” and the “true pixel value” match, the maximum rightward expansion width is set to two pixels, which is the minimum value of the number of consecutive pixels.

(II)右への拡大方法と同様の方法で、移動領域の左への最大拡大幅を算出し、左端を確定する(ステップS314)。 (II) The maximum enlargement width to the left of the moving region is calculated by the same method as the enlargement method to the right, and the left end is determined (step S314).

(III)上記の(I)および(II)の処理を行った後の移動領域に対して、更に、領域を1ラインずつ上に拡大していく(ステップS315〜S318)。具体的には、前述の(ア)、(イ)と同様の方式で、1ライン拡大した場合のメリット値、デメリット値を計算し(ステップS315、S316)、メリット値がデメリット値より大きければ(ステップS317でYES)、ステップS315に戻って、更に次のラインについても同様の処理を行う。また、メリット値がデメリット値よりも大きくなければ、1ライン拡大前の上端を移動領域の上端に確定する(ステップS318)。 (III) The area is further expanded upward by one line with respect to the moving area after performing the processes (I) and (II) (steps S315 to S318). Specifically, the merit value and demerit value when one line is enlarged are calculated in the same manner as in the above (a) and (b) (steps S315 and S316), and if the merit value is larger than the demerit value ( YES in step S317), the process returns to step S315, and the same processing is performed for the next line. If the merit value is not larger than the demerit value, the upper end before the enlargement of one line is determined as the upper end of the moving area (step S318).

(IV)上への拡大と同様の方法で、移動領域を下に拡大していって、下端を確定する(ステップS319〜S322)。 (IV) The lower end is determined by enlarging the moving region downward by the same method as the upward enlargement (steps S319 to S322).

最後に移動領域決定手段302は、拡大後の移動領域の座標情報を含む検出結果を作業域113に記録し(ステップS323)、図5−4の処理を終える。   Finally, the moving area determination unit 302 records the detection result including the coordinate information of the enlarged moving area in the work area 113 (step S323), and finishes the process of FIG. 5-4.

ここで、移動領域の左右への拡大と上下への拡大とで異なる手法を採用している理由は、同じライン上の複数の画素へのメモリアクセスは高速に行えるが、異なるライン上の画素へのメモリアクセスには時間がかかるためである。つまり、左右への拡大を上下と同様に1列ずつ順に拡大していくと、1列拡大するだけでも移動領域の全ラインにわたるメモリアクセスが必要になるためである。しかし、このようなメモリアクセス時間が問題とならない状況の下では、移動領域の左右への拡大を上下への拡大と同じ手法で行っても良い。逆に、移動領域の上下への拡大を、左右への拡大に使用した簡易な手法で行うようにしても良い。   Here, the reason for adopting different methods for the left and right expansion of the moving area and the vertical expansion is that the memory access to a plurality of pixels on the same line can be performed at a high speed, but the pixels on different lines can be accessed. This is because it takes time to access the memory. In other words, if the horizontal expansion is performed sequentially one column at a time in the same manner as the top and bottom, memory access over all lines of the moving area is required even if only one column is expanded. However, under such a situation where the memory access time does not become a problem, the movement region may be expanded to the left and right by the same method as the vertical expansion. On the contrary, the movement region may be enlarged up and down by a simple method used for right and left enlargement.

この例1の移動領域決定手段302によれば、初期候補決定手段301で決定された初期候補の妥当性を定量的に判定することができるため、不適切な移動領域を使った動き補償を防止することができる。また、初期候補が妥当な場合、符号量の削減効果が大きい、よりサイズの大きな移動領域を探索することができる。   According to the moving region determination unit 302 of Example 1, since the validity of the initial candidate determined by the initial candidate determination unit 301 can be quantitatively determined, motion compensation using an inappropriate moving region is prevented. can do. In addition, when the initial candidate is valid, it is possible to search for a moving region having a larger size and having a large code amount reduction effect.

(B)移動領域決定手段302の例2
この例2の移動領域決定手段302の処理例を図5−6に示す。例2が例1と相違するところは、例1では初期候補よりサイズの大きな移動領域だけを探索したのに対して、例2では、移動領域が真の移動領域よりも大きな領域として過剰に検出されている可能性を考慮して、まず各辺毎に領域の縮小の可能性を判定し、過剰検出されていない辺については例1と同様に拡大していくようにした点にある。
(B) Example 2 of moving area determination means 302
A processing example of the movement area determination unit 302 of Example 2 is shown in FIGS. Example 2 differs from Example 1 in that only a moving area larger in size than the initial candidate was searched in Example 1, whereas in Example 2, the moving area is excessively detected as an area larger than the true moving area. In consideration of the possibility that the area has been reduced, the possibility of the reduction of the area is first determined for each side, and the side that has not been excessively detected is enlarged as in the first example.

まず移動領域決定手段302は、例1と同様の方法により初期候補の移動領域の妥当性を判定する(ステップS331、S332)。移動領域の初期候補が棄却された場合、本例でも例1と同様にもはや移動領域の検出は一切行われず、移動領域の検出が失敗した旨の検出結果を作業域113に記録して(ステップS357)、図5−6の処理を終了する。   First, the moving area determination unit 302 determines the validity of the moving area of the initial candidate by the same method as in Example 1 (Steps S331 and S332). When the initial candidate for the moving area is rejected, the moving area is no longer detected in this example as in Example 1, and the detection result indicating that the moving area has failed is recorded in the work area 113 (step S357), the process of FIG.

他方、移動領域の初期候補が採用された場合、以下の手順により、領域を更に上下左右から縮小可能かどうか、上下左右へ拡張可能かどうかを調べる。   On the other hand, when the initial candidate for the moving area is adopted, the following procedure is used to check whether the area can be further reduced vertically and horizontally and whether it can be expanded vertically and horizontally.

まず移動領域決定手段302は、初期候補の移動領域の右からの最大縮小幅を算出する(ステップS333)。具体的には、移動領域の各ラインについて、領域を右から狭めた際に「動き補償後の画素値」と「真の画素値」とが一致しない(差分が閾値以上になる)連続画素数を調べ、連続画素数の最小値を右からの最大縮小幅として、右端を確定する。例えば図5−7に示すように、初期候補の右端を右から狭めた際、1ライン目と4ライン目と5ライン目は3画素連続して、残りの全ラインは2画素連続して、それぞれ「動き補償後の画素値」と「真の画素値」とが一致しなかったとすると、右からの最大縮小幅は連続画素数の最小値である2画素とする。   First, the moving area determination unit 302 calculates the maximum reduction width from the right of the moving area of the initial candidate (step S333). Specifically, for each line of the moving region, the number of consecutive pixels in which the “pixel value after motion compensation” does not match the “true pixel value” when the region is narrowed from the right (the difference is greater than or equal to the threshold value). And the right end is determined with the minimum value of the number of continuous pixels as the maximum reduction width from the right. For example, as shown in FIG. 5-7, when the right edge of the initial candidate is narrowed from the right, the first line, the fourth line, and the fifth line are three consecutive pixels, and the remaining all lines are two consecutive pixels. If the “pixel value after motion compensation” and the “true pixel value” do not match, the maximum reduction width from the right is set to two pixels, which is the minimum value of the number of continuous pixels.

次に移動領域決定手段302は、最大縮小幅が0か否かを判定し(ステップS334)、最大縮小幅が0でなければ、例えば図5−7に示すように、初期候補の右端から最大縮小幅だけ狭めた箇所を移動領域の右端として確定する(ステップS335)。また、最大縮小幅が0であれば、例1と同様の方法で移動領域の右への最大拡大幅を算出し、右端を確定する(ステップS336)。   Next, the moving area determination unit 302 determines whether or not the maximum reduction width is 0 (step S334). If the maximum reduction width is not 0, for example, as shown in FIG. A portion narrowed by the reduction width is determined as the right end of the movement region (step S335). If the maximum reduction width is 0, the maximum enlargement width to the right of the moving area is calculated in the same manner as in Example 1, and the right end is determined (step S336).

次に移動領域決定手段302は、初期領域の左端からも右端と同様に最大縮小幅を算出し(ステップS337)、最大縮小幅が0でなければ、最大縮小幅から左端を確定する(ステップS338、339)。また、最大縮小幅が0であれば、例1と同様の方法で左端からの最大拡張幅を算出して、左端を確定する(ステップS340)。   Next, the moving area determination unit 302 calculates the maximum reduction width from the left end of the initial area in the same manner as the right end (step S337). If the maximum reduction width is not 0, the left end is determined from the maximum reduction width (step S338). 339). If the maximum reduction width is 0, the maximum extension width from the left end is calculated in the same manner as in Example 1, and the left end is determined (step S340).

次に移動領域決定手段302は、移動領域を上から1ライン縮小し、前述の(ア)、(イ)と同様の方式で、1ライン縮小した場合のメリット値、デメリット値を計算する(ステップS341、S342)。メリット値がデメリット値より小さければ(ステップS343でYES)、更に次のラインについても同様の縮小処理を繰り返す(ステップS344〜S346)。そして、メリット値がデメリット値よりも小さくないことが検出された場合、1ライン縮小前の上端を移動領域の上端に確定する(ステップS347)。他方、ステップS343でメリット値がデメリット値より小さくないと判定した場合、例1と同様の方法で移動領域の上への最大拡張幅を算出し、上端を確定する(ステップS348)。   Next, the moving area determination unit 302 reduces the moving area by one line from the top, and calculates the merit value and demerit value when the line is reduced by the same method as the above-mentioned (a) and (b) (step) S341, S342). If the merit value is smaller than the demerit value (YES in step S343), the same reduction process is repeated for the next line (steps S344 to S346). If it is detected that the merit value is not smaller than the demerit value, the upper end before the reduction of one line is determined as the upper end of the movement region (step S347). On the other hand, if it is determined in step S343 that the merit value is not smaller than the demerit value, the maximum extension width above the moving region is calculated by the same method as in Example 1 and the upper end is determined (step S348).

次に移動領域決定手段302は、移動領域の下からも上からと同様の処理を行う(ステップS349〜S356)。   Next, the movement area determination means 302 performs the same processing from the bottom of the movement area as from the top (steps S349 to S356).

最後に移動領域決定手段302は、上下左右の端部が確定した移動領域の座標情報を含む検出結果を作業域113に記録し(ステップS357)、図5−6の処理を終える。   Finally, the moving area determination unit 302 records the detection result including the coordinate information of the moving area in which the upper, lower, left, and right ends are determined in the work area 113 (step S357), and ends the processing of FIG. 5-6.

ここで、移動領域の左右からの縮小と上下からの縮小とで異なる手法を採用している理由は、同じライン上の複数の画素へのメモリアクセスは高速に行えるが、異なるライン上の画素へのメモリアクセスには時間がかかるためである。つまり、左右への縮小を上下と同様に1列ずつ順に行っていくと、1列縮小するだけでも移動領域の全ラインにわたるメモリアクセスが必要になるためである。しかし、このようなメモリアクセス時間が問題とならない状況の下では、移動領域の左右からの縮小を上下からの縮小と同じ手法で行っても良い。逆に、移動領域の上下からの縮小を、左右からの縮小に使用した簡易な手法で行うようにしても良い。   Here, the reason why different methods are adopted for the reduction from the left and right of the moving region and the reduction from the top and bottom is that memory access to a plurality of pixels on the same line can be performed at a high speed, but to the pixels on different lines This is because it takes time to access the memory. In other words, if the horizontal reduction is performed one column at a time in the same manner as the top and bottom, memory access over all the lines of the moving area is required even by reducing one column. However, under such a situation where the memory access time does not become a problem, the movement area may be reduced from the left and right by the same method as the reduction from the top and bottom. Conversely, reduction from the top and bottom of the moving area may be performed by a simple method used for reduction from the left and right.

この例2の移動領域決定手段302によれば、初期候補決定手段301で決定された初期候補の妥当性を定量的に判定することができるため、不適切な移動領域を使った動き補償を防止することができる。また、初期候補が妥当な場合、まず上下左右からの縮減を試みるため、初期候補の移動領域が真の移動領域よりも大きな領域として過剰に検出されていた場合に、過剰検出分を削減することが可能になる。更に、過剰検出の可能性がない辺については、符号量の削減効果が大きい、よりサイズの大きな移動領域へと拡大していくことが可能となる。   According to the moving region determination unit 302 of this example 2, the validity of the initial candidate determined by the initial candidate determination unit 301 can be quantitatively determined, so that motion compensation using an inappropriate moving region is prevented. can do. In addition, when the initial candidate is valid, it tries to reduce from the top, bottom, left, and right, so if the initial candidate's moving area is excessively detected as a larger area than the true moving area, the excess detection amount should be reduced. Is possible. Furthermore, the side where there is no possibility of excessive detection can be expanded to a larger moving region with a large code amount reduction effect.

(C)移動領域決定手段302の例3
この例3の移動領域決定手段302の処理例を図5−8に示す。例3が例2と相違するところは、例2では初期候補について計算したメリット値がデメリット値を下回っていた場合にもはや移動領域の検出を断念していたのに対して、例3では、移動領域が真の移動領域よりも極めて過大に検出されている可能性を考慮して、各辺毎に領域の縮小の可能性を判定していくようにした点にある。
(C) Example 3 of moving area determination means 302
A processing example of the movement area determination means 302 of Example 3 is shown in FIGS. The difference between Example 3 and Example 2 is that in Example 3, when the merit value calculated for the initial candidate was lower than the demerit value, detection of the moving region was no longer given, whereas in Example 3, the move In consideration of the possibility that the area is detected to be extremely larger than the true moving area, the possibility of reducing the area is determined for each side.

まず移動領域決定手段302は、例2と同様の方法により初期候補の移動領域の妥当性を判定する(ステップS361、S362)。移動領域の初期候補が棄却されなかった場合(ステップS362でYES)の処理ステップS363は、例2のステップS333〜S356と同じである。   First, the moving area determination unit 302 determines the validity of the moving area of the initial candidate by the same method as in Example 2 (Steps S361 and S362). Processing step S363 when the initial candidate for the moving area is not rejected (YES in step S362) is the same as steps S333 to S356 of Example 2.

他方、移動領域の初期候補が棄却された場合、以下の手順により、領域を更に上下左右から縮小可能かどうかを調べる。   On the other hand, when the initial candidate for the moving area is rejected, it is checked whether the area can be further reduced from the top, bottom, left, and right by the following procedure.

まず移動領域決定手段302は、例2と同様の方法で、初期候補の移動領域の右からの最大縮小幅を算出する(ステップS364)。次に移動領域決定手段302は、最大縮小幅が移動領域の横幅に等しいか否かを判定し(ステップS365)、最大縮小幅が移動領域の横幅に等しければ、移動領域の検出に失敗したとして、その旨の検出結果を生成し(ステップS372)、図5−8の処理を終了する。最大縮小幅が移動領域の横幅に等しくなければ、初期候補の右端から最大縮小幅だけ狭めた箇所を移動領域の右端として確定する(ステップS366)。   First, the moving area determination unit 302 calculates the maximum reduction width from the right of the moving area of the initial candidate by the same method as in Example 2 (step S364). Next, the moving area determination unit 302 determines whether or not the maximum reduction width is equal to the horizontal width of the moving area (step S365). If the maximum reduction width is equal to the horizontal width of the moving area, it is determined that the detection of the moving area has failed. Then, a detection result to that effect is generated (step S372), and the processing of FIG. If the maximum reduction width is not equal to the horizontal width of the moving area, a portion narrowed by the maximum reduction width from the right end of the initial candidate is determined as the right end of the moving area (step S366).

次に移動領域決定手段302は、初期領域の左端からも右端と同様に最大縮小幅を算出し、左端を確定する(ステップS367)。   Next, the moving area determination unit 302 calculates the maximum reduction width from the left end of the initial area in the same manner as the right end, and determines the left end (step S367).

次に移動領域決定手段302は、移動領域の上からの最大縮小幅を例2と同様の方法で算出する(ステップS368)。若し、最大縮小幅が移動領域の縦幅に等しければ、移動領域の検出に失敗したとして、その旨の検出結果を生成し(ステップS369でYES、ステップS372)、図5−8の処理を終了する。最大縮小幅が移動領域の縦幅に等しくなければ、最大縮小幅から移動領域の上端を確定する(ステップS370)。   Next, the moving area determination unit 302 calculates the maximum reduction width from above the moving area by the same method as in Example 2 (step S368). If the maximum reduction width is equal to the vertical width of the moving area, the detection result indicating that the moving area has failed is generated (YES in step S369, step S372), and the processing of FIG. finish. If the maximum reduction width is not equal to the vertical width of the movement area, the upper end of the movement area is determined from the maximum reduction width (step S370).

次に移動領域決定手段302は、移動領域の下からも上からと同様に最大縮小幅を算出し、下端を確定する(ステップS371)。   Next, the moving area determining means 302 calculates the maximum reduction width from the bottom of the moving area in the same manner as from above, and determines the lower end (step S371).

最後に移動領域決定手段302は、上下左右の端部が確定した移動領域の座標情報を含む検出結果を作業域113に記録し(ステップS372)、図5−8の処理を終える。   Finally, the moving area determination unit 302 records the detection result including the coordinate information of the moving area in which the upper, lower, left, and right end portions are determined in the work area 113 (step S372), and ends the process of FIG.

この例3の移動領域決定手段302によれば、初期候補決定手段301で決定された初期候補の妥当性を定量的に判定することができるため、不適切な移動領域を使った動き補償を防止することができる。また、初期候補が棄却された場合であっても、縮小の可能性を探索するため、初期候補の移動領域が真の移動領域よりも極めて過大に検出されていた場合でも移動領域を可能な限り検出することが可能になる。さらに、例2と同様に、初期候補が妥当な場合、まず上下左右からの縮小を試みるため、初期候補の移動領域が真の移動領域よりも大きな領域として過剰に検出されていた場合に、過剰検出分を削減することが可能になり、更に、過剰検出の可能性がない辺については、符号量の削減効果が大きい、よりサイズの大きな移動領域へと拡大していくことが可能となる。   According to the moving region determination unit 302 of this example 3, since the validity of the initial candidate determined by the initial candidate determination unit 301 can be quantitatively determined, motion compensation using an inappropriate moving region is prevented. can do. Even if the initial candidate is rejected, in order to search for the possibility of reduction, even if the moving area of the initial candidate is detected to be excessively larger than the true moving area, the moving area is set as much as possible. It becomes possible to detect. Further, as in Example 2, when the initial candidate is valid, first, the reduction from the top, bottom, left, and right is attempted. Therefore, if the initial candidate moving area is excessively detected as an area larger than the true moving area, excessive It is possible to reduce the amount of detection, and further, it is possible to expand the side where there is no possibility of overdetection to a moving region having a larger size that has a large code amount reduction effect.

(D)移動領域決定手段302の例4
この例4の移動領域決定手段302の処理例を図5−9に示す。例4が例2と相違するところは、例2では初期候補について妥当性の判定を行い、妥当と判定した場合に移動領域の縮小、拡大を試行するのに対して、例4では、初期候補の妥当性の判定を省略し、初期候補の縮小、拡大を試行する点にある。
(D) Example 4 of moving area determining means 302
A processing example of the movement area determination unit 302 of Example 4 is shown in FIGS. The difference between Example 4 and Example 2 is that in Example 2, the validity of the initial candidate is determined, and when it is determined to be valid, the moving region is reduced and expanded, whereas in Example 4, the initial candidate is It is in the point of omitting the determination of the validity of and trying to reduce or expand the initial candidate.

まず移動領域決定手段302は、例2と同様の方法で、初期候補の移動領域の右からの最大縮小幅を算出する(ステップS381)。次に移動領域決定手段302は、最大縮小幅が移動領域の横幅に等しいか否かを判定し(ステップS382)、最大縮小幅が移動領域の横幅に等しければ、移動領域の検出に失敗したとして、その旨の検出結果を生成し(ステップS399)、図5−9の処理を終了する。   First, the moving area determination unit 302 calculates the maximum reduction width from the right of the moving area of the initial candidate by the same method as in Example 2 (step S381). Next, the moving area determination unit 302 determines whether or not the maximum reduction width is equal to the horizontal width of the moving area (step S382). If the maximum reduction width is equal to the horizontal width of the moving area, it is determined that the detection of the moving area has failed. Then, a detection result to that effect is generated (step S399), and the processing of FIG.

最大縮小幅が移動領域の横幅に等しくなければ、移動領域決定手段302は、最大縮小幅が0かどうかを判定し(ステップS383)、0でなければ、初期候補の右端から最大縮小幅だけ狭めた箇所を移動領域の右端として確定する(ステップS384)。また、最大縮小幅が0であれば、移動領域決定手段302は、例2と同様の方法で右への最大拡大幅を算出し、右端を確定する(ステップS385)。   If the maximum reduction width is not equal to the horizontal width of the movement area, the movement area determination unit 302 determines whether or not the maximum reduction width is 0 (step S383). If not, the movement area determination unit 302 narrows the maximum reduction width from the right end of the initial candidate by the maximum reduction width. Is determined as the right end of the movement area (step S384). If the maximum reduction width is 0, the moving area determination unit 302 calculates the maximum enlargement width to the right by the same method as in Example 2 and determines the right end (step S385).

次に移動領域決定手段302は、例2と同様の方法で初期候補の移動領域の左からの最大縮小幅を算出し(ステップS386)、最大縮小幅が0でなければ(ステップS387でNO)、初期候補の左端から最大縮小幅だけ狭めた箇所を移動領域の左端として確定する(ステップS388)。また、最大縮小幅が0であれば、移動領域決定手段302は、例2と同様の方法で左への最大拡大幅を算出し、左端を確定する(ステップS389)。   Next, the moving area determination unit 302 calculates the maximum reduction width from the left of the moving area of the initial candidate by the same method as in Example 2 (step S386), and if the maximum reduction width is not 0 (NO in step S387). Then, a portion narrowed by the maximum reduction width from the left end of the initial candidate is determined as the left end of the moving region (step S388). If the maximum reduction width is 0, the moving area determination unit 302 calculates the maximum enlargement width to the left by the same method as in Example 2 and determines the left end (step S389).

次に移動領域決定手段302は、移動領域の上からの最大縮小幅を例2と同様の方法で算出する(ステップS390)。若し、最大縮小幅が移動領域の縦幅に等しければ、移動領域の検出に失敗したとして、その旨の検出結果を生成し(ステップS391でYES、S399)、図5−9の処理を終了する。最大縮小幅が移動領域の縦幅に等しくなければ、最大縮小幅が0かどうかを判定し(ステップS392)、0でなければ、初期候補の上端から最大縮小幅だけ狭めた箇所を移動領域の上端として確定する(ステップS393)。また、最大縮小幅が0であれば、移動領域決定手段302は、例2と同様の方法で上への最大拡大幅を算出し、上端を確定する(ステップS394)。   Next, the moving area determination unit 302 calculates the maximum reduction width from above the moving area by the same method as in Example 2 (step S390). If the maximum reduction width is equal to the vertical width of the moving area, the detection result indicating that the moving area has failed is generated (YES in step S391, S399), and the processing in FIG. To do. If the maximum reduction width is not equal to the vertical width of the moving area, it is determined whether or not the maximum reduction width is 0 (step S392). If it is not 0, a position narrowed by the maximum reduction width from the upper end of the initial candidate is determined. The upper end is determined (step S393). If the maximum reduction width is 0, the moving area determination unit 302 calculates the maximum enlargement width upward using the same method as in Example 2 and determines the upper end (step S394).

次に移動領域決定手段302は、移動領域の下からの最大縮小幅を例2と同様の方法で算出し(ステップS395)、0でなければ、初期候補の下端から最大縮小幅だけ狭めた箇所を移動領域の下端として確定する(ステップS396でNO、S397)。また、最大縮小幅が0であれば、移動領域決定手段302は、例2と同様の方法で下への最大拡大幅を算出し、下端を確定する(ステップS398)。   Next, the moving area determining means 302 calculates the maximum reduction width from the bottom of the moving area by the same method as in Example 2 (step S395). If it is not 0, a location narrowed by the maximum reduction width from the lower end of the initial candidate. Is determined as the lower end of the movement area (NO in step S396, S397). On the other hand, if the maximum reduction width is 0, the moving area determination unit 302 calculates the maximum downward expansion width by the same method as in Example 2 and determines the lower end (step S398).

最後に移動領域決定手段302は、上下左右の端部が確定した移動領域の座標情報を含む検出結果を作業域113に記録し(ステップS399)、図5−9の処理を終える。   Finally, the moving area determination unit 302 records the detection result including the coordinate information of the moving area in which the upper, lower, left and right ends are determined in the work area 113 (step S399), and finishes the process of FIG. 5-9.

この例4の移動領域決定手段302によれば、初期候補決定手段301で決定された初期候補の妥当性を定量的に判定していないので、処理量を削減することができる。また、まず上下左右からの縮小を試みるため、初期候補の移動領域が真の移動領域よりも大きな領域として過剰に検出されていた場合に、過剰検出分を削減することが可能になり、更に、過剰検出の可能性がない辺については、符号量の削減効果が大きい、よりサイズの大きな移動領域へと拡大していくことが可能となる。ただし、初期候補の移動領域の妥当性を判定していないため、例えばドーナツ型の穴の部分が移動前後で全く相違するような領域を移動領域として検出する可能性がある。   According to the moving area determination unit 302 of Example 4, since the validity of the initial candidate determined by the initial candidate determination unit 301 is not quantitatively determined, the processing amount can be reduced. In addition, since the first candidate moving area is excessively detected as a larger area than the true moving area in order to try to reduce from the top, bottom, left and right, it becomes possible to reduce the excess detection amount, The side where there is no possibility of excessive detection can be expanded to a larger moving region that has a large code amount reduction effect. However, since the validity of the moving area of the initial candidate is not determined, there is a possibility that an area where the donut-shaped hole part is completely different before and after the movement is detected as the moving area, for example.

(3)更新領域検出域設定手段124
図6−1を参照すると、更新領域検出域設定手段124の第1の実施例は、移動領域有無判定手段401と、移動方向判定手段402と、分割手段403とから構成される。各々は、概ね以下のような機能を有する。
(3) Update area detection area setting means 124
Referring to FIG. 6A, the first embodiment of the update area detection area setting unit 124 includes a movement area presence / absence determination unit 401, a movement direction determination unit 402, and a division unit 403. Each has the following functions in general.

移動領域有無判定手段401は、移動領域検出手段122で移動領域が検出されたか否かを判定する機能を有する。   The moving region presence / absence determining unit 401 has a function of determining whether or not a moving region has been detected by the moving region detecting unit 122.

移動方向判定手段402は、移動領域検出手段122で検出された移動領域の移動方向を判定する機能を有する。   The movement direction determination unit 402 has a function of determining the movement direction of the movement region detected by the movement region detection unit 122.

分割手段403は、移動領域有無判定手段401および移動方向判定手段402の判定結果に従って画面分割の必要性の判定および画面分割による更新領域検出域の設定を行う機能を有する。   The dividing unit 403 has a function of determining the necessity of screen division and setting an update region detection area by screen division according to the determination results of the moving region presence / absence determining unit 401 and the moving direction determining unit 402.

次に本実施例の更新領域検出域設定手段124の第1の処理例を説明する。   Next, a first processing example of the update area detection area setting unit 124 of this embodiment will be described.

更新領域検出域設定手段124の移動領域有無判定手段401は、移動領域検出手段122の検出結果を作業域113から読み出して解析することにより、移動領域が検出されたかどうかを判定し、判定結果を移動方向判定手段402および分割手段403へ通知する(図6−2のステップS501)。   The movement area presence / absence determination means 401 of the update area detection area setting means 124 reads out and analyzes the detection result of the movement area detection means 122 from the work area 113, thereby determining whether or not a movement area has been detected. Notification is made to the moving direction determining means 402 and the dividing means 403 (step S501 in FIG. 6-2).

移動方向判定手段402は、移動領域が検出された旨の通知を移動領域有無判定手段401から受け取ると、作業域113から読み出された移動領域検出手段122の検出結果に含まれる移動前の移動領域の座標と移動後の移動領域の座標とを比較することにより、移動方向が、画面の上から下へ向かう成分を含む方向(以下、下方向と言う)、画面の下から上へ向かう成分を含む方向(以下、上方向と言う)の何れであるかを判定し、判定結果を分割手段403に通知する(ステップS502)。判定結果には、移動方向以外に、下方向の場合には移動後の移動領域の上端の座標、上方向の場合には移動後の移動領域の下端の座標が含まれる。なお、下方向でもなく、上方向でもない左右方向の場合の扱い方としては、例えば、下方向あるいは上方向の何れかに含めることが考えられる。   When the movement direction determination means 402 receives a notification that the movement area has been detected from the movement area presence / absence determination means 401, the movement direction determination means 402 moves before movement included in the detection result of the movement area detection means 122 read from the work area 113. By comparing the coordinates of the area with the coordinates of the moved area after movement, the direction in which the moving direction includes a component from the top to the bottom of the screen (hereinafter referred to as the downward direction), the component from the bottom to the top of the screen Is determined (hereinafter referred to as the upward direction), and the determination result is notified to the dividing means 403 (step S502). In addition to the movement direction, the determination result includes the coordinates of the upper end of the movement area after movement in the case of the downward direction, and the coordinates of the lower end of the movement area after the movement in the case of the upward direction. In addition, as a method of handling in the left-right direction that is neither downward nor upward, for example, it can be considered to include either the downward or upward direction.

分割手段403は、移動領域有無判定手段401から移動領域が検出されなかった旨の通知を受けた場合、画面全体を1つの更新領域検出域に設定する(ステップS503)。また、移動領域有無判定手段401から移動領域が検出された旨の通知を受けた場合、移動方向判定手段402からの通知に従って画面を分割する(ステップS504〜S506)。具体的には、移動方向が下方向であれば、移動後の移動領域の上端で画面を2分割し、各分割領域をそれぞれ1つの更新領域検出域に設定する。また、移動方向が上方向であれば、移動後の移動領域の下端で画面を2分割し、各分割領域をそれぞれ1つの更新領域検出域に設定する。その後、更新領域検出域毎に更新領域検出手段125による更新領域の検出が行われる。   When the dividing unit 403 receives notification from the moving region presence / absence determining unit 401 that the moving region has not been detected, the dividing unit 403 sets the entire screen as one update region detecting region (step S503). When the notification that the moving area is detected is received from the moving area presence / absence determining unit 401, the screen is divided in accordance with the notification from the moving direction determining unit 402 (steps S504 to S506). Specifically, if the movement direction is downward, the screen is divided into two at the upper end of the moved area after movement, and each divided area is set as one update area detection area. If the moving direction is upward, the screen is divided into two at the lower end of the moving area after movement, and each divided area is set as one update area detection area. Thereafter, the update area detection unit 125 detects the update area for each update area detection area.

第1の処理例の更新領域検出域設定手段124による効果を説明する。以下では、移動方向が下方向の場合について説明しているが、上方向の場合も同様の効果が得られる。   The effect of the update area detection area setting means 124 of the first processing example will be described. Although the case where the moving direction is the downward direction is described below, the same effect can be obtained when the moving direction is the upward direction.

図6−3の左上に示すように、移動領域が下方向に移動した場合、画面全体を更新領域検出域に設定すると、図6−3の右上に示すように移動前の移動領域に相当する領域全体が更新領域として検出される。これに対して本例では、図6−3の右下に示すように移動後の移動領域の上端で画面が2分割され、各々の更新領域検出域で更新領域の検出が行われるため、更新領域の合計面積を最小限に抑えることができ、符号量の削減が可能になる。   As shown in the upper left of FIG. 6-3, when the moving area moves downward, setting the entire screen as the update area detection area corresponds to the moving area before the movement as shown in the upper right of FIG. 6-3. The entire area is detected as an update area. On the other hand, in this example, as shown in the lower right of FIG. 6-3, the screen is divided into two at the upper end of the moved area after movement, and the update area is detected in each update area detection area. The total area of the regions can be minimized, and the amount of codes can be reduced.

次に本実施例の更新領域検出域設定手段124の第2の処理例を説明する。   Next, a second processing example of the update area detection area setting unit 124 of this embodiment will be described.

更新領域検出域設定手段124の移動領域有無判定手段401は、第1の処理例と同様に移動領域が検出されたかどうかを判定し、判定結果を移動方向判定手段402および分割手段403へ通知する(図6−4のステップS511)。   The moving area presence / absence determining means 401 of the update area detecting area setting means 124 determines whether or not a moving area has been detected, as in the first processing example, and notifies the moving direction determining means 402 and the dividing means 403 of the determination result. (Step S511 in FIG. 6-4).

移動方向判定手段402は、第1の処理例と同様に、移動領域が検出された旨の通知を移動領域有無判定手段401から受け取ると、移動方向が下方向、上方向の何れであるかを判定し、判定結果を分割手段403に通知する(ステップS512)。判定結果には、移動方向以外に、移動方向が下方向の場合も上方向の場合も共に、移動後の移動領域の上下端の座標が含まれる。   Similar to the first processing example, when the movement direction determination unit 402 receives a notification that the movement region has been detected from the movement region presence determination unit 401, the movement direction determination unit 402 determines whether the movement direction is a downward direction or an upward direction. The determination is made and the determination result is notified to the dividing means 403 (step S512). In addition to the movement direction, the determination result includes the coordinates of the upper and lower ends of the movement area after the movement in both the downward direction and the upward direction.

分割手段403は、移動領域有無判定手段401から移動領域が検出されなかった旨の通知を受けた場合、第1の処理例と同様に画面全体を1つの更新領域検出域に設定する(ステップS513)。また、移動領域有無判定手段401から移動領域が検出された旨の通知を受けた場合、移動方向判定手段402からの通知に従って画面を分割する(ステップS514〜S516)。具体的には、移動方向が下方向および上方向とも、移動後の移動領域の上下端で画面を3分割し、各分割領域をそれぞれ1つの更新領域検出域に設定する。その後、更新領域検出域毎に更新領域検出手段125による更新領域の検出が行われる。   When the dividing unit 403 receives a notification that the moving area is not detected from the moving area presence / absence determining unit 401, the dividing unit 403 sets the entire screen as one update area detecting area as in the first processing example (step S513). ). When the notification that the moving area is detected is received from the moving area presence / absence determining unit 401, the screen is divided in accordance with the notification from the moving direction determining unit 402 (steps S514 to S516). Specifically, the screen is divided into three at the upper and lower ends of the moving area after movement in both the downward direction and the upward direction, and each divided area is set as one update area detection area. Thereafter, the update area detection unit 125 detects the update area for each update area detection area.

次に、本処理例の更新領域検出域設定手段124による効果を説明する。以下では、移動方向が下方向の場合について説明しているが、上方向の場合も同様の効果が得られる。   Next, the effect of the update area detection area setting unit 124 of this processing example will be described. Although the case where the moving direction is the downward direction is described below, the same effect can be obtained when the moving direction is the upward direction.

図6−5の左上に示すように、移動領域が下方向に移動した場合、画面全体を更新領域検出域に設定すると、図6−5の右上に示すように移動前の移動領域に相当する領域全体が更新領域として検出される。これに対して本例では、図6−5の右下に示すように移動後の移動領域の上下端で画面が3分割され、各々の更新領域検出域で更新領域の検出が行われるため、更新領域の合計面積を最小限に抑えることができ、符号量の削減が可能になる。   As shown in the upper left of FIG. 6-5, when the moving area moves downward, setting the entire screen as the update area detecting area corresponds to the moving area before moving as shown in the upper right of FIG. 6-5. The entire area is detected as an update area. On the other hand, in this example, as shown in the lower right of FIG. 6-5, the screen is divided into three at the upper and lower ends of the movement area after movement, and the update area is detected in each update area detection area. The total area of the update area can be minimized, and the code amount can be reduced.

また図6−6の左上に示すように、検出された移動領域が実際の移動領域よりも小さかった場合、移動後の上端のみで画面を分割する図6−2の第1の処理例では、図6−6の右上に示すように無駄に大きな更新領域が検出されてしまう。これに対して本例では、図6−6の右下に示すように移動後の移動領域の上下端で画面が3分割され、各々の更新領域検出域で更新領域の検出が行われるため、更新領域の合計面積を小さくでき、その分、符号量の削減が可能になる。   Also, as shown in the upper left of FIG. 6-6, when the detected moving area is smaller than the actual moving area, in the first processing example of FIG. As shown in the upper right of FIG. 6-6, a large update area is unnecessarily detected. On the other hand, in this example, as shown in the lower right of FIG. 6-6, the screen is divided into three at the upper and lower ends of the movement area after movement, and the update area is detected in each update area detection area. The total area of the update area can be reduced, and the code amount can be reduced accordingly.

次に本実施例の更新領域検出域設定手段124の第3の処理例を説明する。   Next, a third processing example of the update area detection area setting unit 124 of this embodiment will be described.

更新領域検出域設定手段124の移動領域有無判定手段401は、第2の処理例と同様に移動領域が検出されたかどうかを判定し、判定結果を移動方向判定手段402および分割手段403へ通知する(図6−7のステップS521)。   The moving area presence / absence determining means 401 of the update area detecting area setting means 124 determines whether or not a moving area has been detected as in the second processing example, and notifies the moving direction determining means 402 and the dividing means 403 of the determination result. (Step S521 in FIG. 6-7).

移動方向判定手段402は、第2の処理例と同様に、移動領域が検出された旨の通知を移動領域有無判定手段401から受け取ると、移動方向が下方向、上方向の何れであるかを判定し、判定結果を分割手段403に通知する(ステップS522)。判定結果には、移動方向以外に、移動方向が下方向の場合には移動後の移動領域の上下端および移動前の移動領域の下端の座標が含まれ、移動方向が上方向の場合には移動後の移動領域の上下端および移動前の移動領域の上端の座標が含まれる。   Similar to the second processing example, when the movement direction determination unit 402 receives a notification that the movement region has been detected from the movement region presence / absence determination unit 401, the movement direction determination unit 402 determines whether the movement direction is a downward direction or an upward direction. The determination is made, and the determination result is notified to the dividing means 403 (step S522). In addition to the moving direction, the judgment result includes the coordinates of the upper and lower ends of the moving area after moving and the lower end of the moving area before moving if the moving direction is downward. If the moving direction is upward, The coordinates of the upper and lower ends of the movement area after movement and the upper end of the movement area before movement are included.

分割手段403は、移動領域有無判定手段401から移動領域が検出されなかった旨の通知を受けた場合、第2の処理例と同様に画面全体を1つの更新領域検出域に設定する(ステップS523)。また、移動領域有無判定手段401から移動領域が検出された旨の通知を受けた場合、移動方向判定手段402からの通知に従って画面を分割する(ステップS524〜S526)。具体的には、移動方向が下方向の場合、移動後の移動領域の上下端と移動前の移動領域の下端で画面を4分割し、各分割領域をそれぞれ1つの更新領域検出域に設定する。また、移動方向が上方向の場合、移動後の移動領域の上下端と移動前の移動領域の上端で画面を4分割し、各分割領域をそれぞれ1つの更新領域検出域に設定する。その後、更新領域検出域毎に更新領域検出手段125による更新領域の検出が行われる。   When the dividing unit 403 receives notification from the moving region presence / absence determining unit 401 that the moving region has not been detected, the dividing unit 403 sets the entire screen as one update region detecting region as in the second processing example (step S523). ). When the notification that the moving area is detected is received from the moving area presence / absence determining unit 401, the screen is divided in accordance with the notification from the moving direction determining unit 402 (steps S524 to S526). Specifically, when the moving direction is downward, the screen is divided into four at the upper and lower ends of the moving area after moving and the lower end of the moving area before moving, and each divided area is set as one update area detection area. . When the moving direction is upward, the screen is divided into four at the upper and lower ends of the moving area after moving and the upper end of the moving area before moving, and each divided area is set as one update area detecting area. Thereafter, the update area detection unit 125 detects the update area for each update area detection area.

次に、本処理例の更新領域検出域設定手段124による効果を説明する。以下では、移動方向が下方向の場合について説明しているが、上方向の場合も同様の効果が得られる。   Next, the effect of the update area detection area setting unit 124 of this processing example will be described. Although the case where the moving direction is the downward direction is described below, the same effect can be obtained when the moving direction is the upward direction.

図6−8の左上に示すように、移動領域が下方向に移動した場合、画面全体を更新領域検出域に設定すると、図6−8の右上に示すように移動前の移動領域に相当する領域全体が更新領域として検出される。これに対して本例では、図6−8の右下に示すように移動後の移動領域の上下端および移動前の移動領域の下端で画面が4分割され、各々の更新領域検出域で更新領域の検出が行われるため、更新領域の合計面積を最小限に抑えることができ、符号量の削減が可能になる。   As shown in the upper left of FIG. 6-8, when the moving area moves downward, setting the entire screen as the update area detecting area corresponds to the moving area before moving as shown in the upper right of FIG. 6-8. The entire area is detected as an update area. On the other hand, in this example, as shown in the lower right of FIG. 6-8, the screen is divided into four at the upper and lower ends of the moving area after movement and the lower end of the moving area before movement, and is updated in each update area detection area. Since the area is detected, the total area of the update area can be minimized, and the code amount can be reduced.

また図6−9の左上に示すように、検出された移動領域が実際の移動領域よりも小さかった場合、移動後の上端のみで画面を分割する図6−2の第1の処理例では、図6−9の右上に示すように無駄に大きな更新領域が検出されてしまう。これに対して本例では、図6−9の右下に示すように移動後の移動領域の上下端および移動前の移動領域の下端で画面が4分割され、各々の更新領域検出域で更新領域の検出が行われるため、更新領域の合計面積を小さくでき、その分、符号量の削減が可能になる。   Also, as shown in the upper left of FIG. 6-9, when the detected moving area is smaller than the actual moving area, the first processing example of FIG. As shown in the upper right of FIG. 6-9, a large update area is unnecessarily detected. On the other hand, in this example, as shown in the lower right of FIG. 6-9, the screen is divided into four at the upper and lower ends of the moving area after movement and the lower end of the moving area before movement, and updated in each update area detection area. Since the area is detected, the total area of the update area can be reduced, and the amount of code can be reduced accordingly.

さらに図6−10の左上に示すように、検出された移動領域が実際の移動領域よりも大きかった場合、移動後の上端のみで画面を分割する図6−2の第1の処理例では、図6−10の右上に示すように無駄に大きな更新領域が検出されてしまう。また、移動後の上下端のみで画面を分割する図6−4の第2の処理例では、図6−10の右下に示すように更新領域がやや冗長になる。これに対して本例では、図6−10の左下に示すように移動後の移動領域の上下端および移動前の移動領域の下端で画面が4分割され、各々の更新領域検出域で更新領域の検出が行われるため、第2の処理例に比べて更新領域の合計面積を小さくでき、その分、符号量の削減が可能になる。ただし、過剰検出される領域の面積がそれほど大きくないならば、第2の処理例の方が更新領域の個数が少なくなる利点がある。   Further, as shown in the upper left of FIG. 6-10, when the detected moving area is larger than the actual moving area, in the first processing example of FIG. As shown in the upper right of FIG. 6-10, a large update area is unnecessarily detected. Further, in the second processing example of FIG. 6-4 in which the screen is divided only by the upper and lower ends after movement, the update area becomes slightly redundant as shown in the lower right of FIG. 6-10. On the other hand, in this example, as shown in the lower left of FIG. 6-10, the screen is divided into four at the upper and lower ends of the moving area after the movement and the lower end of the moving area before the movement. Therefore, the total area of the update region can be reduced compared to the second processing example, and the amount of code can be reduced accordingly. However, if the area of the excessively detected region is not so large, the second processing example has an advantage that the number of update regions is reduced.

図6−11を参照すると、更新領域検出域設定手段124の第2の実施例は、移動領域有無判定手段411と、移動領域重複判定手段412と、移動方向判定手段413と、分割手段414とから構成される。各々は、概ね以下のような機能を有する。   Referring to FIG. 6-11, the second embodiment of the update area detection area setting means 124 includes a movement area presence / absence determination means 411, a movement area overlap determination means 412, a movement direction determination means 413, and a dividing means 414. Consists of Each has the following functions in general.

移動領域有無判定手段411および移動方向判定手段413は、更新領域検出域設定手段124の第1の実施例における移動領域有無判定手段401および移動方向判定手段402と同じ機能を有する。   The movement area presence / absence determination means 411 and the movement direction determination means 413 have the same functions as the movement area presence / absence determination means 401 and the movement direction determination means 402 in the first embodiment of the update area detection area setting means 124.

移動領域重複判定手段412は、移動領域検出手段122で検出された移動前後の移動領域の重なりの可能性の有無を判定する機能を有する。   The movement area overlap determination unit 412 has a function of determining whether or not there is a possibility of overlapping of the movement areas before and after the movement detected by the movement area detection unit 122.

分割手段414は、移動領域有無判定手段411、移動領域重複判定手段412および移動方向判定手段413の判定結果に従って画面分割の必要性の判定および画面分割による更新領域検出域の設定を行う機能を有する。   The dividing unit 414 has a function of determining the necessity of screen division and setting an update region detection area by screen division according to the determination results of the moving region presence / absence determining unit 411, the moving region overlap determining unit 412 and the moving direction determining unit 413. .

次に本実施例の更新領域検出域設定手段124の処理例を説明する。   Next, a processing example of the update area detection area setting unit 124 of this embodiment will be described.

更新領域検出域設定手段124の移動領域有無判定手段411は、第1の実施例の移動領域有無判定手段401と同様に移動領域が検出されたかどうかを判定し、判定結果を移動領域重複判定手段412および分割手段414へ通知する(図6−12のステップS531)。   The movement area presence / absence determination means 411 of the update area detection area setting means 124 determines whether or not a movement area has been detected in the same manner as the movement area presence / absence determination means 401 of the first embodiment, and determines the determination result as a movement area overlap determination means. 412 and the dividing unit 414 are notified (step S531 in FIG. 6-12).

移動領域重複判定手段412は、移動領域が検出された旨の通知を移動領域有無判定手段401から受け取ると、作業域113から移動領域検出手段122の検出結果に含まれる移動前の移動領域の座標と移動後の移動領域の座標とを読み出し、移動前の移動領域を上下左右に所定幅Δだけ拡大した領域と、移動後の移動領域を上下左右に所定幅Δだけ拡大した領域とが少なくとも一部で重なるかどうかを調べ、重なる場合には移動領域の重複ありの判定結果を、重ならない場合には移動領域の重複なしの判定結果を移動方向判定手段413および分割手段414に通知する(ステップS532)。ここで、所定幅Δは、移動領域の検出不足の生じる程度に応じて事前に設定される。   When the movement area overlap determination unit 412 receives a notification that the movement area is detected from the movement area presence / absence determination unit 401, the movement area overlap determination unit 412 includes the coordinates of the movement area before the movement included in the detection result of the movement area detection unit 122 from the work area 113. And the coordinates of the moving area after the movement are read out, and at least one of the area where the moving area before the movement is enlarged by a predetermined width Δ vertically and horizontally and the area after the movement is enlarged by a predetermined width Δ vertically and horizontally. In the case of overlapping, the determination result of the overlapping of the moving regions is notified to the moving direction determining means 413 and the dividing means 414 if the overlapping does not overlap (step 414). S532). Here, the predetermined width Δ is set in advance in accordance with the degree of insufficient detection of the moving area.

移動方向判定手段413は、移動領域の重複なしの通知を移動領域重複判定手段412から受け取ると、作業域113から読み出された移動領域検出手段122の検出結果に含まれる移動前の移動領域の座標と移動後の移動領域の座標とを比較することにより、移動方向が下方向、上方向の何れであるかを判定し、判定結果を分割手段414に通知する(ステップS533)。判定結果には、第1の実施例における移動方向判定手段402と同様に移動方向以外に、画面を分割する座標が含まれる。   When the movement direction determination unit 413 receives the notification that there is no overlap between the movement regions from the movement region overlap determination unit 412, the movement direction determination unit 413 determines the movement region before the movement included in the detection result of the movement region detection unit 122 read from the work area 113. By comparing the coordinates with the coordinates of the moved area after the movement, it is determined whether the moving direction is the downward direction or the upward direction, and the determination result is notified to the dividing unit 414 (step S533). The determination result includes coordinates for dividing the screen in addition to the moving direction as in the moving direction determining unit 402 in the first embodiment.

分割手段414は、移動領域有無判定手段411から移動領域が検出されなかった旨の通知を受けた場合、および移動領域重複判定手段412から移動領域の重複なしの通知を受けた場合、画面全体を1つの更新領域検出域に設定する(ステップS534)。他方、移動領域有無判定手段411から移動領域が検出された旨の通知を受けると共に、移動領域重複判定手段412から移動領域の重複ありの通知を受けた場合、移動方向判定手段413からの通知に従って第1の実施例の分割手段403の第1の処理例、第2の処理例および第3の処理例の何れかと同じように画面を分割して更新領域検出域を設定する(ステップS535〜S537)。その後、更新領域検出域毎に更新領域検出手段125による更新領域の検出が行われる。   When the dividing unit 414 receives a notification that the moving region has not been detected from the moving region presence / absence determining unit 411 and when the moving unit overlap determining unit 412 receives a notification that there is no overlapping of moving regions, the dividing unit 414 One update area detection area is set (step S534). On the other hand, when a notification indicating that a moving region has been detected is received from the moving region presence / absence determining unit 411, and when a moving region overlap notification is received from the moving region overlap determining unit 412, the notification from the moving direction determining unit 413 is followed. As in any of the first processing example, the second processing example, and the third processing example of the dividing unit 403 according to the first embodiment, the screen is divided and the update area detection area is set (steps S535 to S537). ). Thereafter, the update area detection unit 125 detects the update area for each update area detection area.

この第2の実施例の更新領域検出域設定手段124によれば、移動前後の移動領域が重なっている可能性がない場合には画面を分割しないので、更新領域の分割数の増加を抑えることができる。   According to the update area detection area setting means 124 of the second embodiment, the screen is not divided when there is no possibility that the movement areas before and after the movement overlap, so that an increase in the number of divisions of the update area is suppressed. Can do.

(4)更新領域検出手段125
図7−1を参照すると、更新領域検出手段125の第1の実施例は、画素比較手段601および更新領域抽出手段602から構成され、更新領域検出域設定手段124により設定された各々の更新領域検出域毎に、動き補償後の参照フレームと現フレームとの差分領域である更新領域を検出する。画素比較手段601および更新領域抽出手段602は、概ね以下のような機能を有する。
(4) Update area detection means 125
Referring to FIG. 7A, the first embodiment of the update region detection unit 125 includes a pixel comparison unit 601 and an update region extraction unit 602, and each update region set by the update region detection region setting unit 124. For each detection area, an update area that is a difference area between the reference frame after motion compensation and the current frame is detected. The pixel comparison unit 601 and the update region extraction unit 602 generally have the following functions.

画素比較手段601は、処理対象とする更新領域検出域毎に、動き補償後の参照フレームと現フレームとにおける同じ位置の画素の値の差分を、第1の閾値および第1の閾値よりも大きな値の第2の閾値と比較する機能を有する。   The pixel comparison unit 601 increases, for each update region detection area to be processed, a difference between pixel values at the same position in the reference frame after motion compensation and the current frame, which is larger than the first threshold value and the first threshold value. It has a function of comparing with a second threshold value.

更新領域抽出手段602は、処理対象とする更新領域検出域毎に、第1の閾値より大きな差分が検出された画素の塊のうち、第2の閾値より大きな差分が検出された画素を含む塊を更新領域として抽出する機能を有する。   The update area extraction unit 602 includes, for each update area detection area to be processed, a block including pixels in which a difference greater than the second threshold is detected among pixels in which a difference greater than the first threshold is detected. Is extracted as an update area.

次に本実施例の更新領域検出手段125の動作を説明する。   Next, the operation of the update area detection unit 125 of this embodiment will be described.

更新領域検出手段125は、更新領域検出域設定手段124が設定した更新領域検出域の情報を作業域113から読み出し、そのうちの1つの更新領域検出域に注目する(図7−2のステップS701)。次に、注目中の更新領域検出域から更新領域の抽出を行い、抽出結果を作業域113に保存する(ステップS702)。更新領域検出手段125は、1つの更新領域検出域からの更新領域の抽出処理を終えると、次の1つの更新領域検出域に注目を移し(ステップS703)、上述した処理と同様の処理を繰り返す。全ての更新領域検出域からの更新領域の抽出処理を終えると(ステップS704でYES)、図7−2の処理を終える。   The update area detection means 125 reads the update area detection area information set by the update area detection area setting means 124 from the work area 113 and pays attention to one of the update area detection areas (step S701 in FIG. 7-2). . Next, an update area is extracted from the update area detection area under attention, and the extraction result is stored in the work area 113 (step S702). When the update region detection unit 125 finishes the process of extracting the update region from one update region detection region, the update region detection unit 125 moves attention to the next one update region detection region (step S703), and repeats the same processing as described above. . When the update area extraction process from all the update area detection areas is completed (YES in step S704), the process of FIG.

次にステップS702で実行される処理について、図7−3のフローチャートを参照して詳細に説明する。   Next, the process executed in step S702 will be described in detail with reference to the flowchart of FIG.

まず更新領域検出手段125は、更新領域の抽出処理に使用する上端バッファ、下端バッファおよびフラグバッファの初期化を行う(ステップS711)。各バッファはフレームの各列に1対1に対応するエントリを有する。このうち、上端バッファは、第1の閾値より大きな差分が検出された最上位行の行番号を各列毎に保持するために使用し、下端バッファは、第1の閾値より大きな差分が検出された最下位行の行番号を各列毎に保持するために使用する。また、フラグバッファは、第2の閾値より大きな差分が検出されたか否かを示すフラグを各列毎に保持する。   First, the update area detection unit 125 initializes the upper end buffer, the lower end buffer, and the flag buffer used for the update area extraction processing (step S711). Each buffer has a one-to-one entry in each column of the frame. Among these, the upper end buffer is used to hold the row number of the highest row in which a difference larger than the first threshold is detected for each column, and the lower end buffer detects a difference larger than the first threshold. It is used to hold the row number of the lowest row for each column. The flag buffer holds a flag indicating whether or not a difference larger than the second threshold is detected for each column.

以降、更新領域検出手段125の画素比較手段601によって以下のような処理が実行される。   Thereafter, the following processing is executed by the pixel comparison unit 601 of the update region detection unit 125.

まず画素比較手段601は、動き補償後の参照フレームと現フレームとの更新領域検出域に含まれる複数の画素のペアのうち、先頭の画素のペアに注目する(S712)。例えば、図7−4に示すように、注目中の更新領域検出域がフレームの1行目から始まる場合、動き補償後の参照フレームの画素P(0,0)と現フレームの画素P(0,0)のペアに注目する。   First, the pixel comparison unit 601 pays attention to the first pixel pair among a plurality of pixel pairs included in the update region detection area of the reference frame after the motion compensation and the current frame (S712). For example, as shown in FIG. 7-4, when the update region detection area of interest starts from the first row of the frame, the pixel P (0, 0) of the reference frame after motion compensation and the pixel P (0 of the current frame) , 0).

次に画素比較手段601は、注目中の画素のペアの画素値の差分を計算する(ステップS713)。次に、差分を第1の閾値と比較し(ステップS714)、差分が第1の閾値より大きければ、上端バッファおよび下端バッファを更新する(ステップS715)。具体的には、上端バッファについては、注目中の画素が位置する列に対応する上端バッファのエントリがNULLであれば当該エントリに注目中の画素が位置する行の番号を記録し、NULLでなく既に行番号が記録されていればそのままにする。他方、下端バッファについては、注目中の画素が位置する列に対応する下端バッファのエントリに無条件に注目中の画素が位置する行の番号を記録する。   Next, the pixel comparison unit 601 calculates the difference between the pixel values of the pixel pair of interest (step S713). Next, the difference is compared with a first threshold (step S714), and if the difference is larger than the first threshold, the upper end buffer and the lower end buffer are updated (step S715). Specifically, for the upper end buffer, if the upper end buffer entry corresponding to the column in which the pixel of interest is located is NULL, the number of the row in which the pixel of interest is located is recorded in the entry, not NULL If the line number has already been recorded, leave it as it is. On the other hand, for the lower end buffer, the number of the row where the pixel of interest is unconditionally recorded is recorded in the entry of the lower end buffer corresponding to the column where the pixel of interest is located.

次に画素比較手段601は、差分を第2の閾値と比較し(ステップS716)、差分が第2の閾値より大きければ、フラグバッファを更新する(ステップS717)。具体的には、注目中の画素が位置する列に対応するフラグバッファのエントリに無条件に1を記録する。   Next, the pixel comparison unit 601 compares the difference with the second threshold (step S716), and updates the flag buffer if the difference is greater than the second threshold (step S717). Specifically, 1 is unconditionally recorded in the entry of the flag buffer corresponding to the column where the pixel of interest is located.

次に画素比較手段601は、双方のフレームにおける同じ行の次の列の画素のペアに注目を移し(ステップS718)、ステップS713に戻る。差分が第1の閾値より大きくない場合、上端バッファおよび下端バッファの更新は行わない。また、差分が第1の閾値より大きくても第2の閾値より大きくなければ、フラグバッファの更新は行わない。   Next, the pixel comparison unit 601 shifts attention to the pixel pair of the next column in the same row in both frames (step S718), and returns to step S713. If the difference is not greater than the first threshold, the upper end buffer and the lower end buffer are not updated. If the difference is greater than the first threshold but not greater than the second threshold, the flag buffer is not updated.

ここで、画素値の差分の計算は、例えばR、G、Bの各成分毎に行う。また、第1および第2の閾値との比較は、各成分の差分毎に行い、少なくとも1つの成分の差分が閾値より大きければ、画素値の差分が閾値より大きいと判定する。   Here, the calculation of the difference between the pixel values is performed for each of R, G, and B components, for example. The comparison with the first and second threshold values is performed for each component difference, and if the difference between at least one component is greater than the threshold value, it is determined that the pixel value difference is greater than the threshold value.

画素比較手段601は、注目中の更新領域検出域の1行分の画素のペアについての処理を終えると(ステップS719でYES)、処理の開始時点または更新領域抽出手段602を過去に呼び出していれば前回の呼び出し時点から第1の閾値より大きな差分が全く検出されなかった行の連続数、つまり非更新行の連続数をカウントし(ステップS720)、予め設定された閾値Lと比較する(ステップS721)。ここで、閾値Lは更新領域の過分割を避けるために1以上の値(例えば8)に設定される。若し、非更新行の連続数が閾値Lを超えていれば、更新領域抽出範囲の先頭行と最終行とを指定して、更新領域抽出手段602を呼び出し、列分割による更新領域の検出処理を行わせる(ステップS722)。更新領域の抽出範囲の先頭行は、更新領域抽出手段602を過去に呼び出していなければフレームの先頭行であり、呼び出していれば、前回の呼び出し時に指定した最終行の次の行である。また更新領域の抽出範囲の最終行は、現時点において最後の列の画素の処理を終えた行である。   When the pixel comparison unit 601 finishes the process for the pixel pair for one row in the update region detection area under attention (YES in step S719), the pixel comparison unit 601 has called the process start time or the update region extraction unit 602 in the past. For example, the number of consecutive rows in which no difference greater than the first threshold has been detected since the previous call, that is, the number of consecutive non-updated rows is counted (step S720) and compared with a preset threshold value L (step S720). S721). Here, the threshold value L is set to a value of 1 or more (for example, 8) in order to avoid excessive division of the update area. If the number of consecutive non-updated rows exceeds the threshold L, the update region extraction unit 602 is called by specifying the first row and the last row of the update region extraction range, and update region detection processing by column division is performed. (Step S722). If the update area extraction means 602 has not been called in the past, the first line of the update area extraction range is the first line of the frame, and if it has been called, it is the line following the last line specified at the previous call. In addition, the last row of the update area extraction range is a row that has been processed for the pixels in the last column at the present time.

画素比較手段601は、更新領域抽出手段602の処理が完了すると、フレームの次の行の先頭の画素のペアに注目を移し(ステップS723)、ステップS713に戻る。   When the process of the update region extraction unit 602 is completed, the pixel comparison unit 601 moves attention to the first pixel pair in the next row of the frame (step S723), and returns to step S713.

なお、画素比較手段601は、非更新行の連続数が閾値Lを超えていなければ、更新領域抽出手段602は呼び出さずに、フレームの次の行の先頭の画素のペアに注目を移し(ステップS723)、ステップS713に戻る。   If the number of consecutive non-updated rows does not exceed the threshold L, the pixel comparison unit 601 shifts attention to the first pixel pair in the next row of the frame without calling the update region extraction unit 602 (step S723), the process returns to step S713.

さらに、画素比較手段601は、注目中の更新領域検出域の最後の行の最後の画素のペアまで処理を終えると(ステップS724でYES)、処理の開始時点または更新領域抽出手段602を過去に呼び出していれば前回の呼び出し時点から後に第1の閾値より大きな差分が検出された行が存在したかどうかを判定し(ステップS725)、存在しなかった場合には図7−3の処理を終了し、存在した場合には、更新領域抽出範囲の先頭行と最終行とを指定して、更新領域抽出手段602を呼び出し(ステップS726)、列分割による更新領域の検出処理の完了後に図7−3の処理を終了する。更新領域の抽出範囲の先頭行は、更新領域抽出手段602を過去に呼び出していなければフレームの先頭行であり、呼び出していれば、前回の呼び出し時に指定した最終行の次の行である。また更新領域の抽出範囲の最終行はフレームの最終行である。   Further, when the pixel comparison unit 601 finishes the process until the last pixel pair in the last row of the update area detection area of interest (YES in step S724), the process start point or the update area extraction unit 602 is set in the past. If it is called, it is determined whether or not there is a row in which a difference greater than the first threshold is detected after the previous call time (step S725). If there is no row, the processing of FIG. If it exists, the first and last rows of the update area extraction range are designated, and the update area extraction means 602 is called (step S726). After the update area detection processing by column division is completed, FIG. The process of 3 is finished. If the update area extraction means 602 has not been called in the past, the first line of the update area extraction range is the first line of the frame, and if it has been called, it is the line following the last line specified at the previous call. The last row of the update area extraction range is the last row of the frame.

図7−4の上側に描いたマトリクスは、動き補償後の参照フレームと現フレームとの差分状況の一例を示しており、1つの枡目が1つの画素のペアの差分状況を示す。また、空白の枡目は差分が第1の閾値よりも小さいことを、ハッチングを施した枡目は差分が第1の閾値より大きく第2の閾値より小さいことを、黒く塗りつぶした枡目は差分が第2の閾値より大きいことをそれぞれ示す。このような状況の下に、フレームの9行目までの範囲について画素比較手段601で上述したような動作が行われると、上端バッファ、下端バッファおよびフラグバッファには、図7−4の下側に示すような内容が記録される。ここで、上端バッファおよび下端バッファ中の数値は行の番号を示し、記号「−」はNULLを示す。また、フラグバッファ中の0、1はフラグの値を示し、第2の閾値を超えたことは値1で示される。そして、上記閾値Lを例えば3行とすると、9行目までの処理を終えた時点で非更新行の連続数が4となり、閾値Lを超えるので、更新領域抽出手段602が呼び出されることになる。   The matrix drawn on the upper side of FIG. 7-4 shows an example of the difference situation between the reference frame after motion compensation and the current frame, and one square shows the difference situation of one pixel pair. In addition, a blank cell has a difference smaller than the first threshold, a hatched cell has a difference larger than the first threshold and smaller than the second threshold, and a black cell has a difference. Indicates that it is greater than the second threshold. Under such circumstances, when the above-described operation is performed by the pixel comparison unit 601 for the range up to the ninth line of the frame, the upper end buffer, the lower end buffer, and the flag buffer include the lower side of FIG. The contents shown in Fig. 6 are recorded. Here, the numerical values in the upper end buffer and the lower end buffer indicate row numbers, and the symbol “-” indicates NULL. Further, 0 and 1 in the flag buffer indicate flag values, and a value 1 indicates that the second threshold value has been exceeded. If the threshold L is, for example, 3 rows, the number of consecutive non-updated rows becomes 4 when the processing up to the 9th row is finished, and exceeds the threshold L, so the update region extraction means 602 is called. .

次に、更新領域抽出手段602が実行する列分割による更新領域の検出処理について、図7−5のフローチャートを参照して説明する。   Next, update area detection processing by column division executed by the update area extraction unit 602 will be described with reference to the flowchart of FIG.

更新領域抽出手段602は、上端バッファまたは下端バッファを参照して、今回の呼び出しで指定された更新領域抽出範囲から更新列(差分画素が存在した列のまとまり)と非更新列(差分画素が存在しなかった列のまとまり)を抽出する(ステップS731)。例えば図7−4の場合、上端バッファのエントリを列0から順に参照すると、NULLが1つ連続しているので、0列を非更新列(0−0)として抽出し、次に数値が記録されたエントリが5つ連続しているので、1列から5列までを更新列(1−5)として抽出する。以下同様に、非更新列(6−7)、更新列(8−9)、非更新列(10−14)、更新列(15−16)等を抽出する。   The update region extraction unit 602 refers to the upper end buffer or the lower end buffer, and updates columns (a group of columns in which difference pixels exist) and non-update columns (difference pixels exist) from the update region extraction range specified in the current call. A group of columns that have not been performed is extracted (step S731). For example, in the case of FIG. 7-4, when referring to the entries in the upper end buffer in order from column 0, since one NULL is consecutive, 0 column is extracted as a non-update column (0-0), and then a numerical value is recorded. Since there are five consecutive entries, the first column to the fifth column are extracted as the update column (1-5). Similarly, the non-update column (6-7), the update column (8-9), the non-update column (10-14), the update column (15-16), and the like are extracted.

次に更新領域抽出手段602は、更新領域の過分割を避けるために、所定列数W以下の非更新列を間にして互いに隣接する更新列を1つの更新列に結合する(ステップS732)。例えば、Wを3とすると、図7−4の場合、更新列(1−5)と更新列(8−9)は更新列(1−9)として結合される。   Next, the update region extraction unit 602 combines adjacent update columns into one update column with non-update columns having a predetermined number W or less in order to avoid excessive division of the update region (step S732). For example, when W is 3, in the case of FIG. 7-4, the update sequence (1-5) and the update sequence (8-9) are combined as the update sequence (1-9).

次に更新領域抽出手段602は、フラグバッファを参照して、フラグの値が全て0の更新列を非更新列に変更する(ステップS733)。例えば図7−4の場合、結合後の更新列(1−9)についてフラグバッファ中の列1〜列9に対応するフラグを参照すると、値1が含まれているので、更新列(1−9)はそのままとする。他方、更新列(15−16)についてフラグバッファ中の列15−16に対応するフラグを参照すると、すべて値0なので、更新列(15−16)はノイズによって生じた可能性が高いと判断して非更新列に変更される。   Next, the update area extraction unit 602 refers to the flag buffer and changes the update sequence in which the flag values are all 0 to a non-update sequence (step S733). For example, in the case of FIG. 7-4, referring to the flags corresponding to the columns 1 to 9 in the flag buffer with respect to the combined update column (1-9), the value 1 is included. 9) is left as it is. On the other hand, referring to the flag corresponding to the column 15-16 in the flag buffer with respect to the update column (15-16), since all values are 0, it is determined that the update column (15-16) is likely to be caused by noise. Changed to a non-updated column.

次に更新領域抽出手段602は、各更新列毎に、差分画素が発生する最上端と最下端の行を調べ、その更新列の左端と右端と合わせて、更新領域を定める更新矩形を確定する(ステップS734)。この処理により、更新列(1−9)については、上端バッファを参照すると最上端は2、下端バッファを参照すると最下端は5、その更新列の左端は1、右端は9なので、更新矩形を左上および右下の端点で規定する場合、左上端点(2,1)、右下端点(5,9)として求められる。こうして求められた更新領域の情報(更新矩形の座標)は、更新領域検出結果の一部として作業域113に記録される。   Next, the update area extraction unit 602 examines the uppermost and lowermost rows in which the difference pixels are generated for each update column, and determines the update rectangle that defines the update area, together with the left and right ends of the update column. (Step S734). With this processing, for the update sequence (1-9), the uppermost buffer is 2 when referring to the upper end buffer, the lowermost end is 5 when referring to the lower end buffer, the left end of the update sequence is 1 and the right end is 9, so the update rectangle is When defined by the upper left and lower right end points, the upper left end point (2, 1) and the lower right end point (5, 9) are obtained. The information of the update area thus obtained (coordinates of the update rectangle) is recorded in the work area 113 as a part of the update area detection result.

次に更新領域抽出手段602は、上端バッファ、下端バッファおよびフラグバッファの初期化を行い(ステップS735)、図7−5の処理を終了する。なお、図7−5の処理では、所定列数W以下の非更新列を間にして互いに隣接する更新列を1つの更新列に結合した後、第2の閾値を超える画素が存在しない更新列を非更新列に変更したが、それとは逆に、第2の閾値を超える画素が存在しない更新列を非更新列に変更した後、所定列数W以下の非更新列を間にして互いに隣接する更新列を1つの更新列に結合する処理を行うようにしても良い。   Next, the update area extraction unit 602 initializes the upper end buffer, the lower end buffer, and the flag buffer (step S735), and ends the processing of FIG. 7-5. In the processing of FIG. 7-5, an update column in which there are no pixels exceeding the second threshold after combining update columns adjacent to each other with a non-update column having a predetermined number of columns W or less in between. Is changed to a non-updated column, but on the contrary, an update column in which no pixel exceeding the second threshold exists is changed to a non-update column, and then adjacent to each other with a non-update column having a predetermined number W or less in between. It is also possible to perform processing for combining the update columns to be combined into one update column.

次に本実施例の更新領域検出手段125の効果を説明する。   Next, the effect of the update area detection unit 125 of this embodiment will be described.

本実施例の更新領域検出手段125によれば、アナログキャプチャされたコンピュータ画面の更新領域を精度良く検出することができる。その理由は、第1の閾値とそれより大きな第2の閾値との2種類の閾値を使用し、第1の閾値より大きな差分が検出された画素の塊のうち、第2の閾値より大きな差分が検出された画素を含む塊を更新領域として抽出するため、第1の閾値だけを使用して更新領域を検出した場合に起こり易い更新領域の過度検出が防止でき、かつ、第2の閾値だけを使用して更新領域を検出した場合に起こり易い更新領域の検出不足が防止できるためである。   According to the update area detection means 125 of the present embodiment, the update area of the computer screen captured in analog can be detected with high accuracy. The reason is that, using two types of threshold values, a first threshold value and a second threshold value larger than the first threshold value, a difference larger than the second threshold value among the pixel clusters in which a difference larger than the first threshold value is detected. In order to extract a block including pixels in which an update is detected as an update region, it is possible to prevent excessive detection of an update region that is likely to occur when the update region is detected using only the first threshold, and only the second threshold is used. This is because it is possible to prevent insufficient detection of the update area, which is likely to occur when the update area is detected using.

具体的には、例えば動画などのグラデーション部に画素変化があった場合、単一の画素値の変化量だけを参照しても、画素が描画更新されたのか、アナログキャプチャに伴うノイズによる画素値変動なのかを識別することは難しい。こうした理由から単一の閾値では、動画において更新領域の検出に失敗する場合があった。例えば、画面中央の動画ウィンドウのみが前後フレーム1、2で更新されている図7−6に示す実験例では、更新領域として中央の動画ウィンドウ全体が検出されることが望ましい。しかし、小さな値の閾値だけを使用すると、図7−6の左下に示すように検出領域が過大となり、逆に大きな値の閾値だけを使用すると、図7−6の右下に示すように検出領域が不足した。検出が過大になると、画面更新が僅かな場合にも符号量が増大してしまう。また、検出漏れが複数フレームにわたって発生すると、検出に成功した領域と検出漏れした領域との間で、輝度不連続な境界が知覚されるようになる。   Specifically, for example, when there is a pixel change in a gradation part such as a moving image, even if only the change amount of a single pixel value is referred to, whether the pixel has been redrawn or the pixel value due to noise accompanying analog capture It is difficult to identify whether this is a change. For these reasons, the detection of the update area in the moving image may fail with a single threshold value. For example, in the experimental example shown in FIG. 7-6 in which only the moving image window at the center of the screen is updated in the front and rear frames 1 and 2, it is desirable that the entire moving image window at the center is detected as the update region. However, if only a small threshold value is used, the detection area becomes excessive as shown in the lower left of FIG. 7-6. Conversely, if only a large value threshold is used, detection is performed as shown in the lower right of FIG. 7-6. Insufficient space. If the detection becomes excessive, the amount of code increases even when the screen update is slight. Further, when a detection failure occurs over a plurality of frames, a boundary with a discontinuous luminance is perceived between a region where detection is successful and a region where detection is lost.

これに対して、差分判定用の閾値を2種類(大と小)設定した本実施例の更新領域検出手段125によれば、図7−7の実験例に示すように、中央の動画ウィンドウ全体を過不足なく更新領域として検出することができた。   On the other hand, according to the update region detection means 125 of the present embodiment in which two types of threshold values for difference determination (large and small) are set, as shown in the experimental example of FIG. Can be detected as an update area without excess or deficiency.

また本実施例の更新領域検出手段125によれば、更新領域検出域内に存在する全ての更新領域に外接する1つの矩形で更新領域を検出する手法に較べて、更新領域を無駄に大きく検出することを防止できる。   In addition, according to the update area detection unit 125 of the present embodiment, the update area is detected unnecessarily large as compared with the method of detecting the update area with one rectangle circumscribing all the update areas existing in the update area detection area. Can be prevented.

また本実施例の更新領域検出手段125によれば、コンピュータ画面の更新領域を高速に検出することができる。その理由は、フレームの各列について差分画素の上端および下端の座標を保持する上端および下端バッファと、参照フレームと現フレームの画素をラスタスキャン順に比較して、差分が第1の閾値以上となる画素が見つかったら上端および下端バッファの該当列の上端および下端の座標を書き換える画素比較手段601と、非更新行が所定行連続したら上端および下端バッファを参照して更新領域を確定する更新領域抽出手段602とを備えており、いわゆる1パス処理で更新領域の検出が行えるためである。   Further, according to the update area detection means 125 of the present embodiment, the update area of the computer screen can be detected at high speed. The reason is that the top and bottom buffers that hold the coordinates of the top and bottom edges of the difference pixels for each column of the frame, and the pixels of the reference frame and the current frame are compared in raster scan order, and the difference is greater than or equal to the first threshold. A pixel comparison unit 601 that rewrites the coordinates of the upper and lower ends of the corresponding column in the upper and lower end buffers when a pixel is found, and an update region extraction unit that determines an update region with reference to the upper and lower end buffers when a predetermined number of non-updated rows continue. This is because the update area can be detected by so-called one-pass processing.

本発明の実施の形態に係る映像信号符号化装置のブロック図である。1 is a block diagram of a video signal encoding device according to an embodiment of the present invention. 本発明の実施の形態に係る映像信号符号化装置の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the video signal encoding apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る映像信号符号化装置による映像信号の符号化処理の説明図である。It is explanatory drawing of the encoding process of the video signal by the video signal encoding apparatus which concerns on embodiment of this invention. 移動ベクトル検出手段の第1の実施例のブロック図である。It is a block diagram of the 1st Example of a movement vector detection means. 第1の実施例に係る移動ベクトル検出手段の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the movement vector detection means based on a 1st Example. 第1の実施例に係る移動ベクトル検出手段におけるエッジ抽出処理の説明図である。It is explanatory drawing of the edge extraction process in the movement vector detection means based on a 1st Example. 第1の実施例に係る移動ベクトル検出手段で使用する現フレームのハッシュテーブルの一例を示す図である。It is a figure which shows an example of the hash table of the present frame used with the movement vector detection means based on 1st Example. 第1の実施例に係る移動ベクトル検出手段で使用する前フレームのハッシュテーブルの一例を示す図である。It is a figure which shows an example of the hash table of the previous frame used with the movement vector detection means based on 1st Example. 第1の実施例に係る移動ベクトル検出手段の検出結果の一例を示す図である。It is a figure which shows an example of the detection result of the movement vector detection means based on a 1st Example. 第1の実施例に係る移動ベクトル検出手段で検出された最頻出の移動ベクトル候補のリストに含まれる特徴点のペアを前フレームおよび現フレームにプロットしたイメージと、推定された移動ベクトルとの関係を示す図である。Relationship between an image obtained by plotting a pair of feature points included in a list of most frequent movement vector candidates detected by the movement vector detection unit according to the first embodiment in the previous frame and the current frame, and the estimated movement vector FIG. 移動領域検出手段の第1の実施例のブロック図である。It is a block diagram of the 1st Example of a movement area | region detection means. 第1の実施例に係る移動領域検出手段の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the movement area | region detection means based on a 1st Example. 第1の実施例に係る移動領域検出手段において特徴点群に外接する矩形を移動領域とする例を示す図である。It is a figure which shows the example which makes the rectangle which circumscribes the feature point group into a movement area in the movement area detection means based on 1st Example. 第1の実施例に係る移動領域検出手段における移動領域決定手段の第1の処理例を示すフローチャートである。It is a flowchart which shows the 1st process example of the movement area determination means in the movement area detection means which concerns on a 1st Example. 第1の実施例に係る移動領域検出手段において移動領域の右への拡大幅の決定する方法の説明図である。It is explanatory drawing of the method of determining the expansion width to the right of a movement area in the movement area detection means based on a 1st Example. 第1の実施例に係る移動領域検出手段における移動領域決定手段の第2の処理例を示すフローチャートである。It is a flowchart which shows the 2nd process example of the movement area determination means in the movement area detection means which concerns on a 1st Example. 第1の実施例に係る移動領域検出手段において移動領域の右からの縮小幅の決定する方法の説明図である。It is explanatory drawing of the method of determining the reduction width from the right of a movement area in the movement area detection means based on a 1st Example. 第1の実施例に係る移動領域検出手段における移動領域決定手段の第3の処理例を示すフローチャートである。It is a flowchart which shows the 3rd processing example of the movement area | region determination means in the movement area detection means based on 1st Example. 第1の実施例に係る移動領域検出手段における移動領域決定手段の第4の処理例を示すフローチャートである。It is a flowchart which shows the 4th example of a process of the movement area determination means in the movement area detection means based on 1st Example. 更新領域検出域設定手段の第1の実施例のブロック図である。It is a block diagram of the 1st Example of the update area detection area setting means. 第1の実施例に係る更新領域検出域設定手段の第1の処理例を示すフローチャートである。It is a flowchart which shows the 1st process example of the update area | region detection area setting means based on a 1st Example. 第1の実施例に係る更新領域検出域設定手段の第1の処理例による効果の説明図である。It is explanatory drawing of the effect by the 1st process example of the update area | region detection area setting means which concerns on a 1st Example. 第1の実施例に係る更新領域検出域設定手段の第2の処理例を示すフローチャートである。It is a flowchart which shows the 2nd process example of the update area | region detection area setting means based on a 1st Example. 第1の実施例に係る更新領域検出域設定手段の第2の処理例による効果の説明図である。It is explanatory drawing of the effect by the 2nd process example of the update area | region detection area setting means which concerns on a 1st Example. 第1の実施例に係る更新領域検出域設定手段の第2の処理例による効果の説明図である。It is explanatory drawing of the effect by the 2nd process example of the update area | region detection area setting means which concerns on a 1st Example. 第1の実施例に係る更新領域検出域設定手段の第3の処理例を示すフローチャートである。It is a flowchart which shows the 3rd processing example of the update area | region detection area setting means which concerns on a 1st Example. 第1の実施例に係る更新領域検出域設定手段の第3の処理例による効果の説明図である。It is explanatory drawing of the effect by the 3rd process example of the update area | region detection area setting means which concerns on a 1st Example. 第1の実施例に係る更新領域検出域設定手段の第3の処理例による効果の説明図である。It is explanatory drawing of the effect by the 3rd process example of the update area | region detection area setting means which concerns on a 1st Example. 第1の実施例に係る更新領域検出域設定手段の第3の処理例による効果の説明図である。It is explanatory drawing of the effect by the 3rd process example of the update area | region detection area setting means which concerns on a 1st Example. 更新領域検出域設定手段の第2の実施例のブロック図である。It is a block diagram of 2nd Example of an update area detection area setting means. 第2の実施例に係る更新領域検出域設定手段の処理例を示すフローチャートである。It is a flowchart which shows the process example of the update area | region detection area setting means which concerns on a 2nd Example. 更新領域検出手段の第1の実施例のブロック図である。It is a block diagram of the 1st Example of an update area | region detection means. 第1の実施例に係る更新領域検出手段の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of the update area | region detection means based on a 1st Example. 第1の実施例に係る更新領域検出手段における画素比較手段による処理例をを示すフローチャートである。It is a flowchart which shows the process example by the pixel comparison means in the update area | region detection means which concerns on a 1st Example. 第1の実施例に係る更新領域検出手段で使用する上端バッファ、下端バッファおよびフラグバッファが、動き補償後の参照フレームと現フレームとの差分状況に応じて更新される例を示す図である。It is a figure which shows the example in which the upper end buffer, lower end buffer, and flag buffer used with the update area | region detection means based on 1st Example are updated according to the difference condition of the reference frame after motion compensation, and the present frame. 第1の実施例に係る更新領域検出手段における更新領域抽出手段による処理例を示すフローチャートである。It is a flowchart which shows the process example by the update area extraction means in the update area detection means based on 1st Example. 単一の閾値による更新領域検出の実験例を示す図である。It is a figure which shows the experimental example of the update area detection by a single threshold value. 第1の実施例に係る更新領域検出手段による更新領域検出の実験例を示す図である。It is a figure which shows the experiment example of the update area detection by the update area detection means which concerns on a 1st Example.

符号の説明Explanation of symbols

101…画像入力装置
102…データ記憶装置
103…データ処理装置
104…符号出力装置
111…符号化対象フレーム記憶部
112…参照フレーム記憶部
113…作業域
121…移動ベクトル検出手段
122…移動領域検出手段
123…動き補償手段
124…更新領域検出域設定手段
125…更新領域検出手段
126…領域符号化手段
DESCRIPTION OF SYMBOLS 101 ... Image input device 102 ... Data storage device 103 ... Data processing device 104 ... Code output device 111 ... Encoding object frame storage unit 112 ... Reference frame storage unit 113 ... Work area 121 ... Movement vector detection means 122 ... Movement area detection means 123... Motion compensation means 124... Update area detection area setting means 125... Update area detection means 126.

Claims (25)

前フレームと現フレームの何れにも存在する同一または類似の画像領域であって画面上での位置が変化している画像領域を移動領域として検出する移動領域検出手段と、
該移動領域検出手段で検出された移動領域を前フレーム上で移動後の位置に複写する動き補償手段と、
前記移動領域検出手段で検出された移動領域の移動方向を判定し、該判定した移動方向が画面の上から下へ向かう成分を含む場合には移動後の移動領域の上に加えて更に、移動前の移動領域の下端により画面を分割し、前記判定した移動方向が画面の下から上へ向かう成分を含む場合には移動後の移動領域の下端に加えて更に、移動前の移動領域の上端により画面を分割し、各々の分割領域を、更新領域を検出する処理の単位となる更新領域検出域に設定する更新領域検出域設定手段と、
該更新領域検出域設定手段により設定された更新領域検出域毎に、前記複写後の前フレームと現フレームとが相違する領域を更新領域として検出する更新領域検出手段とを備えることを特徴とする更新領域検出装置。
A moving area detecting means for detecting, as a moving area, an image area which is the same or similar image area existing in both the previous frame and the current frame and whose position on the screen is changed;
Motion compensation means for copying the movement area detected by the movement area detection means to a position after movement on the previous frame;
The mobile determines the moving direction of the detected moving region in the region detection means, in addition to the lower end on the moving region after movement when the movement direction which is the determination comprises a component directed from top to bottom of the screen the screen is divided by the lower end of the moving region before movement, when said determined movement direction includes a component directed from the bottom to the top of the screen in addition to the upper and lower ends of the moving region after movement, the movement before movement An update area detection area setting means for dividing the screen by the upper end of the area and setting each of the divided areas as an update area detection area that is a unit of processing for detecting the update area;
Update area detection means for detecting, as an update area, an area where the previous frame after copying is different from the current frame for each update area detection area set by the update area detection area setting means. Update area detection device.
前記更新領域検出域設定手段は、前記移動領域検出手段で検出された移動前後の移動領域の重なりの可能性の有無を判定し、重なりの可能性がないと判定した場合は前記分割を行わずに画面全体を更新領域検出域に設定することを特徴とする請求項1に記載の更新領域検出装置。 The update area detection area setting means determines whether or not the movement areas before and after the movement detected by the movement area detection means overlap, and does not perform the division when it is determined that there is no possibility of overlap. The update area detection apparatus according to claim 1, wherein the entire screen is set as an update area detection area. 前記更新領域検出域設定手段は、前記移動領域検出手段で移動領域が検出されたか否かを判定し、移動領域が検出されなかった場合は前記分割を行わずに画面全体を更新領域検出域に設定することを特徴とする請求項1または2に記載の更新領域検出装置。 The update area detection area setting means determines whether or not a movement area is detected by the movement area detection means. If no movement area is detected, the entire screen is set as an update area detection area without performing the division. setting update region detection device according to claim 1 or 2, characterized in that. 前記更新領域検出手段は、前フレームと現フレームとにおける同じ位置の画素の画素値を比較し、画素値に差分のある画素の塊を更新領域として検出することを特徴とする請求項1乃至の何れか1項に記載の更新領域検出装置。 The update area detection means compares the pixel values of pixels at the same position in the previous frame and the current frame, according to claim 1, wherein detecting the cluster of pixels with a difference in pixel value as an update region The update area | region detection apparatus of any one of these. 前記更新領域検出手段は、前記画素の塊に外接する矩形を更新領域とすることを特徴とする請求項に記載の更新領域検出装置。 The update area detection apparatus according to claim 4 , wherein the update area detection unit uses a rectangle circumscribing the block of pixels as an update area. 前記更新領域検出手段は、前フレームと現フレームの画素を1行ずつ順に比較して、各列毎に、第1の閾値より大きな差分が検出された上端の行座標と下端の行座標を記録すると共に当該上端と当該下端の間で第2の閾値より大きな差分が検出された画素が存在したか否かを記録し、第1の閾値より大きな差分が検出されなかった行が所定行数連続した時点で、前記記録を参照して、第1の閾値より大きな差分が検出された列のまとまりであって第2の閾値より大きな差分が検出された画素を含む更新列を抽出し、該抽出した更新列毎に、第1の閾値より大きな差分が検出された最上端の行座標と最下端の行座標、および当該更新列の左端の列座標と右端の列座標とから規定される矩形を更新領域として確定する処理を行うことを特徴とする請求項またはに記載の更新領域検出装置。 The update area detection means sequentially compares the pixels of the previous frame and the current frame one row at a time, and records, for each column, the upper row coordinates and the lower row coordinates where a difference larger than the first threshold is detected. In addition, it is recorded whether or not there is a pixel in which a difference greater than the second threshold is detected between the upper end and the lower end, and a row in which a difference greater than the first threshold is not detected continues for a predetermined number of rows. At that time, referring to the record, an update column including a group of columns in which a difference greater than the first threshold is detected and including a pixel in which a difference greater than the second threshold is detected is extracted and extracted. For each updated column, a rectangle defined by the uppermost row coordinate and the lowermost row coordinate where a difference larger than the first threshold is detected, and the leftmost column coordinate and the rightmost column coordinate of the updated column is defined. It is characterized by performing the process of confirming as an update area Update region detection device according to Motomeko 4 or 5. 第1の閾値より大きな差分が検出された列のまとまりとは、第1の閾値より大きな差分が検出された列が隣接しているか、直接隣接していなくても、第1の閾値より大きな差分が検出されなかった所定数以下の列を間にして隣接している列のまとまりであることを特徴とする請求項に記載の更新領域検出装置。 A group of columns in which a difference greater than the first threshold is detected is a difference greater than the first threshold even if columns in which a difference greater than the first threshold is detected are adjacent or not directly adjacent to each other. 7. The update region detection apparatus according to claim 6 , wherein the update region detection apparatus is a group of columns adjacent to each other with a predetermined number of columns not detected. 第1の閾値より大きな差分が検出された行座標を各列毎に保持するための上端バッファと、第1の閾値より大きな差分が検出された行座標を各列毎に保持するための下端バッファと、第2の閾値より大きな差分が検出されたか否かを示すフラグを各列毎に保持するフラグバッファとを備え、
前記更新領域検出手段は、前フレームと現フレームの画素をスキャン順に比較して、差分が第1の閾値より大きい画素が見つかったら前記上端バッファおよび前記下端バッファにおける該当列の行座標を書き換えると共に、前記差分が第2の閾値より大きければ前記フラグバッファの該当列のフラグをセットし、第1の閾値より大きな差分が検出されなかった行が所定行連続した時点で、前記上端バッファ、前記下端バッファおよび前記フラグバッファを参照して更新領域を確定する前記処理を行うことを特徴とする請求項に記載の更新領域検出装置。
An upper end buffer for holding, for each column, row coordinates in which a difference greater than the first threshold is detected, and a lower end buffer for holding, in each column, row coordinates in which a difference greater than the first threshold is detected And a flag buffer that holds a flag indicating whether or not a difference larger than the second threshold is detected for each column,
The update region detection means compares the pixels of the previous frame and the current frame in the scan order, and when a pixel whose difference is larger than the first threshold is found, rewrites the row coordinates of the corresponding column in the upper end buffer and the lower end buffer, If the difference is larger than the second threshold, the flag in the corresponding column of the flag buffer is set, and the upper end buffer and the lower end buffer are set when a predetermined number of consecutive rows have not been detected. The update area detection apparatus according to claim 7 , wherein the process of determining an update area is performed with reference to the flag buffer.
a)移動領域検出手段が、前フレームと現フレームの何れにも存在する同一または類似の画像領域であって画面上での位置が変化している画像領域を移動領域として検出するステップと、
b)動き補償手段が、前記移動領域検出手段で検出された移動領域を前フレーム上で移動後の位置に複写するステップと、
c)更新領域検出域設定手段が、前記移動領域検出手段で検出された移動領域の移動方向を判定し、該判定した移動方向が画面の上から下へ向かう成分を含む場合には移動後の移動領域の上に加えて更に、移動前の移動領域の下端により画面を分割し、前記判定した移動方向が画面の下から上へ向かう成分を含む場合には移動後の移動領域の下端に加えて更に、移動前の移動領域の上端により画面を分割し、各々の分割領域を、更新領域を検出する処理の単位となる更新領域検出域に設定するステップと、
d)更新領域検出手段が、前記更新領域検出域設定手段により設定された更新領域検出域毎に、前記複写後の前フレームと現フレームとが相違する領域を更新領域として検出するステップとを含むことを特徴とする更新領域検出方法。
a) a moving area detecting means detecting, as a moving area, an image area which is the same or similar image area existing in both the previous frame and the current frame and whose position on the screen is changed;
b) the motion compensation means copying the movement area detected by the movement area detection means to the position after movement on the previous frame;
c) The update area detection area setting means determines the movement direction of the movement area detected by the movement area detection means, and if the determined movement direction includes a component from the top to the bottom of the screen, in addition to the lower end on the moving area, the screen is divided by the lower end of the movement region before the movement, the determined movement direction on the moving region after movement in the case of including a component directed from the bottom to the top of the screen In addition to the lower end , further dividing the screen by the upper end of the moving area before moving, and setting each divided area as an update area detection area that is a unit of processing for detecting the update area;
d) an update area detecting unit detecting, for each update area detection area set by the update area detection area setting unit, an area where the previous frame after copying is different from the current frame as an update area; An update area detection method characterized by the above.
前記更新領域検出域設定手段は、前記移動領域検出手段で検出された移動前後の移動領域の重なりの可能性の有無を判定し、重なりの可能性がないと判定した場合は前記分割を行わずに画面全体を更新領域検出域に設定することを特徴とする請求項の何れか1項に記載の更新領域検出方法。 The update area detection area setting means determines whether or not the movement areas before and after the movement detected by the movement area detection means overlap, and does not perform the division when it is determined that there is no possibility of overlap. The update area detection method according to claim 9 , wherein the entire screen is set as an update area detection area. 前記更新領域検出域設定手段は、前記移動領域検出手段で移動領域が検出されたか否かを判定し、移動領域が検出されなかった場合は前記分割を行わずに画面全体を更新領域検出域に設定することを特徴とする請求項9または10に記載の更新領域検出方法。 The update area detection area setting means determines whether or not a movement area is detected by the movement area detection means. If no movement area is detected, the entire screen is set as an update area detection area without performing the division. The update area detection method according to claim 9, wherein the update area detection method is set. 前記更新領域検出手段は、前フレームと現フレームとにおける同じ位置の画素の画素値を比較し、画素値に差分のある画素の塊を更新領域として検出することを特徴とする請求項乃至11の何れか1項に記載の更新領域検出方法。 The update area detection means compares the pixel values of pixels at the same position in the previous frame and the current frame, according to claim 9 or 11, characterized in that detecting the cluster of pixels with a difference in pixel value as an update region The update area | region detection method of any one of these. 前記更新領域検出手段は、前記画素の塊に外接する矩形を更新領域とすることを特徴とする請求項12に記載の更新領域検出方法。 13. The update area detection method according to claim 12 , wherein the update area detection means sets a rectangle circumscribing the pixel block as an update area. 前記更新領域検出手段は、前フレームと現フレームの画素を1行ずつ順に比較して、各列毎に、第1の閾値より大きな差分が検出された上端の行座標と下端の行座標を記録すると共に当該上端と当該下端の間で第2の閾値より大きな差分が検出された画素が存在したか否かを記録し、第1の閾値より大きな差分が検出されなかった行が所定行数連続した時点で、前記記録を参照して、第1の閾値より大きな差分が検出された列のまとまりであって第2の閾値より大きな差分が検出された画素を含む更新列を抽出し、該抽出した更新列毎に、第1の閾値より大きな差分が検出された最上端の行座標と最下端の行座標、および当該更新列の左端の列座標と右端の列座標とから規定される矩形を更新領域として確定する処理を行うことを特徴とする請求項12または13に記載の更新領域検出方法。 The update area detection means sequentially compares the pixels of the previous frame and the current frame one row at a time, and records, for each column, the upper row coordinates and the lower row coordinates where a difference larger than the first threshold is detected. In addition, it is recorded whether or not there is a pixel in which a difference greater than the second threshold is detected between the upper end and the lower end, and a row in which a difference greater than the first threshold is not detected continues for a predetermined number of rows. At that time, referring to the record, an update column including a group of columns in which a difference greater than the first threshold is detected and including a pixel in which a difference greater than the second threshold is detected is extracted and extracted. For each updated column, a rectangle defined by the uppermost row coordinate and the lowermost row coordinate where a difference larger than the first threshold is detected, and the leftmost column coordinate and the rightmost column coordinate of the updated column is defined. It is characterized by performing the process of confirming as an update area Update region detection method according to Motomeko 12 or 13. 第1の閾値より大きな差分が検出された列のまとまりとは、第1の閾値より大きな差分が検出された列が隣接しているか、直接隣接していなくても、第1の閾値より大きな差分が検出されなかった所定数以下の列を間にして隣接している列のまとまりであることを特徴とする請求項14に記載の更新領域検出方法。 A group of columns in which a difference greater than the first threshold is detected is a difference greater than the first threshold even if columns in which a difference greater than the first threshold is detected are adjacent or not directly adjacent to each other. 15. The update region detection method according to claim 14 , wherein the update region detection method is a group of columns adjacent to each other with a predetermined number of columns not detected. 第1の閾値より大きな差分が検出された行座標を各列毎に保持するための上端バッファと、第1の閾値より大きな差分が検出された行座標を各列毎に保持するための下端バッファと、第2の閾値より大きな差分が検出されたか否かを示すフラグを各列毎に保持するフラグバッファとを備え、
前記更新領域検出手段は、前フレームと現フレームの画素をスキャン順に比較して、差分が第1の閾値より大きい画素が見つかったら前記上端バッファおよび前記下端バッファにおける該当列の行座標を書き換えると共に、前記差分が第2の閾値より大きければ前記フラグバッファの該当列のフラグをセットし、第1の閾値より大きな差分が検出されなかった行が所定行連続した時点で、前記上端バッファ、前記下端バッファおよび前記フラグバッファを参照して更新領域を確定する前記処理を行うことを特徴とする請求項15に記載の更新領域検出方法。
An upper end buffer for holding, for each column, row coordinates in which a difference greater than the first threshold is detected, and a lower end buffer for holding, in each column, row coordinates in which a difference greater than the first threshold is detected And a flag buffer that holds a flag indicating whether or not a difference larger than the second threshold is detected for each column,
The update region detection means compares the pixels of the previous frame and the current frame in the scan order, and when a pixel whose difference is larger than the first threshold is found, rewrites the row coordinates of the corresponding column in the upper end buffer and the lower end buffer, If the difference is larger than the second threshold, the flag in the corresponding column of the flag buffer is set, and the upper end buffer and the lower end buffer are set when a predetermined number of consecutive rows have not been detected. The update area detection method according to claim 15 , wherein the process of determining an update area is performed with reference to the flag buffer.
コンピュータを、
前フレームと現フレームの何れにも存在する同一または類似の画像領域であって画面上での位置が変化している画像領域を移動領域として検出する移動領域検出手段と、
該移動領域検出手段で検出された移動領域を前フレーム上で移動後の位置に複写する動き補償手段と、
前記移動領域検出手段で検出された移動領域の移動方向を判定し、該判定した移動方向が画面の上から下へ向かう成分を含む場合には移動後の移動領域の上に加えて更に、移動前の移動領域の下端により画面を分割し、前記判定した移動方向が画面の下から上へ向かう成分を含む場合には移動後の移動領域の下端に加えて更に、移動前の移動領域の上端により画面を分割し、各々の分割領域を、更新領域を検出する処理の単位となる更新領域検出域に設定する更新領域検出域設定手段と、
該更新領域検出域設定手段により設定された更新領域検出域毎に、前記複写後の前フレームと現フレームとが相違する領域を更新領域として検出する更新領域検出手段として機能させるための更新領域検出プログラム。
Computer
A moving area detecting means for detecting, as a moving area, an image area which is the same or similar image area existing in both the previous frame and the current frame and whose position on the screen is changed;
Motion compensation means for copying the movement area detected by the movement area detection means to a position after movement on the previous frame;
The mobile determines the moving direction of the detected moving region in the region detection means, in addition to the lower end on the moving region after movement when the movement direction which is the determination comprises a component directed from top to bottom of the screen the screen is divided by the lower end of the moving region before movement, when said determined movement direction includes a component directed from the bottom to the top of the screen in addition to the upper and lower ends of the moving region after movement, the movement before movement An update area detection area setting means for dividing the screen by the upper end of the area and setting each of the divided areas as an update area detection area that is a unit of processing for detecting the update area;
Update area detection for causing each update area detection area set by the update area detection area setting means to function as an update area detecting means for detecting an area where the previous frame after copying is different from the current frame as an update area program.
前記更新領域検出域設定手段は、前記移動領域検出手段で検出された移動前後の移動領域の重なりの可能性の有無を判定し、重なりの可能性がないと判定した場合は前記分割を行わずに画面全体を更新領域検出域に設定することを特徴とする請求項17の何れか1項に記載の更新領域検出プログラム。 The update area detection area setting means determines whether or not the movement areas before and after the movement detected by the movement area detection means overlap, and does not perform the division when it is determined that there is no possibility of overlap. The update area detection program according to claim 17 , wherein the entire screen is set as an update area detection area. 前記更新領域検出域設定手段は、前記移動領域検出手段で移動領域が検出されたか否かを判定し、移動領域が検出されなかった場合は前記分割を行わずに画面全体を更新領域検出域に設定することを特徴とする請求項17または18に記載の更新領域検出プログラム。 The update area detection area setting means determines whether or not a movement area is detected by the movement area detection means. If no movement area is detected, the entire screen is set as an update area detection area without performing the division. 19. The update area detection program according to claim 17 , wherein the update area detection program is set. 前記更新領域検出手段は、前フレームと現フレームとにおける同じ位置の画素の画素値を比較し、画素値に差分のある画素の塊を更新領域として検出することを特徴とする請求項17乃至19の何れか1項に記載の更新領域検出プログラム。 The update area detection means compares the pixel values of pixels at the same position in the previous frame and the current frame, according to claim 17 or 19, characterized in that detecting the cluster of pixels with a difference in pixel value as an update region The update area detection program according to any one of the above. 前記更新領域検出手段は、前記画素の塊に外接する矩形を更新領域とすることを特徴とする請求項20に記載の更新領域検出プログラム。 21. The update area detection program according to claim 20 , wherein the update area detection means sets a rectangle circumscribing the block of pixels as an update area. 前記更新領域検出手段は、前フレームと現フレームの画素を1行ずつ順に比較して、各列毎に、第1の閾値より大きな差分が検出された上端の行座標と下端の行座標を記録すると共に当該上端と当該下端の間で第2の閾値より大きな差分が検出された画素が存在したか否かを記録し、第1の閾値より大きな差分が検出されなかった行が所定行数連続した時点で、前記記録を参照して、第1の閾値より大きな差分が検出された列のまとまりであって第2の閾値より大きな差分が検出された画素を含む更新列を抽出し、該抽出した更新列毎に、第1の閾値より大きな差分が検出された最上端の行座標と最下端の行座標、および当該更新列の左端の列座標と右端の列座標とから規定される矩形を更新領域として確定する処理を行うことを特徴とする請求項20または21に記載の更新領域検出プログラム。 The update area detection means sequentially compares the pixels of the previous frame and the current frame one row at a time, and records, for each column, the upper row coordinates and the lower row coordinates where a difference larger than the first threshold is detected. In addition, it is recorded whether or not there is a pixel in which a difference greater than the second threshold is detected between the upper end and the lower end, and a row in which a difference greater than the first threshold is not detected continues for a predetermined number of rows. At that time, referring to the record, an update column including a group of columns in which a difference greater than the first threshold is detected and including a pixel in which a difference greater than the second threshold is detected is extracted and extracted. For each updated column, a rectangle defined by the uppermost row coordinate and the lowermost row coordinate where a difference larger than the first threshold is detected, and the leftmost column coordinate and the rightmost column coordinate of the updated column is defined. It is characterized by performing the process of confirming as an update area Update region detection program according to Motomeko 20 or 21. 第1の閾値より大きな差分が検出された列のまとまりとは、第1の閾値より大きな差分が検出された列が隣接しているか、直接隣接していなくても、第1の閾値より大きな差分が検出されなかった所定数以下の列を間にして隣接している列のまとまりであることを特徴とする請求項22に記載の更新領域検出プログラム。 A group of columns in which a difference greater than the first threshold is detected is a difference greater than the first threshold even if columns in which a difference greater than the first threshold is detected are adjacent or not directly adjacent to each other. 23. The update region detection program according to claim 22 , wherein the update region detection program is a group of columns adjacent to each other with a predetermined number of columns not detected. 前記コンピュータは、第1の閾値より大きな差分が検出された行座標を各列毎に保持するための上端バッファと、第1の閾値より大きな差分が検出された行座標を各列毎に保持するための下端バッファと、第2の閾値より大きな差分が検出されたか否かを示すフラグを各列毎に保持するフラグバッファとを備え、
前記更新領域検出手段は、前フレームと現フレームの画素をスキャン順に比較して、差分が第1の閾値より大きい画素が見つかったら前記上端バッファおよび前記下端バッファにおける該当列の行座標を書き換えると共に、前記差分が第2の閾値より大きければ前記フラグバッファの該当列のフラグをセットし、第1の閾値より大きな差分が検出されなかった行が所定行連続した時点で、前記上端バッファ、前記下端バッファおよび前記フラグバッファを参照して更新領域を確定する前記処理を行うことを特徴とする請求項23に記載の更新領域検出プログラム。
The computer holds, for each column, an upper end buffer for holding, for each column, a row coordinate in which a difference greater than a first threshold is detected, and a row coordinate in which a difference greater than the first threshold is detected for each column. And a flag buffer that holds, for each column, a flag indicating whether or not a difference larger than the second threshold is detected,
The update region detection means compares the pixels of the previous frame and the current frame in the scan order, and when a pixel whose difference is larger than the first threshold is found, rewrites the row coordinates of the corresponding column in the upper end buffer and the lower end buffer, If the difference is larger than the second threshold, the flag in the corresponding column of the flag buffer is set, and the upper end buffer and the lower end buffer are set when a predetermined number of consecutive rows have not been detected. 24. The update region detection program according to claim 23 , wherein the processing for determining an update region is performed with reference to the flag buffer.
請求項1乃至の何れか1項に記載の更新領域検出装置で検出された更新領域を画像として符号化する領域符号化手段を備えた映像信号符号化装置。 A video signal encoding apparatus comprising: an area encoding unit that encodes an update area detected by the update area detection apparatus according to any one of claims 1 to 8 as an image.
JP2008033045A 2008-02-14 2008-02-14 Update region detection device with motion compensation Expired - Fee Related JP5003521B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008033045A JP5003521B2 (en) 2008-02-14 2008-02-14 Update region detection device with motion compensation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008033045A JP5003521B2 (en) 2008-02-14 2008-02-14 Update region detection device with motion compensation

Publications (2)

Publication Number Publication Date
JP2009194627A JP2009194627A (en) 2009-08-27
JP5003521B2 true JP5003521B2 (en) 2012-08-15

Family

ID=41076249

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008033045A Expired - Fee Related JP5003521B2 (en) 2008-02-14 2008-02-14 Update region detection device with motion compensation

Country Status (1)

Country Link
JP (1) JP5003521B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5241030B2 (en) * 2009-09-01 2013-07-17 富士フイルム株式会社 Image transmission apparatus, method and program, image output apparatus, and image transmission system
JP5549431B2 (en) * 2010-07-02 2014-07-16 日本電気株式会社 Server apparatus, moving vector detection method and program
US9167020B2 (en) * 2011-06-10 2015-10-20 Microsoft Technology Licensing, Llc Web-browser based desktop and application remoting solution
CN104662900B (en) 2012-09-19 2018-02-13 日本电气株式会社 video image encoding apparatus

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01272280A (en) * 1988-04-23 1989-10-31 Miyuukomu:Kk Picture data transmitting system and displaying method
US5043919A (en) * 1988-12-19 1991-08-27 International Business Machines Corporation Method of and system for updating a display unit
EP1292884A2 (en) * 2000-06-12 2003-03-19 Preworx ( Proprietary) Limited System for controlling a display of the user interface of a software application
US6983020B2 (en) * 2002-03-25 2006-01-03 Citrix Online Llc Method and apparatus for fast block motion detection
JP2004086550A (en) * 2002-08-27 2004-03-18 Matsushita Electric Ind Co Ltd Display image updating system
JP2005033763A (en) * 2003-06-19 2005-02-03 Matsushita Electric Ind Co Ltd Transmission apparatus, image processing system, image processing method, program, and recording medium

Also Published As

Publication number Publication date
JP2009194627A (en) 2009-08-27

Similar Documents

Publication Publication Date Title
JP4471039B2 (en) Moving vector detection device
JP5446878B2 (en) Update area detector
JP5471449B2 (en) Moving area detector
JP5003521B2 (en) Update region detection device with motion compensation
JP4935705B2 (en) Update region detection device with motion compensation
JP2012053770A (en) Motion vector detection device
JP4804238B2 (en) Motion vector detection device
US9842260B2 (en) Image processing apparatus and image processing method of performing image segmentation
JP2007026285A (en) Image processor and image processing program
JP2016164709A (en) Image processing device, imaging apparatus, and image processing program
KR102429337B1 (en) Image processing device stabilizing image and method of stabilizing image
JP2002152750A (en) Motion vector detection method and device
JP2006215657A (en) Method, apparatus, program and program storage medium for detecting motion vector
JP5114290B2 (en) Signal processing device
WO2016142965A1 (en) Video processing device, video processing method, and storage medium storing video processing program
JP2016212500A (en) Shooting direction change detection device and shooting direction change detection method
JP2009065283A (en) Image shake correction apparatus
JP2004179906A (en) Device and method for motion vector detection
JP2013246601A (en) Image process device
JP2654294B2 (en) Edge detection method
JP2006072829A (en) Image recognition system and image recognition method
US20230316732A1 (en) Learning system, object detection system, learning method, and computer program
JP5743147B2 (en) Image processing unit and image processing program
JP2009288893A (en) Image processor
JP5266806B2 (en) Image format estimation apparatus, method and program

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20091009

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20091009

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120131

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120308

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120507

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150601

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5003521

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees