JP7042736B2 - Foreground extraction device, foreground extraction method, and foreground extraction program - Google Patents
Foreground extraction device, foreground extraction method, and foreground extraction program Download PDFInfo
- Publication number
- JP7042736B2 JP7042736B2 JP2018240680A JP2018240680A JP7042736B2 JP 7042736 B2 JP7042736 B2 JP 7042736B2 JP 2018240680 A JP2018240680 A JP 2018240680A JP 2018240680 A JP2018240680 A JP 2018240680A JP 7042736 B2 JP7042736 B2 JP 7042736B2
- Authority
- JP
- Japan
- Prior art keywords
- foreground
- edge
- unit
- local area
- image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Analysis (AREA)
Description
この発明は、映像フレームから背景画像に存在しない物体領域を抽出する前景抽出装置、前景抽出方法、及び、前景抽出プログラムに関するものである。 The present invention relates to a foreground extraction device for extracting an object region that does not exist in a background image from a video frame, a foreground extraction method, and a foreground extraction program.
従来から、事前に用意した背景画像と参照画像を比較して、参照画像から背景画像に存在しない物体領域を抽出する前景抽出技術が知られている。前景を抽出する技術としては、輝度を元に画素ごとの差分をとり、差分が大きい箇所を前景として抽出する方法、あるいは、画像の局所領域ごと輝度分布の類似度を算出し、類似度が低い箇所を前景として抽出する方法が存在する。
前者は画素ごとの輝度の差分を取っているため、参照画像の日照条件が背景画像と大きく異なり、輝度が大きく異なるような画像では、誤抽出が多く発生する問題がある。
Conventionally, there has been known a foreground extraction technique for comparing a background image prepared in advance with a reference image and extracting an object region that does not exist in the background image from the reference image. As a technique for extracting the foreground, a method of extracting a difference for each pixel based on the brightness and extracting a portion having a large difference as a foreground, or a method of calculating the similarity of the brightness distribution for each local region of the image and having a low degree of similarity. There is a method to extract the part as the foreground.
Since the former takes the difference in brightness for each pixel, there is a problem that erroneous extraction often occurs in an image in which the sunshine condition of the reference image is significantly different from that of the background image and the brightness is significantly different.
一方、後者の手法では、画像の明暗パターンを表すテクスチャ特徴を類似度の算出に利用することで、誤抽出を抑えることができる。これは、日照の変化によって輝度が変化したとしても、明暗パターンを表すテクスチャ特徴は変化しにくいためである。 On the other hand, in the latter method, erroneous extraction can be suppressed by using the texture feature representing the light and dark pattern of the image for the calculation of the degree of similarity. This is because the texture feature representing the light-dark pattern is unlikely to change even if the brightness changes due to the change in sunshine.
例えば特許文献1には画像の局所領域ごとに背景画像と入力画像のパターンを比較することで類似度を算出し、前景を抽出する技術が開示されている。この手法では、日照変化による輝度変動に頑健なテクスチャ特徴を利用するとともに、影である可能性が高い影候補ブロックを検出することで、濃い影であっても前景の領域を精度よく推定することを可能としている。 For example, Patent Document 1 discloses a technique of calculating the similarity by comparing the patterns of the background image and the input image for each local region of the image and extracting the foreground. This method uses texture features that are robust against brightness fluctuations due to changes in sunshine, and detects shadow candidate blocks that are likely to be shadows to accurately estimate the foreground region even with dark shadows. Is possible.
しかしながら、特許文献1に開示されているような技術では、前景領域を抽出するために、局所領域ごとの類似度を計算しており、画像全体の前景を抽出する際には、局所領域を画面全体で走査させねばならないため、計算量が多く、処理負荷が高いという課題があった。 However, in the technique disclosed in Patent Document 1, the similarity for each local region is calculated in order to extract the foreground region, and when the foreground of the entire image is extracted, the local region is displayed on the screen. Since it is necessary to scan the entire image, there is a problem that the amount of calculation is large and the processing load is high.
本発明では、前景を抽出する際に、計算量が削減でき、処理負荷が軽減できるようにすること目的とする。 An object of the present invention is to reduce the amount of calculation and the processing load when extracting the foreground.
この発明の前景抽出装置は、
映像フレームからエッジを抽出し、前記映像フレームのエッジと前記映像フレームの撮影領域に前景となる物体がない状態で撮影された背景画像とを用いて、前記映像フレームから前景を抽出する前景抽出部を備えた。
The foreground extraction device of the present invention
A foreground extraction unit that extracts an edge from a video frame and extracts a foreground from the video frame using the edge of the video frame and a background image shot in a state where there is no foreground object in the shooting area of the video frame. Equipped with.
この発明の前景抽出装置は、映像フレームからエッジを抽出し、エッジを用いて前景を抽出するので、前景を抽出する際に、計算量が削減でき、処理負荷が軽減できる。 Since the foreground extraction device of the present invention extracts an edge from a video frame and extracts the foreground using the edge, the amount of calculation can be reduced and the processing load can be reduced when extracting the foreground.
実施の形態1.
以下、実施の形態について、図面を参照しながら詳細に説明する。
Embodiment 1.
Hereinafter, embodiments will be described in detail with reference to the drawings.
***構成の説明***
図1は、実施の形態1に係る前景抽出装置20の構成図である。
図1に示されるように、前景抽出装置20は、撮影領域の映像を撮影・配信するカメラ10と接続され、カメラ10から配信される圧縮映像ストリームを復号して映像フレームに変換する映像受信復号部201と、映像フレームを用いて前景を抽出する前景抽出部202と、抽出結果を装置外部に出力する前景画像出力部203とを備える。
さらに、前景抽出装置20は、背景画像を保存するとともに映像フレームの画像を解析する解析用パラメータを保存するパラメータ保存用ストレージ204を備える。
*** Explanation of configuration ***
FIG. 1 is a block diagram of the
As shown in FIG. 1, the
Further, the
図2は、実施の形態1に係る前景抽出装置20のハードウェア構成図である。
前景抽出装置20は、図2に示す一般的なコンピュータ100から構成される。
映像受信復号部201及び前景画像出力部203はプロセッサ1001、メモリ1002及びネットワークインタフェース1003から構成される。前景抽出部202及び前景画像出力部203はプロセッサ1001及びメモリ1002から構成される。パラメータ保存用ストレージ204は記憶装置1004から構成される。
FIG. 2 is a hardware configuration diagram of the
The
The video reception /
プロセッサ1001は、信号線を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
記憶装置1004には、前景抽出装置20の各機能構成要素の機能を実現するプログラムが記憶されている。このプログラムは、プロセッサ1001によりメモリ1002に読み込まれ、プロセッサ1001によって実行される。これにより、前景抽出装置20の各機能構成要素の機能が実現される。
The
The
プロセッサ1001は、演算処理を行うIC(Integrated Circuit)である。プロセッサ1001は、具体例としては、CPU(Central Processing Unit)、DSP(Digital Signal Processor)、GPU(Graphics Processing Unit)である。
The
メモリ1002は、データを一時的に記憶する記憶装置である。メモリ1002は、具体例としては、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)である。
The
記憶装置1004は、データを保管する記憶装置である。記憶装置1004は、具体例としては、HDD(Hard Disk Drive)である。また、記憶装置1004は、メモリカード、NANDフラッシュ、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD(Digital Versatile Disk)といった可搬記録媒体であってもよい。
The
ネットワークインタフェース1003は、外部の装置と通信するためのインタフェースである。ネットワークインタフェース1003は、具体例としては、Ethernet(登録商標)、USB(Universal Serial Bus)、又は、HDMI(登録商標,High-Definition Multimedia Interface)のポートを有する。
The
図2では、プロセッサ1001は、1つだけ示されているが、前景抽出装置20は、プロセッサ1001を代替する複数のプロセッサを備えていてもよい。これら複数のプロセッサは、各機能構成要素の機能を実現するプログラムの実行を分担する。
Although only one
***動作の説明***
以下、この実施の形態1における前景抽出装置の動作について説明する。
図3は前景抽出装置20の動作を示すフローチャートである。
*** Explanation of operation ***
Hereinafter, the operation of the foreground extraction device according to the first embodiment will be described.
FIG. 3 is a flowchart showing the operation of the
(ステップST01:解析用パラメータ読み込み処理)
前景抽出部202はパラメータ保存用ストレージ204から背景画像及び解析用パラメータを読み込んでおく。読み込んだ背景画像及びパラメータは後述の前景抽出部202の処理で使用する。
背景画像は、カメラ10の撮影領域に前景となる物体がない状態で撮影領域をカメラ10によって撮影することにより得られた画像データである。
(Step ST01: Parameter reading process for analysis)
The
The background image is image data obtained by shooting a shooting area with the
(ステップST02:動画像受信復号処理)
映像受信復号部201は前景抽出装置20に接続されたカメラ10から、圧縮映像ストリームを受信するために待機し、圧縮映像ストリームを受信した場合は圧縮映像ストリームを1フレーム分復号し、映像フレームに変換する。
映像フレームとは、1枚の静止画を指し、縦X画素横Y画素からなる映像信号を含んでいる。
(Step ST02: Moving image reception / decoding processing)
The video reception /
The video frame refers to one still image, and includes a video signal composed of vertical X pixels and horizontal Y pixels.
ここで受信対象とする映像ストリームは、例えばH.262/MPEG-2 video、H.264/AVC、H.265/HEVC、又はJPEG等の映像圧縮符号化方式で圧縮された映像符号化データを、MPEG-2 TS(Moving Picture
Experts Group 2 Transport Stream)、RTP/RTSP(Real-time Transport Protocol/Real Time Streaming Protocol)、MMT(MPEG Media Transport)又はDASH(Dynamic Adaptive Streaming over HTTP)等の映像配信プロトコルでIP(Internet Protocol)配信されるものを対象とする。
The video stream to be received here is, for example, H. 262 / MPEG-2 video, H.M. 264 / AVC, H. MPEG-2 TS (Moving Picture) of video coded data compressed by a video compression coding method such as 265 / HEVC or JPEG.
Experts Group 2 Transport Stream), RTP / RTSP (Real-time Transport Protocol / Real Time Streaming Protocol), MMT (MPEG Media Transport) or DASH (Digital Protocol) Target what is done.
映像ストリームは、上記以外の符号化フォーマット又は配信フォーマットで配信されてもよいし、SDI(Serial Digital Interface)、HD-SDI(High Definition Serial Digital Interface)等の非圧縮の伝送規格フォーマットで配信されてもよい。 The video stream may be distributed in an encoding format or distribution format other than the above, or may be distributed in an uncompressed transmission standard format such as SDI (Serial Digital Interface) or HD-SDI (High Definition Serial Digital Interface). May be good.
(ステップST03:前景画像生成処理)
前景抽出部202は、映像受信復号部201から入力される映像フレームからエッジを抽出し、映像フレームのエッジと映像フレームの撮影領域に前景となる物体がない状態で撮影された背景画像とを用いて、当該映像フレームから前景を抽出し、出力する。前景抽出部202の動作の詳細は後述する。
(Step ST03: Foreground image generation process)
The
(ステップST04:前景抽出結果の出力処理)
次に前景画像出力部203は、前景抽出部202から出力された前景抽出結果を、前景抽出装置20の外部に出力する。
出力の形式としては、例えば、モニタへの表示、ログファイルへの出力、外部接続機器への出力、又はネットワークへの送出等があげられる。又はその他の形式での出力でもよい。また、前景抽出部202から前景抽出結果が出力されるたびに外部に出力してもよいし、特定の期間又は特定数の前景抽出結果を集計又は統計処理した後に出力する等、断続的な出力であってもよい。
ステップST04の後はステップST02に戻り、次の映像フレームの処理を行う。
(Step ST04: Output processing of foreground extraction result)
Next, the foreground
Examples of the output format include display on a monitor, output to a log file, output to an externally connected device, transmission to a network, and the like. Alternatively, the output may be in other formats. Further, it may be output to the outside every time the foreground extraction result is output from the
After step ST04, the process returns to step ST02 to process the next video frame.
***前景抽出部202の構成の説明***
図4は本実施の形態における前景抽出部202の構成図である。
前景抽出部202は、入力された映像フレームからエッジを抽出するエッジ抽出部2021と、抽出したエッジを中心とした局所領域を指定する局所領域設定部2022と、指定された局所領域における映像フレームと背景画像の類似度を算出する類似度計算部2023と、算出された類似度分布から前景を抽出する二値化処理部2024を備える。
*** Explanation of the configuration of the
FIG. 4 is a configuration diagram of the
The
***前景抽出部202の動作の説明***
以下、前景抽出部202の詳細動作について説明する。
図5は本実施の形態における前景抽出部202の動作フローチャートである。
図6は本実施の形態の処理概要図である。
*** Explanation of the operation of the
Hereinafter, the detailed operation of the
FIG. 5 is an operation flowchart of the
FIG. 6 is a schematic processing diagram of the present embodiment.
(ステップST11:エッジ抽出処理)
まず、エッジ抽出部2021は、入力された映像フレームに対してエッジ抽出を実施し、エッジ抽出結果を局所領域設定部2022に出力する。
エッジとは、画像中の明るさ又は色が急に変化する部分をいう。
エッジ抽出とは、画像中の明るさ又は色が急に変化する部分を抽出することをいう。
エッジ抽出部2021のエッジ抽出は公知の技術で実現することができる。
図6では、エッジ抽出部2021が、映像フレームから2本の斜線と人型を映像エッジとして抽出している。
(Step ST11: Edge extraction process)
First, the
An edge is a part of an image where the brightness or color changes suddenly.
Edge extraction refers to extracting a part of an image where the brightness or color suddenly changes.
The edge extraction of the
In FIG. 6, the
(ステップST12:局所領域・比較領域の設定処理)
次に局所領域設定部2022では、エッジ抽出部2021から入力されたエッジ抽出結果を用いて、エッジが抽出された画素を中心とした局所領域を設定する。
また、局所領域設定部2022は、背景画像の局所領域に対応する領域を局所領域と比較する比較領域として設定する。
局所領域は、例えば、エッジとして抽出されたいずれかの1画素を中心としたn画素×n画素(nは3以上の整数)の矩形の画像領域である。
比較領域は、背景画像上で局所領域と同じ位置、同じ大きさのn画素×n画素の矩形の画像領域である。
図6では、局所領域設定部2022が、映像エッジ抽出結果に基づいて、映像フレームに対して2本の斜線と人型を構成している画素に局所領域を設定し、さらに、背景画像の局所領域に対応する位置に比較領域を設定している。
(Step ST12: Local area / comparison area setting process)
Next, the local
Further, the local
The local region is, for example, a rectangular image region of n pixels × n pixels (n is an integer of 3 or more) centered on any one pixel extracted as an edge.
The comparison area is a rectangular image area of n pixels × n pixels having the same position and size as the local area on the background image.
In FIG. 6, the local
(ステップST13:類似度計算処理)
次に類似度計算部2023では、局所領域設定部2022で設定された局所領域において、背景画像と映像フレームの類似度を算出する。類似度計算部2023は、局所領域設定部2022により設定された局所領域の画像と、背景画像の比較領域の画像との類似度を計算する。
(Step ST13: Similarity calculation process)
Next, the
類似度の算出には、日向、日陰といった日照条件に頑健なテクスチャ特徴を利用した手法を利用する。利用するテクスチャ特徴は、例えば画像の位相情報から類似度を算出する位相限定相関法(例えば、非特許文献1参照)が考えられる。その他利用できるテクスチャ特徴の種類としては、エッジ、輝度勾配、Local Binary Pattern、相関、ヒストグラム、エントロピー等が考えられる。 To calculate the degree of similarity, a method that uses texture features that are robust to sunshine conditions such as sun and shade is used. As the texture feature to be used, for example, a phase-limited correlation method (see, for example, Non-Patent Document 1) in which the degree of similarity is calculated from the phase information of an image can be considered. Other types of texture features that can be used include edges, luminance gradients, local binary patterns, correlations, histograms, entropy, and the like.
一番単純なテクスチャ特徴はエッジであるが、エッジは位置ずれが発生した場合に類似度が著しく下がり、誤抽出が発生しやすい。それに対し、位相情報、相関、ヒストグラム、エントロピーは、領域の発生頻度又は明暗パターンの統計データを使用しているため、位置ずれが発生したとしても、類似度の低下はエッジに比べて少なく、誤抽出を発生させにくい。 The simplest texture feature is the edge, but when the edge is misaligned, the similarity is significantly reduced and erroneous extraction is likely to occur. On the other hand, phase information, correlation, histogram, and entropy use statistical data of region occurrence frequency or light / dark pattern, so even if misalignment occurs, the decrease in similarity is smaller than that of edges, which is erroneous. It is difficult to generate extraction.
その中でも特に、位相情報を利用した位相限定相関法は、位置ずれ量を考慮したうえで類似度を算出する手法であり、位置ずれが発生した場合でも、類似度の低下は少なく、位置ずれに頑健である。そのため類似度の算出に位相限定相関法を利用することで、位置ずれにも頑健な前景抽出が実現される。
解析用パラメータには類似度算出の手法に応じて、必要なパラメータが設定されていて、類似度計算部2023は、類似度算出のために解析用パラメータを用いる。
Among them, the phase-limited correlation method using phase information is a method of calculating the similarity after considering the amount of misalignment, and even if the misalignment occurs, the degree of similarity does not decrease so much that the misalignment occurs. Robust. Therefore, by using the phase-limited correlation method to calculate the degree of similarity, it is possible to extract a foreground that is robust against misalignment.
Necessary parameters are set for the analysis parameters according to the similarity calculation method, and the
エッジ抽出部2021で抽出されたエッジに含まれる画素すべてに対し、ステップST12とST13を繰り返す。すなわち、局所領域設定部2022は、エッジを構成する全ての画素を中心とした局所領域を設定し、その後、局所領域と対応する比較領域を背景画像に設定する。類似度計算部2023は、局所領域設定部2022で設定された全ての局所領域において、映像フレームの局所領域と背景画像の比較領域との映像フレームの類似度を算出する。具体的には、ステップST12で類似度を算出していない、画素を抽出した局所領域と、対応する比較領域とを設定し、ステップS13で映像フレームの類似度を算出する処理を、すべての画素に対応する局所領域について、実行する。
図6では、2本の斜線に対して設定した局所領域と比較領域との類似度は高くなり、人型に対して設定した局所領域と比較領域との類似度は低くなる。
Steps ST12 and ST13 are repeated for all the pixels included in the edges extracted by the
In FIG. 6, the similarity between the local region set for the two diagonal lines and the comparison region is high, and the similarity between the local region set for the humanoid and the comparison region is low.
(ステップST14:二値化処理)
二値化処理部2024では、ステップST12とST13の繰り返しによって得られたエッジを構成する全ての画素の類似度から、類似度の分布を求める。二値化処理部2024では、類似度の分布に対し、基準値で2値化を行い、前景と背景に分離し、類似度が低い領域のみを前景として抽出する。
図6では、二値化処理部2024は、2本の斜線に対して設定した局所領域と比較領域との類似度は基準値より高くなるのでその局所領域の中心にある画素は背景であると判断して無視している。
一方、二値化処理部2024は、人型に対して設定した局所領域と比較領域との類似度は基準値より低くなるので、その局所領域の中心にある画素が前景を構成する画素であるとして抽出する。
図6では、類似度が低い領域の中心にある画素の集合を前景抽出結果(二値)として示している。結果として、図6では、人型の前景が抽出されたことを示している。
(Step ST14: Binarization process)
The
In FIG. 6, in the
On the other hand, in the
In FIG. 6, a set of pixels in the center of a region having a low degree of similarity is shown as a foreground extraction result (binary value). As a result, FIG. 6 shows that the humanoid foreground was extracted.
***実施の形態1の特徴***
この実施の形態1の前景抽出装置は、解析用パラメータを保持するパラメータ保存用ストレージ204と、映像フレームからエッジを抽出し、映像フレームのエッジと前記映像フレームの撮影領域に前景となる物体がない状態で撮影された背景画像とを用いて映像フレームから前景を抽出する前景抽出部202と、前景抽出部202が抽出した前景を出力する前景画像出力部203とを備えたことを特徴とする。
*** Features of Embodiment 1 ***
The foreground extraction device of the first embodiment extracts a
パラメータ保存用ストレージ204は、背景画像を保持している。
前景抽出部202は、映像フレームからエッジを抽出するエッジ抽出部2021と、抽出されたエッジを構成する画素を中心とする局所領域と背景画像の局所領域に対応する比較領域とを設定する局所領域設定部2022とを備えている。
前景抽出部202は、局所領域設定部により設定された局所領域の画像と比較領域の画像との類似度を計算する類似度計算部2023と、類似度計算部が計算した類似度に対して二値化処理を実施し、前景を抽出する二値化処理部0204とを備えている。
The
The
The
この実施の形態1の前景抽出装置は、前景を抽出する際に、不必要な部分の局所領域の類似度計算は省くことで、高速化を実現する。具体的には、この実施の形態1の前景抽出装置は、テクスチャ特徴を利用した前景抽出において、前景は多くの場合エッジ周辺に表れる事実に着目し、エッジ周辺だけを処理することで、精度を維持したまま高速化を実現する。 The foreground extraction device of the first embodiment realizes high speed by omitting the similarity calculation of the local region of an unnecessary portion when extracting the foreground. Specifically, the foreground extraction device of the first embodiment pays attention to the fact that the foreground often appears around the edge in the foreground extraction using the texture feature, and processes only the edge periphery to improve the accuracy. Achieve high speed while maintaining.
***実施の形態1の効果の説明***
以上のように、この実施の形態1によれば、背景画像と参照画像の異なる領域を抽出できる前景抽出技術において、日向又は日陰といった異なる日照条件においても精度よく前景を抽出することができるだけでなく、前景抽出の精度を維持しながら高速化を実現できる。
特に、前景抽出装置20は、日照条件がことなる画像間においても誤抽出が少なく、高速に前景の抽出をすることが可能となる。
さらに、類似度計算部2023において位相限定相関法を利用することで、位置ずれにも頑健な前景抽出が可能となる。
*** Explanation of the effect of Embodiment 1 ***
As described above, according to the first embodiment, in the foreground extraction technique capable of extracting different regions of the background image and the reference image, not only can the foreground be accurately extracted even under different sunshine conditions such as sunlight or shade. , High speed can be realized while maintaining the accuracy of foreground extraction.
In particular, the
Further, by using the phase-limited correlation method in the
特にこの実施の形態1の前景抽出装置は、日照条件が変化する環境に高い効果を発揮する。例えば屋外環境における置き去り物の検知等が挙げられる。 In particular, the foreground extraction device of the first embodiment is highly effective in an environment where the sunshine conditions change. For example, detection of leftover objects in an outdoor environment can be mentioned.
<変形例1>
実施の形態1の前景抽出装置20では、入力装置として、カメラ10を対象とするように構成されているが、RGBカメラに限定されるものではない。例えばサーマルカメラ(Thermal Camera)又はデプスカメラ(Depth Camera)を入力装置としてもよい。
<Modification 1>
The
<変形例2>
局所領域設定部2022は、エッジを構成する1つの画素ごとに1つの局所領域を設定しなくてもよい。局所領域設定部2022は、エッジを構成する複数の画素に1つの局所領域を設定してもよい。例えば局所領域設定部2022は、隣接かつ連続する特定個数又は任意個数の画素に1つの局所領域を設定してもよい。
局所領域は、抽出されたエッジを構成する画素を少なくとも1つ含んでいればよい。
<Modification 2>
The local
The local region may include at least one pixel constituting the extracted edge.
<変形例3>
実施の形態1では、各機能構成要素がソフトウェアで実現する場合を説明した。しかし、変形例として、各機能構成要素はハードウェアで実現されてもよい。
<Modification 3>
In the first embodiment, the case where each functional component is realized by software has been described. However, as a modification, each functional component may be realized by hardware.
図7を参照して、変形例に係る前景抽出装置20の構成を説明する。
各機能構成要素がハードウェアで実現される場合には、前景抽出装置20は、プロセッサ1001に代えて、処理回路1005を備える。あるいは、図示しないが、前景抽出装置20は、プロセッサ1001とメモリ1002と記憶装置1004とに代えて、処理回路1005を備える。処理回路1005は、各機能構成要素(及び、メモリ1002と記憶装置1004)との機能とを実現する専用の電子回路である。
The configuration of the
When each functional component is realized by hardware, the
処理回路1005は、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ロジックIC、GA(Gate Array)、ASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)が想定される。
各機能構成要素を1つの処理回路1005で実現してもよいし、各機能構成要素を複数の処理回路1005に分散させて実現してもよい。
The
Each functional component may be realized by one
あるいは、一部の各機能構成要素がハードウェアで実現され、他の各機能構成要素がソフトウェアで実現されてもよい。 Alternatively, some functional components may be implemented in hardware and other functional components may be implemented in software.
前述したプロセッサ1001とメモリ1002と記憶装置1004と処理回路1005とを、総称して「プロセッシングサーキットリー」という。つまり、各機能構成要素の機能は、プロセッシングサーキットリーにより実現される。
The
実施の形態2.
以下、前述した実施の形態と異なる点について、図面を参照しながら説明する。
Embodiment 2.
Hereinafter, the points different from the above-described embodiments will be described with reference to the drawings.
***構成の説明***
図8は本実施の形態における前景抽出部202の構成図である。
前述した実施の形態では、背景画像と映像フレームで位置ずれが発生していた場合、前景を誤抽出する可能性がある。この課題を解決するために、実施の形態2では、実施の形態1の類似度計算部2023に位置ずれ量計算部2025を付加し、位置ずれに頑健な前景抽出を実現する。
*** Explanation of configuration ***
FIG. 8 is a block diagram of the
In the above-described embodiment, if the background image and the video frame are misaligned, the foreground may be erroneously extracted. In order to solve this problem, in the second embodiment, the misalignment
***動作の説明***
図9は本実施の形態における前景抽出部202の動作を示すフローチャートである。
*** Explanation of operation ***
FIG. 9 is a flowchart showing the operation of the
(ステップST12:局所領域・比較領域の設定処理)
局所領域設定部2022では、エッジ抽出部2021から入力されたエッジ抽出結果を用いて、エッジが抽出された画素を中心とした局所領域と背景画像の比較領域とを設定する。
(ステップST15:類似度・位置ずれ量計算処理)
類似度計算部2023が動作する場合、位置ずれ量計算部2025において、位相限定相関法を利用することで、局所領域と比較領域との位置ずれ量を算出する。
位置ずれ量が0でなかった場合、位置ずれ量を考慮して、局所領域設定部2022において、位置ずれ量が0になるように局所領域を再度設定し(ステップST12)、再度位置ずれ量を計算する(ステップST15)。この再計算は1度でもよいし、位置ずれ量の改善が見られなくなるまで繰り返し実施してもよい。
類似度計算部2023は、位置ずれ量が0になった場合、類似度計算部2023は、類似度を計算する。なお、類似度計算部2023は、位置ずれ量の算出とともに類似度を毎回計算してもよい。
このように類似度計算部2023は、局所領域の画像と比較領域の画像との位置ずれ量を計算して、位置ずれ量を抑制して類似度の計算をする
(Step ST12: Local area / comparison area setting process)
In the local
(Step ST15: Similarity / misalignment amount calculation process)
When the
If the misalignment amount is not 0, the local
When the amount of misalignment becomes 0, the
In this way, the
***実施の形態2の効果の説明***
実施の形態2によれば、位置ずれ量計算部2025が計算した位置ずれがなくなるように局所領域設定部2022が局所領域を設定するので、位置ずれに頑健な前景抽出が可能となる。
*** Explanation of the effect of Embodiment 2 ***
According to the second embodiment, since the local
実施の形態3.
以下、前述した実施の形態と異なる点について、図面を参照しながら説明する。
Embodiment 3.
Hereinafter, the points different from the above-described embodiments will be described with reference to the drawings.
***構成の説明***
図10は本実施の形態における前景抽出部202の構成図である。
前景抽出部202は、背景画像のエッジを抽出する背景エッジ抽出部2026と、背景エッジ抽出部2026の結果でエッジ抽出部2021の結果をマスキングするエッジマスク部2027とを備える。
*** Explanation of configuration ***
FIG. 10 is a block diagram of the
The
前述した実施の形態では、映像フレームから得られたエッジ箇所全てに対し、類似度を計算しているため、背景に存在する構造物のエッジ部分等の計算が不要な部分まで類似度を算出していることになる。
また、構造物のエッジ周辺では、日照変化が発生した場合、照り返し等が発生し、背景画像との類似度が低下しやすいため、前景の誤抽出が発生しやすい可能性がある。
実施の形態3では実施の形態1における前段階として、エッジ抽出部2021と並行して背景エッジ抽出部2026を追加し、エッジ抽出部2021と局所領域設定部2022の間にエッジマスク部2027を追加する。
In the above-described embodiment, since the similarity is calculated for all the edge portions obtained from the video frame, the similarity is calculated up to the part where the calculation is unnecessary, such as the edge portion of the structure existing in the background. It will be.
In addition, when a change in sunshine occurs around the edge of the structure, reflection or the like occurs and the degree of similarity with the background image tends to decrease, so that erroneous extraction of the foreground may easily occur.
In the third embodiment, as a preliminary step in the first embodiment, the background
***動作の説明***
図11は本実施の形態における前景抽出部202の動作を示すフローチャートである。
図12と図13は、本実施の形態の処理概要図である。
*** Explanation of operation ***
FIG. 11 is a flowchart showing the operation of the
12 and 13 are schematic processing diagrams of the present embodiment.
(ステップST16:背景エッジ抽出処理)
背景エッジ抽出部2026は、パラメータ保存用ストレージ204から背景画像を取得する。背景エッジ抽出部2026は、背景画像のエッジを背景エッジとして抽出し、エッジマスク部2027に出力する。
図12では、背景エッジ抽出部2026は、2本の斜線を背景画像の背景エッジとして抽出している。
(Step ST16: Background edge extraction process)
The background
In FIG. 12, the background
(ステップST17:エッジマスク適用処理)
次にエッジマスク部2027において、背景エッジ抽出部2026から得られたエッジ抽出結果を用いて、エッジ抽出部2021で得られたエッジ抽出結果にマスキングを行う。
エッジマスク部2027は、映像フレームのエッジの中で背景画像のエッジと重なるエッジは背景に存在するエッジであると判断して、映像フレームのエッジから背景に存在するエッジを削除したエッジを前景のエッジとして抽出する。
図12では、エッジマスク部2027は、映像エッジ抽出結果と背景エッジ抽出結果との各画素の排他的論理和を取ることによりマスクエッジ画像を生成する。
図12では、エッジマスク部2027は、映像エッジの中で背景エッジが重なる2本の斜線部分を背景に存在するエッジであると判断して、映像フレームのエッジから2本の斜線を削除した人型のエッジのみを前景のエッジとして抽出している。
(Step ST17: Edge mask application process)
Next, in the
The
In FIG. 12, the
In FIG. 12, a person who determines that the
(ステップST12:局所領域・比較領域の設定処理)
次に局所領域設定部2022では、エッジマスク部2027で抽出された人型のエッジ抽出結果を用いて、エッジが抽出された画素を中心とした局所領域と背景画像の比較領域とを設定する。
図13では、局所領域設定部2022は、人型の前景のエッジを構成する画素を中心とした局所領域とその局所領域に対応する比較領域とを設定する。局所領域設定部2022は、背景に存在するエッジを構成する画素を中心とした局所領域とその局所領域に対応する比較領域とは設定しない。
(Step ST12: Local area / comparison area setting process)
Next, in the local
In FIG. 13, the local
(ステップST13:類似度計算処理)
次に類似度計算部2023では、局所領域設定部2022で設定された局所領域において、背景画像と映像フレームの類似度を算出する。類似度計算部2023では、マスクされていないエッジ周辺のみ類似度を計算する。
図13では、類似度計算部2023は、人型の前景のエッジを構成する画素を中心とした局所領域の類似度を計算する。類似度計算部2023は、背景に存在するエッジを構成する画素を中心とした局所領域の類似度は計算しない。
(Step ST13: Similarity calculation process)
Next, the
In FIG. 13, the
***実施の形態3の効果の説明***
実施の形態3によれば、背景に存在するエッジを類似度計算から除外することができるので、前景抽出をより高速に、誤抽出少なく実施することができる。
*** Explanation of the effect of Embodiment 3 ***
According to the third embodiment, since the edge existing in the background can be excluded from the similarity calculation, the foreground extraction can be performed at higher speed and with less erroneous extraction.
特に、1回のエッジマスク適用処理により、背景のエッジを構成する画素数の回数だけ局所領域設定処理と類似度計算処理を除外することができ、高速処理が実現できる。 In particular, by performing the edge mask application process once, the local area setting process and the similarity calculation process can be excluded as many times as the number of pixels constituting the background edge, and high-speed processing can be realized.
***他の実施の形態***
前述した各実施の形態の自由な組み合わせ、あるいは各実施の形態の任意の構成要素の変形、もしくは各実施の形態において任意の構成要素の省略が可能である。
*** Other embodiments ***
It is possible to freely combine the above-described embodiments, modify any component of each embodiment, or omit any component in each embodiment.
前述した各実施の形態の前景抽出装置は、2枚の画像を比較し、2枚の画像の差異を検出する画像比較装置、差分抽出装置、画像比較システム、差分抽出システムに使用することができる。
前景抽出装置が、画像比較装置、差分抽出装置、画像比較システム、又は、差分抽出システムに使用される場合、「前景」は「2枚の画像の差分」であり、前景抽出部202は差分抽出部となり、前景画像出力部203は差分画像出力部となる。
The foreground extraction device of each of the above-described embodiments can be used in an image comparison device, a difference extraction device, an image comparison system, and a difference extraction system that compare two images and detect the difference between the two images. ..
When the foreground extraction device is used for an image comparison device, a difference extraction device, an image comparison system, or a difference extraction system, the "foreground" is the "difference between two images", and the
前述した各実施の形態の前景抽出装置は、画像処理装置、画像処理システム、アニメーション処理装置、又は、アニメーション処理システムの一部として組み込むことができる。 The foreground extraction device of each of the above-described embodiments can be incorporated as a part of an image processing device, an image processing system, an animation processing device, or an animation processing system.
10 カメラ、20 前景抽出装置、100 コンピュータ、201 映像受信復号部、202 前景抽出部、203 前景画像出力部、204 パラメータ保存用ストレージ、1001 プロセッサ、1002 メモリ、1003 ネットワークインタフェース、1004 記憶装置、1005 処理回路、2021 エッジ抽出部、2022 局所領域設定部、2023 類似度計算部、2024 二値化処理部、2025 位置ずれ量計算部、2026 背景エッジ抽出部、2027 エッジマスク部。 10 camera, 20 foreground extractor, 100 computer, 201 video reception / decoding unit, 202 foreground extraction unit, 203 foreground image output unit, 204 parameter storage storage, 1001 processor, 1002 memory, 1003 network interface, 1004 storage device, 1005 processing Circuit, 2021 edge extraction unit, 2022 local area setting unit, 2023 similarity calculation unit, 2024 binarization processing unit, 2025 misalignment amount calculation unit, 2026 background edge extraction unit, 2027 edge mask unit.
Claims (6)
前記前景抽出部は、
前記映像フレームからエッジを抽出するエッジ抽出部と、
抽出されたエッジを構成する画素を含む局所領域と前記背景画像の前記局所領域に対応する比較領域とを設定する局所領域設定部と、
前記局所領域設定部により設定された前記局所領域の画像と前記比較領域の画像との類似度を計算する類似度計算部と、
前記類似度計算部が計算した前記類似度に対して二値化処理を実施し、前景を抽出する二値化処理部と
を備えた前景抽出装置。 A foreground extraction unit that extracts an edge from a video frame and extracts a foreground from the video frame using the edge of the video frame and a background image shot in a state where there is no foreground object in the shooting area of the video frame. Equipped with
The foreground extraction unit
An edge extraction unit that extracts edges from the video frame,
A local area setting unit that sets a local area including pixels constituting the extracted edge and a comparison area corresponding to the local area of the background image, and a local area setting unit.
A similarity calculation unit that calculates the similarity between the image of the local region and the image of the comparison region set by the local region setting unit, and the similarity calculation unit.
With the binarization processing unit that performs binarization processing on the similarity calculated by the similarity calculation unit and extracts the foreground.
Foreground extraction device equipped with .
前記類似度計算部は、前記局所領域設定部が前記局所領域と前記比較領域とを設定すると、前記局所領域の画像と前記比較領域の画像との類似度を計算する請求項1に記載の前景抽出装置。 The local area setting unit sets the local area for the pixels constituting the edge extracted by the edge extraction unit, and then sets the comparison area in the background image.
The foreground according to claim 1 , wherein the similarity calculation unit calculates the similarity between the image of the local region and the image of the comparison region when the local region setting unit sets the local region and the comparison region. Extractor.
前記背景画像のエッジを抽出する背景エッジ抽出部と、
前記背景エッジ抽出部が抽出したエッジで前記エッジ抽出部が抽出したエッジをマスキングするエッジマスク部と
を備える請求項1から3のいずれか1項に記載の前景抽出装置。 The foreground extractor also
A background edge extraction unit that extracts edges of the background image,
The foreground extraction device according to any one of claims 1 to 3 , further comprising an edge mask unit that masks the edge extracted by the edge extraction unit with the edge extracted by the background edge extraction unit.
前景抽出部が、映像フレームからエッジを抽出し、前記映像フレームのエッジと前記映像フレームの撮影領域に前景となる物体がない状態で撮影された背景画像とを用いて、前記映像フレームから前景を抽出する前景抽出方法であって、
前記前景抽出部は、
エッジ抽出部が、前記映像フレームからエッジを抽出し、
局所領域設定部が、抽出されたエッジを構成する画素を含む局所領域と前記背景画像の前記局所領域に対応する比較領域とを設定し、
類似度計算部が、前記局所領域設定部により設定された前記局所領域の画像と前記比較領域の画像との類似度を計算し、
二値化処理部が、前記類似度計算部が計算した前記類似度に対して二値化処理を実施し、前景を抽出する前景抽出方法。 In the foreground extraction method of the foreground extraction device
The foreground extraction unit extracts an edge from the video frame, and uses the edge of the video frame and the background image shot with no object as the foreground in the shooting area of the video frame to extract the foreground from the video frame. It is a foreground extraction method to extract.
The foreground extraction unit
The edge extraction unit extracts an edge from the video frame,
The local area setting unit sets a local area including pixels constituting the extracted edge and a comparison area corresponding to the local area of the background image.
The similarity calculation unit calculates the similarity between the image of the local area set by the local area setting unit and the image of the comparison area.
A foreground extraction method in which the binarization processing unit performs binarization processing on the similarity calculated by the similarity calculation unit and extracts the foreground .
映像フレームからエッジを抽出し、前記映像フレームのエッジと前記映像フレームの撮影領域に前景となる物体がない状態で撮影された背景画像とを用いて、前記映像フレームから前景を抽出する前景抽出処理を実行させる前景抽出プログラムであって、
前記前景抽出処理は、
前記映像フレームからエッジを抽出するエッジ抽出処理と、
抽出されたエッジを構成する画素を含む局所領域と前記背景画像の前記局所領域に対応する比較領域とを設定する局所領域設定処理と、
前記局所領域設定処理により設定された前記局所領域の画像と前記比較領域の画像との類似度を計算する類似度計算処理と、
前記類似度計算処理が計算した前記類似度に対して二値化処理を実施し、前景を抽出する二値化処理と
を実行する前景抽出プログラム。 On the computer
Foreground extraction processing that extracts an edge from a video frame and extracts a foreground from the video frame using the edge of the video frame and a background image shot in a state where there is no foreground object in the shooting area of the video frame. It is a foreground extraction program that executes
The foreground extraction process
Edge extraction processing that extracts edges from the video frame and
A local area setting process for setting a local area including pixels constituting the extracted edge and a comparison area corresponding to the local area of the background image, and
The similarity calculation process for calculating the similarity between the image of the local area and the image of the comparison area set by the local area setting process, and the similarity calculation process.
A binarization process for extracting the foreground by performing a binarization process on the similarity calculated by the similarity calculation process.
Foreground extraction program to run .
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018240680A JP7042736B2 (en) | 2018-12-25 | 2018-12-25 | Foreground extraction device, foreground extraction method, and foreground extraction program |
| PCT/JP2019/037099 WO2020137038A1 (en) | 2018-12-25 | 2019-09-20 | Foreground extraction device, foreground extraction method, and foreground extraction program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2018240680A JP7042736B2 (en) | 2018-12-25 | 2018-12-25 | Foreground extraction device, foreground extraction method, and foreground extraction program |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2020102077A JP2020102077A (en) | 2020-07-02 |
| JP2020102077A5 JP2020102077A5 (en) | 2021-01-21 |
| JP7042736B2 true JP7042736B2 (en) | 2022-03-28 |
Family
ID=71126398
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2018240680A Active JP7042736B2 (en) | 2018-12-25 | 2018-12-25 | Foreground extraction device, foreground extraction method, and foreground extraction program |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP7042736B2 (en) |
| WO (1) | WO2020137038A1 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013201489A (en) | 2012-03-23 | 2013-10-03 | Fuji Xerox Co Ltd | Image processing device and image processing program |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH10320566A (en) * | 1997-05-19 | 1998-12-04 | Canon Inc | Image processing apparatus, image processing method, and storage medium storing the method |
| JP6618438B2 (en) * | 2016-08-12 | 2019-12-11 | 日本電信電話株式会社 | Foreground region extraction apparatus, method, and program |
-
2018
- 2018-12-25 JP JP2018240680A patent/JP7042736B2/en active Active
-
2019
- 2019-09-20 WO PCT/JP2019/037099 patent/WO2020137038A1/en not_active Ceased
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013201489A (en) | 2012-03-23 | 2013-10-03 | Fuji Xerox Co Ltd | Image processing device and image processing program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2020102077A (en) | 2020-07-02 |
| WO2020137038A1 (en) | 2020-07-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11423942B2 (en) | Reference and non-reference video quality evaluation | |
| CN113362246B (en) | Image banding artifact removal method, device, equipment and medium | |
| US9547890B2 (en) | Image processing apparatus and image processing method | |
| US20150117540A1 (en) | Coding apparatus, decoding apparatus, coding data, coding method, decoding method, and program | |
| US8582915B2 (en) | Image enhancement for challenging lighting conditions | |
| US20120275524A1 (en) | Systems and methods for processing shadows in compressed video images | |
| Bidokhti et al. | Detection of regional copy/move forgery in MPEG videos using optical flow | |
| US11082699B2 (en) | Codec | |
| US9167260B2 (en) | Apparatus and method for video processing | |
| US10354394B2 (en) | Dynamic adjustment of frame rate conversion settings | |
| JP5962937B2 (en) | Image processing method | |
| KR102211592B1 (en) | Electronic device for processing image and method thereof | |
| JP2008527525A (en) | Method and electronic device for detecting graphical objects | |
| US9305603B2 (en) | Method and apparatus for indexing a video stream | |
| CN107818553A (en) | Gradation of image value adjustment method and device | |
| TW201436542A (en) | System and method for improving video encoding using content information | |
| JP2019165434A (en) | Method and apparatus for generating hdr image with reduced clipped area | |
| KR101281850B1 (en) | Video descriptor generator | |
| US20150062371A1 (en) | Encoding apparatus and method | |
| Costa et al. | Hash-based frame selection for video phylogeny | |
| US10015504B2 (en) | Compressing image segmentation data using video coding | |
| JP7042736B2 (en) | Foreground extraction device, foreground extraction method, and foreground extraction program | |
| US11290740B2 (en) | Image coding apparatus, image coding method, and storage medium | |
| CN111988600A (en) | Video lens switching detection method and device and terminal equipment | |
| US9571839B2 (en) | Image compression and lossless reconstruction of digital image |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201207 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201207 |
|
| 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: 20220215 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220315 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7042736 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313115 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |