JP2012175207A - Image processing apparatus, image processing method, and computer program - Google Patents

Image processing apparatus, image processing method, and computer program Download PDF

Info

Publication number
JP2012175207A
JP2012175207A JP2011032782A JP2011032782A JP2012175207A JP 2012175207 A JP2012175207 A JP 2012175207A JP 2011032782 A JP2011032782 A JP 2011032782A JP 2011032782 A JP2011032782 A JP 2011032782A JP 2012175207 A JP2012175207 A JP 2012175207A
Authority
JP
Japan
Prior art keywords
frame
display frame
display
image
image processing
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.)
Withdrawn
Application number
JP2011032782A
Other languages
Japanese (ja)
Inventor
Takeshi Watanabe
偉志 渡邊
Sumio Yokomitsu
澄男 横光
Hirobumi Fujii
博文 藤井
Takeshi Fujimatsu
健 藤松
Yuichi Matsumoto
裕一 松本
Katsunori Waratani
克則 藁谷
Takayuki Matsukawa
隆行 松川
Michio Miwa
道雄 三輪
Mikio Morioka
幹夫 森岡
Masaki Sugiura
雅貴 杉浦
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.)
Panasonic Corp
Original Assignee
Panasonic 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 Panasonic Corp filed Critical Panasonic Corp
Priority to JP2011032782A priority Critical patent/JP2012175207A/en
Publication of JP2012175207A publication Critical patent/JP2012175207A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus which when generating a cut-out image of a display frame in a taken image, is capable of reducing stress caused by variation in the display frame, onto a user observing the cut-out image.SOLUTION: An image processing apparatus 100 comprises: an image generating part 101 which generates an image by photographing; a person detection part 102 which detects an area surrounding a moving object in the image as a detection frame; a display frame center position determination part 107 which determines a display frame corresponding to the detection frame so as to avoid positional fluctuation, on the basis of the history of the position of the detection frame; and a cut-out image generating part 110 which generates the cut-out image of the display frame determined by the display frame center position determination part 107.

Description

本発明は、撮影画像に対して画像処理を行う画像処理装置、画像処理方法、及びコンピュータプログラムに関し、特に、撮影画像中の表示枠を切り出して切出し画像を生成する画像処理装置、画像処理方法、及びコンピュータプログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and a computer program that perform image processing on a captured image, and in particular, an image processing apparatus, an image processing method, and an image processing apparatus that cut out a display frame in a captured image and generate a cut-out image. And a computer program.

従来、監視カメラで撮影を行って画像を生成し、その画像をモニタに表示する監視システムにおいては、カメラによる撮影で得られた画像(撮影画像)全体を表示するモード(全表示モード)のほか、その一部領域を切り出して表示するモード(切出し表示モード)が用いられる。   Conventionally, in a surveillance system in which an image is generated by shooting with a monitoring camera and the image is displayed on the monitor, in addition to a mode (all display mode) for displaying the entire image (taken image) obtained by shooting with the camera A mode (cutout display mode) in which the partial area is cut out and displayed is used.

また、切出し表示モードには、特に、撮影画像から画像処理により移動体を検出して、その移動体を追尾するように自動で切出し領域を移動させるものがある。このような切出し表示モードでは、撮影画像中の動きのある領域を囲う枠を検出枠として、検出枠を含み、検出枠より大きい表示枠を設定して、表示枠内の画像を表示する。表示枠は、その中心が検出枠の中心と一致するように設定することができる。   In addition, in the cut-out display mode, in particular, there is a mode in which a moving body is detected from a captured image by image processing, and the cut-out area is automatically moved so as to track the moving body. In such a cut-out display mode, a frame that surrounds a moving area in the captured image is used as a detection frame, a display frame that includes the detection frame and is larger than the detection frame is set, and an image in the display frame is displayed. The display frame can be set so that its center coincides with the center of the detection frame.

しかしながら、単純に表示枠を常にその中心が検出枠の中心に一致するように設定すると、次のような問題が生じる。   However, simply setting the display frame so that its center always coincides with the center of the detection frame causes the following problems.

まず、移動体が人物である場合には、人物が移動をしていないとしても、人物の影やノイズの影響を受けたり、また人物が振り向いたり、手を伸ばしたり、しゃがんだりすることで、検出枠が変動し、その中心位置も移動することになる。また、検出精度が十分に高くない場合にも、同様に検出枠が変動することになる。   First, if the moving object is a person, even if the person is not moving, it is affected by the shadow and noise of the person, the person turns around, stretches his hand, crouches, The detection frame fluctuates and the center position thereof also moves. In addition, even when the detection accuracy is not sufficiently high, the detection frame similarly varies.

このような原因による検出枠の変動は、ごく小さな範囲内における、頻繁かつ高速な変動(以下、このような変動を「振れ」という。)となる。このような検出枠の振れに対しても、その変動に従って、その中心が検出枠の中心に一致するように表示枠を設定すると、表示枠にも振れが生じることになる。これにより、モニタには、あたかも手振れを起こしたような切出し画像が表示されることになり、これを観察しているユーザにストレスを与えてしまう。   The variation in the detection frame due to such a cause is frequent and high-speed variation (hereinafter, such variation is referred to as “shake”) within a very small range. Even for such a fluctuation of the detection frame, if the display frame is set so that the center of the detection frame coincides with the center of the detection frame, the display frame also shakes. As a result, a cut-out image that appears to have shaken is displayed on the monitor, which causes stress on the user who observes the image.

この問題に対して、検出枠の位置として、例えば前のフレームとの平均位置を採用することで、検出枠の位置の変動に対してスムージング処理を行い、表示枠の振れを緩和する技術がある(例えば、特許文献1を参照)。   To solve this problem, there is a technique for reducing the fluctuation of the display frame by performing a smoothing process on the variation of the position of the detection frame by adopting, for example, an average position with the previous frame as the position of the detection frame. (For example, see Patent Document 1).

特開平5−68195号公報JP-A-5-68195

しかしながら、上記の従来技術によっても、振れの幅が減少する可能性はあるが、振れ自体がなくなるわけではなく、振れの根本的な解決にはならない。また、人物が実際に移動をしている際にも、一定の比較的狭い範囲内を行ったり来たりしている場合には、表示枠が上下左右に頻繁に移動することになり、やはり、これを観察しているユーザにストレスを与えてしまう。   However, even with the above-described prior art, there is a possibility that the width of the shake is reduced, but the shake itself is not eliminated, and it is not a fundamental solution for the shake. In addition, when a person is actually moving, if the figure moves back and forth within a certain relatively narrow range, the display frame will frequently move up and down, left and right, The user who observes this is stressed.

本発明は、上記の問題に鑑みてなされたものであり、撮影画像中の表示枠を切り出した切出し画像を生成する画像処理装置において、切出し画像を観察しているユーザに与える、表示枠の変動によるストレスを軽減できる画像処理装置を提供することを目的とする。   The present invention has been made in view of the above problems, and in an image processing apparatus that generates a cutout image obtained by cutting out a display frame in a captured image, a change in the display frame that is given to a user who is observing the cutout image. An object of the present invention is to provide an image processing apparatus capable of reducing the stress caused by the above.

上記従来の課題を解決するために、本発明の画像処理装置は、撮影により画像を生成する画像生成部と、前記画像中の移動体を囲む領域を検出枠として検出する検出枠生成部と、前記検出枠の位置の履歴に基づいて、位置が振れないように、表示枠を決定する表示枠決定部と、前記表示枠決定部にて決定された前記表示枠の切出し画像を生成する切出し画像生成部とを備えた構成を有している。   In order to solve the above-described conventional problems, an image processing apparatus of the present invention includes an image generation unit that generates an image by photographing, a detection frame generation unit that detects a region surrounding the moving body in the image as a detection frame, Based on the history of the position of the detection frame, a display frame determining unit that determines a display frame so that the position does not move, and a cut-out image that generates a cut-out image of the display frame determined by the display frame determining unit And a generator.

この構成により、検出枠の位置の履歴に基づいて、位置が振れないように表示枠が決定して、その表示枠で切出し画像を生成するので、切出し画像を観察しているユーザに与える、表示枠の変動によるストレスを軽減できる。なお、表示枠は検出枠を完全に包含するように決定されてもよいし、検出枠の囲む領域の少なくとも一部を含むように決定されてもよく、また、検出枠の囲む領域を包含しないように決定されてもよい。また、表示枠を決定するとは、表示枠の位置及び大きさの少なくともいずれか一方を決定することをいう。   With this configuration, based on the history of the position of the detection frame, the display frame is determined so that the position is not shaken, and a cut-out image is generated with the display frame, so the display given to the user who is observing the cut-out image The stress due to the fluctuation of the frame can be reduced. The display frame may be determined so as to completely include the detection frame, may be determined so as to include at least a part of the region surrounded by the detection frame, and does not include the region surrounded by the detection frame. May be determined as follows. In addition, determining the display frame means determining at least one of the position and size of the display frame.

また、上記の画像処理装置において、前記表示枠決定部は、前記検出枠の位置の履歴に基づいて、表示モードを、前記表示枠を前記検出枠に追随して移動させる移動表示モード又は前記検出枠の変動に関らず前記表示枠を固定する固定表示モードのいずれかに設定し、設定された前記表示モードに従って前記表示枠の位置を決定してよい。   In the image processing apparatus, the display frame determination unit may move the display mode according to the position history of the detection frame, the moving display mode in which the display frame is moved following the detection frame, or the detection. The display frame may be set to any one of the fixed display modes for fixing the display frame regardless of the change of the frame, and the position of the display frame may be determined according to the set display mode.

この構成により、固定表示モードで切出し画像を表示することで、検出枠が振れたとしても検出枠の振れに影響されない表示枠で切出し画像が表示される。   With this configuration, by displaying the cut image in the fixed display mode, the cut image is displayed in the display frame that is not affected by the shake of the detection frame even if the detection frame is shaken.

また、上記の画像処理装置において、前記表示枠決定部は、前記検出枠の位置の履歴に基づいて、前記移動体が移動しているか、又は停止若しくは滞留しているかを推定し、前記移動体が移動していると推定した場合に、前記表示モードを前記移動表示モードに設定し、前記移動体が停止又は滞留していると推定した場合に、前記表示モードを前記固定表示モードに設定してよい。   In the image processing apparatus, the display frame determination unit estimates whether the moving body is moving, stopped, or stays based on the history of the position of the detection frame, and the moving body When it is estimated that the moving body is moving, the display mode is set to the moving display mode, and when it is estimated that the moving body is stopped or staying, the display mode is set to the fixed display mode. It's okay.

この構成により、移動体が停止又は滞留していると推定された場合は、検出枠の微小な変動に表示枠を追随させないので、移動体の実質的な位置の移動を伴わない検出枠の変動によって表示枠が振れることを防止できる。   With this configuration, when it is estimated that the moving body is stopped or staying, the display frame does not follow the minute fluctuation of the detection frame, so the fluctuation of the detection frame is not accompanied by the movement of the substantial position of the moving body. Can prevent the display frame from being shaken.

また、上記の画像処理装置において、前記表示枠決定部は、前記表示モードが前記固定表示モードから前記移動表示モードに移行する際に、前記表示枠がスムーズに変動するよう前記表示枠を決定してよい。   In the image processing apparatus, the display frame determination unit determines the display frame so that the display frame changes smoothly when the display mode shifts from the fixed display mode to the moving display mode. It's okay.

固定表示モードから直ちに移動表示モードに切替えると、固定表示モードにおける表示枠の位置や大きさが大きく変化することがあり、この場合には、切出し画像を観察しているユーザにおいて、表示モードの切替え前後において切出し画像の相関が理解しにくくなることがあるが、この構成により、固定表示モードから移動表示モードへの切り替えにおいて、表示枠がスムーズに変動するので、表示モードの切替え前後における切出し画像の相関を認識し易くなる。   When switching from the fixed display mode to the moving display mode immediately, the position and size of the display frame in the fixed display mode may change greatly. In this case, the user who is observing the cutout image switches the display mode. It may be difficult to understand the correlation between the cropped images before and after, but with this configuration, the display frame changes smoothly when switching from the fixed display mode to the moving display mode. It becomes easy to recognize the correlation.

また、上記の画像処理装置において、前記表示枠決定部は、前記検出枠の大きさ及び前記検出枠の位置の履歴に基づいて、前記表示枠の大きさを決定してよい。   In the image processing apparatus, the display frame determination unit may determine the size of the display frame based on the size of the detection frame and the history of the position of the detection frame.

この構成により、検出枠が振れる場合に、検出枠に対して表示枠を大きく取ることで、表示枠の位置を検出枠に追随させる場合には、表示枠の振れを軽減でき、表示枠の位置を検出枠に追随させない場合にも、表示枠を固定したままで検出枠内の画像を含む切出し画像を生成できる。   With this configuration, when the detection frame swings, if the display frame is made larger than the detection frame, the display frame shake can be reduced and the display frame position can be reduced. Even when the detection frame is not allowed to follow, a cut-out image including an image in the detection frame can be generated with the display frame fixed.

また、上記の画像処理装置において、前記表示枠決定部は、前記検出枠の位置の履歴に基づいて、前記移動体が移動しているか、又は停止若しくは滞留しているかを推定し、前記移動体が停止又は滞留していると推定した場合に、前記移動体が移動していると推定した場合よりも、前記表示枠の大きさを大きくしてよい。   In the image processing apparatus, the display frame determination unit estimates whether the moving body is moving, stopped, or stays based on the history of the position of the detection frame, and the moving body The size of the display frame may be larger when it is estimated that the moving body is moving than when it is estimated that the moving body is moving.

この構成により、移動体が停止若しくは滞留していると推定された場合に表示枠を大きくすることで、表示枠の振れを軽減でき、または表示枠を固定しておくことができる。   With this configuration, when the moving body is estimated to be stopped or staying, the display frame can be enlarged by reducing the display frame, or the display frame can be fixed.

また、上記の画像処理装置において、前記表示枠決定部は、前記検出枠の位置の履歴に基づいて、前記検出枠が所定の期間内に移動した範囲を含むように、前記表示枠の位置及び大きさを決定して固定してよい。   In the above image processing device, the display frame determination unit may determine the position of the display frame and the position of the display frame so as to include a range in which the detection frame moves within a predetermined period based on the history of the position of the detection frame. The size may be determined and fixed.

この構成により、移動体が比較的狭い範囲を複雑に動き回る場合に、表示枠をその範囲を含むように大きく取って固定することで、移動体の複雑な動きに対して表示枠の位置を移動することなく移動体の切出し画像を得ることができる。   With this configuration, when the moving body moves around a relatively narrow range in a complicated manner, the display frame is moved to a complicated position so that the position of the display frame can be moved. A cut-out image of the moving body can be obtained without doing so.

また、上記の画像処理装置において、前記表示枠決定部は、前記検出枠が、固定された前記表示枠の周囲に達したときに、前記表示枠の固定を解除してよい。   In the image processing apparatus, the display frame determination unit may release the fixing of the display frame when the detection frame reaches the periphery of the fixed display frame.

この構成により、表示枠を固定したことで移動体の移動に追随できずに切出し画像に移動体が映らなくなるという不都合を回避できる。   With this configuration, it is possible to avoid the inconvenience that the moving body does not appear in the cut-out image without following the movement of the moving body by fixing the display frame.

また、上記の画像処理装置において、前記表示枠決定部は、所定の期間内における前記検出枠の平均位置を求め、前記所定の期間内における各検出枠の位置と前記平均位置との距離差の総和を求め、前記距離差の総和が所定の閾値より大きいときは、前記移動体が移動していると推定し、前記距離差の総和が前記所定の閾値より小さいときは、前記移動体が停止又は滞留していると推定してよい。   In the image processing apparatus, the display frame determination unit obtains an average position of the detection frames within a predetermined period, and calculates a distance difference between the position of each detection frame and the average position within the predetermined period. When the sum of the distance differences is larger than a predetermined threshold, it is estimated that the moving body is moving. When the sum of the distance differences is smaller than the predetermined threshold, the moving body is stopped. Or it may be estimated that it is stagnant.

この構成により、移動体が移動しているのか、停止又は滞留しているのかを好適に推定できる。   With this configuration, it can be suitably estimated whether the moving body is moving, stopped, or staying.

また、上記の画像処理装置において、前記画像は歪みを有し、前記表示枠決定部は、前記各検出枠の歪みに応じて前記距離差に重みを付けてよい。   In the image processing apparatus, the image may be distorted, and the display frame determination unit may weight the distance difference according to the distortion of each detection frame.

この構成により、画像に歪があることによって、移動体が実際には移動しているのに、停止又は滞留であると推定してしまうことを軽減できる。   With this configuration, it is possible to reduce the estimation that the moving object is stopped or stayed when the moving object is actually moving due to the distortion in the image.

また、上記の画像処理装置は、前記移動体の画像に基づいて前記移動体の向きを検出する移動体向き検出部をさらに備えていてよく、前記表示枠決定部は、前記検出枠の位置の履歴に基づく前記検出枠の移動方向と前記移動体の向きとが異なるときは、前記移動体が停止又は滞留していると推定してよい。   The image processing apparatus may further include a moving body direction detecting unit that detects the direction of the moving body based on the image of the moving body, and the display frame determining unit may detect the position of the detection frame. When the moving direction of the detection frame based on the history is different from the direction of the moving body, it may be estimated that the moving body is stopped or staying.

この構成により、移動体が移動しているのか、停止又は滞留しているのかを好適に推定できる。   With this configuration, it can be suitably estimated whether the moving body is moving, stopped, or staying.

また、上記の画像処理装置において、前記表示枠決定部は、前記表示枠の位置が振れないような前記表示枠の位置の変動に関する制約条件を参照して、前記制約条件を満たすように、前記表示枠決定してよい。   In the image processing apparatus, the display frame determination unit refers to a constraint condition regarding a change in the position of the display frame so that the position of the display frame cannot be shaken, so that the constraint condition is satisfied. The display frame may be determined.

表示枠決定部が、位置が振れないように表示枠を決定するための所定のアルゴリズムに従って表示枠を決定する場合において、実際には表示枠の位置が振れることがあったとしても、この構成により、制約条件を課した上で表示枠を決定するので、表示枠の振れを確実に軽減又は防止できる。   In the case where the display frame determining unit determines the display frame according to a predetermined algorithm for determining the display frame so that the position does not move, even if the position of the display frame may actually move, this configuration Since the display frame is determined after imposing the constraint condition, the shake of the display frame can be reliably reduced or prevented.

また、上記の画像処理装置において、前記制約条件は、前記表示枠の移動速度が所定の上限を超えないという条件であってよい。   In the image processing apparatus, the constraint condition may be a condition that a moving speed of the display frame does not exceed a predetermined upper limit.

この構成により、表示枠が所定の速度以上では移動しないことが保証され、確実に表示枠の振れを軽減又は防止できる。   With this configuration, it is ensured that the display frame does not move at a predetermined speed or higher, and the display frame can be reliably reduced or prevented from shaking.

前記制約条件は、前記表示枠の位置を所定のルート上に制限するという条件であってよい。   The constraint condition may be a condition for limiting the position of the display frame on a predetermined route.

画像生成部がある場所を撮影しており、人物が移動体として検出される状況において、その場所において、障害物等の要因により、人物の移動ルートが限られている場合は、表示枠の位置もその移動ルートを辿るように変動させればよい。よって、この構成により、表示枠の位置を所定のルート上に制限することで、そのルートとは異なる方向への検出枠の変動によって表示枠が振れることはなく、切出し画像を観察しているユーザに与える、表示枠の変動によるストレスを軽減できる。   In a situation where an image generation unit is photographed and a person is detected as a moving body, if the movement route of the person is limited at that place due to an obstacle or the like, the position of the display frame May be changed to follow the movement route. Therefore, with this configuration, by restricting the position of the display frame to a predetermined route, the user who observes the cut-out image does not shake the display frame due to a change in the detection frame in a direction different from the route. Can reduce the stress caused by fluctuations in the display frame.

本発明の別の態様は、画像処理方法であり、この画像処理方法は、撮影により画像を生成する画像生成ステップと、前記画像中の移動体を囲む領域を検出枠として検出する検出枠生成ステップと、前記検出枠の位置の履歴に基づいて、位置が振れないように前記検出枠に対応する表示枠を決定する表示枠決定ステップと、前記表示枠決定ステップにて決定された前記表示枠の切出し画像を生成する切出し画像生成ステップとを含んでいる。   Another aspect of the present invention is an image processing method. The image processing method includes an image generation step of generating an image by photographing, and a detection frame generation step of detecting a region surrounding the moving body in the image as a detection frame. And a display frame determining step for determining a display frame corresponding to the detection frame so that the position does not move based on the history of the position of the detection frame, and the display frame determined in the display frame determining step. A cut image generation step for generating a cut image.

この構成によっても、検出枠の位置の履歴に基づいて、位置が振れないように表示枠が決定して、その表示枠で切出し画像を生成するので、切出し画像を観察しているユーザに与える、表示枠の変動によるストレスを軽減できる。   Also with this configuration, based on the history of the position of the detection frame, the display frame is determined so that the position is not shaken, and a cutout image is generated with the display frame, so it is given to the user who is observing the cutout image. Stress due to fluctuations in the display frame can be reduced.

本発明のさらに別の態様は、コンピュータプログラムであって、このコンピュータプログラムは、上記の画像処理方法をコンピュータに実行させる。   Yet another embodiment of the present invention is a computer program that causes a computer to execute the above-described image processing method.

本発明は、検出枠の位置の履歴に基づいて、位置が振れないように表示枠を決定して、その表示枠で切出し画像を生成するので、切出し画像を観察しているユーザに与える、表示枠の変動によるストレスを軽減できる。   Since the present invention determines a display frame so that the position does not fluctuate based on the history of the position of the detection frame and generates a cut-out image with the display frame, the display given to the user who is observing the cut-out image The stress due to the fluctuation of the frame can be reduced.

本発明の第1の実施の形態における画像処理装置の構成を示すブロック図1 is a block diagram showing a configuration of an image processing apparatus according to a first embodiment of the present invention. (a)本発明の第1の実施の形態における時刻t−sから時刻tまでの平均位置と各時刻の平均位置からの距離差の総和(人物が移動している場合)を説明する図 (b)本発明の第1の実施の形態における時刻t−sから時刻tまでの平均位置と各時刻の平均位置からの距離差の総和(人物が停止又は滞留している場合)を説明する図(A) The figure explaining the sum total (when the person is moving) of the distance difference from the average position from the time ts to the time t and the average position of each time in the 1st Embodiment of this invention. b) A diagram for explaining the sum of distance differences between the average position from time ts to time t and the average position at each time (when a person is stopped or staying) in the first embodiment of the present invention. (a)本発明の第1の実施の形態における固定表示モード開始時の検出枠と表示枠との関係を示す図 (b)本発明の第1の実施の形態における人物が滞留しながら表示枠の端に移動したときの検出枠と表示枠との関係を示す図 (c)本発明の第1の実施の形態における過渡期間の検出枠と表示枠との関係を示す図 (d)本発明の第1の実施の形態における過渡期間終了時の検出枠と表示枠との関係を示す図(A) The figure which shows the relationship between the detection frame at the time of the fixed display mode start in the 1st Embodiment of this invention, and a display frame (b) The display frame while the person in the 1st Embodiment of this invention stagnates (C) The figure which shows the relationship between the detection frame and display frame of the transition period in the 1st Embodiment of this invention (d) This invention The figure which shows the relationship between the detection frame at the time of the transition period end in 1st Embodiment of this, and a display frame (a)本発明の第1の実施の形態における検出枠と表示枠との関係を示す図 (b)本発明の第1の実施の形態における境界ラインを示す図 (c)検出枠が境界ラインにかかった状態を示す図(A) The figure which shows the relationship between the detection frame and display frame in the 1st Embodiment of this invention (b) The figure which shows the boundary line in the 1st Embodiment of this invention (c) The detection frame is a boundary line A diagram showing the condition 本発明の第1の実施の形態における画像処理装置の動作を示すフロー図The flowchart which shows operation | movement of the image processing apparatus in the 1st Embodiment of this invention. 本発明の第2の実施の形態における画像処理装置の構成を示すブロック図The block diagram which shows the structure of the image processing apparatus in the 2nd Embodiment of this invention. (a)本発明の第2の実施の形態における右向きのテンプレートのマッチングスコアが高い場合を示す図 (b)本発明の第2の実施の形態における左向きのテンプレートのマッチングスコアが高い場合を示す図(A) The figure which shows the case where the matching score of the rightward template in the 2nd Embodiment of this invention is high (b) The figure which shows the case where the matching score of the leftward template in the 2nd Embodiment of this invention is high 本発明の第3の実施の形態における画像処理装置の構成を示すブロック図The block diagram which shows the structure of the image processing apparatus in the 3rd Embodiment of this invention. 本発明の第4の実施の形態における画像処理装置の構成を示すブロック図The block diagram which shows the structure of the image processing apparatus in the 4th Embodiment of this invention. (a)本発明の第4の実施の形態における人物の複数回の移動による軌跡から平均的なルートを求める処理を説明する図 (b)本発明の第4の実施の形態における平均的な移動ルート上に制限される表示枠を示す図(A) The figure explaining the process which calculates | requires an average route from the locus | trajectory by the movement of the person in multiple times in the 4th Embodiment of this invention (b) The average movement in the 4th Embodiment of this invention The figure which shows the display frame restricted on the route 本発明の第4の実施の形態の変形例を示す図The figure which shows the modification of the 4th Embodiment of this invention 本発明の第5の実施の形態における画像処理装置の構成を示すブロック図The block diagram which shows the structure of the image processing apparatus in the 5th Embodiment of this invention. (a)本発明の第5の実施の形態における人物が全方位画像の円周方向に移動する場合を示す図 (b)本発明の第5の実施の形態における人物が全方位画像の半径方向に比較的長い距離移動する場合を示す図 (c)本発明の第5の実施の形態における人物が全方位画像の半径方向に比較的短い距離移動する場合を示す図(A) The figure which shows the case where the person in the 5th Embodiment of this invention moves to the circumferential direction of an omnidirectional image (b) The person in the 5th Embodiment of this invention is the radial direction of an omnidirectional image (C) The figure which shows the case where the person in the 5th Embodiment of this invention moves a comparatively short distance in the radial direction of an omnidirectional image

以下、本発明を実施するための形態について、図面を参照しながら説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

(第1の実施の形態)
図1は、本発明の第1の実施の形態の画像処理装置の構成を示すブロック図である。図1に示すように、画像処理装置100は、画像生成部101、人物検出部102、移動履歴保持部103、平均位置算出部104、距離差総和算出部105、表示モード決定部106、表示枠中心位置決定部107、表示枠位置決定パラメータ保持部108、表示枠位置保持部109、及び切出し画像生成部110を備えている。なお、平均位置算出部104、距離差総和算出部105、表示モード決定部106、表示枠中心位置決定部107、表示枠位置決定パラメータ保持部108を含む構成は、本発明の表示枠決定部に相当する。
(First embodiment)
FIG. 1 is a block diagram showing the configuration of the image processing apparatus according to the first embodiment of the present invention. As shown in FIG. 1, the image processing apparatus 100 includes an image generation unit 101, a person detection unit 102, a movement history holding unit 103, an average position calculation unit 104, a distance difference sum calculation unit 105, a display mode determination unit 106, a display frame. A center position determination unit 107, a display frame position determination parameter holding unit 108, a display frame position holding unit 109, and a cut-out image generation unit 110 are provided. The configuration including the average position calculation unit 104, the distance difference total calculation unit 105, the display mode determination unit 106, the display frame center position determination unit 107, and the display frame position determination parameter holding unit 108 is included in the display frame determination unit of the present invention. Equivalent to.

画像生成部101は、カメラなどで撮影をすることで画像(以下、「撮影画像」という。)を生成する。画像処理装置100が監視システムに応用される場合は、カメラは監視対象箇所に設置されて、監視対象箇所を撮影する。撮影画像は人物検出部102に出力される。   The image generation unit 101 generates an image (hereinafter referred to as “captured image”) by capturing with a camera or the like. When the image processing apparatus 100 is applied to a monitoring system, the camera is installed at a monitoring target location and images the monitoring target location. The captured image is output to the person detection unit 102.

人物検出部102は、撮影画像中から人物を検出して、その検出結果を出力する。人物検出部102は、前のフレームと現在のフレームとを比較して、撮影画像において、画素値の差分が所定の閾値以上である箇所を人物が映し出されている箇所として検出する。人物検出部102は、差分が閾値以上である箇所を含む矩形領域を検出枠として生成し、検出結果として、生成した検出枠の情報(検出枠の中心座標、高さ及び幅)を出力する。人物検出部102は、本発明の検出枠生成部に相当する。   The person detection unit 102 detects a person from the captured image and outputs the detection result. The person detection unit 102 compares the previous frame with the current frame, and detects a part where a difference in pixel values is equal to or greater than a predetermined threshold in the captured image as a part where a person is projected. The person detection unit 102 generates a rectangular area including a portion where the difference is equal to or greater than a threshold value as a detection frame, and outputs information on the generated detection frame (center coordinates, height and width of the detection frame) as a detection result. The person detection unit 102 corresponds to the detection frame generation unit of the present invention.

移動履歴保持部103は、人物検出部102から出力された検出枠の情報をその検出時刻と対応付けて保持している。平均位置算出部104は、移動履歴保持部103に保持されている各時刻の検出枠の位置を参照して、現在時刻をtとして、現在時刻から時間sだけ前の時刻t−sから現在時刻tまでの間(フレーム数はX枚)の人物位置(即ち検出枠の中心座標の位置)の平均位置を算出する。   The movement history holding unit 103 holds information on the detection frame output from the person detection unit 102 in association with the detection time. The average position calculation unit 104 refers to the position of the detection frame at each time held in the movement history holding unit 103, sets the current time as t, and sets the current time from time ts that is a time s before the current time. The average position of person positions (that is, the position of the center coordinates of the detection frame) up to t (the number of frames is X) is calculated.

距離差総和算出部105は、平均位置算出部104が算出した平均位置と、時刻t−sから現在時刻tまでの間の各時刻での人物位置との距離差の総和を求める。この距離差の総和は、人物が一方向に移動している場合には、大きくなり、一箇所に停止又は滞留している場合には小さくなる。   The distance difference sum calculation unit 105 obtains the sum of distance differences between the average position calculated by the average position calculation unit 104 and the person position at each time from time ts to the current time t. The sum of the distance differences increases when the person moves in one direction, and decreases when the person stops or stays at one place.

図2は、時刻t−sから時刻tまでの平均位置と距離差の総和を説明する図である。図2(a)は、人物が移動している場合の平均位置と各時刻の平均位置からの距離差を示す図である。図2(a)の例では、人物が移動しているので、時刻t−sから時刻tまでの距離差の総和は大きくなる。これに対して、図2(b)は、人物が停止又は滞留している場合の平均位置と各時刻の平均位置からの距離差を示す図である。この場合には、時刻t−sから時刻tにわたって平均位置からの距離差が小さく、その総和も小さくなる。   FIG. 2 is a diagram for explaining the sum of the average position and the distance difference from time ts to time t. FIG. 2A is a diagram illustrating a difference in distance between the average position when the person is moving and the average position at each time. In the example of FIG. 2A, since the person is moving, the sum of the distance differences from time ts to time t becomes large. On the other hand, FIG.2 (b) is a figure which shows the distance difference from the average position in case a person has stopped or stayed, and the average position of each time. In this case, the distance difference from the average position from time ts to time t is small, and the sum is also small.

表示モード決定部106は、検出枠の位置の履歴に基づいて、表示モードを設定する。具体的には、表示モード決定部106は、距離総和算出部105にて算出された距離差の総和が所定の閾値σを超えたら表示モードとして「移動表示モード」を設定し、閾値σを超えない場合には表示モードとして「固定表示モード」を設定する。表示モード決定部106は、設定した表示モードを表示枠中心位置決定部107に出力する。   The display mode determination unit 106 sets the display mode based on the detection frame position history. Specifically, the display mode determination unit 106 sets the “moving display mode” as the display mode when the sum of the distance differences calculated by the distance sum calculation unit 105 exceeds a predetermined threshold σ, and exceeds the threshold σ. If not, the “fixed display mode” is set as the display mode. The display mode determination unit 106 outputs the set display mode to the display frame center position determination unit 107.

表示枠中心位置決定部107は、検出枠の位置に対応する表示枠の位置を決定する。表示枠中心位置決定部107は、表示モード決定部106より出力された表示モードを参照して、表示モードが「移動表示モード」であるときは、検出枠の位置に追随するように表示枠の位置を決定する。具体的には、表示枠の中心が検出枠の中心と一致するように、表示枠の位置を決定する。   The display frame center position determination unit 107 determines the position of the display frame corresponding to the position of the detection frame. The display frame center position determination unit 107 refers to the display mode output from the display mode determination unit 106, and when the display mode is the “moving display mode”, the display frame center position determination unit 107 follows the position of the detection frame. Determine the position. Specifically, the position of the display frame is determined so that the center of the display frame matches the center of the detection frame.

但し、この場合にも、表示枠位置決定パラメータ保持部108に保持された表示枠位置決定パラメータを参照して、表示枠の位置を決定する。表示枠位置決定パラメータ保持部108には、表示枠位置決定パラメータとして、表示枠を移動させるときの制約条件が保持されている。本実施の形態では、表示枠位置決定パラメータとして、表示枠の最大速度が保持されている。   In this case, however, the position of the display frame is determined with reference to the display frame position determination parameter held in the display frame position determination parameter holding unit 108. The display frame position determination parameter holding unit 108 holds a restriction condition for moving the display frame as a display frame position determination parameter. In the present embodiment, the maximum speed of the display frame is held as the display frame position determination parameter.

表示枠中心位置決定部107は、表示枠位置保持部109に保持された前のフレームの表示枠の位置を参照して、表示枠の速度(前のフレームからの表示枠の移動量)が最大速度を超えていなければ、表示枠の中心が、移動履歴保持部103から入力した現在のフレームの検出枠の中心と一致するように表示枠の位置を決定し、最大速度を超えている場合には、最大速度を超えない限度で表示枠の位置を決定する。   The display frame center position determination unit 107 refers to the display frame position of the previous frame held in the display frame position holding unit 109, and the display frame speed (the amount of movement of the display frame from the previous frame) is the maximum. If the speed is not exceeded, the position of the display frame is determined so that the center of the display frame matches the center of the detection frame of the current frame input from the movement history holding unit 103, and the maximum speed is exceeded. Determines the position of the display frame as long as the maximum speed is not exceeded.

表示枠中心位置決定部107は、表示モードが「固定表示モード」であるときは、表示枠位置保持部109に保持された前のフレームの表示枠を現在のフレームの表示枠とする。即ち、検出枠の位置に関らず、表示枠を固定とする。   When the display mode is “fixed display mode”, the display frame center position determination unit 107 sets the display frame of the previous frame held in the display frame position holding unit 109 as the display frame of the current frame. That is, the display frame is fixed regardless of the position of the detection frame.

固定表示モードにある場合に、あるフレームにおいて、直近の時間sの間における平均位置からの各時刻の距離差の総和が閾値を超えたら、固定表示モードから移動表示モードに切り替わる。但し、この場合には、移動表示モードにおいて、直ちに表示枠を検出枠に完全に追随させるのではなく、緩やかに検出枠に追随させるようにする。   In the fixed display mode, when the sum of the distance differences from the average position during the most recent time s in a certain frame exceeds the threshold value, the fixed display mode is switched to the moving display mode. However, in this case, in the moving display mode, the display frame is not made to immediately follow the detection frame, but gradually follows the detection frame.

図3は、固定表示モードから移動表示モードへの切替えを説明する図である。図3(a)に示すように、表示枠の中心位置が検出枠の中心と一致するように表示枠を固定して固定表示モードを開始した後に、図3(b)に示すように人物が滞留しながら表示枠の端に移動して、そこから移動を始めた場合には、検出枠の中心と表示枠の中心とがずれているので、仮に直ちに表示枠の中心が検出枠の中心と一致するように表示枠の位置を決定すると、固定されていた表示枠の位置から急激に表示枠の位置が変化し、ユーザは、表示モードの切替え前後における切出し画像の相関を把握しにくくなる。   FIG. 3 is a diagram for explaining switching from the fixed display mode to the moving display mode. As shown in FIG. 3A, after the display frame is fixed so that the center position of the display frame coincides with the center of the detection frame and the fixed display mode is started, the person is moved as shown in FIG. If you move to the edge of the display frame while staying, and start moving from there, the center of the detection frame is shifted from the center of the display frame. When the position of the display frame is determined so as to match, the position of the display frame suddenly changes from the position of the fixed display frame, and it becomes difficult for the user to grasp the correlation between the cut-out images before and after switching the display mode.

そこで、固定表示モードから移動表示モードに移行する際の過渡期間には、次のようにして、表示枠の中心位置(x,y)を決定する。即ち、固定表示モード時の表示枠の中心座標を(xf,yf)とし、移動表示モード時の時刻tにおける検出枠の中心座標を(xt,yt)とし、固定表示モードから移動表示モードに切り替わる時刻をtaとし、固定表示モードから移動表示モードへの切替りの過渡期間をnとすると、時刻ta以前及び時刻ta+n以降では、表示枠の中心位置(x,y)は、それぞれ(xf,yf)、(xt,yt)とし、時刻taから時刻ta+nまでは、下式(1)を表示枠の中心位置(x,y)とする。

Figure 2012175207
Therefore, the center position (x, y) of the display frame is determined in the following manner during the transition period when shifting from the fixed display mode to the moving display mode. That is, the center coordinates of the display frame of a fixed display mode and (x f, y f), the center coordinates of the detection frame at time t of the moving display mode and (x t, y t), the movement from the fixed display mode the time to switch the display mode and t a, the transient period of the switching Ri to the mobile display mode and n from the fixed display mode, the time t a at the previous and the time t a + n later, the center position of the display frame (x, y ), respectively (x f, y f), and (x t, y t), is from time t a to time t a + n, the center position of the display frame the formula (1) (x, y) .
Figure 2012175207

図3(c)は、時刻taから時刻ta+nにおいて、検出枠の中心と表示枠の中心とが徐々に近づく様子を示しており、図3(d)は、時刻ta+nにおいて、検出枠の中心が表示枠の中心に追いついた様子を示している。図3(d)以降は、通常の移動表示モードとなり、表示枠の中心と検出枠の中心とが一致するように表示枠の位置を決定する。 FIG. 3 (c), at time t a + n from time t a, and shows a state where the center of the display frame of the detection frame gradually approaches, Fig. 3 (d), at time t a + n, It shows a state where the center of the detection frame has caught up with the center of the display frame. After FIG. 3D, the normal moving display mode is set, and the position of the display frame is determined so that the center of the display frame coincides with the center of the detection frame.

上述のように、直近の時間sの間における平均位置からの各時刻の距離差の総和が閾値を超えない場合には、表示モードが「固定表示モード」とされて、表示枠が固定される。しかしながら、人物が所定の場所にて停止又は滞留していた状態から、ゆっくりと移動した場合には、距離差の総和が閾値を超えずに(即ち固定表示モードのまま)、人物位置が固定された表示枠から外れてしまうことがある。   As described above, when the sum of the distance differences from the average position during the most recent time s does not exceed the threshold value, the display mode is set to “fixed display mode” and the display frame is fixed. . However, if the person slowly moves from the state where the person has stopped or stayed at the predetermined place, the total position of the distance does not exceed the threshold (that is, the fixed display mode is maintained), and the person position is fixed. May fall out of the display frame.

そこで、表示枠中心位置決定部107は、検出枠が境界ラインを超えたら、表示モードを移動表示モードに変更する。図4(a)は、表示枠と検出枠との関係を示す図である。図4(a)に示すように、表示枠は検出枠を完全に包含しており、固定表示モードの開始時には検出枠と表示枠の中心は一致している。図4(b)は、境界ラインを示す図である。境界ラインは表示枠の内側の一定ピクセル(又は一定割合)の位置に、表示枠より一回り小さい枠として設定される。   Therefore, the display frame center position determination unit 107 changes the display mode to the moving display mode when the detection frame exceeds the boundary line. FIG. 4A is a diagram illustrating the relationship between the display frame and the detection frame. As shown in FIG. 4A, the display frame completely includes the detection frame, and the center of the detection frame and the display frame coincides when the fixed display mode is started. FIG. 4B is a diagram showing boundary lines. The boundary line is set as a frame that is slightly smaller than the display frame at the position of a fixed pixel (or a fixed ratio) inside the display frame.

図4(c)は、検出枠が境界ラインにかかった状態を示す図である。図4(c)に示すように、検出枠が境界ラインにかかると、表示枠中心位置決定部107は、表示モードを固定表示モードから移動表示モードに変更する。なお、この場合にも、上述のように、直ちに検出枠の中心と表示枠の中心を一致させるのではなく、過渡期間nをかけて徐々に表示枠が検出枠に追随するようにする。   FIG. 4C is a diagram illustrating a state in which the detection frame is on the boundary line. As shown in FIG. 4C, when the detection frame is on the boundary line, the display frame center position determination unit 107 changes the display mode from the fixed display mode to the moving display mode. Also in this case, as described above, the center of the detection frame and the center of the display frame are not immediately matched, but the display frame gradually follows the detection frame over the transition period n.

なお、表示枠中心位置決定部107は、検出枠の中心が境界ラインを超えたときに、表示モードを固定表示モードから移動表示モードに変更してもよく、検出枠と境界ラインとの関係についての更に他の基準によって表示モードを変更してもよい。   Note that the display frame center position determination unit 107 may change the display mode from the fixed display mode to the moving display mode when the center of the detection frame exceeds the boundary line, and the relationship between the detection frame and the boundary line. The display mode may be changed according to other criteria.

図1に戻って、切出し画像生成部110は、表示枠内の画像を切り出して、切出し画像を生成して表示する。なお、撮影画像が魚眼レンズを用いて撮影された全方位画像である場合には、切出し画像生成部110は、表示枠について歪み補正を行なって切出し画像を生成する。切出し画像のサイズは、固定されていてもよいし、切出し画像生成部110が人物検出枠の大きさに比例するように切出し画像のサイズを設定してもよい。   Returning to FIG. 1, the cut-out image generation unit 110 cuts out an image in the display frame, generates a cut-out image, and displays it. When the captured image is an omnidirectional image captured using a fisheye lens, the cut-out image generation unit 110 performs distortion correction on the display frame to generate a cut-out image. The size of the cut-out image may be fixed, or the cut-out image generation unit 110 may set the size of the cut-out image so as to be proportional to the size of the person detection frame.

図5は、第1の実施の形態の画像処理装置100の動作を示すフロー図である。画像処理装置100の画像生成部101が、あるフレームの撮影画像を生成すると(ステップS501)、人物検出部102は、撮影画像から人物を検出して(ステップS502)、そのフレームの検出枠を生成し(ステップS503)、そのフレームの検出枠の情報を移動履歴保持部103に保存する(ステップS504)。   FIG. 5 is a flowchart illustrating the operation of the image processing apparatus 100 according to the first embodiment. When the image generation unit 101 of the image processing apparatus 100 generates a captured image of a certain frame (step S501), the person detection unit 102 detects a person from the captured image (step S502) and generates a detection frame for the frame. Then, the information of the detection frame of the frame is stored in the movement history holding unit 103 (step S504).

次に、表示モードが移動表示モードであって、かつ固定表示モードからの変更の過渡期間にある(以下、「移動表示モード(過渡期間)」と表記する)か否かを判断する(ステップS505)。表示モードが移動表示モード(過渡期間)でない場合は(ステップS505にてNO)、平均位置算出部104及び距離差総和算出部105がそれぞれ、移動履歴保持部103から過去の検出枠の移動履歴を読出し(ステップS506)、平均位置算出部104は平均位置を算出し(ステップS507)、距離総和算出部105は、平均位置と、過去のXフレーム分の人物位置との距離差の総和を算出する(ステップS508)。   Next, it is determined whether or not the display mode is the moving display mode and is in a transition period of change from the fixed display mode (hereinafter referred to as “moving display mode (transition period)”) (step S505). ). When the display mode is not the movement display mode (transition period) (NO in step S505), the average position calculation unit 104 and the distance difference total calculation unit 105 respectively store the movement history of the past detection frames from the movement history holding unit 103. Reading (step S506), the average position calculation unit 104 calculates the average position (step S507), and the distance sum calculation unit 105 calculates the sum of distance differences between the average position and the person positions for the past X frames. (Step S508).

表示モード決定部106は、距離差の総和が閾値σより大きいか否かを判断し(ステップS509)、距離差の総和が閾値σを超えていない場合は(ステップS509でNO)、表示モードを固定表示モードとする(ステップS510)。そして、検出枠が境界ラインに掛かっているかを判断し(ステップS511)、掛かっていない場合には(ステップS511にてNO)、現フレームの表示枠の中心と前のフレームの表示枠の中心とが一致するように、現フレームの表示枠の位置を決定して(ステップS512)、切出し画像を生成して表示し、次のフレームのためにステップS501に戻る。   The display mode determination unit 106 determines whether the sum of the distance differences is larger than the threshold σ (step S509). If the sum of the distance differences does not exceed the threshold σ (NO in step S509), the display mode is determined. The fixed display mode is set (step S510). Then, it is determined whether the detection frame is on the boundary line (step S511). If not (NO in step S511), the center of the display frame of the current frame and the center of the display frame of the previous frame are determined. Are determined so as to match (step S512), a cut-out image is generated and displayed, and the process returns to step S501 for the next frame.

表示モード決定部106は、ステップS509にて、距離差の総和が閾値σを超えている場合には(ステップS509にてYES)、表示モードを移動表示モードにするが、その前に、現在の表示モードが固定表示モードであるか否かを判断する(ステップS513)。現在の表示モードが固定表示モードである場合(ステップS513にてYES)、即ち固定表示モードから移動表示モードへ切り替わる際には、表示モードを移動表示モード(過渡期間)として(ステップS514)、上記で説明した過渡処理によって表示枠の位置を決定し(ステップS515)、切出し画像を生成して表示する。   If the sum of the distance differences exceeds the threshold value σ in step S509 (YES in step S509), the display mode determination unit 106 sets the display mode to the moving display mode. It is determined whether or not the display mode is a fixed display mode (step S513). When the current display mode is the fixed display mode (YES in step S513), that is, when switching from the fixed display mode to the moving display mode, the display mode is set to the moving display mode (transition period) (step S514), The position of the display frame is determined by the transient processing described in (Step S515), and a cut-out image is generated and displayed.

そして、過渡期間が終了したか否かを判断し、終了していない場合には(ステップS516でNO)、そのまま、即ち表示モードを移動表示モード(過渡期間)としたまま、次のフレームのためにステップS501に戻る。一方、過渡期間が終了した場合には(ステップS516でYES)、表示モードを通常の移動表示モードに設定して(ステップS517)、次のフレームのためにステップS501に戻る。   Then, it is determined whether or not the transition period has ended. If the transition period has not ended (NO in step S516), the display mode remains unchanged, that is, the display mode remains in the moving display mode (transition period). Return to step S501. On the other hand, when the transition period ends (YES in step S516), the display mode is set to the normal moving display mode (step S517), and the process returns to step S501 for the next frame.

距離の総和が閾値σを超えており(ステップS509にてYES)、かつ、現在の表示モードが固定表示モードでない場合には(ステップS513にてNO)、表示モード決定部107は、表示モードを通常の移動表示モードに設定し(ステップS518)、表示枠の中心が現フレームの検出枠の中心と一致するように表示枠を設定して(ステップS519)、切出し画像を生成して表示し、次のフレームのためにステップS501に戻る。   If the sum of the distances exceeds the threshold σ (YES in step S509) and the current display mode is not the fixed display mode (NO in step S513), the display mode determination unit 107 sets the display mode. The normal moving display mode is set (step S518), the display frame is set so that the center of the display frame coincides with the center of the detection frame of the current frame (step S519), and a cut-out image is generated and displayed. Return to step S501 for the next frame.

なお、ステップS514で表示モードが移動表示モード(過渡期間)に設定された場合には、次のフレームのためにステップS501に戻った後に、ステップS505で表示モードが移動表示モード(過渡期間)であると判断される(ステップS505でYES)。この場合には、直ちに過渡処理で表示枠が設定される(ステップS515)。   If the display mode is set to the moving display mode (transition period) in step S514, the display mode is changed to the movement display mode (transition period) in step S505 after returning to step S501 for the next frame. It is determined that there is (YES in step S505). In this case, the display frame is immediately set by transient processing (step S515).

また、ステップS510で表示モードが固定表示モードとされた時に、人物がゆっくりと移動したことにより、検出枠が境界ラインに掛かった場合には(ステップS511)、表示モードが移動表示モード(過渡期間)に設定され(ステップS514)、過渡期間が終了するまで過渡処理で表示枠が設定されることになる。   In addition, when the display mode is changed to the fixed display mode in step S510, and the detection frame is placed on the boundary line due to the slow movement of the person (step S511), the display mode is the moving display mode (transition period). (Step S514), and the display frame is set in the transient process until the transition period ends.

以上のように、本実施の形態の画像処理装置100によれば、人物が一定の場所に停止又は滞留している場合に、検出枠が振れたとしても、表示モードが固定表示モードにされるので、表示枠がそれに追随して振れることはない。よって、切出し画像が手振れを起こしたような画像になることを防止でき、切出し画像を観察しているユーザに負担を与えることがない。   As described above, according to the image processing apparatus 100 of the present embodiment, when a person is stopped or staying at a certain place, even if the detection frame is shaken, the display mode is set to the fixed display mode. Therefore, the display frame does not follow the display frame. Therefore, it is possible to prevent the clipped image from being an image that causes camera shake, and no burden is imposed on the user who observes the clipped image.

また、表示モードを固定表示モードから移動表示モードに切替える際には、表示枠の位置を直ちに完全に検出枠に追随させるのではなく、一定の過渡期間を設けて、徐々に表示枠の中心が検出枠の中心に近づくように過渡処理を行うので、ユーザが、表示モードが切り替わったことにより切替え前後の切出し画像の相関を把握できないという事態を回避できる。   Also, when the display mode is switched from the fixed display mode to the moving display mode, the center of the display frame is gradually set by providing a certain transition period instead of immediately following the position of the display frame completely. Since the transient process is performed so as to approach the center of the detection frame, it is possible to avoid a situation in which the user cannot grasp the correlation between the cut-out images before and after switching due to the switching of the display mode.

更に、所定のフレーム数分の平均位置と人物位置との距離差の総和が所定の閾値を越えるか否かで固定表示モードとするか移動表示モードとするかを決定する場合には、人物がゆっくりと移動すると、距離差の総和が閾値を越えない状態で人物位置が表示枠から外れてしまうことも生じうるが、本実施の形態の画像処理装置100によれば、固定表示モードにおいても、検出枠が境界ラインに掛かった場合には移動表示モードに移行するので、そのような事態を回避できる。   Further, when determining whether to set the fixed display mode or the moving display mode depending on whether the sum of the distance differences between the average position and the person position for a predetermined number of frames exceeds a predetermined threshold, If it moves slowly, the position of the person may deviate from the display frame in a state where the sum of the distance differences does not exceed the threshold. However, according to the image processing apparatus 100 of the present embodiment, even in the fixed display mode, Since the shift to the moving display mode occurs when the detection frame is on the boundary line, such a situation can be avoided.

(第2の実施の形態)
図6は、第2の実施の形態の画像処理装置200の構成を示すブロック図である。図6の画像処理装置200において、第1の実施の形態の画像処理装置100の構成と同一の構成要素には同一の符号を付して、その説明を省略する。本実施の形態の画像処理装置200は、第1の実施の形態の画像処理装置100の構成に加えて、更に、人物向き検出部211及び方向比較部212を備えている。また、本実施の形態の画像処理装置200は、第1の実施の形態の表示モード決定部106に相当する構成要素として、表示モード決定部206を備えており、第1の実施の形態の表示枠中心位置決定部107に相当する構成要素として、表示枠中心位置及び表示枠サイズ決定部207を備えている。
(Second Embodiment)
FIG. 6 is a block diagram illustrating a configuration of the image processing apparatus 200 according to the second embodiment. In the image processing apparatus 200 of FIG. 6, the same components as those of the image processing apparatus 100 of the first embodiment are denoted by the same reference numerals, and the description thereof is omitted. In addition to the configuration of the image processing apparatus 100 according to the first embodiment, the image processing apparatus 200 according to the present embodiment further includes a person orientation detection unit 211 and a direction comparison unit 212. The image processing apparatus 200 according to the present embodiment includes a display mode determination unit 206 as a component corresponding to the display mode determination unit 106 according to the first embodiment, and the display according to the first embodiment. As a component equivalent to the frame center position determination unit 107, a display frame center position and display frame size determination unit 207 is provided.

人物向き検出部211は、撮像画像内の人物の向きを検出する。具体的には、方向別の人物モデルのテンプレートを用いて、該当するテンプレートを決定することで、人物の向きを検出する。人物モデルは、例えば前後、左、右の3方向について用意される。3種類のテンプレートのうちの最もマッチングスコアの高いテンプレートの示す方向をその人物の向きとして検出してもよい。また、人物の画像とこの3種類のテンプレートのいずれかとの間のマッチングスコアが所定の閾値より高い場合に、その人物が当該マッチングスコアの高いテンプレートの示す方向を向いていると判断してもよい。図7(a)は、右向きのテンプレートのマッチングスコアが高い場合を示す図であり、図7(b)は、左向きのテンプレートのマッチングスコアが高い場合を示す図である。   The person orientation detection unit 211 detects the orientation of the person in the captured image. Specifically, the direction of the person is detected by determining the corresponding template using the template of the person model for each direction. The person model is prepared in three directions, for example, front and rear, left and right. The direction indicated by the template having the highest matching score among the three types of templates may be detected as the direction of the person. Further, when the matching score between a person image and one of the three types of templates is higher than a predetermined threshold, it may be determined that the person is facing the direction indicated by the template having the higher matching score. . FIG. 7A is a diagram illustrating a case where the matching score of the rightward template is high, and FIG. 7B is a diagram illustrating a case where the matching score of the leftward template is high.

方向比較部212は、移動履歴保持部103から人物位置の移動履歴を読み出して、人物位置の移動方向(人物動線の方向)を求める。方向比較部212は、更に、求めた人物動線の方向と人物向き検出部211で検出した人物の向きとを比較し、両方向が一致するか否かを判断し、その判断結果を表示モード決定部206に出力する。また、方向比較部212は、両方向が一致しない場合には、その旨を表示枠中心位置及び表示枠サイズ決定部207に通知する。   The direction comparison unit 212 reads the movement history of the person position from the movement history holding unit 103 and obtains the movement direction of the person position (the direction of the person flow line). The direction comparison unit 212 further compares the obtained direction of the person flow line with the direction of the person detected by the person direction detection unit 211, determines whether or not both directions match, and determines the determination result as a display mode. The data is output to the unit 206. If the two directions do not match, the direction comparison unit 212 notifies the display frame center position and the display frame size determination unit 207 to that effect.

図7(a)の例では、人物動線の方向が右方向であり、人物の向きも右方向であるので、方向比較部212は、両方向が一致していると判断する。また、図7(b)の例では、人物動線の方向が右方向であり、人物の向きが左方向であるので、方向比較部212は、両方向は一致していないと判断する。方向比較部212は、具体的には、両方向の間の角度が所定の閾値以下である場合に、両方向が一致すると判断する。   In the example of FIG. 7A, since the direction of the person flow line is the right direction and the direction of the person is also the right direction, the direction comparison unit 212 determines that the two directions match. In the example of FIG. 7B, since the direction of the person flow line is the right direction and the direction of the person is the left direction, the direction comparison unit 212 determines that the two directions do not match. Specifically, the direction comparison unit 212 determines that the two directions match when the angle between the two directions is equal to or smaller than a predetermined threshold.

表示モード決定部206は、距離差の総和が閾値σを超えていない場合、及び、距離差の総和が閾値σを超えているが方向比較部212から出力された結果が、人物動線の方向と人物の向きとが一致しないという結果である場合には、表示モードを固定表示モードに設定する。表示モード決定部206は、距離差の総和が閾値σを超えており、かつ、方向比較部212から出力された結果が、人物動線の方向と人物の向きとが一致するという結果である場合は、表示モードを移動表示モードとする。   The display mode determination unit 206 displays the direction of the person flow line when the sum of the distance differences does not exceed the threshold σ and the result output from the direction comparison unit 212 when the sum of the distance differences exceeds the threshold σ. If the result is that the direction of the person does not match the direction of the person, the display mode is set to the fixed display mode. When the sum of the distance differences exceeds the threshold σ and the result output from the direction comparison unit 212 is a result that the direction of the person flow line matches the direction of the person The display mode is the moving display mode.

表示枠中心位置及び表示枠サイズ決定部207は、固定表示モードが設定された場合には、表示枠のサイズを検出枠のサイズのα倍(α>1)とし、移動表示モードが設定された場合には、表示枠を検出枠と同じ大きさにする。   When the fixed display mode is set, the display frame center position and display frame size determination unit 207 sets the display frame size to α times the detection frame size (α> 1), and the moving display mode is set. In this case, the display frame is made the same size as the detection frame.

表示枠中心位置及び表示枠サイズ決定部207は、表示モード決定部206から表示モードとして固定表示モードが設定されたことが通知され、かつ、方向比較部212から人物動線の方向と人物の向きとが一致しないという結果が通知された場合には、固定表示モードのおける表示枠を設定する際に、検出枠内の人物が向いている方向ほど表示枠を広くするように、表示枠のサイズを決定する。その他の構成は、第1の実施の形態と同様である。   The display frame center position and display frame size determination unit 207 is notified by the display mode determination unit 206 that the fixed display mode is set as the display mode, and the direction comparison unit 212 notifies the direction of the person flow line and the direction of the person. If the result is that they do not match, when setting the display frame in the fixed display mode, the size of the display frame is set so that the display frame becomes wider in the direction in which the person in the detection frame faces. To decide. Other configurations are the same as those of the first embodiment.

以上のように、第2の実施の形態の画像処理装置200によれば、画像処理により撮像画像中の人物の向きを比較して、人物位置の移動履歴に基づく人物動線の方向が人物の向きと一致するときは、その人物動線は人物の移動によるものであると判断して、距離差が閾値σを超える場合に表示モードを移動表示モードに設定し、人物動線の方向と人物の向きとが一致しないときは、検出枠の変動は検出枠の振れによるものであると判断して、距離差が閾値σを超える場合であっても表示モードを固定表示モードとする。よって、人物の向きを考慮して、より適切に、人物が移動しているのか、停止又は滞留しているのかを判断できる。   As described above, according to the image processing apparatus 200 of the second embodiment, the direction of the person in the captured image is compared by the image processing, and the direction of the person flow line based on the movement history of the person position is the person's direction. If it matches the direction, it is determined that the person flow line is due to the movement of the person, and when the distance difference exceeds the threshold σ, the display mode is set to the movement display mode, and the direction of the person flow line and the person If the direction does not match, it is determined that the fluctuation of the detection frame is due to the fluctuation of the detection frame, and the display mode is set to the fixed display mode even when the distance difference exceeds the threshold σ. Therefore, it is possible to more appropriately determine whether the person is moving, stopped, or staying in consideration of the direction of the person.

(第3の実施の形態)
図8は、第3の実施の形態の画像処理装置300の構成を示すブロック図である。図8の画像処理装置300において、第1の実施の形態の画像処理装置100の構成と同一の構成要素には同一の符号を付して、その説明を省略する。本実施の形態の画像処理装置300は、第1の実施の形態の画像処理装置100の構成に加えて、更に、移動状態算出部311及びパターン内重み保持部312を備えている。また、本実施の形態の画像処理装置300は、第1の実施の形態の表示モード決定部106に相当する構成要素として、表示モード決定部306を備えており、第1の実施の形態の表示枠中心位置決定部107に相当する構成要素として、表示枠中心位置及び表示枠サイズ決定部307を備えている。
(Third embodiment)
FIG. 8 is a block diagram illustrating a configuration of an image processing apparatus 300 according to the third embodiment. In the image processing apparatus 300 of FIG. 8, the same components as those of the image processing apparatus 100 according to the first embodiment are denoted by the same reference numerals, and description thereof is omitted. In addition to the configuration of the image processing apparatus 100 according to the first embodiment, the image processing apparatus 300 according to the present embodiment further includes a movement state calculation unit 311 and an intra-pattern weight holding unit 312. The image processing apparatus 300 according to the present embodiment includes a display mode determination unit 306 as a component corresponding to the display mode determination unit 106 according to the first embodiment, and the display according to the first embodiment. As a component equivalent to the frame center position determining unit 107, a display frame center position and display frame size determining unit 307 is provided.

人物が移動しているが、その移動領域が一定の範囲内に収まっており、表示枠を検出枠に追随させても、手振れのようにごく小さな範囲内における頻繁かつ高速な変動にはならないものの、表示枠が一定の範囲内を速い速度で上下左右に頻繁に移動する場合には、はやり切出し画像を観察しているユーザにストレスを与えてしまうことがある。本実施の形態の画像処理装置300は、このようなユーザに与えるストレスを解消することができる。   Although the person is moving, the movement area is within a certain range, and even if the display frame follows the detection frame, it does not cause frequent and high-speed fluctuation within a very small range like camera shake. When the display frame frequently moves up and down and left and right at a high speed within a certain range, the user who observes the cut-out image may be stressed. The image processing apparatus 300 according to the present embodiment can eliminate such stress on the user.

移動状態算出部311は、移動履歴保持部103に保存された人物位置の移動履歴を参照して、人物が所定の大きさの範囲内を速い速度で移動しているか否かを判断し、その結果を表示モード決定部306及び表示枠中心位置出力する。人物が所定の大きさの範囲内を速い速度で移動しているか否かは、直近のXフレーム(現在時刻をtとして、時刻t−sから時刻tまでの間)について、各フレームの検出枠の速度(前フレームからの移動距離)の総和を、平均位置と各フレームの検出枠の中心位置との距離差の総和で除したパラメータが、所定の閾値を上回るか否かで判断できる。また、移動状態算出部311は、人物が所定の大きさの範囲内を速い速度で移動していると判断した場合には、その旨を表示枠中心位置及び表示枠サイズ決定部307に通知する。   The movement state calculation unit 311 refers to the movement history of the person position stored in the movement history holding unit 103 to determine whether or not the person is moving at a high speed within a predetermined size range. The result is output to the display mode determination unit 306 and the display frame center position. Whether or not a person is moving within a predetermined size range at a high speed is determined based on the detection frame of each frame for the most recent X frame (current time is t to time t-s to time t). It is possible to determine whether or not the parameter obtained by dividing the sum of the speeds (the movement distance from the previous frame) by the sum of the distance differences between the average position and the center position of the detection frame of each frame exceeds a predetermined threshold value. When the movement state calculation unit 311 determines that the person is moving at a high speed within a predetermined size range, the movement state calculation unit 311 notifies the display frame center position and the display frame size determination unit 307 to that effect. .

表示モード決定部306は、距離差の総和が閾値σを超えていない場合、及び、距離差の総和が閾値σを超えているが移動状態算出部311から出力された結果が、人物が所定の大きさの範囲内を速い速度で移動しているという結果である場合には、表示モードを固定表示モードに設定する。表示モード決定部306は、距離差の総和が閾値σを超えており、かつ、移動状態算出部311から出力された結果が、人物が所定の大きさの範囲内を速い速度で移動しているという結果でない場合は、表示モードを移動表示モードとする。   The display mode determination unit 306 determines that the person is a predetermined value when the sum of the distance differences does not exceed the threshold σ and the result output from the movement state calculation unit 311 when the sum of the distance differences exceeds the threshold σ. If the result is that the robot is moving at a high speed within the size range, the display mode is set to the fixed display mode. The display mode determination unit 306 indicates that the sum of the distance differences exceeds the threshold σ, and the result output from the movement state calculation unit 311 indicates that the person is moving within a predetermined size range at a high speed. If the result is not, the display mode is set to the moving display mode.

表示枠中心位置及び表示枠サイズ決定部307は、表示モード決定部306から表示モードとして固定表示モードが設定されたことが通知され、かつ、移動状態算出部311から人物が所定の大きさの範囲内を速い速度で移動しているという判断結果が通知された場合には、固定表示モードにおける表示枠を決定する際に、表示枠を広くするように、表示枠のサイズを決定する。表示枠中心位置及び表示枠サイズ決定部307は、直近のXフレームにおいて人物が移動している範囲を包含するように表示枠のサイズを決定してよい。   The display frame center position and display frame size determination unit 307 is notified by the display mode determination unit 306 that the fixed display mode has been set as the display mode, and the movement state calculation unit 311 has a predetermined size range. When a determination result indicating that the user is moving at a high speed is notified, the size of the display frame is determined so as to widen the display frame when determining the display frame in the fixed display mode. The display frame center position and display frame size determination unit 307 may determine the size of the display frame so as to include the range in which the person is moving in the latest X frame.

また、パターン内重み保持部312には、パターン内の重みが保持されている。表示枠中心位置及び表示枠サイズ決定部307は、表示枠のサイズを大きく設定する際に、その中心位置をどこにするかを判断する際に、パターン内重み保持部312に保持された重みを参照して、人物パターン内の顔の部分の重みを大きくする。その他の構成は、第1の実施の形態と同様である。   The intra-pattern weight holding unit 312 holds the intra-pattern weight. The display frame center position and display frame size determination unit 307 refers to the weight held in the in-pattern weight holding unit 312 when determining where to set the center position when setting the size of the display frame to be large. Then, the weight of the face portion in the person pattern is increased. Other configurations are the same as those of the first embodiment.

以上のように、第3の実施の形態の画像処理装置300によれば、人物の移動状態が、所定の大きさの範囲内を速い速度で移動しているものであるか否かを判断して、人物が所定の大きさの範囲内を速い速度で移動している場合には、表示枠を大きくして固定するので、表示枠が一定の範囲内を速い速度で上下左右に頻繁に移動することによって切出し画像を観察しているユーザにストレスを与えることを回避できる。   As described above, according to the image processing apparatus 300 of the third embodiment, it is determined whether or not the movement state of a person is moving within a predetermined size range at a high speed. When a person is moving within a predetermined size range at a high speed, the display frame is enlarged and fixed, so the display frame frequently moves up, down, left, and right within a certain range at a high speed. By doing so, it is possible to avoid stressing the user who is observing the cut-out image.

(第4の実施の形態)
図9は、第4の実施の形態の画像処理装置400の構成を示すブロック図である。図9の画像処理装置400において、第1の実施の形態の画像処理装置100の構成と同一の構成要素には同一の符号を付して、その説明を省略する。本実施の形態の画像処理装置400は、第1の実施の形態の画像処理装置100の構成に加えて、更に、移動ルート算出部411及び移動ルート保持部412を備えている。また、本実施の形態の画像処理装置400は、第1の実施の形態の表示枠中心位置決定部107に相当する構成要素として、表示枠位置決定部407を備えている。
(Fourth embodiment)
FIG. 9 is a block diagram illustrating a configuration of an image processing apparatus 400 according to the fourth embodiment. In the image processing apparatus 400 of FIG. 9, the same components as those of the image processing apparatus 100 according to the first embodiment are denoted by the same reference numerals, and description thereof is omitted. In addition to the configuration of the image processing apparatus 100 according to the first embodiment, the image processing apparatus 400 according to the present embodiment further includes a movement route calculation unit 411 and a movement route holding unit 412. Further, the image processing apparatus 400 according to the present embodiment includes a display frame position determination unit 407 as a component corresponding to the display frame center position determination unit 107 according to the first embodiment.

画像生成部101がある場所を撮影している場合は、その場所において、障害物等の要因により、人物の移動ルートが限られる場合がある。この場合には、表示枠の位置もその移動ルートを辿るように変動させればよい。そこで、本実施の形態では、表示枠の位置を人物が移動する移動ルート上に制限する。   When a place where the image generation unit 101 is located is photographed, the movement route of the person may be limited at the place due to an obstacle or the like. In this case, the position of the display frame may be changed so as to follow the movement route. Therefore, in the present embodiment, the position of the display frame is limited on the moving route along which the person moves.

移動ルート算出部411は、同じ場所を複数回通過した人物などから平均的な移動ルートを算出する。移動ルート保持部412は、移動ルート算出部411で算出された平均的な移動ルートを保持する。図10(a)は、人物の複数回の移動による軌跡から平均的なルートを求める処理を説明する図である。図10(a)に示すように、人物がほぼ同じルートで何度も検出されている場合には、移動ルート算出部411は、検出枠の移動状況に基づいて、平均的な一本の曲線を、平均的な移動ルートとして決定し、移動ルート保持部412は、これを保持する。   The travel route calculation unit 411 calculates an average travel route from a person who has passed the same place multiple times. The movement route holding unit 412 holds the average movement route calculated by the movement route calculation unit 411. FIG. 10A is a diagram for explaining processing for obtaining an average route from a trajectory caused by a plurality of movements of a person. As shown in FIG. 10 (a), when a person is detected many times on substantially the same route, the movement route calculation unit 411 determines an average single curve based on the movement status of the detection frame. Is determined as the average travel route, and the travel route holding unit 412 holds this.

表示枠位置決定部407は、移動表示モードが設定されている場合に、表示枠を表示する範囲を移動ルート保持部412に保持されている移動ルート上に固定する。即ち、表示枠位置決定部407は、平均的な移動ルート上の前後方向のみを検出枠の位置に対応するように決定する。図10(b)は、このようにして決定される表示枠を示す図である。表示枠の中心は、常に、移動ルート保持部407に保持されている移動ルート上に位置している。表示枠の中心は、検出枠の中心から最も近い移動ルート上の点とすることができる。   When the movement display mode is set, the display frame position determination unit 407 fixes the display frame display range on the movement route held in the movement route holding unit 412. That is, the display frame position determination unit 407 determines only the front-rear direction on the average moving route to correspond to the position of the detection frame. FIG. 10B is a diagram showing the display frame determined in this way. The center of the display frame is always located on the movement route held by the movement route holding unit 407. The center of the display frame can be a point on the moving route that is closest to the center of the detection frame.

図11は、本実施の形態の変形例を示す図である。この変形例では、表示枠位置決定部407は、人物の移動履歴に基づいて移動方向を判断し、検出枠の中心から最も近い移動ルート上の点から、移動ルート上を移動方向にずらした点を表示枠の中心とする。図11において、実線は、検出枠の中心から最も近い移動ルート上の点を中心とする表示枠であり、点線は、検出枠の中心から最も近い移動ルート上の点移動ルート上を移動方向に所定長さだけずらした点を中心とする表示枠である。   FIG. 11 is a diagram illustrating a modification of the present embodiment. In this modification, the display frame position determination unit 407 determines the moving direction based on the movement history of the person, and the point on the moving route is shifted in the moving direction from the point on the moving route closest to the center of the detection frame. Is the center of the display frame. In FIG. 11, a solid line is a display frame centered on a point on the moving route closest to the center of the detection frame, and a dotted line is a moving direction on the point moving route on the moving route closest to the center of the detection frame. This is a display frame centered on a point shifted by a predetermined length.

以上のように、第4の実施の形態の画像処理装置400によれば、過去の人物の移動の履歴から平均的な移動ルートを求めて、表示枠の位置をその移動ルート上に制限するので、移動ルートとは異なる方向への検出枠の変動によって表示枠が振れることはなく、切出し画像を観察しているユーザに与える、表示枠の変動によるストレスを軽減できる。   As described above, according to the image processing apparatus 400 of the fourth embodiment, an average movement route is obtained from the movement history of past persons, and the position of the display frame is limited on the movement route. The display frame does not shake due to the change of the detection frame in a direction different from the moving route, and the stress caused by the change of the display frame that is given to the user who observes the cut-out image can be reduced.

また、平均的な移動ルートが求まり、かつ、人物の移動方向が分かれば、人物の移動先を予測できるので、表示枠を移動ルート上で、人物の移動に先行させて設定することもできる。   Further, if the average movement route is obtained and the movement direction of the person is known, the movement destination of the person can be predicted. Therefore, the display frame can be set on the movement route in advance of the movement of the person.

(第5の実施の形態)
図12は、第5の実施の形態の画像処理装置500の構成を示すブロック図である。図12の画像処理装置500において、第1の実施の形態の画像処理装置100の構成と同一の構成要素には同一の符号を付して、その説明を省略する。本実施の形態の画像処理装置500は、第1の実施の形態の画像処理装置100の構成に加えて、更に、画像歪み情報保持部511及び重み付け部512を備えている。また、本実施の形態の画像処理装置500は、第1の実施の形態の距離差総和算出部105に相当する構成要素として、距離差総和算出部505を備えている。
(Fifth embodiment)
FIG. 12 is a block diagram illustrating a configuration of an image processing apparatus 500 according to the fifth embodiment. In the image processing apparatus 500 of FIG. 12, the same components as those of the image processing apparatus 100 of the first embodiment are denoted by the same reference numerals, and description thereof is omitted. The image processing apparatus 500 according to the present embodiment further includes an image distortion information holding unit 511 and a weighting unit 512 in addition to the configuration of the image processing apparatus 100 according to the first embodiment. Further, the image processing apparatus 500 according to the present embodiment includes a distance difference total calculation unit 505 as a component corresponding to the distance difference total calculation unit 105 according to the first embodiment.

本実施の形態の画像生成部101は、水平画角360度の魚眼レンズを用いて、撮影画像として全方位画像を生成する。全方位画像は、円形の画像であり、円の中心から円周部に向かうほどその歪が大きくなる。切出し画像生成部110は、円形の全方位画像から表示枠を切り出して、歪み補正をして平面画像を生成してそれを表示する。   The image generation unit 101 according to the present embodiment generates an omnidirectional image as a captured image using a fisheye lens with a horizontal angle of view of 360 degrees. The omnidirectional image is a circular image, and the distortion increases from the center of the circle toward the circumference. The cut-out image generation unit 110 cuts out a display frame from a circular omnidirectional image, corrects distortion, generates a plane image, and displays it.

画像歪み情報保持部511は、撮影画像の位置ごとに画像の歪み情報を保持する。上述のように、画像の歪みは、画像周辺部の方が画像中心部よりも大きい。重み付け部512は、画像の中心から外側に向けた(即ち半径方向の)移動に対して、画像の円周に沿った移動よりも重い重み付けをする。距離差総和算出部505は、画像上の検出枠の位置と移動方向に応じて、重み付け部512にて重み付けがされた距離差の総和を求める。   The image distortion information holding unit 511 holds image distortion information for each position of the captured image. As described above, the distortion of the image is larger at the periphery of the image than at the center of the image. The weighting unit 512 weights the movement from the center of the image outward (that is, in the radial direction) more heavily than the movement along the circumference of the image. The distance difference sum calculation unit 505 obtains the sum of the distance differences weighted by the weighting unit 512 according to the position of the detection frame on the image and the moving direction.

全方位画像においては、円周方向の移動に比べて、半径方向への移動の際には、画像上での位置変動が小さくなる。このため、重み付け部512は、半径方向への移動に対しては、距離差に付与する重みを軽くすることで、半径方向への移動時には、画像上で大きく位置が変動した場合にのみ移動表示モードとなるようにする。   In the omnidirectional image, the position variation on the image is smaller when moving in the radial direction than when moving in the circumferential direction. For this reason, the weighting unit 512 reduces the weight given to the distance difference for the movement in the radial direction, and when moving in the radial direction, the movement display is performed only when the position largely fluctuates on the image. Make it a mode.

図13は、全方位画像の位置に応じた重み付け処理を説明する図である。図13(a)のように、人物が円形の全方位画像の円周方向に沿うように移動する場合には、重み付け部512は、平均位置からの距離差に重い重みを付けて、距離差総和算出部505が距離差の総和を算出する。この結果、距離差の総和は閾値σを上回り、表示モード決定部106では、移動表示モードが設定される。   FIG. 13 is a diagram illustrating weighting processing according to the position of the omnidirectional image. As shown in FIG. 13A, when the person moves along the circumferential direction of the circular omnidirectional image, the weighting unit 512 applies a heavy weight to the distance difference from the average position, and the distance difference A sum calculation unit 505 calculates the sum of the distance differences. As a result, the sum of the distance differences exceeds the threshold σ, and the display mode determination unit 106 sets the movement display mode.

図13(b)のように、人物が円形の全方位画像の半径方向に移動する場合には、重み付け部512は、平均位置からの距離差に軽い重みをつけて、距離差総和算出部505が距離差の総和を算出する。その結果、図13(b)に示すように、十分に長い距離を移動している場合には、距離差の総和は閾値σを上回り、表示モード決定部106では、移動表示モードが設定される。   When the person moves in the radial direction of the circular omnidirectional image as shown in FIG. 13B, the weighting unit 512 gives a light weight to the distance difference from the average position, and the distance difference sum calculation unit 505. Calculates the sum of the distance differences. As a result, as shown in FIG. 13B, when moving over a sufficiently long distance, the sum of the distance differences exceeds the threshold σ, and the display mode determination unit 106 sets the movement display mode. .

図13(c)のように、人物が円形の全方位画像の半径方向に移動する場合には、重み付け部512は、平均位置からの距離差に軽い重みをつけて、距離差総和算出部505が距離差の総和を算出する。その結果、図13(c)に示すように、十分に長い距離を移動していない場合には、距離差の総和は閾値σを超えず、表示モード決定部106では、固定表示モードが設定される。   As shown in FIG. 13C, when the person moves in the radial direction of the circular omnidirectional image, the weighting unit 512 gives a light weight to the distance difference from the average position, and the distance difference sum calculation unit 505. Calculates the sum of the distance differences. As a result, as shown in FIG. 13C, when the distance is not sufficiently long, the sum of the distance differences does not exceed the threshold σ, and the display mode determination unit 106 sets the fixed display mode. The

さらに、重み付け部512は、人物が画像の円周に沿った移動をしている場合でも、中心部付近か外周付近かによって重みを変える。全方位画像においては、中心部付近での移動は外周付近の移動に比べて画像上での位置変動が大きくなる。このため、重み付け部512は中心部付近の移動の場合は重みを大きくする。   Furthermore, the weighting unit 512 changes the weight depending on whether the person is moving along the circumference of the image, near the center or near the periphery. In the omnidirectional image, the movement near the center portion has a larger positional variation on the image than the movement near the outer periphery. For this reason, the weighting unit 512 increases the weight in the case of movement near the center.

以上のように、第5の実施の形態の画像処理装置500によれば、中心から円周に向かうほど歪が大きくなるという全方位画像の特性に応じた重み付けをして、距離差の総和を算出するので、全方位画像の歪みによって、人物が実際には移動しているのに、停止又は滞留であると推定してしまうことを軽減できる。   As described above, according to the image processing apparatus 500 of the fifth embodiment, weighting is performed according to the characteristics of the omnidirectional image that distortion increases from the center toward the circumference, and the total distance difference is calculated. Since the calculation is performed, it can be reduced that the person is actually moving but is estimated to be stopped or stayed due to the distortion of the omnidirectional image.

なお、上記の第1ないし第5の実施の形態では、表示枠を検出枠より大きくして、検出枠が表示枠に包含されるように表示枠を設定した。しかし、例えば、検出枠から人物の顔部分を抽出して、顔の部分のみについて切り出し画像を生成してもよい。この場合には、表示枠は検出枠よりも小さくなることがある。よって、移動表示モードにおいて、表示枠の位置を検出枠の位置に追随させる場合にも、表示枠と検出枠とは一定の関係にあればよく、必ずしも表示枠が検出枠を含み検出枠より大きいものでなくてもよい。   In the first to fifth embodiments, the display frame is set to be larger than the detection frame and to be included in the display frame. However, for example, a human face portion may be extracted from the detection frame, and a cut-out image may be generated for only the face portion. In this case, the display frame may be smaller than the detection frame. Therefore, even when the position of the display frame is made to follow the position of the detection frame in the moving display mode, the display frame and the detection frame need only have a certain relationship, and the display frame necessarily includes the detection frame and is larger than the detection frame. It doesn't have to be a thing.

また、上記の第1ないし第5の実施の形態では、人物検出部102は、画像中の人物を検出して検出枠を生成したが、人物以外の移動体を検出してもよい。   In the first to fifth embodiments, the person detection unit 102 detects a person in the image and generates a detection frame. However, a moving body other than a person may be detected.

以上のように、本発明は、検出枠の位置の履歴に基づいて、位置が振れないように表示枠が決定して、その表示枠で切出し画像を生成するので、切出し画像を観察しているユーザに与える、表示枠の変動によるストレスを軽減でき、撮影画像に対して画像処理を行い、撮影画像中の表示枠を切り出した切出し画像を生成する画像処理装置等として有用である。   As described above, according to the present invention, the display frame is determined based on the history of the position of the detection frame so that the position does not move, and the cut image is generated with the display frame. Therefore, the cut image is observed. This is useful as an image processing apparatus or the like that can reduce stress on the user due to fluctuations in the display frame, performs image processing on the captured image, and generates a cut image obtained by cutting out the display frame in the captured image.

100 画像処理装置
101 画像生成部
102 人物検出部
103 移動履歴保持部
104 平均位置算出部
105 距離差総和算出部
106 表示モード決定部
107 表示中心位置決定部
108 表示枠位置決定パラメータ保持部
109 表示枠位置保持部
110 切出し画像生成部
200 画像処理装置
207 表示枠中心位置及び表示枠サイズ決定部
211 人物向き検出部
212 方向比較部
300 画像処理装置
306 表示モード決定部
307 表示枠中心位置及び表示枠サイズ決定部
311 移動状態算出部
312 パターン内重み保持部
400 画像処理装置
407 表示枠位置決定部
411 移動ルート算出部
412 移動ルート保持部
500 画像処理装置
505 距離差総和算出部
511 画像歪み情報保持部
512 重み付け部
DESCRIPTION OF SYMBOLS 100 Image processing apparatus 101 Image generation part 102 Person detection part 103 Movement history holding part 104 Average position calculation part 105 Distance difference sum total calculation part 106 Display mode determination part 107 Display center position determination part 108 Display frame position determination parameter holding part 109 Display frame Position holding unit 110 Cutout image generation unit 200 Image processing device 207 Display frame center position and display frame size determination unit 211 Person orientation detection unit 212 Direction comparison unit 300 Image processing device 306 Display mode determination unit 307 Display frame center position and display frame size Determination unit 311 Movement state calculation unit 312 In-pattern weight holding unit 400 Image processing device 407 Display frame position determination unit 411 Movement route calculation unit 412 Movement route holding unit 500 Image processing device 505 Distance difference sum calculation unit 511 Image distortion information holding unit 512 Weighting part

Claims (16)

