Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7562999B2 - MOTION DETECTION DEVICE AND MOTION DETECTION METHOD - Google Patents
[go: Go Back, main page]

JP7562999B2 - MOTION DETECTION DEVICE AND MOTION DETECTION METHOD - Google Patents

MOTION DETECTION DEVICE AND MOTION DETECTION METHOD Download PDF

Info

Publication number
JP7562999B2
JP7562999B2 JP2020106748A JP2020106748A JP7562999B2 JP 7562999 B2 JP7562999 B2 JP 7562999B2 JP 2020106748 A JP2020106748 A JP 2020106748A JP 2020106748 A JP2020106748 A JP 2020106748A JP 7562999 B2 JP7562999 B2 JP 7562999B2
Authority
JP
Japan
Prior art keywords
image
contrast enhancement
moving object
object detection
difference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020106748A
Other languages
Japanese (ja)
Other versions
JP2022002018A (en
Inventor
昂志 太田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP2020106748A priority Critical patent/JP7562999B2/en
Priority to PCT/JP2021/019005 priority patent/WO2021261125A1/en
Publication of JP2022002018A publication Critical patent/JP2022002018A/en
Application granted granted Critical
Publication of JP7562999B2 publication Critical patent/JP7562999B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20021Dividing image into blocks, subimages or windows

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Description

本発明は、動体(動きのある物体)を検出する技術に関する。 The present invention relates to a technology for detecting moving objects (objects that move).

監視などのための技術として、カメラで撮像された画像間の差分に基づき、動きのある物体(動体)を検出する動体検出技術が提案されている。この動体検出技術では、上記差分の大きい領域が、動体の領域として検出される。 As a technology for surveillance and the like, a motion detection technology has been proposed that detects moving objects (moving bodies) based on the differences between images captured by a camera. With this motion detection technology, areas where the above differences are large are detected as areas of moving bodies.

上記動体検出技術では、撮像された画像(撮像画像)のコントラストが低い場合に、動体の領域であっても上記差分が小さく算出されるため、動体を高精度に検出できない。 In the above-mentioned moving object detection technology, when the contrast of a captured image (captured image) is low, the above-mentioned difference is calculated to be small even in the area of a moving object, so that the moving object cannot be detected with high accuracy.

特許文献1には、動体検出の前に、撮像画像のコントラスト強調を行う技術が提案されている。 Patent document 1 proposes a technique for enhancing the contrast of captured images before detecting moving objects.

特開2014-059798号公報JP 2014-059798 A

撮像画像の全体に亘ってコントラストが一様であれば、従来のコントラスト強調(撮像画像全体のコントラストを一律に強調する(高める)コントラスト強調)後の画像を用いて、動体を高精度に検出できる。 If the contrast is uniform across the entire captured image, moving objects can be detected with high accuracy using images after conventional contrast enhancement (which uniformly enhances (highers) the contrast across the entire captured image).

しかしながら、撮像画像の全体に亘ってコントラストが一様であるとは限らない。例えば、赤外光(IR(Infrared Ray)光)を検知するカメラ(IRカメラ)では、IRカメラから発せられて物体で乱反射したIR反射光が検知される。このため、IRカメラから物体までの距離が長いほど、IR光の減衰が大きく、検知されるIR反射光の強度(検知強度)が低くなる。その結果、撮像画像(IR画像)において、IRカメラから撮像範囲の各位置までの距離に応じた検知強度のばらつきが生じ、IR画像内でコントラストがばらつく。自然光を検知するカメラであっても、影の多いシーンなどでは、撮像画像内でコントラストがばらつく。 However, contrast is not necessarily uniform throughout the entire captured image. For example, a camera (IR camera) that detects infrared light (IR (Infrared Ray) light) detects reflected IR light emitted from the IR camera and diffusely reflected by an object. For this reason, the longer the distance from the IR camera to the object, the greater the attenuation of the IR light, and the lower the intensity (detection intensity) of the detected reflected IR light. As a result, in the captured image (IR image), the detection intensity varies according to the distance from the IR camera to each position in the imaging range, and contrast varies within the IR image. Even with a camera that detects natural light, contrast varies within the captured image in scenes with many shadows.

そして、撮像画像内でコントラストがばらついている場合に、撮像画像全体のコントラストを一律に強調する従来のコントラスト強調では、撮像画像の一部の領域のコントラストが十分に強調されず、当該領域で動体を高精度に検出できない。 When contrast varies within a captured image, conventional contrast enhancement, which uniformly enhances the contrast of the entire captured image, does not sufficiently enhance the contrast of some areas of the captured image, making it impossible to detect moving objects in those areas with high accuracy.

本発明は上記実情に鑑みなされたものであって、撮像画像内でコントラストがばらついている場合であっても動体を高精度に検出できる技術を提供することを目的とする。 The present invention has been developed in consideration of the above-mentioned circumstances, and aims to provide a technology that can detect moving objects with high accuracy even when the contrast varies within a captured image.

上記目的を達成するために本発明は、以下の構成を採用する。 To achieve the above objective, the present invention adopts the following configuration.

本発明の第一側面は、所定範囲を撮像した画像の領域を構成する複数の分割領域について、個別にコントラスト強調を行うコントラスト強調手段と、前記コントラスト強調手段によるコントラスト強調後の画像間の差分に基づき、前記所定範囲における動体を検出する動体検出手段とを有することを特徴とする動体検出装置を提供する。所定範囲は、室内
や屋外などにおける予め定められた範囲である。差分を得るための複数の画像は2枚以上の画像である。前記コントラスト強調手段は、前記複数の分割領域のそれぞれについて、当該分割領域の画素値に基づき、前記コントラスト強調のパラメータを決定するとしてもよい。
A first aspect of the present invention provides a moving object detection device comprising: a contrast enhancement means for individually enhancing contrast for a plurality of divided regions constituting an area of an image captured within a predetermined range; and a moving object detection means for detecting a moving object within the predetermined range based on a difference between images after contrast enhancement by the contrast enhancement means. The predetermined range is a predetermined range indoors, outdoors, etc. The plurality of images for obtaining the difference are two or more images. The contrast enhancement means may determine a parameter for the contrast enhancement for each of the plurality of divided regions based on pixel values of the divided region.

上述した構成によれば、撮像画像の領域を構成する複数の分割領域について個別にコントラスト強調が行われるため、各分割領域のコントラストを十分に強調でき、ひいては各分割領域で動体を高精度に検出できる。 According to the above-mentioned configuration, contrast enhancement is performed individually for the multiple divided regions that make up the area of the captured image, so that the contrast of each divided region can be sufficiently enhanced, and thus moving objects can be detected with high accuracy in each divided region.

前記コントラスト強調は、前記分割領域の各画素値に基づくγカーブを用いて当該分割領域の各画素値を変換するγ補正であるとしてもよい。この場合は、上記パラメータとして、γカーブなどを用いることができる。前記コントラスト強調は、前記分割領域を代表する画素値と当該分割領域の各画素値との差分が増すように、当該分割領域の各画素値を変更する処理であるとしてもよい。この場合は、上記パラメータとして、代表画素値(分割領域を代表する画素値)や、代表画素値との差分を増やすための係数(倍率)などを用いることができる。前記分割領域を代表する画素値は、当該分割領域の平均画素値であるとしてもよい。こうすることで、偏りなく画素値を変更(分散)できる。 The contrast enhancement may be gamma correction that converts each pixel value of the divided region using a gamma curve based on each pixel value of the divided region. In this case, a gamma curve or the like can be used as the parameter. The contrast enhancement may be processing that changes each pixel value of the divided region so that the difference between the pixel value representing the divided region and each pixel value of the divided region increases. In this case, a representative pixel value (a pixel value representing the divided region) or a coefficient (magnification factor) for increasing the difference from the representative pixel value can be used as the parameter. The pixel value representing the divided region may be the average pixel value of the divided region. In this way, pixel values can be changed (distributed) without bias.

前記動体検出手段は、現在のフレームの画像に対して前記コントラスト強調を行った画像と、過去のフレームの画像に対して前記コントラスト強調を行った画像との差分を用いるフレーム間差分法により、前記動体を検出するとしてもよい。過去のフレームは、現在のフレームの所定数前のフレームであり、所定数は1以上である。前記動体検出手段は、現在のフレームの画像に対して前記コントラスト強調を行った画像と、予め用意された背景画像に対して前記コントラスト強調を行った画像との差分を用いる背景差分法により、前記動体を検出するとしてもよい。背景画像は、例えば、検出対象の動体(検出すべき動体)がいない状態で所定範囲を撮像した画像である。 The moving object detection means may detect the moving object by an inter-frame difference method using the difference between an image obtained by performing the contrast enhancement on an image of a current frame and an image obtained by performing the contrast enhancement on an image of a past frame. The past frame is a frame that is a predetermined number of frames before the current frame, and the predetermined number is 1 or more. The moving object detection means may detect the moving object by a background difference method using the difference between an image obtained by performing the contrast enhancement on an image of a current frame and an image obtained by performing the contrast enhancement on a background image prepared in advance. The background image is, for example, an image captured of a predetermined range in the absence of a moving object to be detected (a moving object to be detected).

フレーム間差分法と背景差分法には、それぞれ異なるメリット・デメリットがある。例えば、フレーム間差分法では、検出対象の動体が静止すると、当該動体が検出されなくなってしまう。また、人物がカメラに向かって歩いてくる場合に、或る領域において、現在のフレームと過去のフレームの両方に、当該人物の服などの同じ色の部分が存在し、フレーム間の差分が小さくなり、当該人物が検出されないことがある。背景差分法では、日照条件の変化などの外乱要因、つまり周囲の環境の変動により、動体検出の精度が低下してしまう。また、背景に動体(検出対象でない動体)が含まれている場合に、現在のフレームの画像と背景画像とで、背景に含まれる動体が異なり、不要な動体が誤検出されたり、背景の領域が動体の領域として誤検出されたりする。特に、背景に動体(検出対象でない動体)が多く含まれる場合に、このような誤検出が顕著となる。 The frame difference method and the background difference method each have different advantages and disadvantages. For example, in the frame difference method, if a moving object to be detected stops, the moving object will not be detected. Also, when a person is walking toward the camera, the same color of the person's clothes, etc., may be present in both the current frame and the past frame in a certain area, and the difference between the frames may be small, and the person may not be detected. In the background difference method, the accuracy of moving object detection decreases due to disturbance factors such as changes in sunlight conditions, that is, fluctuations in the surrounding environment. Also, when a moving object (moving object that is not the detection target) is included in the background, the moving object included in the background differs between the image of the current frame and the background image, and unnecessary moving objects may be erroneously detected or background areas may be erroneously detected as moving object areas. Such erroneous detection is particularly noticeable when the background contains many moving objects (moving objects that are not the detection target).

このため、前記動体検出手段は、現在のフレームの画像に対して前記コントラスト強調を行った画像と、過去のフレームの画像に対して前記コントラスト強調を行った画像との差分を用いるフレーム間差分法、及び、前記現在のフレームの画像に対して前記コントラスト強調を行った画像と、予め用意された背景画像に対して前記コントラスト強調を行った画像との差分を用いる背景差分法の組み合わせにより、前記動体を検出するとしてもよい。こうすることで、フレーム間差分法と背景差分法のデメリットを解消したり、それらのメリットを活かしたりできるようになり、ひいては動体をより高精度に検出できるようになる。 For this reason, the moving object detection means may detect the moving object by a combination of an inter-frame difference method that uses the difference between an image obtained by performing the contrast enhancement on an image of the current frame and an image obtained by performing the contrast enhancement on an image of a past frame, and a background difference method that uses the difference between an image obtained by performing the contrast enhancement on an image of the current frame and an image obtained by performing the contrast enhancement on a previously prepared background image. This makes it possible to eliminate the disadvantages of the inter-frame difference method and the background difference method and utilize their advantages, thereby enabling more accurate detection of moving objects.

太陽光やその他の光の時間変化や、部屋のレイアウト変更などによって、背景は変化することがある。このため、前記フレーム間差分法により背景と判定される領域について、前記背景画像を、前記現在のフレームの画像に基づき更新する更新手段をさらに有すると
してもよい。こうすることで、背景差分法による動体検出の精度を向上できる。
The background may change due to changes in sunlight or other light over time, changes in the layout of a room, etc. For this reason, the apparatus may further include an update means for updating the background image of an area determined to be background by the frame difference method based on the image of the current frame. This can improve the accuracy of moving object detection by the background difference method.

コントラスト強調後の画像間でのコントラストの違いにより、動体検出の精度は低下する。このため、前記コントラスト強調手段は、前記差分を得るための複数の画像を、同じパラメータを用いたコントラスト強調により生成するとしてもよい。こうすることで、コントラスト強調後の画像間でコントラストを合わせることができ、ひいては動体検出の精度を向上できる。 The accuracy of moving object detection decreases due to differences in contrast between images after contrast enhancement. For this reason, the contrast enhancement means may generate multiple images for obtaining the difference by contrast enhancement using the same parameters. In this way, it is possible to match the contrast between the images after contrast enhancement, thereby improving the accuracy of moving object detection.

前記動体検出手段により検出された動体の種別を判定する種別判定手段をさらに有するとしてもよい。こうすることで、監視におけるセキュリティ向上などの更なる効果を得ることができる。種別は、車、バイク、自転車などの乗り物や、人、動物、物などである。 The system may further include a type determination means for determining the type of moving object detected by the moving object detection means. In this way, further effects such as improved security in surveillance can be obtained. Types include vehicles such as cars, motorbikes, and bicycles, people, animals, objects, etc.

撮像画像の解像度が高いほど、当該撮像画像のコントラスト強調の処理負荷は大きい。このため、前記所定範囲を撮像した画像を縮小する縮小手段をさらに有し、前記コントラスト強調手段は、前記縮小手段による縮小後の画像に対して前記コントラスト強調を行うとしてもよい。こうすることで、コントラスト強調の処理負荷を低減できる。 The higher the resolution of the captured image, the greater the processing load of contrast enhancement of the captured image. For this reason, the system may further include a reduction means for reducing the image captured within the specified range, and the contrast enhancement means may perform the contrast enhancement on the image reduced by the reduction means. In this way, the processing load of contrast enhancement can be reduced.

前記所定範囲を撮像した画像は、IR画像であるとしてもよい。IR画像は、赤外光(IR(Infrared Ray)光)を検知するカメラ(IRカメラ)で撮像された画像である。 The image captured of the specified range may be an IR image. The IR image is an image captured by a camera (IR camera) that detects infrared light (IR (Infrared Ray) light).

本発明の第二側面は、所定範囲を撮像した画像の領域を構成する複数の分割領域について、個別にコントラスト強調を行うコントラスト強調ステップと、前記コントラスト強調ステップによるコントラスト強調後の画像間の差分に基づき、前記所定範囲における動体を検出する動体検出ステップとを有することを特徴とする動体検出方法を提供する。 The second aspect of the present invention provides a moving object detection method characterized by having a contrast enhancement step for individually enhancing the contrast of a plurality of divided regions constituting an area of an image captured within a predetermined range, and a moving object detection step for detecting a moving object within the predetermined range based on the difference between the images after contrast enhancement by the contrast enhancement step.

なお、本発明は、上記構成ないし機能の少なくとも一部を有する動体検出システムとして捉えることができる。また、本発明は、上記処理の少なくとも一部を含む、動体検出方法又は動体検出システムの制御方法や、これらの方法をコンピュータに実行させるためのプログラム、又は、そのようなプログラムを非一時的に記録したコンピュータ読取可能な記録媒体として捉えることもできる。上記構成及び処理の各々は技術的な矛盾が生じない限り互いに組み合わせて本発明を構成することができる。 The present invention can be understood as a moving object detection system having at least a part of the above configuration or functions. The present invention can also be understood as a moving object detection method or a control method for a moving object detection system that includes at least a part of the above processing, a program for causing a computer to execute these methods, or a computer-readable recording medium on which such a program is non-temporarily recorded. The above configurations and processing can be combined with each other to constitute the present invention as long as no technical contradictions arise.

本発明によれば、撮像画像内でコントラストがばらついている場合であっても動体を高精度に検出できる。 According to the present invention, moving objects can be detected with high accuracy even when contrast varies within a captured image.

図1は、本発明が適用された動体検出装置の構成例を示すブロック図である。FIG. 1 is a block diagram showing an example of the configuration of a moving object detection device to which the present invention is applied. 図2(A)は、本発明の実施形態に係る動体検出システムの大まかな構成例を示す模式図であり、図2(B)は、当該実施形態に係るPC(動体検出装置)の構成例を示すブロック図である。FIG. 2A is a schematic diagram showing an example of the general configuration of a moving object detection system according to an embodiment of the present invention, and FIG. 2B is a block diagram showing an example of the configuration of a PC (moving object detection device) according to the embodiment. 図3(A)は従来のコントラスト強調の一例を示す図であり、図3(B)は本発明の実施形態に係るコントラスト強調の一例を示す図である。FIG. 3A is a diagram showing an example of conventional contrast enhancement, and FIG. 3B is a diagram showing an example of contrast enhancement according to an embodiment of the present invention. 図4(A)~4(C)は、本発明の実施形態に係るコントラスト強調(1つの分割領域に対するコントラスト強調)の一例を示す図である。4A to 4C are diagrams showing an example of contrast enhancement (contrast enhancement for one divided region) according to an embodiment of the present invention. 図5は、本発明の実施形態に係るコントラスト強調(1つの分割領域に対するコントラスト強調)の一例を示す図である。FIG. 5 is a diagram showing an example of contrast enhancement (contrast enhancement for one divided region) according to an embodiment of the present invention. 図6は、本発明の実施形態に係るPCの処理フロー例を示すフローチャートである。FIG. 6 is a flowchart showing an example of a process flow of the PC according to the embodiment of the present invention.

<適用例>
本発明の適用例について説明する。動体を検出する従来技術では、撮像された画像(撮像画像)のコントラストが低い場合に、動体の領域であっても、撮像画像間の差分が小さく算出されるため、動体を高精度に検出できない。撮像画像の全体に亘ってコントラストが一様であれば、撮像画像全体のコントラストを一律に強調する(高める)従来のコントラスト強調を行うことにより、動体が高精度に検出可能になる。しかしながら、撮像画像内でコントラストがばらついている場合に、上記従来のコントラスト強調では、撮像画像の一部の領域のコントラストが十分に強調されず、当該領域で動体を高精度に検出できない。
<Application Examples>
An application example of the present invention will be described. In the conventional technology for detecting a moving object, when the contrast of a captured image (captured image) is low, the difference between the captured images is calculated to be small even in the area of the moving object, so that the moving object cannot be detected with high accuracy. If the contrast is uniform throughout the captured image, the moving object can be detected with high accuracy by performing conventional contrast enhancement that uniformly emphasizes (increases) the contrast of the entire captured image. However, when the contrast varies within the captured image, the above conventional contrast enhancement does not sufficiently emphasize the contrast of a part of the captured image, and the moving object cannot be detected with high accuracy in that area.

図1は、本発明が適用された動体検出装置100の構成例を示すブロック図である。動体検出装置100は、コントラスト強調部101と動体検出部102を有する。コントラスト強調部101は、所定範囲を撮像した画像の領域を構成する複数の分割領域について、個別にコントラスト強調を行う。動体検出部102は、コントラスト強調部101によるコントラスト強調後の画像間の差分に基づき、所定範囲における動体を検出する。コントラスト強調部101は本発明のコントラスト強調手段の一例であり、動体検出部102は本発明の動体検出手段の一例である。 Figure 1 is a block diagram showing an example of the configuration of a moving object detection device 100 to which the present invention is applied. The moving object detection device 100 has a contrast enhancement unit 101 and a moving object detection unit 102. The contrast enhancement unit 101 performs contrast enhancement individually on a plurality of divided regions that make up the region of an image captured within a specified range. The moving object detection unit 102 detects a moving object within the specified range based on the difference between the images after contrast enhancement by the contrast enhancement unit 101. The contrast enhancement unit 101 is an example of the contrast enhancement means of the present invention, and the moving object detection unit 102 is an example of the moving object detection means of the present invention.

動体検出装置100の上記構成によれば、撮像画像の領域を構成する複数の分割領域について個別にコントラスト強調が行われるため、各分割領域のコントラストを十分に強調でき、ひいては各分割領域で動体を高精度に検出できる。 The above-described configuration of the moving object detection device 100 performs contrast enhancement individually for the multiple divided regions that make up the area of the captured image, so that the contrast of each divided region can be sufficiently enhanced, and thus moving objects can be detected with high accuracy in each divided region.

<実施形態>
本発明の実施形態について説明する。
<Embodiment>
An embodiment of the present invention will be described.

図2(A)は、本実施形態に係る動体検出システムの大まかな構成例を示す模式図である。本実施形態に係る動体検出システムは、カメラ10と、PC200(パーソナルコンピュータ;動体検出装置)とを有する。カメラ10とPC200は有線または無線で互いに接続されている。カメラ10は、室内や屋外における予め定められた範囲を撮像し、撮像した動画をPC200へ出力する。カメラ10は自然光を検知するカメラであってもよいが、本実施形態では赤外光(IR(Infrared Ray)光)を検知するカメラ(IRカメラ)であるとする。つまり、カメラ10で撮像される画像はIR画像であるとする。PC200は、カメラ10で撮像された動画に基づき所定範囲における動体を検出する。PC200は、動体の検出結果(動体の有無、動体が検出された領域など)を表示部に表示したり、動体の検出結果を記憶媒体に記録したり、動体の検出結果を他の端末(遠隔地にいる管理者のスマートフォンなど)へ出力したりする。 2A is a schematic diagram showing an example of the general configuration of a moving object detection system according to this embodiment. The moving object detection system according to this embodiment includes a camera 10 and a PC 200 (personal computer; moving object detection device). The camera 10 and the PC 200 are connected to each other by wire or wirelessly. The camera 10 captures an image of a predetermined range indoors or outdoors, and outputs the captured video to the PC 200. The camera 10 may be a camera that detects natural light, but in this embodiment, it is a camera that detects infrared light (IR (Infrared Ray) light). In other words, the image captured by the camera 10 is an IR image. The PC 200 detects a moving object within a predetermined range based on the video captured by the camera 10. The PC 200 displays the detection result of the moving object (presence or absence of a moving object, the area where the moving object is detected, etc.) on the display unit, records the detection result of the moving object in a storage medium, and outputs the detection result of the moving object to another terminal (such as a smartphone of an administrator in a remote location).

なお、本実施形態ではPC10がカメラ10とは別体の装置であるものとするが、PC200はカメラ10に内蔵されてもよい。上述した表示部や記憶媒体は、PC200の一部であってもよいし、そうでなくてもよい。また、PC200の設置場所は特に限定されない。例えば、PC200はカメラ10と同じ部屋に設置されてもよいし、そうでなくてもよい。PC200はクラウド上のコンピュータであってもよいし、そうでなくてもよい。PC200は、管理者に携帯されるスマートフォンなどの端末であってもよい。 In this embodiment, the PC 10 is a separate device from the camera 10, but the PC 200 may be built into the camera 10. The display unit and storage medium described above may or may not be part of the PC 200. The location where the PC 200 is installed is not particularly limited. For example, the PC 200 may or may not be installed in the same room as the camera 10. The PC 200 may or may not be a computer on the cloud. The PC 200 may be a terminal such as a smartphone carried by the administrator.

図2(B)は、PC200の構成例を示すブロック図である。PC200は、入力部210、制御部220、記憶部230、及び、出力部240を有する。制御部220は、コントラスト強調部221と動体検出部222を有する。 Fig. 2(B) is a block diagram showing an example configuration of the PC 200. The PC 200 has an input unit 210, a control unit 220, a storage unit 230, and an output unit 240. The control unit 220 has a contrast enhancement unit 221 and a moving object detection unit 222.

入力部210は、所定範囲を撮像した画像(動画のフレーム)をカメラ10から取得して制御部220(コントラスト強調部221)へ出力する処理を、順次行う。なお、カメラ10は静止画の撮像を順次行うものであってもよく、その場合は、入力部210は、所定範囲を撮像した静止画をカメラ10から取得して制御部220(コントラスト強調部221)へ出力する処理を、順次行う。 The input unit 210 sequentially performs a process of acquiring images (video frames) of a predetermined range from the camera 10 and outputting the images to the control unit 220 (contrast enhancement unit 221). The camera 10 may sequentially capture still images, in which case the input unit 210 sequentially performs a process of acquiring still images of a predetermined range from the camera 10 and outputting the still images to the control unit 220 (contrast enhancement unit 221).

制御部220は、CPU(Central Processing Unit)やRAM(Random Access Memory)、ROM(Read Only Memory)などを含み、各構成要素の制御や、各種情報処理などを行う。 The control unit 220 includes a CPU (Central Processing Unit), RAM (Random Access Memory), ROM (Read Only Memory), etc., and controls each component and performs various information processing.

コントラスト強調部221は、カメラ10により得られた撮像画像の領域を構成する複数の分割領域について、個別にコントラスト強調を行う。例えば、コントラスト強調部221は、入力部210によって出力された画像のコントラスト強調を行う。そして、コントラスト強調部221は、コントラスト強調後の画像を動体検出部222へ出力する。コントラスト強調部221は、本発明のコントラスト強調手段の一例である。 The contrast enhancement unit 221 performs contrast enhancement individually on a plurality of divided regions that constitute the region of the captured image obtained by the camera 10. For example, the contrast enhancement unit 221 performs contrast enhancement on the image output by the input unit 210. Then, the contrast enhancement unit 221 outputs the image after contrast enhancement to the moving object detection unit 222. The contrast enhancement unit 221 is an example of a contrast enhancement means of the present invention.

本実施形態では、撮像画像の領域を構成する複数の分割領域について個別にコントラスト強調が行われるため、各分割領域のコントラストを十分に強調できる。具体的には、コントラスト強調部221は、複数の分割領域のそれぞれについて、当該分割領域の画素値に基づき、コントラスト強調のパラメータを動的に(適応的に)決定する。そして、コントラスト強調部221は、分割領域ごとに、決定したパラメータを用いてコントラスト強調を行う。これにより、各分割領域のコントラストを十分に強調できる。 In this embodiment, contrast enhancement is performed individually for the multiple divided regions that make up the area of the captured image, so the contrast of each divided region can be sufficiently enhanced. Specifically, the contrast enhancement unit 221 dynamically (adaptively) determines the contrast enhancement parameters for each of the multiple divided regions based on the pixel values of the divided region. Then, the contrast enhancement unit 221 performs contrast enhancement for each divided region using the determined parameters. This allows the contrast of each divided region to be sufficiently enhanced.

これについて、図3(A),3(B)を用いて具体的に説明する。図3(A)は従来のコントラスト強調の一例を示し、図3(B)は本実施形態に係るコントラスト強調の一例を示す。図3(A),3(B)では、撮像画像に動体としての人物H1,H2が写っている。コントラスト強調前において、人物H1周辺のコントラストは、人物H2周辺のコントラストよりもはるかに低い。 This will be specifically explained using Figures 3(A) and 3(B). Figure 3(A) shows an example of conventional contrast enhancement, and Figure 3(B) shows an example of contrast enhancement according to this embodiment. In Figures 3(A) and 3(B), people H1 and H2 are captured as moving objects in the captured image. Before contrast enhancement, the contrast around person H1 is much lower than the contrast around person H2.

図3(A)のコントラスト強調では、撮像画像全体のコントラストが一律に強調されるため、人物H2周辺のコントラストは十分に強調できたとしても、人物H1周辺のコントラスト(極めて低いコントラスト)は十分に強調できない。このため、動体検出において人物H1を検出できない。なお、人物H1周辺のコントラストを十分に強調すると、人物H2周辺で白飛びが発生するなどし、コントラストが低下してしまう。 In the contrast enhancement of FIG. 3(A), the contrast of the entire captured image is enhanced uniformly, so even if the contrast around person H2 can be sufficiently enhanced, the contrast around person H1 (which has extremely low contrast) cannot be sufficiently enhanced. For this reason, person H1 cannot be detected in moving object detection. Furthermore, if the contrast around person H1 is sufficiently enhanced, whiteout occurs around person H2, reducing the contrast.

本実施形態では、分割領域ごとにコントラスト強調が行われるため、図3(B)に示すように、人物H1周辺のコントラストも、人物H2周辺のコントラストも十分に強調できる。具体的には、人物H1周辺のコントラストに影響を及ぼすことなく、人物H2のコントラストを十分に強調でき、人物H2周辺のコントラストに影響を及ぼすことなく、人物H1のコントラストを十分に強調できる。つまり、他の分割領域のコントラストに影響を及ぼすことなく、分割領域のコントラストを十分に強調できる。 In this embodiment, contrast enhancement is performed for each divided region, so that, as shown in FIG. 3(B), the contrast around person H1 and the contrast around person H2 can both be sufficiently enhanced. Specifically, the contrast of person H2 can be sufficiently enhanced without affecting the contrast around person H1, and the contrast of person H1 can be sufficiently enhanced without affecting the contrast around person H2. In other words, the contrast of a divided region can be sufficiently enhanced without affecting the contrast of other divided regions.

なお、図3(B)には水平方向4個×垂直方向3個のマトリクス状に配置された同サイズの12個の矩形領域が複数の分割領域として示されているが、分割領域の数、配置、サイズ、形状などは特に限定されない。例えば、分割領域の数は12個より多くても少なくてもよいし、複数の分割領域が千鳥格子状に配置されていてもよいし、複数の分割領域のサイズや形状は同じでなくてもよいし、分割領域の形状は台形や三角形などであってもよい。 Note that in FIG. 3(B), 12 rectangular regions of the same size arranged in a matrix of 4 horizontal by 3 vertical are shown as the multiple divided regions, but the number, arrangement, size, shape, etc. of the divided regions are not particularly limited. For example, the number of divided regions may be more or less than 12, the multiple divided regions may be arranged in a houndstooth pattern, the multiple divided regions may not be the same size or shape, and the divided regions may be trapezoidal, triangular, etc.

コントラスト強調の具体的な方法について説明する。例えば、コントラスト強調部221は、コントラスト強調として、分割領域の各画素値に基づくγカーブを用いて当該分割領域の各画素値を変換するγ補正を行う。この処理について、図4(A)~4(C)を用いて具体的に説明する。なお、簡略化のため、1つの分割領域に対する処理について説明する。 A specific method of contrast enhancement will be described. For example, the contrast enhancement unit 221 performs gamma correction to enhance contrast by converting each pixel value of a divided region using a gamma curve based on each pixel value of the divided region. This process will be described in detail with reference to Figures 4(A) to 4(C). For simplicity, the process for one divided region will be described.

図4(A)~4(C)のそれぞれは、コントラスト強調前のヒストグラム、γカーブ、及び、コントラスト強調後のヒストグラムの一例を示す。コントラスト強調前のヒストグラムは、コントラスト強調前の画素値ごとに、分割領域における画素数(度数)を示す。γカーブは、コントラスト強調前(変換前)の画素値とコントラスト強調後(変換後)の画素値との対応関係を示す。コントラスト強調後のヒストグラムは、コントラスト強調後の画素値ごとに、分割領域における画素数(度数)を示す。図4(A),4(B)は、コントラスト強調前のヒストグラムにおけるピーク(度数の山)が1つである場合を示し、図4(C)は、コントラスト強調前のヒストグラムにおけるピーク(度数の山)が2つである場合を示す。図4(A)と図4(B)とでは、上記ピークの広がり(画素値の範囲)が異なる。 Figures 4(A) to 4(C) show examples of a histogram before contrast enhancement, a gamma curve, and a histogram after contrast enhancement. The histogram before contrast enhancement shows the number of pixels (frequency) in a divided region for each pixel value before contrast enhancement. The gamma curve shows the correspondence between pixel values before contrast enhancement (before conversion) and pixel values after contrast enhancement (after conversion). The histogram after contrast enhancement shows the number of pixels (frequency) in a divided region for each pixel value after contrast enhancement. Figures 4(A) and 4(B) show a case where the histogram before contrast enhancement has one peak (frequency peak), and Figure 4(C) shows a case where the histogram before contrast enhancement has two peaks (frequency peaks). The spread of the peaks (range of pixel values) is different between Figures 4(A) and 4(B).

図4(A)~4(C)に示すように、コントラスト強調部221は、ヒストグラムを引き伸ばす(分布の広がりを大きくする)γカーブを決定する。具体的には、コントラスト強調部221は、コントラスト強調前のヒストグラムにおけるピーク(度数の山)ごとに、度数が最大の画素値(ピーク画素値)Paと、ピークの広がりPbとを判断する。そして、コントラスト強調部221は、ピーク画素値Paに応じて、γカーブにおいて傾きをつける位置を決定し、広がりPbに応じて、γカーブにおいて傾きをつける範囲(コントラスト強調前の画素値の範囲)を決定する。具体的には、コントラスト強調部221は、ピーク画素値Paを中心に、広がりPbが狭いほどピークを広げるγカーブを決定する。これにより、図4(A),4(B)に示すように、広がりPbに依らず、ピークを十分に広げるように、γ補正を行うことができる。さらに、図4(C)に示すように、コントラスト強調前のヒストグラムに複数のピークが存在する場合には、各ピークを十分に広げるように、γ補正を行うことができる。ピークが十分に広がったことは、コントラストが十分に強調されたことに対応する。 As shown in Figures 4(A) to 4(C), the contrast enhancement unit 221 determines a gamma curve that stretches the histogram (increases the spread of the distribution). Specifically, the contrast enhancement unit 221 determines the pixel value (peak pixel value) Pa with the highest frequency and the spread Pb of the peak for each peak (peak of frequency) in the histogram before contrast enhancement. Then, the contrast enhancement unit 221 determines the position at which the gamma curve is inclined according to the peak pixel value Pa, and determines the range at which the gamma curve is inclined (range of pixel values before contrast enhancement) according to the spread Pb. Specifically, the contrast enhancement unit 221 determines a gamma curve that, centered on the peak pixel value Pa, widens the peak as the spread Pb becomes narrower. As a result, as shown in Figures 4(A) and 4(B), gamma correction can be performed to sufficiently widen the peak regardless of the spread Pb. Furthermore, as shown in Figure 4(C), when there are multiple peaks in the histogram before contrast enhancement, gamma correction can be performed to sufficiently widen each peak. A sufficiently broadened peak corresponds to a sufficient enhancement of contrast.

この方法は、ヒストグラム平坦化やヒストグラム均等化などとも呼ばれる。つまり、コントラスト強調部221は、ヒストグラム平坦化によりコントラスト強調を実現するとも言える。 This method is also called histogram equalization or histogram equalization. In other words, it can be said that the contrast enhancement unit 221 achieves contrast enhancement by histogram equalization.

なお、ピーク画素値Pa(最頻値)の代わりに、コントラスト強調前のヒストグラムにおけるピークを代表する他の画素値(平均値や中間値など)を用いてもよい。また、上記方法の場合は、上記パラメータとして、γカーブ、ピーク画素値Pa、広がりPbなどを用いることができる。また、γカーブとして、変換前の画素値の変化に対して変換後の画素値が線形に変化する直線の繋ぎ合わせを図示したが、γカーブは、変換前の画素値の変化に対して変換後の画素値が非線形に変化する曲線であってもよい。 In addition, instead of the peak pixel value Pa (mode), other pixel values (such as the average value or the median value) that represent the peak in the histogram before contrast enhancement may be used. In addition, in the case of the above method, a gamma curve, peak pixel value Pa, spread Pb, etc. may be used as the above parameters. In addition, although the gamma curve is illustrated as a connection of straight lines in which the pixel value after conversion changes linearly with respect to the change in the pixel value before conversion, the gamma curve may be a curve in which the pixel value after conversion changes nonlinearly with respect to the change in the pixel value before conversion.

コントラスト強調部221は、コントラスト強調として、分割領域を代表する画素値と当該分割領域の各画素値との差分が増すように、当該分割領域の各画素値を変更する処理を行ってもよい。この処理について、図5を用いて具体的に説明する。なお、簡略化のため、1つの分割領域に対する処理について説明する。 As a contrast enhancement, the contrast enhancement unit 221 may perform a process of changing each pixel value of the divided region so as to increase the difference between the pixel value representing the divided region and each pixel value of the divided region. This process will be specifically described with reference to FIG. 5. For simplicity, the process for one divided region will be described.

図5は、コントラスト強調前のヒストグラムと、コントラスト強調後のヒストグラムとの一例を示す。例えば、コントラスト強調部221は、以下の式1を用いて画素値を変更する。式1の「Pave」は、コントラスト強調前の分割領域の平均画素値であり、「P
」はコントラスト強調前の画素値であり、「C」は、平均画素値Paveとの差分を増やすための係数(倍率)であり、「P’」はコントラスト強調後の画素値である。係数Cは0より大きく且つ1以下の値である。これより、上述したような画素値の変更を実現できる。つまり、平均画素値Paveからの各画素値の偏差を大きくすることができ、コントラストを十分に強調することができる。
P’=Pave-C×(Pave-P) ・・・(式1)
5 shows an example of a histogram before contrast enhancement and a histogram after contrast enhancement. For example, the contrast enhancement unit 221 changes pixel values using the following formula 1. In formula 1, "Pave" is the average pixel value of the divided region before contrast enhancement, and "P
" is the pixel value before contrast enhancement, "C" is a coefficient (magnification) for increasing the difference from the average pixel value Pave, and "P'" is the pixel value after contrast enhancement. The coefficient C is a value greater than 0 and less than or equal to 1. This makes it possible to realize the change in pixel value as described above. In other words, it is possible to increase the deviation of each pixel value from the average pixel value Pave, and to sufficiently enhance the contrast.
P'=Pave-C×(Pave-P)...(Formula 1)

なお、平均画素値Pave(平均値)の代わりに、中間値など、コントラスト強調前の他の代表画素値(分割領域を代表する画素値)を用いてもよい。代表画素値として平均値や中間値を用いることで、偏りなく画素値を変更(分散)できる。また、上記方法の場合は、上記パラメータとして、平均画素値Paveや係数Cなどを用いることができる。 In addition, instead of the average pixel value Pave (average value), other representative pixel values (pixel values representing the divided regions) before contrast enhancement, such as the median value, may be used. By using the average value or median value as the representative pixel value, the pixel values can be changed (distributed) without bias. In addition, in the case of the above method, the average pixel value Pave, the coefficient C, etc. can be used as the above parameter.

また、係数Cは、分割領域ごとに決定することが好ましい。例えば、コントラスト強調部221は、平均画素値Paveよりも小さい画素値を有する画素と、平均画素値Paveよりも大きい画素値と有する画素との間における画素値の差が所定の閾値よりも大きくなるように係数Cを決定することが好ましい。コントラスト強調部221は、分割領域内の全画素値の分散に基づき係数Cを決定してもよい。例えば、コントラスト強調部221は、分散が小さいほど係数Cを大きくしてもよい。 It is also preferable that the coefficient C is determined for each divided region. For example, it is preferable that the contrast enhancement unit 221 determines the coefficient C so that the difference in pixel value between a pixel having a pixel value smaller than the average pixel value Pave and a pixel having a pixel value larger than the average pixel value Pave is greater than a predetermined threshold value. The contrast enhancement unit 221 may determine the coefficient C based on the variance of all pixel values in the divided region. For example, the contrast enhancement unit 221 may increase the coefficient C as the variance decreases.

図2(B)の説明に戻る。動体検出部222は、コントラスト強調部101によって出力された複数の画像(コントラスト強調後の複数の画像)の間の差分に基づき、所定範囲における動体を検出する。そして、動体検出部222は、動体の検出結果を出力部240へ出力する。なお、動体検出にはどのようなアルゴリズムを用いてもよく、差分が所定の閾値よりも大きい領域を動体の領域として検出する単純な方法で動体を検出してもよいし、そうでなくてもよい。既存の機械学習により生成された学習済みモデルを用いて動体を検出してもよく、具体的にはディープラーニング(例えば、R-CNN、Fast R-CNN、YOLO、SSDなど)により生成された学習済みモデルを用いて動体を検出してもよい。また、本実施形態では2枚の画像の差分を得るものとするが、差分を得るための複数の画像は2枚より多くてもよい。動体検出部222は本発明の動体検出手段の一例である。 Returning to the explanation of FIG. 2B, the moving object detection unit 222 detects a moving object in a predetermined range based on the difference between the multiple images (multiple images after contrast enhancement) output by the contrast enhancement unit 101. The moving object detection unit 222 then outputs the detection result of the moving object to the output unit 240. Any algorithm may be used for the moving object detection, and the moving object may be detected by a simple method of detecting an area where the difference is greater than a predetermined threshold as the moving object area, or it may not be. The moving object may be detected using a trained model generated by existing machine learning, and specifically, the moving object may be detected using a trained model generated by deep learning (e.g., R-CNN, Fast R-CNN, YOLO, SSD, etc.). In addition, in this embodiment, the difference between two images is obtained, but the number of images to obtain the difference may be more than two. The moving object detection unit 222 is an example of a moving object detection means of the present invention.

記憶部230は、制御部220で実行されるプログラムや、制御部220で使用される各種データなどを記憶する。例えば、記憶部230は、ハードディスクドライブ、ソリッドステートドライブ、等の補助記憶装置である。 The storage unit 230 stores programs executed by the control unit 220, various data used by the control unit 220, and the like. For example, the storage unit 230 is an auxiliary storage device such as a hard disk drive or a solid state drive.

出力部240は、動体検出部222により出力された検出結果(動体の検出結果)を、表示部に表示したり、記憶媒体に記録したり、他の端末(遠隔地にいる管理者のスマートフォンなど)へ出力したりする。なお、これらの処理が行われるように、動体検出部222や出力部240の処理が制御されてもよい。 The output unit 240 displays the detection result (moving object detection result) output by the moving object detection unit 222 on a display unit, records it on a storage medium, or outputs it to another terminal (such as a smartphone of an administrator in a remote location). Note that the processing of the moving object detection unit 222 and the output unit 240 may be controlled so that these processes are performed.

図6は、PC200の処理フロー例を示すフローチャートである。PC200は、図6の処理フローを繰り返し実行する。図6の処理フローの繰り返し周期は特に限定されないが、本実施形態では、カメラ10による撮像のフレームレート(例えば30fps)で図6の処理フローが繰り返されるとする。 Figure 6 is a flowchart showing an example of a processing flow of the PC 200. The PC 200 repeatedly executes the processing flow of Figure 6. The repetition period of the processing flow of Figure 6 is not particularly limited, but in this embodiment, the processing flow of Figure 6 is repeated at the frame rate of the image capture by the camera 10 (e.g., 30 fps).

まず、入力部210は、所定範囲を撮像した画像(現在のフレームの画像;現画像)をカメラ10から取得する(ステップS601)。 First, the input unit 210 acquires an image of a specified range (image of the current frame; current image) from the camera 10 (step S601).

次に、コントラスト強調部221は、コントラスト強調のパラメータを決定し(ステップS602)、決定したパラメータを用いて、ステップS601で取得された現画像のコ
ントラストを強調する(ステップS603)。ステップS602,S603の処理の詳細は、上述したとおりである。そして、コントラスト強調部221は、ステップS603のコントラスト強調に用いたパラメータ(ステップS602で決定したパラメータ)を、記憶部230に記録する(ステップS604)。ステップS602~S604の処理は、分割領域ごとに個別に行われる。さらに、コントラスト強調部221は、後述するステップS606の処理のために、ステップS601で取得された現画像を記憶部230に記録する。
Next, the contrast enhancement unit 221 determines the parameters for contrast enhancement (step S602), and enhances the contrast of the current image acquired in step S601 using the determined parameters (step S603). Details of the processes of steps S602 and S603 are as described above. Then, the contrast enhancement unit 221 records the parameters used for contrast enhancement in step S603 (the parameters determined in step S602) in the storage unit 230 (step S604). The processes of steps S602 to S604 are performed individually for each divided region. Furthermore, the contrast enhancement unit 221 records the current image acquired in step S601 in the storage unit 230 for the process of step S606 described later.

次に、コントラスト強調部221は、記憶部230に予め用意された背景画像を取得し、取得した背景画像のコントラストを上述した方法で強調する(ステップS605)。背景画像は、例えば、検出対象の動体(検出すべき動体)がいない状態で所定範囲を撮像した画像である。そして、コントラスト強調部221は、記憶部230に記録された過去画像(過去のフレームの画像)を取得し、取得した過去画像のコントラストを上述した方法で強調する(ステップS606)。過去画像は、現画像の所定数前のフレームの画像であり、所定数は1以上である。ステップS605,S606の処理は、分割領域ごとに個別に行われる。 Next, the contrast enhancement unit 221 acquires a background image prepared in advance in the storage unit 230, and enhances the contrast of the acquired background image by the above-mentioned method (step S605). The background image is, for example, an image captured of a predetermined range in the absence of a moving object to be detected (a moving object to be detected). Then, the contrast enhancement unit 221 acquires a previous image (an image of a previous frame) recorded in the storage unit 230, and enhances the contrast of the acquired previous image by the above-mentioned method (step S606). The previous image is an image of a frame a predetermined number of frames before the current image, and the predetermined number is 1 or more. The processing of steps S605 and S606 is performed individually for each divided area.

コントラスト強調後の画像間でのコントラストの違いにより、動体検出の精度は低下する。このため、本実施形態では、コントラスト強調部221は、ステップS605,S606のコントラスト強調において、ステップS603のコントラスト強調と同じパラメータ(ステップS602で決定されたパラメータ;ステップS604で記録されたパラメータ)を使用する。こうすることで、コントラスト強調後の画像間でコントラストを合わせることができ、ひいては動体検出の精度を向上できる。 The accuracy of moving object detection decreases due to differences in contrast between images after contrast enhancement. For this reason, in this embodiment, the contrast enhancement unit 221 uses the same parameters (the parameters determined in step S602; the parameters recorded in step S604) in the contrast enhancement of steps S605 and S606 as in the contrast enhancement of step S603. In this way, it is possible to match the contrast between the images after contrast enhancement, and thus improve the accuracy of moving object detection.

なお、この限りではなく、コントラスト強調部221は、ステップS605のコントラスト強調で使用するパラメータを背景画像に基づき決定し、ステップS606のコントラスト強調で使用するパラメータを過去画像に基づき決定してもよい。コントラスト強調部221は、背景画像または過去画像に基づき決定したパラメータを、ステップS603,S605,S606のコントラスト強調で使用してもよい。 However, this is not limited to the above, and the contrast enhancement unit 221 may determine the parameters to be used in the contrast enhancement in step S605 based on the background image, and determine the parameters to be used in the contrast enhancement in step S606 based on the previous image. The contrast enhancement unit 221 may use the parameters determined based on the background image or the previous image in the contrast enhancement in steps S603, S605, and S606.

次に、動体検出部222は、ステップS603のコントラスト強調後の現画像と、ステップS605のコントラスト強調後の背景画像との差分を用いる背景差分法により、動体を検出する(ステップS607)。そして、動体検出部222は、ステップS603のコントラスト強調後の現画像と、ステップS606のコントラスト強調後の過去画像との差分を用いるフレーム間差分法により、動体を検出する(ステップS608)。次に、動体検出部222は、ステップS607,S608の検出結果に基づき、動体の検出結果を示す検出情報を生成する(ステップS609)。 Next, the moving object detection unit 222 detects a moving object by a background subtraction method using the difference between the current image after contrast enhancement in step S603 and the background image after contrast enhancement in step S605 (step S607). Then, the moving object detection unit 222 detects a moving object by an inter-frame subtraction method using the difference between the current image after contrast enhancement in step S603 and the previous image after contrast enhancement in step S606 (step S608). Next, the moving object detection unit 222 generates detection information indicating the moving object detection result based on the detection results of steps S607 and S608 (step S609).

なお、フレーム間差分法と背景差分法の一方のみを用いるようにしてもよい。背景差分法のみを用いる場合には、ステップS606,S608の処理が省略される。記憶部230への現画像の記録も省略してよい。フレーム間差分法のみを用いる場合には、ステップS605,S607の処理が省略される。 Note that only one of the frame difference method and the background difference method may be used. When only the background difference method is used, the processes of steps S606 and S608 are omitted. Recording of the current image in the storage unit 230 may also be omitted. When only the frame difference method is used, the processes of steps S605 and S607 are omitted.

但し、フレーム間差分法と背景差分法には、それぞれ異なるメリット・デメリットがある。例えば、フレーム間差分法では、検出対象の動体が静止すると、当該動体が検出されなくなってしまう。また、人物がカメラに向かって歩いてくる場合に、或る領域において、現在のフレームと過去のフレームの両方に、当該人物の服などの同じ色の部分が存在し、フレーム間の差分が小さくなり、当該人物が検出されないことがある。背景差分法では、日照条件の変化などの外乱要因、つまり周囲の環境の変動により、動体検出の精度が低下してしまう。また、背景に動体(検出対象でない動体)が含まれている場合に、現在の
フレームの画像と背景画像とで、背景に含まれる動画が異なり、不要な動体が誤検出されたり、背景の領域が動体の領域として誤検出されたりする。特に、背景に動体(検出対象でない動体)が多く含まれる場合に、このような誤検出が顕著となる。
However, the frame difference method and the background difference method each have different advantages and disadvantages. For example, in the frame difference method, when a moving object to be detected stops, the moving object cannot be detected. In addition, when a person walks toward the camera, in a certain area, the same color of the person's clothes, etc., is present in both the current frame and the past frame, and the difference between the frames becomes small, and the person may not be detected. In the background difference method, the accuracy of moving object detection decreases due to disturbance factors such as changes in sunlight conditions, that is, fluctuations in the surrounding environment. In addition, when a moving object (a moving object that is not a detection target) is included in the background, the moving image included in the background is different between the image of the current frame and the background image, and an unnecessary moving object is erroneously detected, or a background area is erroneously detected as a moving object area. In particular, when the background includes many moving objects (moving objects that are not a detection target), such erroneous detection becomes noticeable.

このため、本実施形態では、フレーム間差分法と背景差分法の組み合わせにより、動体を検出するようにしている。こうすることで、フレーム間差分法と背景差分法のデメリットを解消したり、それらのメリットを活かしたりできるようになり、ひいては動体をより高精度に検出できるようになる。例えば、ステップS609において、動体検出部222は、動体の領域を、フレーム間差分法と背景差分法の両方で動体が検出された領域に絞り込んで、検出情報を生成することができる。動体検出部222は、フレーム間差分法による検出結果と背景差分法による検出結果とを識別可能に検出情報を生成すること等もできる。 For this reason, in this embodiment, moving objects are detected by combining the frame-to-frame difference method and the background difference method. This makes it possible to eliminate the disadvantages of the frame-to-frame difference method and the background difference method and utilize their advantages, thereby enabling moving objects to be detected with higher accuracy. For example, in step S609, the moving object detection unit 222 can narrow down the moving object area to an area in which moving objects have been detected by both the frame-to-frame difference method and the background difference method, and generate detection information. The moving object detection unit 222 can also generate detection information in such a way that the detection results obtained by the frame-to-frame difference method and the detection results obtained by the background difference method can be distinguished.

最後に、出力部240は、ステップS609で生成された検出情報を、表示部、記憶媒体、スマートフォンなどへ出力する(ステップS610)。 Finally, the output unit 240 outputs the detection information generated in step S609 to a display unit, a storage medium, a smartphone, etc. (step S610).

以上述べたように、本実施形態によれば、撮像画像の領域を構成する複数の分割領域について個別にコントラスト強調が行われるため、各分割領域のコントラストを十分に強調でき、ひいては各分割領域で動体を高精度に検出できる。 As described above, according to this embodiment, contrast enhancement is performed individually for each of the divided regions that make up the area of the captured image, so that the contrast of each divided region can be sufficiently enhanced, and thus moving objects can be detected with high accuracy in each divided region.

なお、太陽光やその他の光の時間変化や、部屋のレイアウト変更などによって、背景は変化することがある。このため、制御部220は、さらに、フレーム間差分法により背景と判定される領域について、背景画像を現画像に基づき更新してもよい。こうすることで、背景差分法による動体検出の精度を向上できる。背景画像の更新(一部領域の更新)は、現画像への置き換えであってもよいし、現画像と背景画像を重みづけ合成した画像への置き換えであってもよい。背景画像の更新は、フレーム間差分と背景差分の両方で背景と判定された領域(動体が検出されなかった領域)についてのみ行ってもよい。背景画像の更新は、フレームごとに行わずに、1時間おきなどの所定の時間間隔で行ってもよい。 Note that the background may change due to changes in sunlight or other light over time, changes in the layout of the room, etc. For this reason, the control unit 220 may further update the background image based on the current image for areas determined to be background by the frame-to-frame difference method. This can improve the accuracy of moving object detection using the background difference method. The background image may be updated (updated for a portion of the area) by replacing it with the current image, or by replacing it with an image obtained by weighting and combining the current image and the background image. The background image may be updated only for areas determined to be background by both the frame-to-frame difference and the background difference (areas where no moving object was detected). The background image may be updated at a predetermined time interval, such as every hour, rather than for each frame.

また、制御部220は、動体検出部222により検出された動体の種別を判定する種別判定(動体認識;動体識別)をさらに行ってもよい。種別は、車、バイク、自転車などの乗り物や、人、動物、物などである。この場合は、検出情報に動体種別の情報をも含めることができる。こうすることで、監視におけるセキュリティ向上などの更なる効果を得ることができる。なお、種別判定にはどのようなアルゴリズムを用いてもよい。例えば、既存の種別判定により動体の種別を判定してもよく、具体的にはHoGやHaar-likeなどの画像特徴とブースティングを組み合わせた判定器(認識器;識別器)を用いて動体の種別を判定してもよい。既存の機械学習により生成された学習済みモデルを用いて動体の種別を判定してもよく、具体的にはディープラーニング(例えば、R-CNN、Fast R-CNN、YOLO、SSDなど)により生成された学習済みモデルを用いて動体の種別を判定してもよい。 The control unit 220 may further perform type determination (moving object recognition; moving object identification) to determine the type of the moving object detected by the moving object detection unit 222. The type may be a vehicle such as a car, a motorcycle, or a bicycle, or a person, an animal, or an object. In this case, the detection information may also include information on the type of the moving object. By doing so, further effects such as improved security in surveillance can be obtained. Any algorithm may be used for the type determination. For example, the type of the moving object may be determined by an existing type determination, and specifically, the type of the moving object may be determined using a classifier (recognizer; discriminator) that combines image features such as HoG and Haar-like with boosting. The type of the moving object may be determined using a trained model generated by existing machine learning, and specifically, the type of the moving object may be determined using a trained model generated by deep learning (for example, R-CNN, Fast R-CNN, YOLO, SSD, etc.).

また、撮像画像の解像度が高いほど、当該撮像画像のコントラスト強調の処理負荷は大きい。このため、制御部220は、所定範囲を撮像した画像を縮小する縮小処理をさらに行い、縮小後の画像に対してコントラスト強調を行ってもよい。こうすることで、コントラスト強調の処理負荷を低減できる。 In addition, the higher the resolution of the captured image, the greater the processing load of contrast enhancement of the captured image. For this reason, the control unit 220 may further perform a reduction process to reduce the image captured within a specified range, and then perform contrast enhancement on the reduced image. In this way, the processing load of contrast enhancement can be reduced.

<その他>
上記実施形態は、本発明の構成例を例示的に説明するものに過ぎない。本発明は上記の具体的な形態には限定されることはなく、その技術的思想の範囲内で種々の変形が可能である。
<Other>
The above-described embodiment merely describes an exemplary configuration of the present invention. The present invention is not limited to the above-described specific embodiment, and various modifications are possible within the scope of the technical concept thereof.

<付記1>
所定範囲を撮像した画像の領域を構成する複数の分割領域について、個別にコントラスト強調を行うコントラスト強調手段(101,221)と、
前記コントラスト強調手段によるコントラスト強調後の画像間の差分に基づき、前記所定範囲における動体を検出する動体検出手段(102,222)と
を有することを特徴とする動体検出装置(100,200)。
<Appendix 1>
A contrast enhancement means (101, 221) for individually enhancing contrast for a plurality of divided regions constituting an image region obtained by capturing a predetermined range;
and a moving object detection means (102, 222) for detecting a moving object within the predetermined range based on a difference between images after contrast enhancement by the contrast enhancement means.

<付記2>
所定範囲を撮像した画像の領域を構成する複数の分割領域について、個別にコントラスト強調を行うコントラスト強調ステップ(S602,S604、S605)と、
前記コントラスト強調ステップによるコントラスト強調後の画像間の差分に基づき、前記所定範囲における動体を検出する動体検出ステップ(S606~S608)と
を有することを特徴とする動体検出方法。
<Appendix 2>
A contrast enhancement step (S602, S604, S605) of individually enhancing contrast for a plurality of divided regions constituting an image region obtained by capturing a predetermined range;
a moving object detection step (S606 to S608) of detecting a moving object within the predetermined range based on a difference between images after contrast enhancement in the contrast enhancement step.

100:動体検出装置 101:コントラスト強調部 102:動体検出部
10:カメラ 200:PC(動体検出装置)
210:入力部 220:制御部 221:コントラスト強調部
222:動体検出部 230:記憶部 240:出力部
100: Moving object detection device 101: Contrast enhancement unit 102: Moving object detection unit 10: Camera 200: PC (moving object detection device)
210: Input unit 220: Control unit 221: Contrast enhancement unit 222: Moving object detection unit 230: Storage unit 240: Output unit

Claims (13)

所定範囲を撮像した画像の領域を構成する複数の分割領域について、個別にコントラスト強調を行うコントラスト強調手段と、
前記コントラスト強調手段によるコントラスト強調後の画像間の差分に基づき、前記所定範囲における動体を検出する動体検出手段と
を有し、
前記コントラスト強調手段は、現在のフレームの画像における各分割領域の画素値に基づいて各分割領域に適用する前記コントラスト強調のパラメータを決定し、前記現在のフレームの画像に基づいて決定した各分割領域の前記パラメータを用いて、前記現在のフレームの画像、及び、差分処理に用いる他の画像のそれぞれに対して前記コントラスト強調を行うものであり、
前記動体検出手段は、前記現在のフレームの画像に基づいて決定した各分割領域の前記パラメータを用いてそれぞれ前記コントラスト強調が行われた、コントラスト強調後の前記現在のフレームの画像とコントラスト強調後の前記他の画像との差分に基づき、前記所定範囲における動体を検出するものである、ことを特徴とする動体検出装置。
A contrast enhancement unit that performs contrast enhancement individually on a plurality of divided regions that constitute an image region obtained by capturing a predetermined range;
a moving object detection unit that detects a moving object within the predetermined range based on a difference between the images after contrast enhancement by the contrast enhancement unit ,
the contrast enhancement means determines a parameter of the contrast enhancement to be applied to each divided region based on a pixel value of each divided region in the image of the current frame, and performs the contrast enhancement on each of the image of the current frame and another image used in the difference processing, using the parameter of each divided region determined based on the image of the current frame;
The moving object detection means detects a moving object within the specified range based on a difference between the image of the current frame after contrast enhancement and the other image after contrast enhancement, in which the contrast enhancement is performed using the parameters of each divided area determined based on the image of the current frame .
前記コントラスト強調は、前記分割領域の各画素値に基づくγカーブを用いて当該分割領域の各画素値を変換するγ補正である
ことを特徴とする請求項1に記載の動体検出装置。
2. The moving object detection device according to claim 1 , wherein the contrast enhancement is gamma correction that converts each pixel value of the divided region using a gamma curve based on each pixel value of the divided region.
前記コントラスト強調は、前記分割領域を代表する画素値と当該分割領域の各画素値との差分が増すように、当該分割領域の各画素値を変更する処理である
ことを特徴とする請求項1に記載の動体検出装置。
2. The moving object detection device according to claim 1 , wherein the contrast enhancement is a process of changing each pixel value of the divided region so as to increase a difference between a pixel value representing the divided region and each pixel value of the divided region.
前記分割領域を代表する画素値は、当該分割領域の平均画素値である
ことを特徴とする請求項に記載の動体検出装置。
The moving object detection device according to claim 3 , wherein the pixel value representing the divided region is an average pixel value of the divided region.
前記動体検出手段は、現在のフレームの画像に対して前記コントラスト強調を行った画像と、過去のフレームの画像に対して前記コントラスト強調を行った画像との差分を用い
るフレーム間差分法により、前記動体を検出する
ことを特徴とする請求項1~のいずれか1項に記載の動体検出装置。
The moving object detection device according to any one of claims 1 to 4, characterized in that the moving object detection means detects the moving object by an inter-frame difference method that uses the difference between an image obtained by performing the contrast enhancement on an image of a current frame and an image obtained by performing the contrast enhancement on an image of a past frame .
前記動体検出手段は、現在のフレームの画像に対して前記コントラスト強調を行った画像と、予め用意された背景画像に対して前記コントラスト強調を行った画像との差分を用いる背景差分法により、前記動体を検出する
ことを特徴とする請求項1~のいずれか1項に記載の動体検出装置。
The moving object detection device according to any one of claims 1 to 4, characterized in that the moving object detection means detects the moving object by a background subtraction method that uses the difference between an image obtained by performing the contrast enhancement on an image of a current frame and an image obtained by performing the contrast enhancement on a previously prepared background image.
前記動体検出手段は、
現在のフレームの画像に対して前記コントラスト強調を行った画像と、過去のフレームの画像に対して前記コントラスト強調を行った画像との差分を用いるフレーム間差分法、及び、
前記現在のフレームの画像に対して前記コントラスト強調を行った画像と、予め用意された背景画像に対して前記コントラスト強調を行った画像との差分を用いる背景差分法の組み合わせにより、前記動体を検出する
ことを特徴とする請求項1~のいずれか1項に記載の動体検出装置。
The moving object detection means
A frame difference method using a difference between an image obtained by performing the contrast enhancement on an image of a current frame and an image obtained by performing the contrast enhancement on an image of a past frame; and
The moving object detection device according to any one of claims 1 to 4, characterized in that the moving object is detected by a combination of a background subtraction method that uses the difference between an image obtained by performing the contrast enhancement on an image of the current frame and an image obtained by performing the contrast enhancement on a previously prepared background image.
前記フレーム間差分法により背景と判定される領域について、前記背景画像を、前記現在のフレームの画像に基づき更新する更新手段をさらに有する
ことを特徴とする請求項に記載の動体検出装置。
8. The moving object detection device according to claim 7 , further comprising an update unit that updates the background image based on the image of the current frame for an area determined to be background by the interframe difference method.
前記動体検出手段により検出された動体の種別を判定する種別判定手段をさらに有することを特徴とする請求項1~のいずれか1項に記載の動体検出装置。 9. The moving object detection device according to claim 1, further comprising a type determination unit for determining a type of the moving object detected by the moving object detection unit. 前記所定範囲を撮像した画像を縮小する縮小手段をさらに有し、
前記コントラスト強調手段は、前記縮小手段による縮小後の画像に対して前記コントラスト強調を行う
ことを特徴とする請求項1~のいずれか1項に記載の動体検出装置。
The image capturing device further includes a reduction unit for reducing the size of the image captured within the predetermined range.
10. The moving object detection device according to claim 1, wherein the contrast enhancing means performs the contrast enhancement on the image after reduction by the reduction means.
前記所定範囲を撮像した画像は、IR画像である
ことを特徴とする請求項1~10のいずれか1項に記載の動体検出装置。
11. The moving object detection device according to claim 1, wherein the image captured within the predetermined range is an IR image.
所定範囲を撮像した画像の領域を構成する複数の分割領域について、個別にコントラスト強調を行うコントラスト強調ステップと、
前記コントラスト強調ステップによるコントラスト強調後の画像間の差分に基づき、前記所定範囲における動体を検出する動体検出ステップと
を有し、
前記コントラスト強調ステップでは、現在のフレームの画像における各分割領域の画素値に基づいて各分割領域に適用する前記コントラスト強調のパラメータを決定し、前記現在のフレームの画像に基づいて決定した各分割領域の前記パラメータを用いて、前記現在のフレームの画像、及び、差分処理に用いる他の画像のそれぞれに対して前記コントラスト強調を行い、
前記動体検出ステップでは、前記現在のフレームの画像に基づいて決定した各分割領域の前記パラメータを用いてそれぞれ前記コントラスト強調が行われた、コントラスト強調後の前記現在のフレームの画像とコントラスト強調後の前記他の画像との差分に基づき、前記所定範囲における動体を検出することを特徴とする動体検出方法。
a contrast enhancement step of performing contrast enhancement individually on a plurality of divided regions constituting an image region obtained by capturing a predetermined range;
a moving object detection step of detecting a moving object within the predetermined range based on a difference between images after the contrast enhancement step ;
In the contrast enhancement step, a parameter of the contrast enhancement to be applied to each divided region is determined based on a pixel value of each divided region in the image of the current frame, and the contrast enhancement is performed on each of the image of the current frame and another image used in the difference processing, using the parameter of each divided region determined based on the image of the current frame;
A moving object detection method characterized in that in the moving object detection step, the contrast enhancement is performed using the parameters of each divided area determined based on the image of the current frame, and a moving object within the specified range is detected based on the difference between the image of the current frame after contrast enhancement and the other image after contrast enhancement .
請求項12に記載の動体検出方法の各ステップをコンピュータに実行させるためのプログラム。 A program for causing a computer to execute each step of the moving object detection method according to claim 12 .
JP2020106748A 2020-06-22 2020-06-22 MOTION DETECTION DEVICE AND MOTION DETECTION METHOD Active JP7562999B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2020106748A JP7562999B2 (en) 2020-06-22 2020-06-22 MOTION DETECTION DEVICE AND MOTION DETECTION METHOD
PCT/JP2021/019005 WO2021261125A1 (en) 2020-06-22 2021-05-19 Movable body detection device and movable body detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020106748A JP7562999B2 (en) 2020-06-22 2020-06-22 MOTION DETECTION DEVICE AND MOTION DETECTION METHOD

Publications (2)

Publication Number Publication Date
JP2022002018A JP2022002018A (en) 2022-01-06
JP7562999B2 true JP7562999B2 (en) 2024-10-08

Family

ID=79244496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020106748A Active JP7562999B2 (en) 2020-06-22 2020-06-22 MOTION DETECTION DEVICE AND MOTION DETECTION METHOD

Country Status (2)

Country Link
JP (1) JP7562999B2 (en)
WO (1) WO2021261125A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2024126103A (en) * 2023-03-07 2024-09-20 株式会社Jvcケンウッド Recognition processing device and recognition processing method
CN121353413A (en) * 2025-12-17 2026-01-16 杭州寰宇微视科技有限公司 A machine vision-based crane hook swing angle and swing length measurement system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000285230A (en) 1999-03-29 2000-10-13 Minolta Co Ltd Device and method for image processing for performing contrast correction
JP2001195583A (en) 2000-01-14 2001-07-19 Canon Inc Position detecting apparatus and exposure apparatus using the same
JP2014059798A (en) 2012-09-19 2014-04-03 Sony Corp Image processing device, monitoring cameras and image processing method
JP2015008412A (en) 2013-06-25 2015-01-15 グローリー株式会社 Moving body image extraction method and moving body image extraction device
WO2016132772A1 (en) 2015-02-19 2016-08-25 シャープ株式会社 Information management device, information management method, and control program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3710548B2 (en) * 1996-05-08 2005-10-26 松下電器産業株式会社 Vehicle detection device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000285230A (en) 1999-03-29 2000-10-13 Minolta Co Ltd Device and method for image processing for performing contrast correction
JP2001195583A (en) 2000-01-14 2001-07-19 Canon Inc Position detecting apparatus and exposure apparatus using the same
JP2014059798A (en) 2012-09-19 2014-04-03 Sony Corp Image processing device, monitoring cameras and image processing method
JP2015008412A (en) 2013-06-25 2015-01-15 グローリー株式会社 Moving body image extraction method and moving body image extraction device
WO2016132772A1 (en) 2015-02-19 2016-08-25 シャープ株式会社 Information management device, information management method, and control program

Also Published As

Publication number Publication date
JP2022002018A (en) 2022-01-06
WO2021261125A1 (en) 2021-12-30

Similar Documents

Publication Publication Date Title
JP5400195B2 (en) Method and camera for determining image adjustment parameters
KR20210139450A (en) Image display method and device
CN111539265B (en) Method for detecting abnormal behavior in elevator car
US9674441B2 (en) Image processing apparatus, image processing method, and storage medium
US9569688B2 (en) Apparatus and method of detecting motion mask
JP4764487B2 (en) Video surveillance system
CN104823444A (en) Image stabilization techniques for video surveillance systems
US20240048672A1 (en) Adjustment of shutter value of surveillance camera via ai-based object recognition
CN103905727A (en) Object area tracking apparatus, control method, and program of the same
US11991455B2 (en) Light sensor chip and image processing device having different operating modes
JP7562999B2 (en) MOTION DETECTION DEVICE AND MOTION DETECTION METHOD
JP2021193552A (en) Using neural network for object detection in scene having wide range of light intensities
CN117561540A (en) Systems and methods for performing computer vision tasks using frame sequences
US20060056702A1 (en) Image processing apparatus and image processing method
US20240414443A1 (en) Noise removal from surveillance camera image by means of ai-based object recognition
JP6365355B2 (en) Image generating apparatus and image generating method
JP2008234619A (en) Face authentication apparatus and face authentication method
KR20230064959A (en) Surveillance Camera WDR(Wide Dynamic Range) Image Processing Using Object Detection Based on Artificial Intelligence
CN119229075A (en) Object detection method and object detection system
CN116489317A (en) Object detection method, system and storage medium based on image pickup device
US12489980B2 (en) Image capturing apparatus, information processing apparatus, control method, and storage medium
JP6244221B2 (en) Human detection device
US20260127721A1 (en) Method, apparatus, device, and medium of image processing based on event camera
US20240242491A1 (en) Apparatus, method, and storage medium for improving result of inference by learning model
JP7435298B2 (en) Object detection device and object detection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230213

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20240305

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240501

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240827

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240909

R150 Certificate of patent or registration of utility model

Ref document number: 7562999

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150