JP2018147329A - Image processing device, image processing system, and image processing method - Google Patents

Image processing device, image processing system, and image processing method Download PDF

Info

Publication number
JP2018147329A
JP2018147329A JP2017043259A JP2017043259A JP2018147329A JP 2018147329 A JP2018147329 A JP 2018147329A JP 2017043259 A JP2017043259 A JP 2017043259A JP 2017043259 A JP2017043259 A JP 2017043259A JP 2018147329 A JP2018147329 A JP 2018147329A
Authority
JP
Japan
Prior art keywords
image
background
processing target
processing
unit
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.)
Pending
Application number
JP2017043259A
Other languages
Japanese (ja)
Inventor
斉 ▲浜▼上
斉 ▲浜▼上
Hitoshi Hamagami
大樹 桑原
Hiroki Kuwahara
大樹 桑原
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.)
Denso Ten Ltd
Original Assignee
Denso Ten Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2017043259A priority Critical patent/JP2018147329A/en
Publication of JP2018147329A publication Critical patent/JP2018147329A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a background difference processing technique robust over a variation in illumination condition.SOLUTION: The image processing device for extracting, by using a background subtraction method, a foreground region from a moving image shot by a camera includes an acquisition unit, a background difference processing unit, and a threshold varying unit. The acquisition unit acquires a plurality of frame images included in the moving image. The background difference processing unit compares the background image which is the frame image with a processing target image which is the frame image and is acquired by the acquisition unit after the background image, and separates regions of the processing target image into the foreground region and the background region based on a threshold value. The threshold varying unit varies the threshold value according to at least one of a luminance value of the frame image acquired by the acquisition unit before the processing target image and an illuminance which influences the luminance value of the frame image acquired by the acquisition unit before the processing target image.SELECTED DRAWING: Figure 1

Description

本発明は、カメラで撮影された動画像から背景差分法を用いて前景領域を抽出する画像処理技術に関する。   The present invention relates to an image processing technique for extracting a foreground region from a moving image captured by a camera using a background subtraction method.

カメラで撮影された動画像から背景差分法を用いて前景領域を抽出する画像処理技術は、例えば人物の抽出などに利用されている(例えば特許文献1参照)。   An image processing technique for extracting a foreground region from a moving image photographed by a camera using a background subtraction method is used, for example, for extracting a person (see Patent Document 1, for example).

特開2008−250366号公報JP 2008-250366 A

しかしながら、一般的な背景差分法は照明条件の変動に弱いという欠点を有している。例えば、カメラで撮影された車室内の動画像から背景差分法を用いて車両の乗員を抽出する場合、カメラ撮影時の照明条件はカメラ撮影時の車両の外部環境に応じて変動するので、照明条件の変動に強い背景差分処理技術が望まれる。   However, the general background subtraction method has a drawback that it is vulnerable to variations in illumination conditions. For example, when a vehicle occupant is extracted from a moving image captured by a camera using a background difference method, the illumination conditions at the time of camera shooting vary depending on the external environment of the vehicle at the time of camera shooting. Background difference processing technology that is resistant to fluctuations in conditions is desired.

本発明は、上記課題に鑑みて、照明条件の変動に強い背景差分処理技術を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide a background difference processing technique that is resistant to fluctuations in illumination conditions.

本発明の画像処理装置は、カメラで撮影された動画像から背景差分法を用いて前景領域を抽出する画像処理装置であって、前記動画像に含まれる複数のフレーム画像を取得する取得部と、前記フレーム画像である背景画像と、前記フレーム画像であって前記背景画像より後に前記取得部によって取得される処理対象画像とを比較し、閾値に基づいて前記処理対象画像の領域を前記前景領域と背景領域とに区別する背景差分処理部と、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値、及び、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値に影響を与える照度の少なくとも一方に応じて、前記閾値を可変する閾値可変部と、を備える構成(第1の構成)である。   An image processing apparatus of the present invention is an image processing apparatus that extracts a foreground region from a moving image captured by a camera using a background subtraction method, and an acquisition unit that acquires a plurality of frame images included in the moving image; The background image that is the frame image is compared with the processing target image that is the frame image and is acquired by the acquisition unit after the background image, and the region of the processing target image is determined based on a threshold value as the foreground region. And a background difference processing unit that distinguishes between a background region and a luminance value of the frame image acquired by the acquisition unit prior to the processing target image, and acquired by the acquisition unit prior to the processing target image A threshold variable unit configured to vary the threshold according to at least one of illuminances affecting the luminance value of the frame image (first configuration).

上記第1の構成の画像処理装置において、前記閾値可変部は、前記処理対象画像より先に前記取得部によって取得された複数の前記フレーム画像の輝度値を時間平均化して得られる時間平均輝度値に応じて、前記閾値を可変する構成(第2の構成)であってもよい。   In the image processing apparatus having the first configuration, the threshold variable unit is a time average luminance value obtained by time averaging luminance values of the plurality of frame images acquired by the acquisition unit prior to the processing target image. Depending on the configuration, the threshold may be varied (second configuration).

上記第2の構成の画像処理装置において、前記閾値可変部は、前記フレーム画像を複数の区分領域に区分し、前記時間平均輝度値を前記区分領域の単位で求め、前記区分領域の単位で前記閾値を可変する構成(第3の構成)であってもよい。   In the image processing apparatus having the second configuration, the threshold variable unit divides the frame image into a plurality of divided areas, obtains the time average luminance value in units of the divided areas, and calculates the time in units of the divided areas. A configuration in which the threshold is variable (third configuration) may be used.

上記第1の構成の画像処理装置において、前記閾値可変部は、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値と、前記処理対象画像の輝度値とに応じて、前記閾値を可変する構成(第4の構成)であってもよい。   In the image processing apparatus having the first configuration, the threshold variable unit is configured to respond to a luminance value of the frame image acquired by the acquisition unit prior to the processing target image and a luminance value of the processing target image. A configuration (fourth configuration) in which the threshold value is variable may be employed.

上記第4の構成の画像処理装置において、前記閾値可変部は、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像及び前記処理対象画像それぞれを複数の区分領域に区分し、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値を前記区分領域の単位で平均化して得られる値と、前記処理対象画像の輝度値を前記区分領域の単位で平均化して得られる値とに応じて、前記区分領域の単位で前記閾値を可変する構成(第5の構成)であってもよい。   In the image processing apparatus having the fourth configuration, the threshold variable unit divides each of the frame image and the processing target image acquired by the acquisition unit prior to the processing target image into a plurality of partitioned regions, A value obtained by averaging the luminance value of the frame image acquired by the acquisition unit prior to the processing target image in the unit of the segmented region, and the luminance value of the processing target image in the unit of the segmented region Depending on the value obtained in this way, the threshold value may be varied in units of the segmented regions (fifth configuration).

上記第1の構成の画像処理装置において、前記閾値可変部は、照度計から出力される照度情報を受け取り、前記処理対象画像より先に前記取得部によって取得された複数の前記フレーム画像に対応する前記照度を時間平均化して得られる時間平均照度に応じて、前記閾値を可変する構成(第6の構成)であってもよい。   In the image processing apparatus having the first configuration, the threshold variable unit receives illuminance information output from an illuminometer and corresponds to the plurality of frame images acquired by the acquisition unit prior to the processing target image. A configuration (sixth configuration) in which the threshold value is varied according to a time average illuminance obtained by time averaging the illuminance may be employed.

上記第1の構成の画像処理装置において、前記閾値可変部は、照度計から出力される照度情報を受け取り、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像に対応する前記照度と、前記処理対象画像に対応する前記照度とに応じて、前記閾値を可変する構成(第7の構成)であってもよい。   In the image processing apparatus having the first configuration, the threshold variable unit receives illuminance information output from an illuminometer, and the illuminance corresponding to the frame image acquired by the acquisition unit prior to the processing target image And the structure (7th structure) which varies the said threshold value according to the said illumination intensity corresponding to the said process target image may be sufficient.

上記第1〜第7いずれかの構成の画像処理装置において、前記閾値可変部は、ナビゲーション装置から特定の場所に到達したことを通知する通信信号を受け取ったときに、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値、及び、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値に影響を与える照度の少なくとも一方に応じて、前記閾値を可変する構成(第8の構成)であってもよい。   In the image processing device having any one of the first to seventh configurations, when the threshold variable unit receives a communication signal notifying that a specific location has been reached from the navigation device, the threshold variable unit precedes the processing target image. The threshold value according to at least one of the luminance value of the frame image acquired by the acquisition unit and the illuminance that affects the luminance value of the frame image acquired by the acquisition unit prior to the processing target image. May be configured (eighth configuration).

上記第1〜第8いずれかの構成の画像処理装置において、前記背景差分処理部は、前記処理対象画像の全領域に対して背景差分処理を行う構成(第9の構成)であってもよい。   In the image processing apparatus having any one of the first to eighth configurations, the background difference processing unit may be configured to perform background difference processing on the entire region of the processing target image (ninth configuration). .

上記第1〜第8いずれかの構成の画像処理装置において、前記背景差分処理部は、前記処理対象画像内の所定の一部領域に対してのみ背景差分処理を行う構成(第10の構成)であってもよい。   In the image processing apparatus having any one of the first to eighth configurations, the background difference processing unit performs background difference processing only on a predetermined partial region in the processing target image (tenth configuration). It may be.

上記第1〜第10いずれかの構成の画像処理装置において、前記背景差分処理部は、グラフカット法によって前記処理対象画像の領域を前記前景領域と前記背景領域とに区別する構成(第11の構成)であってもよい。   In the image processing apparatus having any one of the first to tenth configurations, the background difference processing unit is configured to distinguish the region of the processing target image into the foreground region and the background region by a graph cut method (an eleventh configuration). Configuration).

上記第11の構成の画像処理装置において、前記閾値は、各ノードが前記前景領域又は前記背景領域のどちらと強くつながっているかを決定するための閾値である構成(第12の構成)であってもよい。   In the image processing apparatus having the eleventh configuration, the threshold value is a threshold value (twelfth configuration) for determining whether each node is strongly connected to the foreground region or the background region. Also good.

上記第1〜第12いずれかの構成の画像処理装置において、前記フレーム画像における注目画素の周辺領域内のエッジを検出するエッジ検出部と、時間経過によって前記エッジが移動した場合に、その移動から一定時間が経過する迄の間、前記注目画素の輝度値が略変動せず且つ前記エッジが更に略移動しなければ、前記注目画素の輝度値を前記背景画像に反映させた修正背景画像を生成する修正部と、を備え、前記背景差分処理部は、前記修正背景画像を前記背景画像として用いる構成(第13の構成)であってもよい。   In the image processing apparatus having any one of the first to twelfth configurations, an edge detection unit that detects an edge in a peripheral region of a pixel of interest in the frame image, and when the edge moves over time, the movement If the luminance value of the target pixel does not substantially change and the edge does not further move until a certain time elapses, a corrected background image is generated in which the luminance value of the target pixel is reflected in the background image. The background difference processing unit may be configured to use the corrected background image as the background image (a thirteenth configuration).

本発明の画像処理システムは、カメラと、前記カメラで撮影された動画像を処理する上記第1〜第13いずれかの構成の画像処理装置と、を備える構成(第14の構成)である。   An image processing system of the present invention is a configuration (fourteenth configuration) comprising a camera and the image processing apparatus having any one of the first to thirteenth configurations for processing a moving image captured by the camera.

本発明の画像処理方法は、カメラで撮影された動画像から背景差分法を用いて前景領域を抽出する画像処理方法であって、前記動画像に含まれる複数のフレーム画像を取得する取得工程と、前記フレーム画像である背景画像と、前記フレーム画像であって前記背景画像より後に前記取得工程によって取得される処理対象画像とを比較し、閾値に基づいて前記処理対象画像の領域を前記前景領域と背景領域とに区別する背景差分処理工程と、前記処理対象画像より先に前記取得工程によって取得された前記フレーム画像の輝度値、及び、前記処理対象画像より先に前記取得工程によって取得された前記フレーム画像の輝度値に影響を与える照度の少なくとも一方に応じて、前記閾値を可変する閾値可変工程と、を備える構成(第15の構成)である。   The image processing method of the present invention is an image processing method for extracting a foreground region from a moving image taken by a camera using a background subtraction method, and acquiring a plurality of frame images included in the moving image; The background image that is the frame image is compared with the processing target image that is the frame image and is acquired by the acquiring step after the background image, and the region of the processing target image is determined based on a threshold value. A background difference processing step for distinguishing between the image and the background region, the luminance value of the frame image acquired by the acquisition step prior to the processing target image, and the acquisition step prior to the processing target image. A configuration (fifteenth configuration) comprising: a threshold variable step that varies the threshold according to at least one of the illuminances affecting the luminance value of the frame image. That.

本発明によると、照明条件の変動に強い背景差分処理技術を提供できる。   According to the present invention, it is possible to provide a background difference processing technique that is resistant to fluctuations in illumination conditions.

第1実施形態に係る画像処理システムの構成を示すブロック図1 is a block diagram showing the configuration of an image processing system according to a first embodiment. 車室内撮影カメラで撮影される画像の一例を示す図The figure which shows an example of the image image | photographed with a vehicle interior camera 画像処理装置の動作例を示すフローチャートFlowchart showing an operation example of the image processing apparatus 車室内撮影カメラで撮影される画像の一例を示す図The figure which shows an example of the image image | photographed with a vehicle interior camera 車室内撮影カメラで撮影される画像の一例を示す図The figure which shows an example of the image image | photographed with a vehicle interior camera 第3実施形態に係る画像処理システムの構成を示すブロック図The block diagram which shows the structure of the image processing system which concerns on 3rd Embodiment. 第5実施形態に係る画像処理システムの構成を示すブロック図Block diagram showing the configuration of an image processing system according to the fifth embodiment グラフカット法による前景領域と背景領域との区別を概念的に示す図A diagram conceptually showing the distinction between foreground and background areas by the graph cut method 第7実施形態に係る画像処理システムの構成を示すブロック図The block diagram which shows the structure of the image processing system which concerns on 7th Embodiment.

以下、本発明の例示的な実施形態について、図面を参照しながら詳細に説明する。   Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings.

<1.第1実施形態>
図1は、本実施形態に係る画像処理システムの構成を示すブロック図である。画像処理システムは、車室内撮影カメラ10と、画像処理装置20と、を備える。本実施形態において、画像処理システムは車両に搭載される。
<1. First Embodiment>
FIG. 1 is a block diagram illustrating a configuration of an image processing system according to the present embodiment. The image processing system includes a vehicle interior photographing camera 10 and an image processing device 20. In the present embodiment, the image processing system is mounted on a vehicle.

車室内撮影カメラ10は、車両の車室内を一方向から撮影する単眼カメラである。車室内撮影カメラ10は、例えば運転席や助手席に座っている乗員のみならず後部座席に座っている乗員も俯瞰して撮影できるように車両の天井の前方中央部に設置するとよい。車室内撮影カメラ10を車両の天井の前方中央部に設置した場合に車室内撮影カメラ10で撮影される画像は、例えば図2に示すようになる。   The vehicle interior photographing camera 10 is a monocular camera that photographs the interior of the vehicle from one direction. The vehicle interior camera 10 may be installed at the front center of the vehicle ceiling so that, for example, not only passengers sitting in the driver's seat and passenger seat but also passengers sitting in the rear seats can be viewed from above. For example, FIG. 2 shows an image captured by the vehicle interior camera 10 when the vehicle interior camera 10 is installed at the front center of the vehicle ceiling.

画像処理装置20は、車室内撮影カメラ10で撮影された動画像から背景差分処理法を用いて前景領域(乗員)を抽出する。なお、夜間でも画像処理装置20が前景領域(乗員)を抽出することができるように、車室内撮影カメラ10として近赤外対応カメラを採用し、車室内撮影カメラ10の撮影領域に近赤外光を照射する近赤外照明装置を車両の室内に設置することが好ましい。   The image processing apparatus 20 extracts a foreground region (occupant) from a moving image captured by the vehicle interior photographing camera 10 using a background difference processing method. It should be noted that a near-infrared camera is employed as the vehicle interior photographing camera 10 so that the image processing apparatus 20 can extract the foreground region (occupant) even at night, and the near infrared is applied to the photographing region of the vehicle interior photographing camera 10. It is preferable to install a near-infrared illumination device for irradiating light in the vehicle interior.

画像処理装置20は、ASIC(application specificintegrated circuit)やFPGA(field-programmable gate array)等のハードウェア、或いは、ハードウェアとソフトウェアの組み合わせによって構成することができる。ソフトウェアを用いて画像処理装置20を構成する場合、ソフトウェアにて実現される部位についてのブロック図は、その部位の機能ブロック図を表すことになる。ソフトウェアを用いて実現される機能をプログラムとして記述し、当該プログラムをプログラム実行装置上で実行することによって、その機能を実現するようにしてもよい。プログラム実行装置としては、例えばCPU(Central Processing Unit)、RAM(Random AccessMemory)、及びROM(Read Only Memory)を備えるコンピュータを挙げることができる。   The image processing apparatus 20 can be configured by hardware such as an application specific integrated circuit (ASIC) or a field-programmable gate array (FPGA), or a combination of hardware and software. When the image processing apparatus 20 is configured using software, a block diagram of a part realized by software represents a functional block diagram of the part. A function realized using software may be described as a program, and the function may be realized by executing the program on a program execution device. Examples of the program execution device include a computer including a CPU (Central Processing Unit), a RAM (Random Access Memory), and a ROM (Read Only Memory).

画像処理装置20は、取得部21と、背景差分処理部23と、閾値可変部24と、を備える。   The image processing device 20 includes an acquisition unit 21, a background difference processing unit 23, and a threshold variable unit 24.

取得部21は、車室内撮影カメラ10からアナログ又はデジタルの撮影画像を所定の周期(例えば、1/30秒周期)で時間的に連続して取得する。すなわち、取得部21によって取得される撮影画像の集合体が車室内撮影カメラ10で撮影された動画像である。そして、取得した撮影画像がアナログの場合には、取得部21は、そのアナログの撮影画像をデジタルの撮影画像に変換(A/D変換)する。取得部21は、取得した撮影画像、或いは、取得及び変換した撮影画像を背景差分処理部23に出力する。取得部21から出力される1つの撮影画像が1つのフレーム画像となる。   The acquisition unit 21 acquires analog or digital photographed images from the vehicle interior photographing camera 10 continuously in a predetermined cycle (for example, 1/30 second cycle). That is, a collection of captured images acquired by the acquisition unit 21 is a moving image captured by the vehicle interior camera 10. If the acquired captured image is analog, the acquiring unit 21 converts the analog captured image into a digital captured image (A / D conversion). The acquisition unit 21 outputs the acquired captured image or the acquired and converted captured image to the background difference processing unit 23. One captured image output from the acquisition unit 21 becomes one frame image.

取得部21は、フレーム画像を背景差分処理部23や閾値可変部24に送出する。   The acquisition unit 21 sends the frame image to the background difference processing unit 23 and the threshold variable unit 24.

背景差分処理部23は、フレーム画像である背景画像と、フレーム画像であって背景画像より後に取得部21によって取得される処理対象画像とを比較し、閾値に基づいて処理対象画像の領域を前景領域と背景領域とに区別する。本実施形態では、背景差分処理部23は、背景画像と処理対象画像との同一位置画素間の輝度差を算出し、輝度差が閾値以上である位置を処理対象画像の前景領域とし、輝度差が閾値未満である位置を処理対象画像の背景領域とする。   The background difference processing unit 23 compares the background image that is a frame image with the processing target image that is a frame image and is acquired by the acquisition unit 21 after the background image, and determines the region of the processing target image based on the threshold value. Distinguish between areas and background areas. In the present embodiment, the background difference processing unit 23 calculates a luminance difference between pixels at the same position in the background image and the processing target image, sets a position where the luminance difference is equal to or greater than a threshold as the foreground region of the processing target image, and determines the luminance difference. Is a background area of the processing target image.

本実施形態において、閾値可変部24は、処理対象画像より先に取得部21によって取得されたフレーム画像の輝度値に応じて、背景差分処理部23で用いられる閾値を可変する。より具体的には、本実施形態において、閾値可変部24は、フレーム画像を複数の区分領域に区分し、処理対象画像より先に取得部21によって取得された複数のフレーム画像の輝度値を時間平均化して得られる時間平均輝度値を区分領域の単位で求め、区分領域の単位で閾値を可変する。   In the present embodiment, the threshold variable unit 24 varies the threshold used by the background difference processing unit 23 according to the luminance value of the frame image acquired by the acquisition unit 21 prior to the processing target image. More specifically, in the present embodiment, the threshold variable unit 24 divides the frame image into a plurality of divided regions, and sets the luminance values of the plurality of frame images acquired by the acquisition unit 21 before the processing target image as time. A time average luminance value obtained by averaging is obtained in units of segmented areas, and the threshold value is varied in units of segmented areas.

図3は、画像処理装置20の動作例を示すフローチャートである。画像処理装置20は、車両のドアロックが解除されたタイミングで図3に示すフローチャートの動作を開始し、背景差分処理の結果が前景領域(乗員)の未抽出である状態において車両のドアがアンロックからロックに切り替わったタイミングで図3に示すフローチャートの動作を強制的に終了する。したがって、画像処理装置20は、車両のドアがロックであるかアンロックであるかを通知する信号を画像処理装置20の外部から受け取る。   FIG. 3 is a flowchart illustrating an operation example of the image processing apparatus 20. The image processing apparatus 20 starts the operation of the flowchart shown in FIG. 3 at the timing when the door lock of the vehicle is released. When the result of the background difference processing is that the foreground area (occupant) has not been extracted, the vehicle door is unloaded. The operation of the flowchart shown in FIG. 3 is forcibly terminated at the timing when the lock is switched to the lock. Therefore, the image processing apparatus 20 receives a signal for notifying whether the door of the vehicle is locked or unlocked from the outside of the image processing apparatus 20.

まず、取得部21が背景画像を取得する(ステップS10)。取得部21は背景画像を取得した後、所定の周期でフレーム画像を取得し続ける。   First, the acquisition unit 21 acquires a background image (step S10). After acquiring the background image, the acquisition unit 21 continues to acquire the frame image at a predetermined cycle.

次に、背景差分処理部23が処理対象画像となるフレーム画像を決定する(ステップS20)。   Next, the background difference processing unit 23 determines a frame image to be a processing target image (step S20).

次に、閾値可変部24が閾値を更新する(ステップS30)。本実施形態では、ドライバーの抽出を目的として、図4に示すようにフレーム画像の所定の一部領域R1を設定している。また、図5に示すようにフレーム画像を、所定の一部領域R1以外の領域R2と、所定の一部領域R1を均等分割した各分割領域R3とによって構成される複数の区分領域に区分する。そして、閾値可変部24は、分割領域R3毎にフレーム画像の輝度値を時間平均化し、その時間平均化された輝度に応じて分割領域R3毎に閾値を更新する。例えば、処理対象画像がn番目のフレーム画像である場合、(n−1)番目のフレーム画像〜(n−k)番目のフレーム画像の輝度値を時間平均化すればよい。上記において、nは3以上の自然数、kはnより小さい自然数である。また、上記の例とは異なり、処理対象画像より1つ先に取得されたフレーム画像(上記(n−1)番目のフレーム画像)を時間平均化の対象に含めないようにしてもよい。   Next, the threshold variable unit 24 updates the threshold (step S30). In the present embodiment, for the purpose of driver extraction, a predetermined partial region R1 of the frame image is set as shown in FIG. In addition, as shown in FIG. 5, the frame image is divided into a plurality of divided areas including areas R2 other than the predetermined partial area R1 and divided areas R3 obtained by equally dividing the predetermined partial area R1. . Then, the threshold variable unit 24 averages the luminance values of the frame images for each divided region R3 and updates the threshold for each divided region R3 according to the time-averaged luminance. For example, when the processing target image is the nth frame image, the luminance values of the (n−1) th frame image to the (n−k) th frame image may be time-averaged. In the above, n is a natural number of 3 or more, and k is a natural number smaller than n. Further, unlike the above example, the frame image (the (n−1) th frame image) acquired one ahead of the processing target image may not be included in the time averaging target.

ステップS30において、例えば、時間平均化された輝度が基準値より離れるほど閾値を小さくすればよい。   In step S30, for example, the threshold value may be decreased as the time-averaged luminance is separated from the reference value.

最後に、背景差分処理部23が、ステップS30で更新された閾値を用いて背景差分処理を実行する(ステップS40)。本実施形態では、背景差分処理部23が所定の一部領域R1のみに対して背景差分処理を実行する。これにより、画像処理装置20にかかる背景差分処理の負担が軽くなる。また、所定の一部領域R1からハンドル、シートベルトリトラクター、シフトノブ等の車両可動部品を外すことで、これらの車両可動部品が動くことで前景領域であると誤って区別されることを防止できる。また、背景差分処理部23が所定の一部領域R1を含む処理対象画像の全領域に対して背景差分処理を実行してもよい。これにより、漏れなく処理対象画像に背景差分処理を実行できる。   Finally, the background difference processing unit 23 executes background difference processing using the threshold updated in step S30 (step S40). In the present embodiment, the background difference processing unit 23 performs background difference processing only on a predetermined partial region R1. This reduces the burden of background difference processing on the image processing apparatus 20. In addition, by removing vehicle movable parts such as a handle, seat belt retractor, and shift knob from the predetermined partial area R1, it is possible to prevent the vehicle movable parts from being mistakenly identified as the foreground area by moving. . In addition, the background difference processing unit 23 may perform background difference processing on the entire region of the processing target image including the predetermined partial region R1. Thereby, the background difference process can be executed on the processing target image without omission.

なお、背景差分処理部23が、例えば前景領域と背景領域との境界線を強調した画像を背景差分処理の結果として生成し、外部の表示装置に出力するようにしてもよい。   Note that the background difference processing unit 23 may generate, for example, an image in which the boundary line between the foreground region and the background region is emphasized as a result of the background difference processing and output it to an external display device.

ステップS40が終了すると、ステップS20に戻り、今まで処理対象画像であったフレーム画像の1つ後のフレーム画像を新たな処理対象画像とする。   When step S40 ends, the process returns to step S20, and the frame image immediately after the frame image that has been the processing target image is set as a new processing target image.

本実施形態によると、閾値可変部24が、処理対象画像より先に取得部21によって取得されたフレーム画像の輝度値に応じて、背景差分処理部23で用いられる閾値を可変するので、処理対象画像の撮影時より前の照明条件に応じて閾値を可変することができる。照明条件は無秩序に変動するのではなく、或る程度の連続性を持って変動する。したがって、処理対象画像の撮影時の照明条件に適した閾値の設定が可能となる。その結果、照明条件の変動に強い背景差分処理を実行することができる。   According to the present embodiment, the threshold variable unit 24 varies the threshold used by the background difference processing unit 23 according to the luminance value of the frame image acquired by the acquisition unit 21 prior to the processing target image. The threshold value can be varied according to the illumination conditions before the image is taken. The lighting conditions do not fluctuate randomly but vary with some degree of continuity. Accordingly, it is possible to set a threshold value suitable for the illumination condition at the time of capturing the processing target image. As a result, it is possible to execute background difference processing that is resistant to variations in illumination conditions.

また、本実施形態によると、閾値可変部24が、複数のフレーム画像の輝度値を時間平均化して得られる時間平均輝度値に応じて、背景差分処理部23で用いられる閾値を可変するので、或る程度の連続性を持って変動する照明条件の変動に合わせて閾値可変部24が閾値を徐々に可変することができる。したがって、前景領域の抽出結果に関しても或る程度の連続性が保たれるので、突発的な前景領域の未抽出や誤抽出を抑制することができる。   Further, according to the present embodiment, the threshold variable unit 24 varies the threshold used in the background difference processing unit 23 in accordance with the time average luminance value obtained by time averaging the luminance values of a plurality of frame images. The threshold variable unit 24 can gradually change the threshold in accordance with the change of the illumination condition that changes with a certain degree of continuity. Therefore, a certain degree of continuity is maintained with respect to the foreground region extraction result, and sudden unextraction or erroneous extraction of the foreground region can be suppressed.

また、本実施形態によると、閾値可変部24が分割領域R3毎に閾値を更新するので、車室内撮影カメラ10の撮影領域において照明条件が場所毎に異なる場合でも、閾値可変部24が分割領域R3毎に閾値を適切に可変することができる。したがって、分割領域R3を設定しない場合に比べて照明条件の変動に対してより強くなる。   Further, according to the present embodiment, since the threshold variable unit 24 updates the threshold for each divided region R3, the threshold variable unit 24 is configured to be divided even when the illumination conditions in the photographing region of the in-vehicle photographing camera 10 vary from place to place. The threshold value can be appropriately varied for each R3. Therefore, it becomes stronger against fluctuations in illumination conditions than when the divided region R3 is not set.

<2.第2実施形態>
本実施形態に係る画像処理システムは、上述した第1実施形態に係る画像処理システムに対して、閾値可変部24の動作内容が異なっている。したがって、第1実施形態における説明で用いた図1〜図5はそのまま本実施形態においても適用できる。以下、第1実施形態と異なる点について説明し、第1実施形態と同様の構成、動作、及び処理については説明を省略する。
<2. Second Embodiment>
The image processing system according to the present embodiment differs from the image processing system according to the first embodiment described above in the operation content of the threshold variable unit 24. Therefore, FIGS. 1 to 5 used in the description of the first embodiment can be applied to the present embodiment as they are. Hereinafter, a different point from 1st Embodiment is demonstrated and description is abbreviate | omitted about the structure, operation | movement, and process similar to 1st Embodiment.

本実施形態では、閾値可変部24は、処理対象画像より先に取得部21によって取得されたフレーム画像の輝度値と、処理対象画像の輝度値とに応じて、閾値を可変する。例えば、処理対象画像がn番目のフレーム画像である場合、n番目のフレーム画像の輝度値と(n−1)番目のフレーム画像の輝度値との差に基づいて、前回の背景差分処理で用いた閾値からの変化量を決定し、前回の背景差分処理で用いた閾値から今回の背景差分処理で用いる閾値に更新すればよい。例えば、n番目のフレーム画像の輝度値と(n−1)番目のフレーム画像の輝度値との差が大きいほど、前回の背景差分処理で用いた閾値からの変化量を大きくすればよい。   In the present embodiment, the threshold variable unit 24 varies the threshold according to the luminance value of the frame image acquired by the acquisition unit 21 prior to the processing target image and the luminance value of the processing target image. For example, when the processing target image is the nth frame image, it is used in the previous background difference process based on the difference between the luminance value of the nth frame image and the luminance value of the (n−1) th frame image. The amount of change from the previous threshold value may be determined and updated from the threshold value used in the previous background difference process to the threshold value used in the current background difference process. For example, the larger the difference between the luminance value of the nth frame image and the luminance value of the (n−1) th frame image, the larger the amount of change from the threshold used in the previous background difference process.

本実施形態によると、閾値可変部24が、処理対象画像より先に取得部21によって取得されたフレーム画像の輝度値と、処理対象画像の輝度値とに応じて、閾値を可変するので、処理対象画像より先に取得部21によって取得されたフレーム画像の撮影時から処理対象画像の撮影時において照明条件が比較的に急激に変化した場合でも、閾値可変部24が閾値を適切に可変することができる。   According to the present embodiment, the threshold variable unit 24 varies the threshold according to the luminance value of the frame image acquired by the acquisition unit 21 prior to the processing target image and the luminance value of the processing target image. Even when the illumination condition changes relatively abruptly from the time of capturing the frame image acquired by the acquiring unit 21 prior to the target image to the time of capturing the processing target image, the threshold variable unit 24 appropriately varies the threshold. Can do.

<3.第3実施形態>
図6は、本実施形態に係る画像処理システムの構成を示すブロック図である。画像処理システムが車室内撮影カメラ10、及び画像処理装置20によって構成される点は、第1実施形態及び第2実施形態と同様である。以下、第1実施形態及び第2実施形態と異なる点について説明する。
<3. Third Embodiment>
FIG. 6 is a block diagram showing the configuration of the image processing system according to the present embodiment. The point that the image processing system is configured by the vehicle interior photographing camera 10 and the image processing device 20 is the same as in the first embodiment and the second embodiment. Hereinafter, differences from the first embodiment and the second embodiment will be described.

本実施形態では、照度計40から出力される照度情報を背景差分処理部23が受け取る。照度計40は、照度計40によって検知される照度がフレーム画像の輝度値に影響を与える照度になるような場所に設置される。照度計40は例えば車両室内の前端(フロントガラスの近傍)に設置される。   In the present embodiment, the background difference processing unit 23 receives the illuminance information output from the illuminometer 40. The illuminometer 40 is installed in a place where the illuminance detected by the illuminometer 40 becomes an illuminance that affects the luminance value of the frame image. The illuminometer 40 is installed, for example, at the front end (near the windshield) in the vehicle interior.

第1実施形態及び第2実施形態とは異なり、本実施形態では、閾値可変部24がフレーム画像の輝度情報を必要としない。閾値可変部24は、各フレーム画像の撮影タイミングと相関のある各フレーム画像の取得タイミングを取得部21から受け取る。   Unlike the first embodiment and the second embodiment, in this embodiment, the threshold variable unit 24 does not need the luminance information of the frame image. The threshold variable unit 24 receives from the acquisition unit 21 the acquisition timing of each frame image that is correlated with the shooting timing of each frame image.

閾値可変部24は、処理対象画像より先に取得部21によって取得された複数のフレーム画像に対応する照度を時間平均化して得られる時間平均照度に応じて、閾値を可変する。第1実施形態及び第2実施形態とは異なり、本実施形態では、フレーム画像を複数の区分領域に区分していない。ただし、第1実施形態及び第2実施形態と同様に、所定の一部領域R1の設定は行っている。閾値可変部24は、フレーム画像に対応する照度を時間平均化し、その時間平均化された照度に応じて閾値を更新する。例えば、処理対象画像がn番目のフレーム画像である場合、(n−1)番目のフレーム画像〜(n−k)番目のフレーム画像に対応する照度を時間平均化すればよい。上記において、nは3以上の自然数、kはnより小さい自然数である。また、上記の例とは異なり、処理対象画像より1つ先に取得されたフレーム画像(上記(n−1)番目のフレーム画像)に対応する照度を時間平均化の対象に含めないようにしてもよい。   The threshold variable unit 24 varies the threshold according to the time average illuminance obtained by time averaging the illuminance corresponding to the plurality of frame images acquired by the acquisition unit 21 prior to the processing target image. Unlike the first and second embodiments, in this embodiment, the frame image is not divided into a plurality of divided regions. However, the predetermined partial region R1 is set as in the first and second embodiments. The threshold variable unit 24 averages the illuminance corresponding to the frame image and updates the threshold according to the time-averaged illuminance. For example, when the processing target image is the nth frame image, the illuminance corresponding to the (n−1) th frame image to the (n−k) th frame image may be time-averaged. In the above, n is a natural number of 3 or more, and k is a natural number smaller than n. In addition, unlike the above example, the illuminance corresponding to the frame image (the (n−1) th frame image) acquired one ahead of the processing target image is not included in the time averaging target. Also good.

本実施形態によると、閾値可変部24が、処理対象画像より先に取得部21によって取得されたフレーム画像の輝度値に影響を与える照度に応じて、背景差分処理部23で用いられる閾値を可変するので、処理対象画像の撮影時より前の照明条件に応じて閾値を可変することができる。照明条件は無秩序に変動するのではなく、或る程度の連続性を持って変動する。したがって、処理対象画像の撮影時の照明条件に適した閾値の設定が可能となる。その結果、照明条件の変動に強い背景差分処理を実行することができる。   According to this embodiment, the threshold variable unit 24 varies the threshold used by the background difference processing unit 23 according to the illuminance that affects the luminance value of the frame image acquired by the acquisition unit 21 prior to the processing target image. Therefore, the threshold value can be varied according to the illumination condition before the time when the processing target image is captured. The lighting conditions do not fluctuate randomly but vary with some degree of continuity. Accordingly, it is possible to set a threshold value suitable for the illumination condition at the time of capturing the processing target image. As a result, it is possible to execute background difference processing that is resistant to variations in illumination conditions.

また本実施形態によると、閾値可変部24が、フレーム画像の輝度情報を処理せずに閾値を可変するので、閾値可変部24にかかる閾値可変処理の負担が軽くなる。   Further, according to the present embodiment, the threshold variable unit 24 varies the threshold without processing the luminance information of the frame image, so the burden of the threshold variable processing on the threshold variable unit 24 is reduced.

<4.第4実施形態>
本実施形態に係る画像処理システムは、上述した第3実施形態に係る画像処理システムに対して、閾値可変部24の動作内容が異なっている。以下、第3実施形態と異なる点について説明し、第3実施形態と同様の構成、動作、及び処理については説明を省略する。
<4. Fourth Embodiment>
The image processing system according to the present embodiment differs from the image processing system according to the third embodiment described above in the operation content of the threshold variable unit 24. Hereinafter, a different point from 3rd Embodiment is demonstrated and description is abbreviate | omitted about the structure, operation | movement, and process similar to 3rd Embodiment.

本実施形態では、閾値可変部24は、処理対象画像より先に取得部21によって取得されたフレーム画像に対応する照度と、処理対象画像に対応する照度とに応じて、閾値を可変する。例えば、処理対象画像がn番目のフレーム画像である場合、n番目のフレーム画像に対応する照度と(n−1)番目のフレーム画像に対応する照度との差に基づいて、前回の背景差分処理で用いた閾値からの変化量を決定し、前回の背景差分処理で用いた閾値から今回の背景差分処理で用いる閾値に更新すればよい。例えば、n番目のフレーム画像に対応する照度と(n−1)番目のフレーム画像に対応する照度との差が大きいほど、前回の背景差分処理で用いた閾値からの変化量を大きくすればよい。   In the present embodiment, the threshold variable unit 24 varies the threshold according to the illuminance corresponding to the frame image acquired by the acquisition unit 21 prior to the processing target image and the illuminance corresponding to the processing target image. For example, when the processing target image is the nth frame image, the previous background difference process is performed based on the difference between the illuminance corresponding to the nth frame image and the illuminance corresponding to the (n−1) th frame image. The amount of change from the threshold value used in the above step may be determined and updated from the threshold value used in the previous background difference process to the threshold value used in the current background difference process. For example, the larger the difference between the illuminance corresponding to the nth frame image and the illuminance corresponding to the (n−1) th frame image, the greater the amount of change from the threshold used in the previous background difference process. .

本実施形態によると、閾値可変部24が、処理対象画像より先に取得部21によって取得されたフレーム画像に対応する照度と、処理対象画像に対応する照度とに応じて、閾値を可変するので、処理対象画像より先に取得部21によって取得されたフレーム画像の撮影時から処理対象画像の撮影時において照明条件が比較的に急激に変化した場合でも、閾値可変部24が閾値を適切に可変することができる。   According to this embodiment, the threshold variable unit 24 varies the threshold according to the illuminance corresponding to the frame image acquired by the acquisition unit 21 prior to the processing target image and the illuminance corresponding to the processing target image. Even when the illumination condition changes relatively abruptly from when the frame image acquired by the acquisition unit 21 is captured before the processing target image to when the processing target image is captured, the threshold variable unit 24 appropriately varies the threshold. can do.

<5.第5実施形態>
図7は、本実施形態に係る画像処理システムの構成を示すブロック図である。画像処理システムが車室内撮影カメラ10、及び画像処理装置20によって構成される点は、第1〜第4実施形態と同様である。以下、第1実施形態及び第2実施形態と異なる点について説明する。
<5. Fifth Embodiment>
FIG. 7 is a block diagram showing the configuration of the image processing system according to this embodiment. The point by which an image processing system is comprised by the vehicle interior camera 10 and the image processing apparatus 20 is the same as that of 1st-4th embodiment. Hereinafter, differences from the first embodiment and the second embodiment will be described.

閾値可変部24は、ナビゲーション装置50から特定の場所に到達したことを通知する通信信号を受け取ったときに、処理対象画像より先に取得部21によって取得されたフレーム画像の輝度値に応じて、閾値を可変する。より具体的には、ナビゲーション装置50から特定の場所に到達したことを通知する通信信号を受け取ったときから所定時間が経過するまで、閾値可変部24が閾値を可変する動作を行い、それ以外は閾値可変部24が閾値の更新を停止する。特定の場所としては、例えばトンネルの入口直前、トンネルの出口直前等の照明条件が大きく変動する地点の手前が適している。   When the threshold variable unit 24 receives a communication signal notifying that a specific place has been reached from the navigation device 50, the threshold variable unit 24, according to the luminance value of the frame image acquired by the acquisition unit 21 prior to the processing target image, Change the threshold. More specifically, the threshold variable unit 24 performs an operation of changing the threshold until a predetermined time elapses after receiving a communication signal notifying that a specific place has been reached from the navigation device 50, and otherwise. The threshold variable unit 24 stops updating the threshold. As the specific place, for example, a point immediately before a point where the lighting conditions greatly change, such as immediately before the entrance of the tunnel or immediately before the exit of the tunnel, is suitable.

閾値可変部24の動作は、第1実施形態と同様であってもよく、第2実施形態と同様であってもよい。   The operation of the threshold variable unit 24 may be the same as that of the first embodiment or may be the same as that of the second embodiment.

本実施形態によれば、特定の場所から少し先で起こり得る照明条件の変動に適切に対応できるとともに、閾値可変部24にかかる閾値可変処理の負担が軽くなる。   According to the present embodiment, it is possible to appropriately cope with fluctuations in illumination conditions that may occur slightly ahead of a specific location, and the burden of threshold variable processing on the threshold variable unit 24 is reduced.

なお、本実施形態を第3実施形態又は第4実施形態と組合せて、閾値可変部24の動作を第3実施形態又は第4実施形態と同様にしてもよい。この場合、閾値可変部24にかかる閾値可変処理の負担をより一層軽くすることができる。   Note that this embodiment may be combined with the third embodiment or the fourth embodiment, and the operation of the threshold variable unit 24 may be the same as that of the third embodiment or the fourth embodiment. In this case, the burden of the threshold variable process on the threshold variable unit 24 can be further reduced.

<6.第6実施形態>
上述した第1〜第5実施形態では、背景差分処理部23が、背景画像と処理対象画像との同一位置画素間の輝度差を算出し、輝度差が閾値以上である位置を処理対象画像の前景領域とし、輝度差が閾値未満である位置を処理対象画像の背景領域としている。
<6. Sixth Embodiment>
In the first to fifth embodiments described above, the background difference processing unit 23 calculates the luminance difference between the same-position pixels of the background image and the processing target image, and sets the position where the luminance difference is equal to or greater than the threshold as the processing target image. A foreground area is set, and a position where the luminance difference is less than the threshold is set as a background area of the processing target image.

本実施形態は、上述した第1〜第5実施形態のいずれかの変形例であって、上述した第1〜第5実施形態のいずれかにおいて、背景差分処理部23が、グラフカット(Graph Cut)法によって処理対象画像の領域を前景領域と背景領域とに区分するように変形する。   The present embodiment is a modification of any of the first to fifth embodiments described above, and in any of the first to fifth embodiments described above, the background difference processing unit 23 performs a graph cut (Graph Cut). ) Method so that the region of the processing target image is divided into a foreground region and a background region.

図8は、グラフカット法による前景領域と背景領域との区別を概念的に示す図である。グラフカット法では、取得部21によって取得された背景画像に対する前景領域を分割するために必要となるエネルギーの総量が最小になるような前景領域を求める。   FIG. 8 is a diagram conceptually showing the distinction between the foreground region and the background region by the graph cut method. In the graph cut method, a foreground area is obtained such that the total amount of energy required to divide the foreground area for the background image acquired by the acquisition unit 21 is minimized.

図8において、sは前景を、tは背景、○は隣接する各ノードをそれぞれ表しており、これらがパイプでつながったものをカットし、前景と背景を分割する。また、各ノードとsまたはtとのフローをデータ項(図8の破線部)、隣接するノード同士のフローを平滑化項(図8の実線部)と呼ぶ。データ項は、その領域がどれだけ前景(s)らしいか、もしくは、背景(t)らしいかを表している。平滑化項は、その領域が隣接する周囲4つの近傍領域とのつながりがどれだけあるのかを表している。これら各ノードのつながりが強固なものほど、分割するために要するエネルギーが大きくなる。   In FIG. 8, s represents the foreground, t represents the background, and ◯ represents each adjacent node, and those connected by pipes are cut to divide the foreground and the background. The flow between each node and s or t is called a data term (broken line portion in FIG. 8), and the flow between adjacent nodes is called a smoothing term (solid line portion in FIG. 8). The data term represents how much the area is foreground (s) or background (t). The smoothing term represents how many connections there are to the four neighboring areas adjacent to the area. The stronger the connection between these nodes, the greater the energy required to divide.

閾値可変部24によって更新される閾値は、例えば、各ノードが前景(s)又は背景(t)のどちらと強くつながっているかを決定するための閾値とすればよい。   The threshold updated by the threshold variable unit 24 may be, for example, a threshold for determining whether each node is strongly connected to the foreground (s) or the background (t).

グラフカット法による前景領域と背景領域との区別することによって、より一層照明条件の変動に強い背景差分処理を実現することができる。   By distinguishing between the foreground region and the background region by the graph cut method, it is possible to realize background difference processing that is more resistant to variations in illumination conditions.

<7.第7実施形態>
図9は、本実施形態に係る画像処理システムの構成を示すブロック図である。本実施形態では、第1実施形態及び第2実施形態と異なり画像処理装置20がエッジ検出部25及び修正部26を備える。以下、第1実施形態及び第2実施形態と異なる点について説明する。
<7. Seventh Embodiment>
FIG. 9 is a block diagram showing a configuration of the image processing system according to the present embodiment. In this embodiment, unlike the first embodiment and the second embodiment, the image processing apparatus 20 includes an edge detection unit 25 and a correction unit 26. Hereinafter, differences from the first embodiment and the second embodiment will be described.

エッジ検出部25は、フレーム画像における注目画素の周辺領域内のエッジを検出する。注目画素はフレーム画像の全画素であることが好ましいが、フレーム画像の全画素に対して間引き処理を行い、間引き処理後に残った画素のみを注目画素としてもよい。   The edge detection unit 25 detects an edge in the peripheral region of the target pixel in the frame image. The target pixel is preferably all the pixels of the frame image, but the thinning process may be performed on all the pixels of the frame image, and only the pixel remaining after the thinning process may be set as the target pixel.

修正部26は、時間経過によってエッジ検出部25によって検出されたエッジが移動した場合に、その移動から一定時間が経過する迄の間、注目画素の輝度値が略変動せず且つエッジ検出部25によって検出されたエッジが更に略移動しなければ、注目画素の輝度値を背景画像に反映させた修正背景画像を生成する。修正部26によって修正背景画像が生成された場合、背景差分処理部23は、修正部26によって生成された修正背景画像を背景画像として用いる。なお、修正部26は、時間経過によってエッジ検出部25によって検出されたエッジが移動した場合に、その移動から一定時間が経過する迄の間、注目画素の輝度値が全く変動せず且つエッジ検出部25によって検出されたエッジが更に移動することが完全になければ、注目画素の輝度値を背景画像に反映させた修正背景画像を生成するようにしてもよい。また、修正部26は、時間経過によってエッジ検出部25によって検出されたエッジが移動した場合に、その移動から一定時間が経過する迄の間、注目画素の輝度値が変動したとしても所定の範囲内に収まり且つエッジ検出部25によって検出されたエッジが更に移動したとしても所定の範囲内に収まれば、注目画素の輝度値を背景画像に反映させた修正背景画像を生成するようにしてもよい。注目画素の輝度値の変動に関する所定の範囲及びエッジの更なる移動に関する所定の範囲は実験やシミュレーションによって適切な範囲を求めればよい。   When the edge detected by the edge detection unit 25 moves over time, the correction unit 26 does not substantially change the luminance value of the pixel of interest until the fixed time elapses from the movement, and the edge detection unit 25. If the detected edge does not move substantially further, a modified background image in which the luminance value of the target pixel is reflected in the background image is generated. When the corrected background image is generated by the correction unit 26, the background difference processing unit 23 uses the corrected background image generated by the correction unit 26 as a background image. In addition, when the edge detected by the edge detection unit 25 moves over time, the correction unit 26 does not change the luminance value of the pixel of interest at all until the fixed time elapses from the movement and detects the edge. If the edge detected by the unit 25 is not completely moved, a modified background image in which the luminance value of the target pixel is reflected in the background image may be generated. In addition, when the edge detected by the edge detection unit 25 moves over time, the correction unit 26 is within a predetermined range even if the luminance value of the pixel of interest fluctuates until a certain time elapses after the movement. Even if the edge within the range and the edge detected by the edge detection unit 25 further moves, a corrected background image in which the luminance value of the target pixel is reflected in the background image may be generated as long as it falls within a predetermined range. . As for the predetermined range relating to the change in the luminance value of the pixel of interest and the predetermined range relating to further movement of the edge, an appropriate range may be obtained by experiment or simulation.

車両においては、背景画像が取得された後に例えばシートポジションやシートリクライニングの設定が変更されてシートが移動することがある。この場合、シートが前景領域に区分されるおそれがある。   In the vehicle, after the background image is acquired, for example, the seat position and the seat reclining setting may be changed to move the seat. In this case, the sheet may be divided into foreground areas.

上記のようなシートの移動は頻繁に行われるものではないこと、及び、乗員は同じような姿勢をとっていても全く動いていない訳ではないことに着目して、エッジ検出部25及び修正部26が画像処理装置20に設けられている。   Focusing on the fact that the movement of the seat as described above is not frequently performed and that the occupant does not move at all even if it takes the same posture, the edge detection unit 25 and the correction unit 26 is provided in the image processing apparatus 20.

エッジ検出部25及び修正部26を設けることにより、一旦背景画像が取得された後に本来想定している前景領域(本実施形態では乗員)以外のものが動いた場合でも、前景領域の誤抽出を抑えることができる。すなわち、前景領域の抽出精度が向上する。   By providing the edge detection unit 25 and the correction unit 26, even if a foreground region other than the originally assumed foreground region (occupant in this embodiment) moves after the background image is once acquired, erroneous extraction of the foreground region is performed. Can be suppressed. That is, the foreground area extraction accuracy is improved.

尚、本実施形態は、第3〜第6実施形態と組み合わせることも可能である。   In addition, this embodiment can also be combined with the 3rd-6th embodiment.

<8.変形例等>
本明細書中に開示されている種々の技術的特徴は、上記実施形態のほか、その技術的創作の主旨を逸脱しない範囲で種々の変更を加えることが可能である。また、本明細書中に示される複数の実施形態及び変形例は可能な範囲で組み合わせて実施されてよい。
<8. Modified example>
Various technical features disclosed in the present specification can be variously modified within the scope of the technical creation in addition to the above-described embodiment. In addition, a plurality of embodiments and modification examples shown in the present specification may be implemented in combination within a possible range.

例えば、第1実施形態又は第2実施形態と、第3実施形態又は第4実施形態とを組み合わせてよい。この場合、処理対象画像の同一位置に対して2つの閾値が算出されるので、例えば2つの閾値に対して重み付け平均を行ったものを最終的な閾値として用いればよい。   For example, the first embodiment or the second embodiment may be combined with the third embodiment or the fourth embodiment. In this case, since two threshold values are calculated for the same position of the processing target image, for example, a weighted average of the two threshold values may be used as the final threshold value.

10 車室内撮影カメラ
20 画像処理装置
21 取得部
22 インターフェース
23 背景差分処理部
24 閾値可変部
25 エッジ検出部
26 修正部
40 照度計
50 ナビゲーション装置
DESCRIPTION OF SYMBOLS 10 Car interior camera 20 Image processing apparatus 21 Acquisition part 22 Interface 23 Background difference process part 24 Threshold variable part 25 Edge detection part 26 Correction part 40 Illuminance meter 50 Navigation apparatus

Claims (15)

カメラで撮影された動画像から背景差分法を用いて前景領域を抽出する画像処理装置であって、
前記動画像に含まれる複数のフレーム画像を取得する取得部と、
前記フレーム画像である背景画像と、前記フレーム画像であって前記背景画像より後に前記取得部によって取得される処理対象画像とを比較し、閾値に基づいて前記処理対象画像の領域を前記前景領域と背景領域とに区別する背景差分処理部と、
前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値、及び、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値に影響を与える照度の少なくとも一方に応じて、前記閾値を可変する閾値可変部と、を備える、画像処理装置。
An image processing apparatus that extracts a foreground region from a moving image captured by a camera using a background subtraction method,
An acquisition unit for acquiring a plurality of frame images included in the moving image;
The background image that is the frame image is compared with the processing target image that is the frame image and is acquired by the acquisition unit after the background image, and the region of the processing target image is determined as the foreground region based on a threshold value. A background difference processing unit for distinguishing the background region;
At least the luminance value of the frame image acquired by the acquisition unit prior to the processing target image and the illuminance that affects the luminance value of the frame image acquired by the acquisition unit prior to the processing target image An image processing apparatus comprising: a threshold value varying unit configured to vary the threshold value according to one.
前記閾値可変部は、前記処理対象画像より先に前記取得部によって取得された複数の前記フレーム画像の輝度値を時間平均化して得られる時間平均輝度値に応じて、前記閾値を可変する、請求項1に記載の画像処理装置。   The threshold variable unit varies the threshold according to a time average luminance value obtained by time averaging luminance values of the plurality of frame images acquired by the acquisition unit prior to the processing target image. Item 8. The image processing apparatus according to Item 1. 前記閾値可変部は、前記フレーム画像を複数の区分領域に区分し、前記時間平均輝度値を前記区分領域の単位で求め、前記区分領域の単位で前記閾値を可変する、請求項2に記載の画像処理装置。   The threshold value changing unit divides the frame image into a plurality of divided regions, obtains the time average luminance value in units of the divided regions, and varies the threshold value in units of the divided regions. Image processing device. 前記閾値可変部は、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値と、前記処理対象画像の輝度値とに応じて、前記閾値を可変する、請求項1に記載の画像処理装置。   The threshold value varying unit varies the threshold value according to a luminance value of the frame image acquired by the acquiring unit prior to the processing target image and a luminance value of the processing target image. The image processing apparatus described. 前記閾値可変部は、
前記処理対象画像より先に前記取得部によって取得された前記フレーム画像及び前記処理対象画像それぞれを複数の区分領域に区分し、
前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値を前記区分領域の単位で平均化して得られる値と、前記処理対象画像の輝度値を前記区分領域の単位で平均化して得られる値とに応じて、前記区分領域の単位で前記閾値を可変する、請求項4に記載の画像処理装置。
The threshold variable unit includes:
Each of the frame image and the processing target image acquired by the acquisition unit prior to the processing target image is divided into a plurality of partitioned regions,
A value obtained by averaging the luminance value of the frame image acquired by the acquisition unit prior to the processing target image in the unit of the segmented area, and an average of the luminance value of the processing target image in the unit of the segmented area The image processing apparatus according to claim 4, wherein the threshold value is varied in units of the segmented areas in accordance with a value obtained by converting the threshold value.
前記閾値可変部は、照度計から出力される照度情報を受け取り、前記処理対象画像より先に前記取得部によって取得された複数の前記フレーム画像に対応する前記照度を時間平均化して得られる時間平均照度に応じて、前記閾値を可変する、請求項1に記載の画像処理装置。   The threshold variable unit receives illuminance information output from an illuminometer, and is a time average obtained by averaging the illuminance corresponding to the plurality of frame images acquired by the acquisition unit prior to the processing target image. The image processing apparatus according to claim 1, wherein the threshold value is varied according to illuminance. 前記閾値可変部は、照度計から出力される照度情報を受け取り、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像に対応する前記照度と、前記処理対象画像に対応する前記照度とに応じて、前記閾値を可変する、請求項1に記載の画像処理装置。   The threshold variable unit receives illuminance information output from an illuminometer, and the illuminance corresponding to the frame image acquired by the acquisition unit prior to the processing target image and the illuminance corresponding to the processing target image The image processing apparatus according to claim 1, wherein the threshold value is varied in accordance with. 前記閾値可変部は、ナビゲーション装置から特定の場所に到達したことを通知する通信信号を受け取ったときに、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値、及び、前記処理対象画像より先に前記取得部によって取得された前記フレーム画像の輝度値に影響を与える照度の少なくとも一方に応じて、前記閾値を可変する、請求項1〜7のいずれか一項に記載の画像処理装置。   The threshold variable unit, when receiving a communication signal notifying that a specific place has been reached from the navigation device, the luminance value of the frame image acquired by the acquisition unit prior to the processing target image, and The threshold value is varied according to at least one of illuminance that affects the luminance value of the frame image acquired by the acquisition unit prior to the processing target image. Image processing apparatus. 前記背景差分処理部は、前記処理対象画像の全領域に対して背景差分処理を行う、請求項1〜8のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the background difference processing unit performs background difference processing on the entire region of the processing target image. 前記背景差分処理部は、前記処理対象画像内の所定の一部領域に対してのみ背景差分処理を行う、請求項1〜8のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the background difference processing unit performs background difference processing only on a predetermined partial region in the processing target image. 前記背景差分処理部は、グラフカット法によって前記処理対象画像の領域を前記前景領域と前記背景領域とに区別する、請求項1〜10のいずれか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the background difference processing unit distinguishes the region of the processing target image into the foreground region and the background region by a graph cut method. 前記閾値は、各ノードが前記前景領域又は前記背景領域のどちらと強くつながっているかを決定するための閾値である、請求項11に記載の画像処理装置。   The image processing apparatus according to claim 11, wherein the threshold is a threshold for determining whether each node is strongly connected to the foreground area or the background area. 前記フレーム画像における注目画素の周辺領域内のエッジを検出するエッジ検出部と、
時間経過によって前記エッジが移動した場合に、その移動から一定時間が経過する迄の間、前記注目画素の輝度値が略変動せず且つ前記エッジが更に略移動しなければ、前記注目画素の輝度値を前記背景画像に反映させた修正背景画像を生成する修正部と、を備え、
前記背景差分処理部は、前記修正背景画像を前記背景画像として用いる、請求項1〜12のいずれか一項に記載の画像処理装置。
An edge detection unit for detecting an edge in a peripheral region of the target pixel in the frame image;
When the edge moves over time, the luminance value of the pixel of interest does not change substantially and the edge does not move substantially until the fixed time elapses from the movement. A correction unit that generates a corrected background image in which a value is reflected in the background image, and
The image processing apparatus according to claim 1, wherein the background difference processing unit uses the corrected background image as the background image.
カメラと、
前記カメラで撮影された動画像を処理する請求項1〜13のいずれか一項に記載の画像処理装置と、を備えることを特徴とする画像処理システム。
A camera,
An image processing system comprising: the image processing apparatus according to any one of claims 1 to 13 that processes a moving image captured by the camera.
カメラで撮影された動画像から背景差分法を用いて前景領域を抽出する画像処理方法であって、
前記動画像に含まれる複数のフレーム画像を取得する取得工程と、
前記フレーム画像である背景画像と、前記フレーム画像であって前記背景画像より後に前記取得工程によって取得される処理対象画像とを比較し、閾値に基づいて前記処理対象画像の領域を前記前景領域と背景領域とに区別する背景差分処理工程と、
前記処理対象画像より先に前記取得工程によって取得された前記フレーム画像の輝度値、及び、前記処理対象画像より先に前記取得工程によって取得された前記フレーム画像の輝度値に影響を与える照度の少なくとも一方に応じて、前記閾値を可変する閾値可変工程と、を備える、画像処理方法。
An image processing method for extracting a foreground region from a moving image captured by a camera using a background subtraction method,
An acquisition step of acquiring a plurality of frame images included in the moving image;
The background image that is the frame image is compared with the processing target image that is the frame image and is acquired by the acquiring step after the background image, and the region of the processing target image is determined as the foreground region based on a threshold value. A background difference processing step for distinguishing from the background region;
The luminance value of the frame image acquired by the acquisition step prior to the processing target image, and the illuminance that affects the luminance value of the frame image acquired by the acquisition step prior to the processing target image An image processing method comprising: a threshold value changing step for changing the threshold value according to one of them.
JP2017043259A 2017-03-07 2017-03-07 Image processing device, image processing system, and image processing method Pending JP2018147329A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017043259A JP2018147329A (en) 2017-03-07 2017-03-07 Image processing device, image processing system, and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017043259A JP2018147329A (en) 2017-03-07 2017-03-07 Image processing device, image processing system, and image processing method

Publications (1)

Publication Number Publication Date
JP2018147329A true JP2018147329A (en) 2018-09-20

Family

ID=63592209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017043259A Pending JP2018147329A (en) 2017-03-07 2017-03-07 Image processing device, image processing system, and image processing method

Country Status (1)

Country Link
JP (1) JP2018147329A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020149641A (en) * 2019-03-15 2020-09-17 オムロン株式会社 Object tracking device and object tracking method
CN112203024A (en) * 2020-03-09 2021-01-08 北京文香信息技术有限公司 Matting method, device, equipment and storage medium
CN114419560A (en) * 2022-04-01 2022-04-29 苏州万店掌网络科技有限公司 Method, device and medium for detecting target object
US11954865B2 (en) 2020-05-20 2024-04-09 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium for foreground extraction

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020149641A (en) * 2019-03-15 2020-09-17 オムロン株式会社 Object tracking device and object tracking method
JP7334432B2 (en) 2019-03-15 2023-08-29 オムロン株式会社 Object tracking device, monitoring system and object tracking method
CN112203024A (en) * 2020-03-09 2021-01-08 北京文香信息技术有限公司 Matting method, device, equipment and storage medium
US11954865B2 (en) 2020-05-20 2024-04-09 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and storage medium for foreground extraction
CN114419560A (en) * 2022-04-01 2022-04-29 苏州万店掌网络科技有限公司 Method, device and medium for detecting target object

Similar Documents

Publication Publication Date Title
US10467479B2 (en) Image processing apparatus, method, and storage medium for reducing a visibility of a specific image region
JP2018147329A (en) Image processing device, image processing system, and image processing method
KR100792283B1 (en) Device and method for auto tracking moving object
US9047673B2 (en) Apparatus and method for extracting target, and recording medium storing program for performing the method
JP4389999B2 (en) Exposure control device and exposure control program
US10791252B2 (en) Image monitoring device, image monitoring method, and recording medium
EP2541493B1 (en) Pupil detection device and pupil detection method
US20150206290A1 (en) Image stabilizing method and apparatus
US9827906B2 (en) Image processing apparatus
JP2007011490A (en) Device and method for detecting road parameter
US11250553B2 (en) Deposit detection device and deposit detection method
JP6375911B2 (en) Curve mirror detector
US20210089818A1 (en) Deposit detection device and deposit detection method
JP6701327B2 (en) Glare detection method and device
US20170364765A1 (en) Image processing apparatus, image processing system, vehicle, imaging apparatus and image processing method
US11308709B2 (en) Deposit detection device and deposit detection method
JP2021061546A (en) Imaging apparatus, control method of the same, and program
KR20190072643A (en) A face detecting apparatus, a control method therefor, and a program
JP6396840B2 (en) Object detection device
US20210090297A1 (en) Adhered substance detection apparatus
US9754174B2 (en) Object detection apparatus
JP2019074965A (en) Device and system for detecting driving incapacity
JP4765363B2 (en) Occupant detection device and occupant detection method
US9082002B2 (en) Detection device and detection method
JP2019074963A (en) Device and system for detecting specific body part