撮影により画像を生成する画像生成部と、
前記画像中の移動体を囲む領域を検出枠として検出する検出枠生成部と、
前記検出枠の位置の履歴に基づいて、位置が振れないように、表示枠を決定する表示枠決定部と、
前記表示枠決定部にて決定された前記表示枠の切出し画像を生成する切出し画像生成部と、
を備えたことを特徴とする画像処理装置。
An image generation unit that generates an image by shooting;
A detection frame generation unit that detects a region surrounding the moving body in the image as a detection frame;
A display frame determining unit that determines a display frame based on a history of the position of the detection frame so that the position does not move;
A cut-out image generation unit that generates a cut-out image of the display frame determined by the display frame determination unit;
An image processing apparatus comprising:
前記表示枠決定部は、前記検出枠の位置の履歴に基づいて、表示モードを、前記表示枠を前記検出枠に追随して移動させる移動表示モード又は前記検出枠の変動に関らず前記表示枠を固定する固定表示モードのいずれかに設定し、設定された前記表示モードに従って前記表示枠の位置を決定することを特徴とする請求項1に記載の画像処理装置。   The display frame determination unit is configured to display the display mode regardless of a movement display mode in which the display frame is moved following the detection frame or a change in the detection frame based on a history of the position of the detection frame. The image processing apparatus according to claim 1, wherein the image processing apparatus is set to any one of a fixed display mode for fixing a frame, and the position of the display frame is determined according to the set display mode. 前記表示枠決定部は、前記検出枠の位置の履歴に基づいて、前記移動体が移動しているか、又は停止若しくは滞留しているかを推定し、前記移動体が移動していると推定した場合に、前記表示モードを前記移動表示モードに設定し、前記移動体が停止又は滞留していると推定した場合に、前記表示モードを前記固定表示モードに設定することを特徴とする請求項2に記載の画像処理装置。   When the display frame determining unit estimates whether the moving body is moving or stopped or stays based on the history of the position of the detection frame, and estimates that the moving body is moving Further, the display mode is set to the fixed display mode when the display mode is set to the moving display mode and it is estimated that the moving body is stopped or staying. The image processing apparatus described. 前記表示枠決定部は、前記表示モードが前記固定表示モードから前記移動表示モードに移行する際に、前記表示枠がスムーズに変動するよう前記表示枠を決定することを特徴とする請求項2又は3に記載の画像処理装置。   The said display frame determination part determines the said display frame so that the said display frame may change smoothly, when the said display mode transfers to the said movement display mode from the said fixed display mode. The image processing apparatus according to 3. 前記表示枠決定部は、前記検出枠の大きさ及び前記検出枠の位置の履歴に基づいて、前記表示枠の大きさを決定することを特徴とする請求項1ないし請求項4のいずれか一項に記載の画像処理装置。   5. The display frame determination unit determines the size of the display frame based on the size of the detection frame and the history of the position of the detection frame. 6. The image processing apparatus according to item. 前記表示枠決定部は、前記検出枠の位置の履歴に基づいて、前記移動体が移動しているか、又は停止若しくは滞留しているかを推定し、前記移動体が停止又は滞留していると推定した場合に、前記移動体が移動していると推定した場合よりも、前記表示枠の大きさを大きくすることを特徴とする請求項5に記載の画像処理装置。   The display frame determination unit estimates whether the moving body is moving, stopped or stayed based on the history of the position of the detection frame, and estimates that the moving body is stopped or staying. The image processing apparatus according to claim 5, wherein the size of the display frame is made larger than when it is estimated that the moving body is moving. 前記表示枠決定部は、前記検出枠の位置の履歴に基づいて、前記検出枠が所定の期間内に移動した範囲を含むように、前記表示枠の位置及び大きさを決定して固定することを特徴とする請求項5に記載の画像処理装置。   The display frame determining unit determines and fixes the position and size of the display frame based on a history of the position of the detection frame so as to include a range in which the detection frame has moved within a predetermined period. The image processing apparatus according to claim 5. 前記表示枠決定部は、前記検出枠が、固定された前記表示枠の周囲に達したときに、前記表示枠の固定を解除することを特徴とする請求項2ないし4、7のいずれか一項に記載の画像処理装置。   8. The display frame determination unit according to claim 2, wherein the display frame determination unit releases the fixing of the display frame when the detection frame reaches the periphery of the fixed display frame. The image processing apparatus according to item. 前記表示枠決定部は、所定の期間内における前記検出枠の平均位置を求め、前記所定の期間内における各検出枠の位置と前記平均位置との距離差の総和を求め、前記距離差の総和が所定の閾値より大きいときは、前記移動体が移動していると推定し、前記距離差の総和が前記所定の閾値より小さいときは、前記移動体が停止又は滞留していると推定することを特徴とする請求項3又は6に記載の画像処理装置。   The display frame determination unit obtains an average position of the detection frames within a predetermined period, obtains a sum of distance differences between the positions of the detection frames and the average position within the predetermined period, and sums the distance differences. Is greater than a predetermined threshold, it is estimated that the moving body is moving, and when the sum of the distance differences is smaller than the predetermined threshold, it is estimated that the moving body is stopped or staying. The image processing apparatus according to claim 3, wherein: 前記画像は歪みを有し、前記表示枠決定部は、前記各検出枠の歪みに応じて前記距離差に重みを付けることを特徴とする請求項9に記載の画像処理装置。   The image processing apparatus according to claim 9, wherein the image has distortion, and the display frame determination unit weights the distance difference according to distortion of each detection frame. 前記移動体の画像に基づいて前記移動体の向きを検出する移動体向き検出部をさらに備え、
前記表示枠決定部は、前記検出枠の位置の履歴に基づく前記検出枠の移動方向と前記移動体の向きとが異なるときは、前記移動体が停止又は滞留していると推定することを特徴とする請求項3又は6に記載の画像処理装置。
A moving body direction detection unit that detects the direction of the moving body based on the image of the moving body;
The display frame determining unit estimates that the moving body is stopped or staying when the moving direction of the detection frame and the direction of the moving body are different based on the history of the position of the detection frame. The image processing apparatus according to claim 3 or 6.
前記表示枠決定部は、前記表示枠の位置が振れないような前記表示枠の位置の変動に関する制約条件を参照して、前記制約条件を満たすように、前記表示枠を決定することを特徴とする請求項1ないし請求項11のいずれか一項に記載の画像処理装置。   The display frame determination unit determines the display frame so as to satisfy the constraint condition with reference to the constraint condition regarding the change in the position of the display frame so that the position of the display frame cannot be shaken. The image processing apparatus according to any one of claims 1 to 11. 前記制約条件は、前記表示枠の移動速度が所定の上限を超えないという条件であることを特徴とする請求項12に記載の画像処理装置。   The image processing apparatus according to claim 12, wherein the constraint condition is a condition that a moving speed of the display frame does not exceed a predetermined upper limit. 前記制約条件は、前記表示枠の位置を所定のルート上に制限するという条件であることを特徴とする請求項12に記載の画像処理装置。   The image processing apparatus according to claim 12, wherein the constraint condition is a condition for limiting a position of the display frame on a predetermined route. 撮影により画像を生成する画像生成ステップと、
前記画像中の移動体を囲む領域を検出枠として検出する検出枠生成ステップと、
前記検出枠の位置の履歴に基づいて、位置が振れないように前記検出枠に対応する表示枠を決定する表示枠決定ステップと、
前記表示枠決定ステップにて決定された前記表示枠の切出し画像を生成する切出し画像生成ステップと、
を含むことを特徴とする画像処理方法。
An image generation step for generating an image by shooting;
A detection frame generation step of detecting a region surrounding the moving body in the image as a detection frame;
A display frame determining step for determining a display frame corresponding to the detection frame based on a history of the position of the detection frame so that the position does not move;
A cut image generation step for generating a cut image of the display frame determined in the display frame determination step;
An image processing method comprising:
請求項15に記載の画像処理方法をコンピュータに実行させるためのコンピュータプログラム。   A computer program for causing a computer to execute the image processing method according to claim 15.
JP2011032782A 2011-02-18 2011-02-18 Image processing apparatus, image processing method, and computer program Withdrawn JP2012175207A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011032782A JP2012175207A (en) 2011-02-18 2011-02-18 Image processing apparatus, image processing method, and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011032782A JP2012175207A (en) 2011-02-18 2011-02-18 Image processing apparatus, image processing method, and computer program

Publications (1)

Publication Number Publication Date
JP2012175207A true JP2012175207A (en) 2012-09-10

Family

ID=46977722

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011032782A Withdrawn JP2012175207A (en) 2011-02-18 2011-02-18 Image processing apparatus, image processing method, and computer program

Country Status (1)

Country Link
JP (1) JP2012175207A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9111363B2 (en) 2013-03-25 2015-08-18 Panasonic Intellectual Property Management Co., Ltd. Video playback apparatus and video playback method
JPWO2014024475A1 (en) * 2012-08-10 2016-07-25 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Video providing method, transmitting apparatus and receiving apparatus
JP2016178608A (en) * 2015-03-23 2016-10-06 カシオ計算機株式会社 Image processing apparatus, image processing method and program
JP2018142981A (en) * 2018-04-24 2018-09-13 株式会社ニコン Subject tracking device, imaging device, and subject tracking program
CN110111336A (en) * 2019-03-05 2019-08-09 中国科学院重庆绿色智能技术研究院 A kind of smog detection method, system, computer readable storage medium and equipment
JP2019161483A (en) * 2018-03-14 2019-09-19 パナソニックIpマネジメント株式会社 Portable terminal and image cut-out method
JP7363504B2 (en) 2019-02-22 2023-10-18 富士通株式会社 Object detection method, detection device and electronic equipment

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2014024475A1 (en) * 2012-08-10 2016-07-25 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Video providing method, transmitting apparatus and receiving apparatus
US9111363B2 (en) 2013-03-25 2015-08-18 Panasonic Intellectual Property Management Co., Ltd. Video playback apparatus and video playback method
JP2016178608A (en) * 2015-03-23 2016-10-06 カシオ計算機株式会社 Image processing apparatus, image processing method and program
JP2019161483A (en) * 2018-03-14 2019-09-19 パナソニックIpマネジメント株式会社 Portable terminal and image cut-out method
JP7113347B2 (en) 2018-03-14 2022-08-05 パナソニックIpマネジメント株式会社 Mobile terminal, image clipping method, and program
JP2018142981A (en) * 2018-04-24 2018-09-13 株式会社ニコン Subject tracking device, imaging device, and subject tracking program
JP7363504B2 (en) 2019-02-22 2023-10-18 富士通株式会社 Object detection method, detection device and electronic equipment
CN110111336A (en) * 2019-03-05 2019-08-09 中国科学院重庆绿色智能技术研究院 A kind of smog detection method, system, computer readable storage medium and equipment

Similar Documents

Publication Publication Date Title
JP2012175207A (en) Image processing apparatus, image processing method, and computer program
JP5810296B2 (en) Image display device and image display method
US8274570B2 (en) Image processing apparatus, image processing method, hand shake blur area estimation device, hand shake blur area estimation method, and program
JP6395506B2 (en) Image processing apparatus and method, program, and imaging apparatus
KR102141290B1 (en) Image processing apparatus, image processing method, image processing program and storage medium
JP2011170684A (en) Object tracking device, object tracking method and object tracking program
WO2012169119A1 (en) Object detection frame display device and object detection frame display method
JP2015100066A5 (en) Imaging apparatus, image processing apparatus, image processing method, and program
JP2014106732A (en) Information processor and information processing method
JP2006245677A (en) Image processor, image processing method, and image processing program
JP2011155492A (en) Image processor
JP2009003866A (en) Face authentication device
JP2013135341A5 (en)
US10078918B2 (en) Information processing apparatus, information processing method, and storage medium
JP2019152980A (en) Image processing system, image processing method and program
JP5155110B2 (en) Monitoring device
JP2010154391A (en) Automatic tracking camera apparatus
JP2009157581A (en) Pedestrian detection device
JP6564284B2 (en) Image processing apparatus and image processing method
JPWO2019224866A1 (en) Display device, display method, program, and non-transitory computer-readable information recording medium
JP7468637B2 (en) Imaging system, imaging method, and computer program
WO2015198592A1 (en) Information processing device, information processing method, and information processing program
JP6700929B2 (en) Motion vector detection device, imaging device, motion vector detection method, program, and storage medium
JP6789899B2 (en) Measuring device and operating method of measuring device
JP2016128845A (en) Image blur correction unit, control method, optical instrument, and image capturing device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20140513