JP2021056936A - Image processing device, image processing method, and program - Google Patents
Image processing device, image processing method, and program Download PDFInfo
- Publication number
- JP2021056936A JP2021056936A JP2019181532A JP2019181532A JP2021056936A JP 2021056936 A JP2021056936 A JP 2021056936A JP 2019181532 A JP2019181532 A JP 2019181532A JP 2019181532 A JP2019181532 A JP 2019181532A JP 2021056936 A JP2021056936 A JP 2021056936A
- Authority
- JP
- Japan
- Prior art keywords
- image
- pixel
- color
- background
- foreground
- 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.)
- Granted
Links
- 238000012545 processing Methods 0.000 title claims description 67
- 238000003672 processing method Methods 0.000 title claims 3
- 238000012937 correction Methods 0.000 claims description 20
- 238000011156 evaluation Methods 0.000 claims description 14
- 238000001514 detection method Methods 0.000 claims description 12
- 238000000605 extraction Methods 0.000 claims description 9
- 238000009795 derivation Methods 0.000 claims 2
- 239000000284 extract Substances 0.000 abstract description 6
- 239000003086 colorant Substances 0.000 abstract description 3
- 238000000034 method Methods 0.000 description 43
- 230000008569 process Effects 0.000 description 27
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000003384 imaging method Methods 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 238000011410 subtraction method Methods 0.000 description 5
- 238000007906 compression Methods 0.000 description 3
- 230000006835 compression Effects 0.000 description 3
- 239000000470 constituent Substances 0.000 description 3
- 238000010187 selection method Methods 0.000 description 3
- 238000013500 data storage Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000008602 contraction Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000002156 mixing Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000007493 shaping process Methods 0.000 description 1
- 230000000087 stabilizing effect Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、撮像画像から、オブジェクトの形状を示す前景画像を生成する技術に関する。 The present invention relates to a technique for generating a foreground image showing the shape of an object from a captured image.
従来、撮像画像からオブジェクト(被写体)に対応する前景領域を抽出する手法として、背景差分法が存在する。背景差分法では、前景となるオブジェクトが写っている撮像画像の各画素値と、当該オブジェクトが写っていない背景のみの画像(背景画像)の各画素値との差分に基づいて、オブジェクトに対応する前景領域を抽出する。ここで、オブジェクトと背景との境界付近において、撮像画像における画素値と背景画像における画素値との違いが小さくなる場合がある。この場合、本来は背景となるべき部分が、オブジェクトに対応する前景領域として誤って抽出されてしまうことが起こる。つまり、従来の背景差分法には、オブジェクトの輪郭に沿って正確に前景領域を抽出することができないことがあった。この点、特許文献1には、撮像画像から前景領域を抽出した後、オブジェクトのエッジ情報に基づいて、抽出した前景領域の整形を行う技術が開示されている。 Conventionally, there is a background subtraction method as a method of extracting a foreground region corresponding to an object (subject) from a captured image. The background subtraction method corresponds to an object based on the difference between each pixel value of the captured image in which the object as the foreground is shown and each pixel value of the background-only image (background image) in which the object is not shown. Extract the foreground area. Here, in the vicinity of the boundary between the object and the background, the difference between the pixel value in the captured image and the pixel value in the background image may become small. In this case, the part that should originally be the background may be mistakenly extracted as the foreground area corresponding to the object. That is, in the conventional background subtraction method, it may not be possible to accurately extract the foreground region along the contour of the object. In this regard, Patent Document 1 discloses a technique of extracting a foreground region from a captured image and then shaping the extracted foreground region based on the edge information of the object.
しかしながら、上記特許文献1の手法では、エッジ情報自体に誤りが含まれていると、オブジェクトの形状を適切に整形ができないという問題があった。 However, the method of Patent Document 1 has a problem that the shape of an object cannot be properly shaped if the edge information itself contains an error.
そこで、本開示に係る技術は、前景となるオブジェクトと背景との境界が曖昧でエッジ情報を正確に抽出することが困難な場合においても、精度のよい前景画像を得ることを目的とする。 Therefore, the technique according to the present disclosure aims to obtain an accurate foreground image even when the boundary between the foreground object and the background is ambiguous and it is difficult to accurately extract the edge information.
本開示に係る画像処理装置は、撮像画像からオブジェクトの形状を示す前景画像を生成する画像処理装置であって、前記撮像画像を取得する取得手段と、前記撮像画像から前記オブジェクトの形状に対応する前景領域を抽出して前景画像を生成する抽出手段と、前記前景画像から前記オブジェクの輪郭領域を検出する検出手段と、前記前景画像における前記輪郭領域を構成する画素を、当該画素に対応する前記撮像画像内の画素の色が背景の色と類似するかどうかに基づき補正する補正手段と、を有することを特徴とする。 The image processing device according to the present disclosure is an image processing device that generates a foreground image showing the shape of an object from a captured image, and corresponds to an acquisition means for acquiring the captured image and the shape of the object from the captured image. The extraction means for extracting the foreground region to generate a foreground image, the detection means for detecting the contour region of the object from the foreground image, and the pixels constituting the contour region in the foreground image correspond to the pixels. It is characterized by having a correction means for correcting based on whether or not the color of a pixel in a captured image is similar to the color of a background.
本開示の技術によれば、前景となるオブジェクトと背景との境界が曖昧でエッジ情報を正確に抽出することが困難な場合においても、精度のよい前景画像を得ることができる。 According to the technique of the present disclosure, it is possible to obtain an accurate foreground image even when the boundary between the foreground object and the background is ambiguous and it is difficult to accurately extract the edge information.
以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態は本発明を限定するものではなく、また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一の構成については、同じ符号を付して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. It should be noted that the following embodiments do not limit the present invention, and not all combinations of features described in the present embodiment are essential for the means for solving the present invention. The same configuration will be described with the same reference numerals.
[実施形態1]
本実施形態では、オブジェクトに対応する前景領域を撮像画像から抽出した後、当該オブジェクトの輪郭領域(背景との境界部分)を検出する。そして、検出した輪郭領域における色を、背景の色との違いに基づき補正することにより、オブジェクトの形状を示す前景画像を生成する。なお、本実施形態において前景画像は、前景領域を“1”、それ以外の背景領域を“0”で表す二値画像とするが、さらに前景領域の確からしさを表す値を加えた多値画像としてもよい。
[Embodiment 1]
In the present embodiment, after the foreground region corresponding to the object is extracted from the captured image, the contour region (boundary portion with the background) of the object is detected. Then, by correcting the color in the detected contour region based on the difference from the background color, a foreground image showing the shape of the object is generated. In the present embodiment, the foreground image is a binary image in which the foreground area is represented by “1” and the other background areas are represented by “0”, but a multivalued image in which a value indicating the certainty of the foreground region is further added. May be.
また、本実施形態では、撮像画像から生成したオブジェクトの前景画像を、仮想視点映像の生成に利用するケースを例に説明を行うものとする。すなわち、オブジェクトの前景画像からその3次元形状データを生成し、仮想視点情報に基づいて当該オブジェクト含んだ仮想視点映像を生成する、というユースケースを想定する。 Further, in the present embodiment, the case where the foreground image of the object generated from the captured image is used for generating the virtual viewpoint image will be described as an example. That is, assume a use case in which the three-dimensional shape data is generated from the foreground image of an object, and the virtual viewpoint image including the object is generated based on the virtual viewpoint information.
(本実施形態の概要)
本実施形態における、前景画像を生成する処理の概要について、図1を参照して説明する。まず、前景領域の抽出対象となる画像(以下、「対象画像」と表記)10が撮像装置であるカメラ11によって撮像される。この対象画像10には、前景としての人物オブジェクト12と背景としてのフィールド13とが写っている。さらに、対象画像10と同一の撮像視点から、人物オブジェクト12がいない状態で背景となるフィールド13を写した画像(以下、「背景画像」と表記)14を撮像する。次に、対象画像10と背景画像14とを対応する画素同士で比較し、画素値の違いが大きい画素を人物オブジェクト12の構成画素と見做すことで、対象画像10から前景領域だけを抽出する。これにより、人物オブジェクト12のシルエットを表した前景画像を取得する。なお、オブジェクトの形状を示す前景画像は、シルエット画像やマスク画像とも呼ばれるものであるが、本明細書では“前景画像”を用いることとする。図1における画像15は、理想的な前景画像を示している。しかしながら実際には、レンズの収差や画像解像度などの影響により、前景領域の輪郭が不明確になることがある。これは、対象画像10上のオブジェクトと背景との境界付近において、背景の色に近いものからオブジェクトの色に近いものまで、色々な画素値の画素が混ざるためである。オブジェクトと背景との境界付近の画素がこのような状態にあると、オブジェクトの画素と背景の画素とに正しく峻別することができないため、オブジェクトの輪郭に沿わない精度の低い前景領域となってしまう。図1における画像15’は、オブジェクトの輪郭に沿っていない精度の低い(誤りを含んだ)前景画像を示している。そこで、本実施形態では、撮像画像から生成した前景画像において誤りを含んでいる可能性の高い輪郭部分16を検出する。そして、検出した輪郭部分16を構成する画素の画素値を、撮像画像における対応する画素の色が背景の色と類似する場合に、背景を示す画素値に変更する補正処理を行う。こうして、輪郭部分における誤りを修正した前景画像が、最終的な前景画像として出力されることになる。以上が、本実施形態で行われる、前景画像生成処理の概要である。以下、本実施形態の具体的な構成について述べる。
(Outline of this embodiment)
The outline of the process for generating the foreground image in the present embodiment will be described with reference to FIG. First, an image (hereinafter, referred to as “target image”) 10 to be extracted in the foreground region is captured by the
(システム構成)
図2は、仮想視点映像を生成する画像処理システムの構成の一例を示す図である。画像処理システム100は、撮影モジュール110a〜110z、データベース(DB)250、サーバ270、制御装置300、スイッチングハブ180、及びエンドユーザ端末190を有する。すなわち、画像処理システム100は、映像収集ドメイン、データ保存ドメイン、及び映像生成ドメインという3つの機能ドメインを有する。映像収集ドメインは撮影モジュール110a〜110zを含み、データ保存ドメインはDB250とサーバ270を含み、映像生成ドメインは制御装置300及びエンドユーザ端末190を含む。
(System configuration)
FIG. 2 is a diagram showing an example of the configuration of an image processing system that generates a virtual viewpoint image. The
制御装置300は、画像処理システム100を構成するそれぞれのブロックに対してネットワークを通じて動作状態の管理及びパラメータ設定制御などを行う。ここで、ネットワークはEthernet(登録商標)であるIEEE標準準拠のGbE(ギガビットイーサーネット)や10GbEでもよいし、インターコネクトInfiniband、産業用ローカルエリアネットワーク等を組合せて構成されてもよい。また、これらに限定されず、他の種類のネットワークであってもよい。
The
最初に、撮影モジュール110a〜110zの26セット分の撮像画像を撮影モジュール110zからサーバ270へ送信する動作を説明する。撮影モジュール110a〜110zは、それぞれ1台ずつのカメラ112a〜112zを有する。以下では、撮影モジュール110a〜110zまでの26セットのシステムを区別せず、単に「撮影モジュール110」と記載する場合がある。各撮影モジュール110内の装置についても同様に、「カメラ112」、「カメラアダプタ120」と記載する場合がある。なお、撮影モジュール110の台数を26セットとしているが、あくまでも一例でありこれに限定されない。
First, an operation of transmitting 26 sets of captured images of the
撮影モジュール110a〜110zはデイジーチェーンにより接続される。この接続形態により、撮影画像の4Kや8Kなどへの高解像度化及び高フレームレート化に伴う画像データの大容量化において、接続ケーブル数の削減や配線作業の省力化ができる効果がある。なお、接続形態は任意であり、例えば撮影モジュール110a〜110zがスイッチングハブ180にそれぞれ接続されて、スイッチングハブ180を経由して撮影モジュール110間のデータ送受信を行うスター型のネットワーク構成としてもよい。
The
本実施形態では、各撮影モジュール110はカメラ112とカメラアダプタ120とで構成されているがこれに限定されない。例えば、マイク、雲台、外部センサを有していてもよい。また、本実施形態では、カメラ112とカメラアダプタ120とが分離された構成となっているが、同一筺体で一体化されていてもよい。撮影モジュール110a内のカメラ112aにて得られた撮像画像は、カメラアダプタ120aにおいて後述の画像処理が施された後、撮影モジュール110bのカメラアダプタ120bに伝送される。同様に撮影モジュール110bは、カメラ112bにて得られた撮像画像を、撮影モジュール110aから取得した撮像画像と合わせて撮影モジュール110cに伝送する。このような動作を続けることにより、26セット分の撮像画像が、撮影モジュール110zからスイッチングハブ180に伝わり、その後、サーバ270へ伝送される。
In the present embodiment, each photographing module 110 is composed of a
なお、本実施形態では、個々のカメラアダプタ120内で前景画像の生成までを行うものとして説明する。ただし、このような態様に限定されるものではなく、26セット分の撮像画像を受け取ったサーバ270にて、個々の撮像画像に対応する前景画像の生成を行うような構成であってもよい。
In this embodiment, it is assumed that the foreground image is generated in each
(カメラアダプタの構成)
次に、カメラアダプタ120の詳細について説明する。図3は、カメラアダプタ120の内部構成を示す機能ブロック図である。カメラアダプタ120は、ネットワークアダプタ121、伝送部122、画像処理部123及びカメラ制御部124から構成される。
(Camera adapter configuration)
Next, the details of the
ネットワークアダプタ121は、他のカメラアダプタ120やサーバ270、制御装置300とデータ通信を行う。また、例えばIEEE1588規格のOrdinay Clockに準拠し、サーバ270との間で送受信したデータのタイムスタンプの保存や、サーバ270との時刻同期も行う。なお、他のEtherAVB規格や、独自プロトコルによってタイムサーバとの時刻同期を実現してもよい。本実施形態では、ネットワークアダプタ121としてNIC(Network Interface Card)を利用するが、これに限定されない。
The
伝送部122は、ネットワークアダプタ121を介してスイッチングハブ180等に対するデータの伝送を制御する。伝送部122は、送受信されるデータに対して所定の圧縮方式、圧縮率、及びフレームレートを適用した圧縮を行う機能と、圧縮されたデータを伸張する機能とを有している。また、受信したデータ及び画像処理部123で処理されたデータのルーティング先を決定する機能や、決定したルーティング先へデータを送信する機能を有している。また、画像データを、他のカメラアダプタ120またはサーバ270へ転送するためのメッセージを作成する機能も有している。メッセージには画像データのメタ情報が含まれる。このメタ情報には、画像撮影のサンプリング時のタイムコードまたはシーケンス番号、データ種別、及びカメラ112の識別子などが含まれる。なお、送信する画像データは圧縮されていてもよい。また、他のカメラアダプタ120からメッセージを受け取り、メッセージに含まれるデータ種別に応じて、伝送プロトコル規定のパケットサイズにフラグメントされたデータ情報を画像データに復元する。
The
画像処理部123は、カメラ制御部124の制御によりカメラ112が撮影した画像データに基づき、オブジェクトの形状を示す前景画像を生成する処理を行う。また、動的キャリブレーションなどの処理も行う。前景画像の生成を複数のカメラアダプタ120それぞれが行うことで、画像処理システム100における負荷を分散させることができる。動的キャリブレーションは、撮影中に行うキャリブレーションで、カメラ毎の色のばらつきを抑えるための色補正処理や、カメラの振動に起因するブレに対して画像の位置を安定させるためのブレ補正処理(電子防振処理)などが含まれる。
The
カメラ制御部124は、カメラ112と接続し、カメラ112の制御、撮影画像取得、同期信号提供、時刻設定などを行う。カメラ112の制御には、例えば撮影パラメータ(画素数、色深度、フレームレート、及びホワイトバランスの設定など)の設定及び参照、カメラ112の状態情報(撮影中、停止中、同期中、及びエラーなど)の取得、撮影の開始及び停止や、ピント調整などがある。
The
(前景画像生成処理の詳細)
続いて、本実施形態に係る、カメラアダプタ120での前景画像生成処理について、図4に示す機能ブロック図及び図5に示すフローチャートを参照して、詳しく説明する。図4に示すとおり、カメラアダプタ120内の画像処理部123は、前景画像の生成に関わる5つの機能部を有する。具体的には、画像取得部401、前景領域抽出部402、輪郭領域検出部403、類似度判定部404、画素値補正部405を有する。また、図5のフローチャートに示す一連の処理は、カメラアダプタ120内の不図示のCPUが、所定のプログラムを不図示のワークメモリ(RAM)に展開して実行することで実現される。但し、以下に示す処理の全てが1個のCPUによって実行される必要はなく、処理の一部または全部がCPU以外の1つ又は複数の処理回路によって行われるように構成してもよい。カメラアダプタ120に入力される撮像画像は、複数フレームからなる動画像である。例えば、60fpsのフレームレートで撮像された動画像データが10秒分入力された場合は、全600フレームの連番画像がストリームとして入力され、フレーム単位で以下に示す処理が順に行われることになる。ただし、入力される撮像画像は動画像に限定される訳ではなく、静止画像であってもよい。なお、以下の説明において記号「S」はステップを表す。
(Details of foreground image generation processing)
Subsequently, the foreground image generation process in the
S501では、画像取得部601が、前景領域の抽出対象となるフレーム(以下、「対象画像」と表記)と背景画像のデータを取得する。ここで、背景画像データは、例えば撮像シーンがサッカーの試合であれば選手やボールなどのオブジェクトが存在しない状態のスタジアムにて試合開始直前などに対象画像と同一条件で撮像し、不図示のHDD等に保持しておいたものを読み込めばよい。この場合において同一条件とは、カメラ112の位置、姿勢、焦点距離、光学中心などの物理的条件のほか、天候や時間帯など環境条件も含む。なお、予め撮像した背景画像のデータをHDD等から読み込んで取得するのではなく、入力された動画像を構成する複数フレームに対して中間値フィルタや平均値フィルタを用いたフィルタ処理を行って作成してもよい。或いは、複数フレームに対してクラスタリング処理を行って作成してもよい。本ステップで取得した対象画像と背景画像のデータは、前景領域抽出部402と類似度判定部404に出力される。
In S501, the
S502では、前景領域抽出部402が、S501で取得した対象画像と背景画像を用いて、対象画像から前景領域を抽出する。具体的には、対象画像と背景画像における対応する画素同士の画素値を比較し、異なる画素値を持つ画素位置を特定する。そして、画素値が同一である座標の画素の画素値を“0”、画素値が同一でない座標の画素の画素値を“1”とすることで、対象画像における前景領域を示す2値画像が得られる。なお、画素値は厳密に同一である必要はなく、所定の閾値(例えば最大画素値の凡そ5%)の範囲内であれば同一と見做してもよい。こうして得られた2値画像は、暫定的な前景画像(以下、「暫定前景画像」と呼ぶ。)として、輪郭領域検出部403、類似度判定部404及び画素値補正部405に出力される。なお、本実施形態では、背景差分法を用いて前景領域の抽出を行うことを前提に説明を行っているが、例えばフレーム間差分法を用いても構わない。
In S502, the foreground
S503では、輪郭領域検出部403が、S502で得られた暫定前景画像におけるオブジェクトの輪郭領域を検出するためのマップ(以下、「輪郭マップ」と呼ぶ。)を初期化する。具体的には、輪郭マップの全画素の画素値を“0”に設定する。この輪郭マップは、暫定前景画像と画素数や画像サイズが共通の2値画像である。暫定前景画像における、オブジェクトと背景との境界付近を示す輪郭領域を構成する画素(或いは、その可能性が高い画素)に対応する画素には“1”、それ以外の画素には“0”の値が付与される。本ステップでの初期化により、輪郭マップ内の全画素について、輪郭領域ではないことを示す値“0”が初期値として設定されることになる。初期化処理後はS504に進む。
In S503, the contour
S504では、輪郭領域検出部403が、S502で得られた暫定前景画像の構成画素のうち注目する画素(以下、「注目画素」と表記)について、オブジェクトと背景との境界付近を示す輪郭領域の画素であるかを判定する。この際の注目画素は、例えば前景画像の左上の画素から順次選択される。ここで、図6を参照して、注目画素が輪郭領域の画素であるか否かの判定処理の詳細を説明する。
In S504, the contour
まず、注目画素の座標(u0,v0)を中心とした所定サイズ(ここでは5×5)のブロック600を設定する。所定サイズは、対象画像のサイズ(4KやフルHDなど)やオブジェクトの大きさ(対象画像に占める割合)に応じて事前に定めておけばよい。次に、暫定前景画像における注目画素601の画素値とブロック600に含まれる各画素の画素値とに基づき、注目画素601が輪郭領域の画素であるかを判定する。具体的には、暫定前景画像における注目画素601の画素値が“1(=オブジェクト)”であり、かつ、ブロック600内に画素値が“0(=背景)の画素が1つ以上存在する場合、注目画素601は輪郭領域の画素であると判定する。いま、ブロック600が、それぞれ602〜604の状態であったとする。ブロック602〜604における各格子はそれぞれ1画素を表しており、画素値が“0”ある画素を黒、画素値が“1”である画素を白で示している。図6の例では、ブロック604の場合に、注目画素601は輪郭領域の画素であると判定されることになる。注目画素601が背景であるブロック602や、ブロック600内に背景の画素がないブロック603のように、上記条件を満たさない場合は、注目画素601は輪郭領域の画素ではないと判定される。なお、輪郭領域の画素であるか否かの判定手法は、上述の方法に限られない。例えば、暫定前景画像に対してモルフォロジ処理を施した収縮画像を生成し、暫定前景画像における注目画素の画素値と収縮画像における当該注目画素に対応する画素の画素値とが同一でない場合に輪郭領域の画素であると判定してもよい。
First, a
S505では、輪郭領域検出部403が、S504での判定結果に従って、注目画素についての輪郭マップにおける画素値を更新する。すなわち、注目画素が輪郭領域の画素であると判定された場合は、注目画素の座標(u0,v0)と同一座標に対応する、輪郭マップE(u0,v0)における画素の画素値を“1”に変更する。また、注目画素が輪郭領域の画素ではないと判定された場合は、注目画素の座標(u0,v0)と同一座標に対応する、輪郭マップE(u0,v0)の画素の画素値を“0”のまま維持する。
In S505, the contour
S506では、暫定前景画像内の全画素が注目画素として処理されたかどうかが判定される。未処理の画素があればS504に戻り、次の注目画素が選択されて処理が続行される。一方、全画素の処理が完了していれば、輪郭領域検出部403から更新を終えた輪郭マップが画素値補正部405に出力され、次の処理(S507)に進む。
In S506, it is determined whether or not all the pixels in the provisional foreground image have been processed as the pixels of interest. If there is an unprocessed pixel, the process returns to S504, the next pixel of interest is selected, and processing is continued. On the other hand, if the processing of all the pixels is completed, the contour map that has been updated is output from the contour
S507では、類似度判定部404が、対象画像を構成する各画素の色が背景の色に類似しているか否かを判定するためのマップ(以下、「類否マップ」と呼ぶ。)を初期化する。具体的には、類否マップの全画素の画素値を“0”に設定する。この類否マップは、対象画像と画素数や画像サイズが共通の2値画像である。対象画像内の画素のうち背景の色と類似する色を持つと判定された画素に対応する画素には“1”、それ以外の画素には“0”の値が付与される。本ステップでの初期化により、類否マップの全画素について、背景の色に類似していないことを示す値“0”が初期値として設定されることになる。初期化処理後はS508に進む。
In S507, the
S508では、類似度判定部404が、対象画像における注目画素の色と背景画像によって示される背景の色との類似度を、色味に関する所定の評価値を用いて判定する。ここでいう「色」には、いわゆる色の三属性(色相、明度、彩度)の情報が含まれる。また、注目画素の意味や選択方法は、S504のときと同じであるので説明を省く。以下、本ステップにおける類似度判定について詳しく説明する。
In S508, the
まず、注目画素の座標(u0,v0)を中心としたブロックを設定する。ブロックのサイズはS504のときと同じでもよいし異なっていてもよい。次に、背景の色と類似する色を持つ画素であるか否かを判定する指標となる、注目画素についての2つの評価値CF、CBを求める。この2つの評価値CF、CBには例えば平均二乗誤差(MSE)を用い、それぞれ以下の式(1)及び式(2)で表される。 First, a block centered on the coordinates (u 0 , v 0) of the pixel of interest is set. The block size may be the same as or different from that of S504. Next, two evaluation values C F and C B for the pixel of interest, which are indexes for determining whether or not the pixel has a color similar to the background color, are obtained. For example, the mean square error (MSE) is used for these two evaluation values C F and C B, and they are represented by the following equations (1) and (2), respectively.
上記式(1)及び式(2)において、I(x,y)は対象画像における座標(x,y)の画素値、IF(x,y)は暫定前景画像における座標(x,y)の画素値を表す。また、kはRGB3チャンネルを識別するための添え字を表し、Bはブロックを表す。また、nFは、ブロック内に含まれる、暫定前景画像においてオブジェクトに対応する前景領域の画素(画素値=1)の総数、nBはオブジェクトに対応しない背景領域の画素(画素値=0)の総数を表す。ここで、評価値CFは、注目画素の画素値とブロック内に含まれる前景領域の画素値との違いを表し、両者が類似しているほど値は小さくなる。また、評価値CBは、注目画素の画素値とブロック内に含まれる背景領域の画素値との違いを表し、両者が類似しているほど値は小さくなる。なお、本実施形態では色の違いをMSE(Mean Squared Error)により評価しているが、評価指標はこれに限定されるものではなく、MAE(Mean Absolute Error)やRMSE(Root Mean Square Error)などを用いてもよい。次に、求めた2つの評価値CF、CBに基づいて、注目画素の色が背景の色と類似しているかを判定する。具体的には、注目画素について得られた評価値CFが評価値CB以上であれば背景の色と類似していると判定する。逆に、注目画素について得られた評価値CFが評価値CB未満であれば背景の色と類似していないと判定する。なお、本実施形態では、注目画素の画素値が、注目画素を中心としたブロック内に含まれる前景領域の画素値に比べて背景領域の画素値に類似している場合、注目画素の色が背景の色に類似していると判定した。しかしながら、類否の判定方法はこれに限られない。例えば、撮像画像内の注目画素における画素値と、当該注目画素と同一座標の背景画像における画素値との差が小さい場合(所定の閾値以下の場合)に、注目画素の色が背景の色と類似していると判定してもよい。この際は、上述した輪郭領域の画素における色の混ざりを考慮し、所定の閾値として相対的に大きな値を設定する。 In the above formula (1) and (2), I (x, y) pixel values of the coordinates (x, y) in the target image, I F (x, y) coordinates in the interim foreground image (x, y) Represents the pixel value of. Further, k represents a subscript for identifying an RGB3 channel, and B represents a block. Further, n F is the total number of pixels (pixel value = 1) in the foreground region corresponding to the object in the provisional foreground image included in the block, and n B is the pixels (pixel value = 0) in the background region not corresponding to the object. Represents the total number of. Here, the evaluation value C F represents the difference between the pixel value of the pixel of interest and the pixel value of the foreground region included in the block, and the more similar the two, the smaller the value. Further, the evaluation value C B represents the difference between the pixel value of the pixel of interest and the pixel value of the background region included in the block, and the more similar the two, the smaller the value. In this embodiment, the difference in color is evaluated by MSE (Mean Squared Error), but the evaluation index is not limited to this, and MAE (Mean Absolute Error), RMSE (Root Mean Square Error), etc. May be used. Next, it is determined whether the color of the pixel of interest is similar to the background color based on the obtained two evaluation values C F and C B. Specifically, if the evaluation value C F obtained for the pixel of interest is the evaluation value C B or more, it is determined that the color is similar to the background color. On the contrary, if the evaluation value C F obtained for the pixel of interest is less than the evaluation value C B , it is determined that the color is not similar to the background color. In the present embodiment, when the pixel value of the pixel of interest is closer to the pixel value of the background region than the pixel value of the foreground region included in the block centered on the pixel of interest, the color of the pixel of interest is It was judged to be similar to the background color. However, the method for determining similarity is not limited to this. For example, when the difference between the pixel value of the pixel of interest in the captured image and the pixel value of the background image having the same coordinates as the pixel of interest is small (when it is equal to or less than a predetermined threshold), the color of the pixel of interest is the background color. It may be determined that they are similar. In this case, a relatively large value is set as a predetermined threshold value in consideration of color mixing in the pixels in the contour region described above.
S509では、類似度判定部404が、S508での判定結果に従って、注目画素についての類否マップにおける画素値を更新する。すなわち、注目画素の色が背景の色と類似すると判定された場合は、注目画素の座標(x,y)と同一座標に対応する、類否マップM(x,y)における画素の画素値を“1”に変更する。また、注目画素の色が背景の色と類似していないと判定された場合は、注目画素の座標(x,y)と同一座標に対応する、類否マップ(x,y)の画素の画素値を“0”のまま維持する。
In S509, the
S510では、対象画像内の全画素が注目画素として処理されたかどうかが判定される。未処理の画素があればS508に戻り、次の注目画素が選択されて処理が続行される。一方、全画素の処理が完了していれば、類似度判定部404から更新を終えた類否マップが画素値補正部405に出力され、次の処理(S511)に進む。
In S510, it is determined whether or not all the pixels in the target image have been processed as the pixels of interest. If there are unprocessed pixels, the process returns to S508, the next pixel of interest is selected, and processing is continued. On the other hand, if the processing of all the pixels is completed, the
S511では、画素値補正部405が、暫定前景画像における注目画素(u1,v1)の画素値を、輪郭マップと類否マップとに基づき補正する。注目画素の意味や選択方法は、S504やS508のときと同じであるので説明を省く。具体的には、以下の3つの条件を満たす場合、注目画素は前景領域を構成する画素ではない(背景領域を構成する画素である)と判定し、暫定前景画像における注目画素の画素値を“0”に変更する。一方、以下の3つの条件を満たさない場合、注目画素は前景領域を構成する画素であると判定し、注目画素の画素値の変更は行わない。
第1条件:IF(u1,v1)=1(暫定前景画像における画素値が“1”)であること。
第2条件:E(u1,v1)=1(輪郭マップにおける画素値が“1”)であること。
第3条件:M(u1,v1)=1(類否マップにおける画素値が“1”)であること。
In S511, the pixel
First condition: IF (u 1 , v 1 ) = 1 (the pixel value in the provisional foreground image is "1").
Second condition: E (u 1 , v 1 ) = 1 (the pixel value in the contour map is "1").
Third condition: M (u 1 , v 1 ) = 1 (the pixel value in the similarity map is "1").
上述の通り、暫定前景画像における輪郭領域の各画素は、背景の色とオブジェクトの色とが混ざった画素値を持ち、誤りを含んでいる可能性が高い。そこで、上述の第1条件と第2条件とを用いて、前景領域と輪郭領域のいずれにも属するかどうかを判定する。そして、いずれにも属すると判定された場合において、さらに第3条件も満たす場合は、当該注目画素は背景に属する画素であると判定して、注目画素の画素値を“0”に変更する。以上のような補正処理により、暫定前景画像における誤り部分が修正される。 As described above, each pixel in the contour region in the provisional foreground image has a pixel value in which the background color and the object color are mixed, and there is a high possibility that an error is included. Therefore, using the above-mentioned first condition and second condition, it is determined whether or not it belongs to either the foreground region or the contour region. Then, when it is determined that the pixel belongs to any of the above, and if the third condition is also satisfied, it is determined that the pixel of interest is a pixel belonging to the background, and the pixel value of the pixel of interest is changed to "0". By the correction processing as described above, the error portion in the provisional foreground image is corrected.
S512では、暫定前景画像内の全画素が注目画素として処理されたかどうかが判定される。未処理の画素があればS511に戻り、次の注目画素が選択されて処理が続行される。一方、全画素の処理が完了していれば、画素値補正部405は、補正処理後の暫定前景画像を最終的な前景画像として出力する。
In S512, it is determined whether or not all the pixels in the provisional foreground image have been processed as the pixels of interest. If there is an unprocessed pixel, the process returns to S511, the next pixel of interest is selected, and processing is continued. On the other hand, if the processing of all the pixels is completed, the pixel
以上が、本実施形態に係る、前景画像生成処理の内容である。ここで、図7を参照して、本実施形態の効果について説明する。前述の図1の場合と同様、カメラ11によって撮像された対象画像10には、前景としての人物オブジェクト12と背景としてのフィールド13とが写っている。そして、対象画像10と同一の撮像視点からフィールド13のみを撮像した背景画像を用いて人物オブジェクト12のシルエットを表した前景画像が生成される。図7には、3種類の前景画像701〜703が示されている。まず、前景画像701の場合、人物オブジェクト12とフィールド13との境界付近において、本来は背景領域となるべき画素を誤って前景領域の構成画素と判定してしまっており、人物オブジェクト12のシルエットが実際の輪郭よりも膨張して表現されている。また、前景画像702の場合、人物オブジェクト12のシルエットに相当する部分は正確に抽出できている一方で、対象画像10に含まれるノイズ部分を前景領域として誤って抽出してしまっている。従来手法によるこれら前景画像に対し、本実施形態の手法によって得られる前景画像703の場合、ノイズ部分を前景領域として誤抽出することなく人物オブジェクトのシルエットのみを正確に抽出できている。
The above is the content of the foreground image generation processing according to the present embodiment. Here, the effect of the present embodiment will be described with reference to FIG. 7. Similar to the case of FIG. 1 described above, the
<変形例>
上述のS508では、対象画像における注目画素の色と背景の色との類似度を判定する際にRGB値の情報を用いていた。RGB値に代えて、例えば、RGB色空間をHSVやLabなどの異なる色空間に変換し、変換後の色空間におけるHSV値やLab値の情報を用いてもよい。
<Modification example>
In S508 described above, the RGB value information is used when determining the degree of similarity between the color of the pixel of interest and the color of the background in the target image. Instead of the RGB values, for example, the RGB color space may be converted into a different color space such as HSV or Lab, and the information of the HSV value or Lab value in the converted color space may be used.
以上のとおり本実施形態によれば、前景となるオブジェクトと背景との境界が曖昧であっても、前景となるオブジェクトの輪郭に沿って高精度に前景領域を抽出することができる。 As described above, according to the present embodiment, even if the boundary between the foreground object and the background is ambiguous, the foreground region can be extracted with high accuracy along the contour of the foreground object.
[実施形態2]
次に、背景色との類似度を色成分の出現頻度に基づいて判定する態様を、実施形態2として説明する。なお、画像処理システムの構成といった実施形態1と共通の内容については説明を省略することとし、以下では差異点である画像処理部123の構成と処理内容を中心に説明を行うこととする。
[Embodiment 2]
Next, a mode in which the degree of similarity with the background color is determined based on the appearance frequency of the color component will be described as the second embodiment. It should be noted that the description of the contents common to the first embodiment such as the configuration of the image processing system will be omitted, and the description will be given below focusing on the configuration and the processing contents of the
(本実施形態の概要)
実施形態1では、オブジェクトの輪郭領域において背景の色に近い色を持つ画素は背景領域の画素と見做されるところ、オブジェクトの色にも同程度に近い色を持つ画素の場合は前景領域の画素と見做されることもある。つまり、所定の評価値に基づくRGB値全体の類似度合いに基づく判定の場合には、誤りを持つ画素を検出できないことがあり、最終的に得られる前景画像の精度がその分だけ低下してしまう。そこで、本実施形態では、背景画像の各画素において出現頻度が最も高い色成分を求め、対象画像内の注目画素において、当該求めた色成分の値が最も大きいかどうかを基準に、注目画素の色が背景の色に近いかどうかを判定する。ここで、色成分とは、RGB色空間の場合であればR(レッド)、G(グリーン)、B(ブルー)の各チャンネルに対応する色成分を意味する。本実施形態では、対象画像はRGB色空間で色が表現されているものとする。例えば、芝生の上に人が立っているシーンを撮像した場合、得られた撮像画像における人と芝生の境界付近の画素は、芝生の色と人の色とが混ざった色の画素値を持つ。また、芝生の色を表す画素値は、一般的にG成分が最大値を取るような画素値となる。従って、輪郭領域の画素において、G成分が最大となる画素については背景を構成する画素と見做すことができる。具体的な処理内容としては、まず、前景領域の抽出処理と併せて、背景画像における各画素の色解析処理を行う。この色解析処理により、RGBのうち出現頻度の最も高い色成分を特定する。そして、対象画像における前景領域かつ輪郭領域の画素において最大値を持つ色成分が、背景画像において出現頻度の最も高い色成分と同一である場合、当該画素は前景領域の画素ではないと判定して、その色を背景の色に変更する。これにより、精度の高い前景画像が得られるようにする。
(Outline of this embodiment)
In the first embodiment, a pixel having a color close to the background color in the outline area of the object is regarded as a pixel in the background area, but a pixel having a color close to the color of the object is in the foreground area. It may be regarded as a pixel. That is, in the case of the judgment based on the degree of similarity of the entire RGB values based on the predetermined evaluation value, it may not be possible to detect the pixel with an error, and the accuracy of the finally obtained foreground image is lowered by that amount. .. Therefore, in the present embodiment, the color component having the highest frequency of appearance in each pixel of the background image is obtained, and in the pixel of interest in the target image, the value of the obtained color component is the largest based on whether or not the value of the obtained color component is the largest. Determine if the color is close to the background color. Here, the color component means a color component corresponding to each channel of R (red), G (green), and B (blue) in the case of the RGB color space. In the present embodiment, it is assumed that the target image has colors expressed in the RGB color space. For example, when a scene in which a person is standing on a lawn is imaged, the pixels near the boundary between the person and the lawn in the obtained image have pixel values of a color in which the color of the lawn and the color of the person are mixed. .. Further, the pixel value representing the color of the lawn is generally a pixel value such that the G component takes the maximum value. Therefore, among the pixels in the contour region, the pixel having the maximum G component can be regarded as the pixel constituting the background. As a specific processing content, first, the color analysis processing of each pixel in the background image is performed together with the extraction processing of the foreground region. By this color analysis processing, the color component having the highest frequency of appearance among RGB is specified. Then, when the color component having the maximum value in the pixels in the foreground region and the contour region in the target image is the same as the color component having the highest frequency of appearance in the background image, it is determined that the pixel is not a pixel in the foreground region. , Change that color to the background color. This makes it possible to obtain a highly accurate foreground image.
(前景画像生成処理の詳細)
本実施形態に係る、カメラアダプタ120での前景画像生成処理について、図8に示す機能ブロック図及び図9に示すフローチャートを参照して、詳しく説明する。図8に示すとおり、本実施形態に係る画像処理部123’は、前景画像の生成に関わる6つの機能部を有する。具体的には、画像取得部401、前景領域抽出部402、輪郭領域検出部403、類似度判定部404’、画素値補正部405及び背景色解析部801を有する。
(Details of foreground image generation processing)
The foreground image generation process in the
S901〜S906は、実施形態1の図5のフローチャートにおけるS501〜S506にそれぞれ対応し、異なるところはないので説明を省く。 S901 to S906 correspond to S501 to S506 in the flowchart of FIG. 5 of the first embodiment, and there are no differences, so the description thereof will be omitted.
S907では、背景色解析部801が、S901で取得した背景画像を解析し、背景画像を構成する各画素において出現頻度が最も高い色成分を導出する。より詳細には、背景画像において、画素値としてのRGB値の中でR成分の値が最大となる画素の総数PR、G成分の値が最大となる画素の総数PG、B成分の値が最大となる画素の総数PBを求める。そして、求めたPR、PG、PBのうち、その数が最も大きい色成分を、出現頻度が最も高い色成分とする。なお、ここでは背景画像の全画素を用いているが、前景となるオブジェクトの周辺領域など背景画像内の一部領域の中で出現頻度が最も高い色成分を特定してもよい。導出された出現頻度が最も高い色成分の情報は、類似度判定部404’に出力される。
In S907, the background
S908では、類似度判定部404’が、類否マップを初期化する。この類否マップについては、実施形態1で説明したとおりである。初期化処理後はS909に進む。 In S908, the similarity determination unit 404'initializes the similarity map. This similarity map is as described in the first embodiment. After the initialization process, the process proceeds to S909.
S909では、類似度判定部404’が、対象画像における注目画素のRGB値をチェックし、値が最大の色成分を特定する。そして、次のS910では、類似度判定部404’が、対象画像における注目画素の色と背景の色との類似度を、色成分比に基づいて判定する。具体的には、S907にて特定された“背景画像内で出現頻度が最も高い色成分”と、S909にて特定された“注目画素においてその値が最大の色成分”とが同一である場合は、注目画素の色と背景の色とが類似していると判定する。一方、両者が同一でない場合は、注目画素の色と背景の色とは類似していないと判定する。なお、注目画素の意味や選択方法は、実施形態1の図5のフローチャートにおけるS504やS508のときと同じである。 In S909, the similarity determination unit 404'checks the RGB value of the pixel of interest in the target image and identifies the color component having the largest value. Then, in the next S910, the similarity determination unit 404'determines the similarity between the color of the pixel of interest and the background color in the target image based on the color component ratio. Specifically, when the "color component having the highest frequency of appearance in the background image" specified in S907 and the "color component having the largest value in the pixel of interest" specified in S909 are the same. Determines that the color of the pixel of interest and the color of the background are similar. On the other hand, if they are not the same, it is determined that the color of the pixel of interest and the color of the background are not similar. The meaning and selection method of the pixel of interest are the same as those of S504 and S508 in the flowchart of FIG. 5 of the first embodiment.
S911では、類似度判定部404’が、S910での判定結果に従って、注目画素についての類否マップにおける画素値を更新する。すなわち、注目画素の色が背景の色と類似すると判定された場合は、注目画素の座標(x,y)と同一座標に対応する、類否マップM(x,y)における画素の画素値を“1”に変更する。また、注目画素の色が背景の色と類似していないと判定された場合は、注目画素の座標(x,y)と同一座標に対応する、類否マップ(x,y)の画素の画素値を“0”のまま維持する。 In S911, the similarity determination unit 404'updates the pixel value in the similarity map for the pixel of interest according to the determination result in S910. That is, when it is determined that the color of the pixel of interest is similar to the color of the background, the pixel value of the pixel in the similarity map M (x, y) corresponding to the same coordinates as the coordinates (x, y) of the pixel of interest is used. Change to "1". If it is determined that the color of the pixel of interest is not similar to the color of the background, the pixel of the pixel of the similarity map (x, y) corresponding to the same coordinates as the coordinates (x, y) of the pixel of interest. Keep the value at “0”.
S912では、対象画像内の全画素が注目画素として処理されたかどうかが判定される。未処理の画素があればS909に戻り、次の注目画素が選択されて処理が続行される。一方、全画素の処理が完了していれば、類似度判定部404’から更新を終えた類否マップが画素値補正部405に出力され、次の処理(S913)に進む。
In S912, it is determined whether or not all the pixels in the target image have been processed as the pixels of interest. If there is an unprocessed pixel, the process returns to S909, the next pixel of interest is selected, and processing is continued. On the other hand, if the processing of all the pixels is completed, the similarity determination unit 404'outputs the updated similarity map to the pixel
S913及びS914は、実施形態1の図5のフローチャートにおけるS511及びS512にそれぞれ対応し、異なるところはないので説明を省く。 S913 and S914 correspond to S511 and S512 in the flowchart of FIG. 5 of the first embodiment, respectively, and there are no differences, so the description thereof will be omitted.
以上が、本実施形態に係る、前景画像生成処理の内容である。ここで、図10を参照して、本実施形態の効果について説明する。実施形態1の図7の場合と同様、カメラ11によって撮像された対象画像10には、前景としての人物オブジェクト12と背景としてのフィールド13とが写っている。そして、対象画像10と同一の撮像視点からフィールド13のみを撮像した背景画像を用いて人物オブジェクト12のシルエットを表した前景画像1001及び1002が生成される。図10において、4×4のブロック14は、対象画像10の一部を拡大したものであり、ブロック14の各格子は1画素を表している。また、ブロック14内の画素群18は人物オブジェクト12の色よりも背景の色に類似している画素群を示し、画素群19は人物オブジェクト12の色との類似度合いと背景の色との類似度合いが同等である画素群を示す。前景画像1001は前述の実施形態1の手法を適用して得られた前景画像であり、前景画像1002は前述の本実施形態の手法を適用して得られた前景画像である。実施形態1の手法で得られる前景画像1001では、画素群1011に示すように、人物オブジェクト12の色よりも背景の色に類似している画素群18を、正しく背景として認識することができている。その一方で、オブジェクトの色との類似度合いと背景の色との類似度合いとが同等の画素群19は、前景領域を構成する画素として処理されており、誤りを含んでいる。これに対し、本実施形態の手法で得られる前景画像1002では、オブジェクトの輪郭に沿って正確に前景領域が抽出されている。
The above is the content of the foreground image generation processing according to the present embodiment. Here, the effect of the present embodiment will be described with reference to FIG. Similar to the case of FIG. 7 of the first embodiment, the
<変形例>
なお、上述のS902では、実施形態1におけるS502と同様、事前に撮像した背景画像と対象画像とを比較することで暫定前景画像を得ることとしていた。これに代えて、実施形態1を適用して得られた補正後の出力前景画像を、本実施形態における暫定前景画像として扱い、各処理を行うように構成してもよい。この場合、実施形態1と実施形態2をそれぞれ単独で実行した場合に比べて、より高精度な前景画像を得ることができる。
<Modification example>
In the above-mentioned S902, as in the case of S502 in the first embodiment, the provisional foreground image is obtained by comparing the background image captured in advance with the target image. Instead of this, the corrected output foreground image obtained by applying the first embodiment may be treated as a provisional foreground image in the present embodiment, and each process may be performed. In this case, a more accurate foreground image can be obtained as compared with the case where the first embodiment and the second embodiment are executed independently.
上述のS901における、背景画像内で出現頻度の最も高い色成分を決定する方法は、上記の例に限定されない。例えば、RGB色空間をHSVやLabなどの異なる色空間に変換し、変換後の色空間における画素値を用いて、色相を複数のグループに分割した後、頻度の高い色相グループを出現頻度の高い色として決定しても良い。 The method for determining the color component having the highest frequency of appearance in the background image in S901 described above is not limited to the above example. For example, the RGB color space is converted into a different color space such as HSV or Lab, the hue is divided into a plurality of groups by using the pixel values in the converted color space, and then the frequently appearing hue group has a high frequency of appearance. It may be decided as a color.
以上のとおり本実施形態によれば、オブジェクトの輪郭に含まれる画素において背景と前景との色の違いが同等程度の場合であっても、オブジェクトの輪郭に沿って前景のオブジェクトを高精度に抽出することができる。 As described above, according to the present embodiment, even if the color difference between the background and the foreground is about the same in the pixels included in the outline of the object, the object in the foreground is extracted with high accuracy along the outline of the object. can do.
<その他の実施形態>
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
<Other Embodiments>
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
Claims (16)
前記撮像画像を取得する取得手段と、
前記撮像画像から前記オブジェクトの形状に対応する前景領域を抽出して前景画像を生成する抽出手段と、
前記前景画像から前記オブジェクの輪郭領域を検出する検出手段と、
前記前景画像における前記輪郭領域を構成する画素を、当該画素に対応する前記撮像画像内の画素の色が背景の色と類似するかどうかに基づき補正する補正手段と、
を有することを特徴とする画像処理装置。 An image processing device that generates a foreground image showing the shape of an object from an captured image.
An acquisition means for acquiring the captured image and
An extraction means for generating a foreground image by extracting a foreground region corresponding to the shape of the object from the captured image, and
A detection means for detecting the contour region of the object from the foreground image, and
A correction means for correcting the pixels constituting the contour region in the foreground image based on whether or not the color of the pixels in the captured image corresponding to the pixels is similar to the background color.
An image processing device characterized by having.
前記撮像画像を構成する各画素の色が、前記背景画像によって示される背景の色に類似するかどうかを判定する判定手段をさらに有し、
前記補正手段は、前記判定手段での判定結果に基づき前記補正を行う、
ことを特徴とする請求項1に記載の画像処理装置。 The acquisition means further acquires a background image in which the object does not exist, and obtains the background image.
Further, it has a determination means for determining whether or not the color of each pixel constituting the captured image is similar to the background color indicated by the background image.
The correction means makes the correction based on the determination result of the determination means.
The image processing apparatus according to claim 1.
前記補正手段は、前記判定手段にて背景の色に近いと判定された前記注目画素に対応する前記前景画像における画素が、前記輪郭領域を構成する画素である場合、当該画素の画素値を、背景を示す画素値にする補正を行う、
ことを特徴とする請求項2に記載の画像処理装置。 In the determination means, when the color of the pixel of interest in the captured image is closer to the color of the background indicated by the background image than the color of the object, the color of the pixel of interest is similar to the background color. Judging that it is
When the pixel in the foreground image corresponding to the pixel of interest determined by the determination means to be close to the background color is a pixel constituting the contour region, the correction means determines the pixel value of the pixel. Make corrections to the pixel values that indicate the background,
The image processing apparatus according to claim 2.
前記判定手段は、前記注目画素の色について、前記オブジェクトの色よりも前記背景画像によって示される背景の色に近い色であるかどうかを、前記撮像画像を構成する画素における画素値の色成分比に基づいて判定することを特徴とする請求項3に記載の画像処理装置。 The captured image and the background image have a common color space represented by a plurality of color components, and have a common color space.
The determination means determines whether or not the color of the pixel of interest is closer to the background color indicated by the background image than the color of the object, and the color component ratio of the pixel values in the pixels constituting the captured image. The image processing apparatus according to claim 3, wherein the determination is made based on the above.
前記判定手段は、前記導出手段にて導出された前記背景画像内で出現頻度が最も高い色成分と、前記撮像画像内の前記注目画素においてその値が最大の色成分とが同一でない場合、前記注目画素の色は前記背景の色に近いと判定する、
ことを特徴とする請求項8に記載の画像処理装置。 Further, it has a derivation means for deriving the color component having the highest frequency of appearance in the color space of the background image.
When the color component with the highest appearance frequency in the background image derived by the derivation means and the color component having the maximum value in the attention pixel in the captured image are not the same, the determination means is described. It is determined that the color of the pixel of interest is close to the color of the background.
The image processing apparatus according to claim 8.
前記撮像画像を取得する取得ステップと、
前記撮像画像から前記オブジェクトの形状に対応する前景領域を抽出して前景画像を生成する抽出ステップと、
前記前景画像から前記オブジェクの輪郭領域を検出する検出ステップと、
前記前景画像における前記輪郭領域を構成する画素を、当該画素に対応する前記撮像画像内の画素の色が背景の色に類似するかどうかに基づき補正する補正ステップと、
を含むことを特徴とする画像処理方法。 An image processing method that generates a foreground image showing the shape of an object from a captured image.
The acquisition step of acquiring the captured image and
An extraction step of extracting a foreground region corresponding to the shape of the object from the captured image to generate a foreground image, and
A detection step for detecting the contour region of the object from the foreground image,
A correction step of correcting the pixels constituting the contour region in the foreground image based on whether or not the color of the pixel in the captured image corresponding to the pixel is similar to the background color.
An image processing method comprising.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019181532A JP7412947B2 (en) | 2019-10-01 | 2019-10-01 | Image processing device, image processing method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019181532A JP7412947B2 (en) | 2019-10-01 | 2019-10-01 | Image processing device, image processing method and program |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2021056936A true JP2021056936A (en) | 2021-04-08 |
JP2021056936A5 JP2021056936A5 (en) | 2022-10-12 |
JP7412947B2 JP7412947B2 (en) | 2024-01-15 |
Family
ID=75270830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019181532A Active JP7412947B2 (en) | 2019-10-01 | 2019-10-01 | Image processing device, image processing method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7412947B2 (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003150964A (en) | 2001-11-15 | 2003-05-23 | Canon Inc | Image processing device and image processing method |
CN101371273A (en) | 2005-12-30 | 2009-02-18 | 意大利电信股份公司 | Video sequence partition |
JP2009211607A (en) | 2008-03-06 | 2009-09-17 | Pioneer Electronic Corp | Object extraction device and method |
JP2017091298A (en) | 2015-11-12 | 2017-05-25 | 日本電信電話株式会社 | Image processing device, image processing method and image processing program |
-
2019
- 2019-10-01 JP JP2019181532A patent/JP7412947B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP7412947B2 (en) | 2024-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108024107B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN109685853B (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
JP2015197745A (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
CN107704798B (en) | Image blurring method and device, computer readable storage medium and computer device | |
US10515463B2 (en) | Object segmentation in a sequence of color image frames by background image and background depth correction | |
CN111491149B (en) | Real-time image matting method, device, equipment and storage medium based on high-definition video | |
US10600170B2 (en) | Method and device for producing a digital image | |
CN114693760A (en) | Image correction method, device and system and electronic equipment | |
US20110085026A1 (en) | Detection method and detection system of moving object | |
US20240048852A1 (en) | Apparatus, control method, and storage medium | |
CN107464225B (en) | Image processing method, image processing device, computer-readable storage medium and mobile terminal | |
KR101281003B1 (en) | Image processing system and method using multi view image | |
JP7374582B2 (en) | Image processing device, image generation method and program | |
JP7412947B2 (en) | Image processing device, image processing method and program | |
KR102389284B1 (en) | Method and device for image inpainting based on artificial intelligence | |
EP3407297B1 (en) | Method and device for determining a characteristic of a display device | |
CN114511461A (en) | Image processing method, electronic device, and computer-readable storage medium | |
CN109447925B (en) | Image processing method and device, storage medium and electronic equipment | |
JP2005354130A (en) | Image processing system, program, and storage medium | |
JP2012133587A (en) | Image analysis device, image analysis method and program | |
JP2021101321A (en) | Information processing device, method and program | |
CN111630569A (en) | Binocular matching method, visual imaging device and device with storage function | |
CN113744167B (en) | Image data conversion method and device | |
JP2021047793A (en) | Image processing device, image processing method, and program | |
Han et al. | A novel hybrid color registration algorithm for image stitching |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20221003 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20221003 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230901 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230912 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231101 |
|
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: 20231128 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20231227 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7412947 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |