JP6800681B2 - Image processing equipment, image processing methods and computer programs - Google Patents

Image processing equipment, image processing methods and computer programs Download PDF

Info

Publication number
JP6800681B2
JP6800681B2 JP2016193548A JP2016193548A JP6800681B2 JP 6800681 B2 JP6800681 B2 JP 6800681B2 JP 2016193548 A JP2016193548 A JP 2016193548A JP 2016193548 A JP2016193548 A JP 2016193548A JP 6800681 B2 JP6800681 B2 JP 6800681B2
Authority
JP
Japan
Prior art keywords
image
distance
distance information
background
background 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
Application number
JP2016193548A
Other languages
Japanese (ja)
Other versions
JP2018054548A (en
Inventor
智一 佐藤
智一 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2016193548A priority Critical patent/JP6800681B2/en
Publication of JP2018054548A publication Critical patent/JP2018054548A/en
Application granted granted Critical
Publication of JP6800681B2 publication Critical patent/JP6800681B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Description

本発明は、距離情報を画素ごとに有する背景画像を処理する画像処理装置、画像処理方法及びコンピュータプログラムに関するものである。 The present invention relates to an image processing apparatus, an image processing method, and a computer program for processing a background image having distance information for each pixel.

近年、物体検出や前景抽出のためのマスク画像生成、距離情報の符号化、距離情報の補正など数多くの目的で背景の距離情報を表す背景距離画像が利用されている。背景画像を複数の画像から自動抽出する方法は数多く提案されているが、そのほとんどは複数のカラー画像から背景カラー画像を抽出する方法である。すなわち、距離情報の特性を活かしたものは少ない。 In recent years, background distance images representing background distance information have been used for many purposes such as mask image generation for object detection and foreground extraction, distance information coding, and distance information correction. Many methods for automatically extracting a background image from a plurality of images have been proposed, but most of them are methods for extracting a background color image from a plurality of color images. That is, there are few that utilize the characteristics of distance information.

距離情報の特性を活かすとは、つまり、距離の前後関係を背景作成に反映させるものである。例えば、特許文献1には、定点カメラを想定して、次々に入力される複数の距離画像に対して、各画素で最も遠くを表す距離値を背景画像に保持する方法が開示されている。このように、距離の前後関係を利用することで、例えば、動物体が画面内に侵入して一定時間止まるようなケースであっても、その動物体を除外して背景画像を維持することが可能となる。 Utilizing the characteristics of distance information means that the context of the distance is reflected in the background creation. For example, Patent Document 1 discloses a method of holding a distance value representing the farthest distance in each pixel in a background image for a plurality of distance images input one after another, assuming a fixed-point camera. In this way, by using the context of the distance, for example, even in the case where an animal body invades the screen and stops for a certain period of time, the animal body can be excluded and the background image can be maintained. It will be possible.

実際に、測距センサから得られる距離画像をリファレンスとして背景画像を生成する場合、距離画像に含まれるノイズが課題となることがある。特許文献1では、当該ノイズの発生を想定している。対策として、距離情報が、現時点で得られている背景画像に対して頻繁に生じる小さなノイズの範囲にある場合には、この距離情報を参照しないという方法を取っている。このようにすることで、小さなノイズによって偶発的に生じた本来よりも大きい距離情報が、背景画像に反映されることを防止することが出来る。 In fact, when a background image is generated using a distance image obtained from a distance measurement sensor as a reference, noise included in the distance image may become a problem. In Patent Document 1, it is assumed that the noise is generated. As a countermeasure, when the distance information is in the range of small noise that frequently occurs with respect to the background image obtained at the present time, this distance information is not referred to. By doing so, it is possible to prevent the distance information larger than the original accidentally generated by the small noise from being reflected in the background image.

特開2011−133320号公報Japanese Unexamined Patent Publication No. 2011-133320

特許文献1では、頻繁に生じる小さなノイズを想定して現在の背景に対してノイズの範囲にある距離情報を参照しないことで、小さなノイズの影響を抑えようとしている。しかし、この方法だけではノイズの影響を十分に抑えることはできない場合がある。例えば、初めに取得した背景までの距離が想定のノイズの範囲内で真値と異なる値であった時、その後、真値が取得されてもその値をノイズの範囲とみなして背景の更新が行われない。また、この方法では稀に発生する大きなノイズへの耐性が低い。例えば、想定したノイズ範囲を少しでも上回る距離情報が観測された場合、背景値がその値で更新されてしまう。この値がノイズによる誤った値であれば、実際とは異なる背景画像を生成してしまう。また、遠くの距離を背景画像に含ませてしまうと、手前側に値を補正することができず、安定した値を得ることが難しい構成となっている。本発明は、上記課題を鑑みてなされたものであり、距離情報を画素ごとに有する背景画像を処理する画像処理装置であって、ノイズへの耐性を高くすることを目的とする。 Patent Document 1 attempts to suppress the influence of small noise by assuming small noise that occurs frequently and not referring to distance information in the noise range with respect to the current background. However, this method alone may not be enough to suppress the influence of noise. For example, when the distance to the background acquired first is a value different from the true value within the assumed noise range, then even if the true value is acquired, that value is regarded as the noise range and the background is updated. Not done. In addition, this method has low resistance to large noise that rarely occurs. For example, if distance information that exceeds the assumed noise range is observed, the background value is updated with that value. If this value is incorrect due to noise, a background image different from the actual one will be generated. Further, if a distant distance is included in the background image, the value cannot be corrected to the front side, and it is difficult to obtain a stable value. The present invention has been made in view of the above problems, and is an image processing device that processes a background image having distance information for each pixel, and an object of the present invention is to increase resistance to noise.

本発明の画像処理装置は、上記課題を解決するため、撮影空間の背景の距離情報を画素ごとに有する背景画像を保持する保持手段と、前記撮影空間の距離画像を入力する入力手段と、前記距離画像に基づき、前記背景画像の距離情報を画素ごとに更新する更新手段と、を有し、前記更新手段は、前記背景画像の背景を示す距離の範囲を設定し、前記距離画像が示す距離情報が前記範囲よりも手前側であると判定した場合は、前記背景画像の距離情報を変更せず、前記距離画像が示す距離情報が前記範囲内であると判定した場合は、前記距離画像が示す距離情報と前記背景画像の距離情報とに基づき、前記背景画像の距離情報を更新し、前記距離画像が示す距離情報が前記範囲よりも奥側であると判定した場合は、前記背景画像の距離情報を前記距離画像が示す距離情報で置き換えることを特徴とする。 In order to solve the above problems, the image processing apparatus of the present invention includes a holding means for holding a background image having distance information of the background of the shooting space for each pixel, an input means for inputting a distance image of the shooting space, and the above. It has an updating means for updating the distance information of the background image for each pixel based on the distance image, and the updating means sets a range of the distance indicating the background of the background image, and the distance indicated by the distance image. If it is determined that the information is on the front side of the range, the distance information of the background image is not changed, and if it is determined that the distance information indicated by the distance image is within the range, the distance image is displayed. When the distance information of the background image is updated based on the indicated distance information and the distance information of the background image and it is determined that the distance information indicated by the distance image is behind the range, the background image is displayed. It is characterized in that the distance information is replaced with the distance information indicated by the distance image.

本発明によれば、距離情報を画素ごとに有する背景画像を処理する画像処理装置であって、ノイズへの耐性を高くすることが出来る。 According to the present invention, it is an image processing device that processes a background image having distance information for each pixel, and can be made highly resistant to noise.

背景距離画像をリファレンスとする距離動画符号化装置のブロック図Block diagram of a distance moving image encoder with reference to a background distance image 背景距離画像をリファレンスとする距離動画符号化手段のフローチャートFlowchart of distance moving image coding means with reference to background distance image 背景画像更新部の詳細ブロック図Detailed block diagram of the background image update section 背景画像更新手段のフローチャートFlowchart of background image update means 第1の実施形態における背景画素の処理のフローチャートFlow chart of background pixel processing in the first embodiment 第1の実施形態における背景画素の処理のフローチャートの数値処理の具体例Specific Example of Numerical Processing of Flow Chart for Background Pixel Processing in First Embodiment 第2の実施形態における背景画素の処理のフローチャートFlow chart of background pixel processing in the second embodiment 第2の実施形態における背景画素の処理のフローチャートの数値処理の具体例Specific Example of Numerical Processing of Flow Chart for Background Pixel Processing in Second Embodiment 第3の実施形態における背景画素の処理のフローチャートの数値処理の具体例Specific Example of Numerical Processing of Flow Chart for Background Pixel Processing in Third Embodiment コンピュータ内部のブロック構成図Block configuration diagram inside the computer

以下、添付図面に従って本発明に係る実施形態を詳細に説明する。なお、以下で説明する各実施形態は、本発明を具体的に実施した例を示す具体的な実施形態の1つである。 Hereinafter, embodiments according to the present invention will be described in detail with reference to the accompanying drawings. In addition, each embodiment described below is one of the specific embodiments showing an example in which the present invention is specifically implemented.

(第1の実施形態)
本実施形態では、距離動画(連続した距離画像)を取得し、時系列に従って1つずつ距離画像を予測符号化する際に、その直前に符号化/復号された1つ前の時刻の距離画像と復号済み距離画像を参照して生成された背景距離画像を参照する実施形態を述べる。なお、前記距離画像とは各画素に、撮影空間を撮影するカメラから被写体までの距離を表現する値(距離値)が格納された画像を示す。距離画像は、複数のカメラを用いて三角測量を行ったり、赤外線による距離センサなどで取得することが可能である。距離画像の距離値が表す距離の表現方法は物理量としての距離を直接表すものの他に、視差表現や距離を表す量子化テーブルを参照するためのインデックスなど様々なものがあり、本実施形態では、如何なる距離表現方法においても利用可能なものである。本実施形態においては、簡単のため距離値はmm単位の距離を表すものとする。また、前記背景画像は、動画中の静止被写体の中で、最も近くにある被写体までの距離を表す距離画像であることが望ましい。以下、本実施形態において特に断りがない場合、動画は距離動画、画像は距離画像を表すものとする。本実施形態の画像処理装置は図1のブロック101〜106によって構成される。図1は、背景距離画像をリファレンスとする距離動画符号化装置のブロック図である。以下で本実施形態を構成する要素を、図1のブロックの処理手順を示した図2のフローチャートと共に説明する。
(First Embodiment)
In the present embodiment, when a distance moving image (continuous distance image) is acquired and the distance images are predicted and encoded one by one according to a time series, the distance image at the previous time encoded / decoded immediately before that is used. An embodiment of referring to the background distance image generated by referring to the decoded distance image will be described. The distance image refers to an image in which a value (distance value) expressing the distance from the camera that shoots the shooting space to the subject is stored in each pixel. The distance image can be triangulated using a plurality of cameras, or acquired by an infrared distance sensor or the like. In addition to the method of directly expressing the distance as a physical quantity, there are various methods of expressing the distance represented by the distance value of the distance image, such as parallax expression and an index for referring to a quantization table representing the distance. It can be used in any distance expression method. In the present embodiment, the distance value represents a distance in mm for the sake of simplicity. Further, it is desirable that the background image is a distance image showing the distance to the closest subject among the still subjects in the moving image. Hereinafter, unless otherwise specified in the present embodiment, the moving image represents a distance moving image and the image represents a distance image. The image processing apparatus of this embodiment is composed of blocks 101 to 106 of FIG. FIG. 1 is a block diagram of a distance moving image coding device using a background distance image as a reference. The elements constituting the present embodiment will be described below together with the flowchart of FIG. 2 showing the processing procedure of the block of FIG.

画像入力部101は画像単位で次々に入力画像を取得し(S201)、逐次的に予測符号化部102へそれらを送る。 The image input unit 101 acquires input images one after another in image units (S201), and sequentially sends them to the prediction coding unit 102.

予測符号化部102は、復号画像記憶部105から復号済みの直前に入力された画像である復号画像を、背景画像記憶部106から背景画像を参照し、入力画像の予測符号化を行う(S202)。なお、予測符号化とは入力画像の予測画像を生成し、入力画像と予測画像の差分を符号化する方法である。これには例えば、H.264で利用される動き補償予測がある。この時、背景画像を利用することで、画面内の被写体の動きによって直前に取得した画像では隠れていた部分が入力画像で現れる場合など、直前に取得した画像には無い情報を得ることができる。これにより、予測の精度が増し、予測値と真値の差分が小さくなることで符号化効率が上昇する。予測符号化が終わると、生成した符号を復号して(S203)、復号された入力画像を復号画像記憶部105に書き込む(S204)。 The predictive coding unit 102 refers to the background image from the background image storage unit 106 for the decoded image, which is the image immediately before being decoded from the decoded image storage unit 105, and performs predictive coding of the input image (S202). ). Note that the prediction coding is a method of generating a prediction image of an input image and encoding the difference between the input image and the prediction image. This includes, for example, H. There is a motion compensation prediction used in 264. At this time, by using the background image, it is possible to obtain information that is not in the image acquired immediately before, such as when a part hidden in the image acquired immediately before appears in the input image due to the movement of the subject in the screen. .. As a result, the accuracy of the prediction is increased, and the difference between the predicted value and the true value is reduced, so that the coding efficiency is increased. When the predictive coding is completed, the generated code is decoded (S203), and the decoded input image is written in the decoded image storage unit 105 (S204).

符号出力部103は前記予測符号化部で生成された符号を、外部記憶装置に書込み若しくは通信経路に伝送する(S205)。 The code output unit 103 writes the code generated by the predictive coding unit to the external storage device or transmits it to the communication path (S205).

背景画像更新部104は復号画像記憶部から復号画像を参照して、背景画像記憶部106の背景画像を更新する(S206)。 The background image updating unit 104 updates the background image of the background image storage unit 106 with reference to the decoded image from the decoded image storage unit (S206).

次に、背景画像更新部の詳細を図3に示す。画像入力部301は図1の復号画像記憶部105の復号画像を入力する。この時、入力画像が背景画像を生成するための連続した画像群の初めの1画像であるか否かを意味する信号も入力される。本実施形態で示すような動画の予測符号化を行う場合、一定の周期で他の復号画像を参照しないイントラフレームと呼ばれる画像を挿入するのが一般的である。これは、動画の途中からの再生などを可能にするものである。前記イントラフレームの前後の画像で依存関係が生じてはならないため、背景画像を生成する際にもイントラフレームが入力される毎に背景画像の初期化が必要となる。 Next, the details of the background image updating unit are shown in FIG. The image input unit 301 inputs the decoded image of the decoded image storage unit 105 of FIG. At this time, a signal indicating whether or not the input image is the first image of the continuous image group for generating the background image is also input. When predictive coding of a moving image as shown in the present embodiment is performed, it is common to insert an image called an intraframe that does not refer to another decoded image at regular intervals. This enables playback from the middle of the moving image. Since there must be no dependency between the images before and after the intra frame, it is necessary to initialize the background image each time the intra frame is input even when the background image is generated.

入力画像が前記画像群の初めの1画像であると判定(S401)されると,背景画像初期化部302は、背景画像記憶部106の背景画像を、入力画像を用いて初期化する(S402)。 When it is determined (S401) that the input image is the first image of the image group, the background image initialization unit 302 initializes the background image of the background image storage unit 106 using the input image (S402). ).

入力画像が初めの1画像でない場合、背景画素判定部303及び背景画素更新部304により画素毎に背景画像を処理する(S403)。図4のNは画像の画素数を表し、nは画像をラスタスキャン順に参照する場合のインデックスを示す。 If the input image is not the first image, the background pixel determination unit 303 and the background pixel update unit 304 process the background image for each pixel (S403). In FIG. 4, N represents the number of pixels of the image, and n represents the index when the images are referenced in the order of raster scan.

更に、背景画素の処理S403の詳細を図5に示す。この背景画素の処理S403は背景画素判定部303及び背景画素更新部304によって実行される。距離値が入力されると、背景画素判定部303は入力距離値を背景と前景と新背景のいずれかに判定する(S501)。その判定に従い、背景画素更新部304は背景画素の更新S502を行う。新背景とは、画面内で静止することで暫定的に背景として扱われていた動体が動いたことにより、前記動体の後ろの背景が新たに現れた場合を表す。 Further, the details of the background pixel processing S403 are shown in FIG. The background pixel processing S403 is executed by the background pixel determination unit 303 and the background pixel update unit 304. When the distance value is input, the background pixel determination unit 303 determines the input distance value as one of the background, the foreground, and the new background (S501). According to the determination, the background pixel update unit 304 updates the background pixel S502. The new background represents a case where the background behind the moving object newly appears due to the movement of the moving object that was provisionally treated as the background by resting on the screen.

ここで、本実施形態の冒頭で述べたようにノイズを考慮した背景画像生成の考え方を説明する。そのためにまず、背景を正確に表す真値に対して実際に測定される値がどのような分布で発生するかを仮定する必要がある。例えば、真値を中心とするガウス分布を仮定するならば、背景と判定された画素の平均を背景画像とすればよい。また、背景の範囲は予め入力画像の分散σを取得しておき、暫定の背景値に対して±3σの範囲とすれば十分である。取得した画像を背景画像生成にそのまま利用できる場合は測距ノイズだけを考えればよい。しかし、本実施形態においては、加えて符号化によるノイズも含めて背景の範囲を定める必要があることに注意する。 Here, the concept of background image generation in consideration of noise will be described as described at the beginning of this embodiment. Therefore, it is first necessary to assume what kind of distribution the actually measured values will occur with respect to the true values that accurately represent the background. For example, if a Gaussian distribution centered on the true value is assumed, the average of the pixels determined to be the background may be used as the background image. Further, it is sufficient to acquire the variance σ 2 of the input image in advance for the background range and set the range to ± 3σ with respect to the provisional background value. If the acquired image can be used as it is for background image generation, only ranging noise needs to be considered. However, it should be noted that in the present embodiment, it is necessary to additionally define the background range including the noise due to coding.

例えば、動き補償予測によって入力された距離画像の予測画像を生成し、その差分画像をJPEG−LSと呼ばれるニアロスレス符号化(符号化による画素値の誤りがパラメータδ以下になることを保証する)の標準技術を用いて符号化する場合を考える。この時、元々距離画像が含むノイズの範囲3σにδを加えて、±(3σ+δ)をノイズの範囲に設定すればよい。このようにすることで、符号化パラメータに合わせて適切な背景画像のパラメータを調整することができる。 For example, a predicted image of the distance image input by motion compensation prediction is generated, and the difference image is near-lossless coded called JPEG-LS (guaranteeing that the error of the pixel value due to coding is equal to or less than the parameter δ). Consider the case of encoding using standard technology. At this time, δ may be added to the noise range 3σ originally included in the distance image, and ± (3σ + δ) may be set in the noise range. By doing so, it is possible to adjust appropriate background image parameters according to the coding parameters.

次に、具体的な数値処理の一例を示す。入力画像をIとし、背景画像記憶部は背景画像B、背景の更新数Cを保持するものとする。I,B,CはそれぞれN個の要素を持つベクトルである。 Next, an example of specific numerical processing is shown. It is assumed that the input image is I, and the background image storage unit holds the background image B and the number of updates C of the background. I, B, and C are vectors having N elements each.

背景画像の初期化S402は、入力画像Iで背景画像を初期化する。すなわち、C←1(全ての要素を1とする)、B←Iとする。 Initialization of background image S402 initializes the background image with the input image I. That is, C ← 1 (all elements are 1) and B ← I.

背景画像の第n画素の処理S403の具体的フローチャートを図6に示す。ただし、図6ではインデックスのnを省略して表記している。背景画素の判定では、IがBに対して±(3σ+δ)の範囲、すなわちδ=δ=3σ+δとして、
−δ≦I≦B+δ
であれば背景、この範囲よりも近ければ(手前側)前景、遠ければ(奥側)新背景と判定するS601。背景と判定されれば、背景画像の更新をS602で行う。その際の更新式は図6に示した通りである。新背景と判定されれば、S603のように背景の距離値Bを入力Iで置き換える。上記構成により、画像に含まれるノイズの分布モデルを考慮した、ロバストな背景画像を生成することができる。
FIG. 6 shows a specific flowchart of the processing S403 of the nth pixel of the background image. However, in FIG. 6, the index n is omitted. The determination of the background pixel, a range of ± (3σ + δ) I n is relative to B n, i.e. a δ 1 = δ 2 = 3σ + δ,
B n -δ 1 ≦ I n ≦ B n + δ 2
If it is, it is the background, if it is closer than this range (front side), it is the foreground, and if it is far (back side), it is the new background. If it is determined to be the background, the background image is updated in S602. The update formula at that time is as shown in FIG. If it is determined that the new background, replaced with the input I n the distance value B n of the background as S603. With the above configuration, it is possible to generate a robust background image in consideration of the noise distribution model included in the image.

尚、図1に示したブロック図の各部はハードウェアで構成しても良いが、ソフトウェア(コンピュータプログラム)として実装しても良い。この場合、このソフトウェアは、PC(パーソナルコンピュータ)等、一般のコンピュータのメモリにインストールされることになる。そしてこのコンピュータのCPUがこのインストールされたソフトウェアを実行することで、このコンピュータは、上述の画像処理装置の機能を実現することになる。即ち、このコンピュータは、上述の画像処理装置に適用することができる。第1の実施形態の画像処理装置に適用可能なコンピュータのハードウェア構成例について、図10のブロック図を用いて説明する。 Each part of the block diagram shown in FIG. 1 may be configured by hardware, but may be implemented as software (computer program). In this case, this software will be installed in the memory of a general computer such as a PC (personal computer). Then, when the CPU of this computer executes the installed software, this computer realizes the functions of the above-mentioned image processing device. That is, this computer can be applied to the above-mentioned image processing apparatus. An example of a computer hardware configuration applicable to the image processing apparatus of the first embodiment will be described with reference to the block diagram of FIG.

CPU2001は、RAM2002やROM2003に格納されているコンピュータプログラムやデータを用いて、コンピュータ全体の制御を行うと共に、画像処理装置が行うものとして説明した上述の各処理を実行する。 The CPU 2001 uses the computer programs and data stored in the RAM 2002 and the ROM 2003 to control the entire computer and execute each of the above-described processes described as those performed by the image processing apparatus.

RAM2002は、コンピュータ読み取り可能な記憶媒体の一例である。RAM2002は、外部記憶装置2007や記憶媒体ドライブ2008、更にはネットワークインタフェース2009からロードされたコンピュータプログラムやデータを一時的に記憶するためのエリアを有する。更に、RAM2002は、CPU2001が各種の処理を実行する際に用いるワークエリアを有する。即ち、RAM2002は、各種のエリアを適宜提供することができる。ROM2003は、コンピュータ読み取り可能な記憶媒体の一例であり、コンピュータの設定データや、ブートプログラムなどが格納されている。 RAM 2002 is an example of a computer-readable storage medium. The RAM 2002 has an area for temporarily storing computer programs and data loaded from the external storage device 2007, the storage medium drive 2008, and the network interface 2009. Further, the RAM 2002 has a work area used by the CPU 2001 to execute various processes. That is, the RAM 2002 can appropriately provide various areas. The ROM 2003 is an example of a computer-readable storage medium, and stores computer setting data, a boot program, and the like.

キーボード2004、マウス2005は、コンピュータの操作者が操作することで、各種の指示をCPU2001に対して入力することができる。表示装置2006は、CRTや液晶画面などにより構成されており、CPU2001による処理結果を画像や文字などでもって表示することができる。 The keyboard 2004 and the mouse 2005 can be operated by a computer operator to input various instructions to the CPU 2001. The display device 2006 is composed of a CRT, a liquid crystal screen, or the like, and can display the processing result by the CPU 2001 with images, characters, or the like.

外部記憶装置2007は、コンピュータ読み取り記憶媒体の一例であり、ハードディスクドライブ装置に代表される大容量情報記憶装置である。外部記憶装置2007には、OS(オペレーティングシステム)や、図1に示した各処理をCPU2001に実現させるためのコンピュータプログラムやデータ、上記の各種テーブル、データベース等が保存されている。外部記憶装置2007に保存されているコンピュータプログラムやデータは、CPU2001による制御に従って適宜RAM2002にロードされ、CPU2001による処理対象となる。 The external storage device 2007 is an example of a computer-reading storage medium, and is a large-capacity information storage device typified by a hard disk drive device. The external storage device 2007 stores an OS (operating system), computer programs and data for realizing each process shown in FIG. 1 in the CPU 2001, the above-mentioned various tables, a database, and the like. The computer programs and data stored in the external storage device 2007 are appropriately loaded into the RAM 2002 according to the control by the CPU 2001, and are processed by the CPU 2001.

記憶媒体ドライブ2008は、CD−ROMやDVD−ROMなどの記憶媒体に記録されているコンピュータプログラムやデータを読み出し、読み出したコンピュータプログラムやデータを外部記憶装置2007やRAM2002に出力する。なお、外部記憶装置2007に保存されているものとして説明した情報の一部若しくは全部をこの記憶媒体に記録させておき、この記憶媒体ドライブ2008に読み取らせても良い。 The storage medium drive 2008 reads out computer programs and data recorded on a storage medium such as a CD-ROM or DVD-ROM, and outputs the read computer programs and data to an external storage device 2007 or RAM 2002. It should be noted that a part or all of the information described as being stored in the external storage device 2007 may be recorded in this storage medium and read by the storage medium drive 2008.

I/F2009は、外部からカラー画像、距離画像、等を入力するインタフェースであり、一例として示すのであればUSB(Universal Serial Bus)である。2010は、上述の各部を繋ぐバスである。 The I / F 2009 is an interface for inputting a color image, a distance image, etc. from the outside, and if shown as an example, it is a USB (Universal Serial Bus). 2010 is a bus connecting the above-mentioned parts.

上述構成において、本コンピュータの電源がONになると、CPU2001はROM2003に格納されているブートプログラムに従って、外部記憶装置2007からOSをRAM2002にロードする。この結果、キーボード2004、マウス2005を介した情報入力操作が可能となり、表示装置2006にGUIを表示することが可能となる。ユーザが、キーボード2004やマウス2005を操作し、外部記憶装置2007に格納された符号化アプリケーション、復号アプリケーションの起動指示を入力すると、CPU2001はこのプログラムをRAM2002にロードし、実行する。これにより、本コンピュータが画像処理装置として機能することになる。 In the above configuration, when the power of the computer is turned on, the CPU 2001 loads the OS from the external storage device 2007 into the RAM 2002 according to the boot program stored in the ROM 2003. As a result, the information input operation can be performed via the keyboard 2004 and the mouse 2005, and the GUI can be displayed on the display device 2006. When the user operates the keyboard 2004 or the mouse 2005 and inputs the start instruction of the coding application or the decoding application stored in the external storage device 2007, the CPU 2001 loads the program into the RAM 2002 and executes it. As a result, the computer functions as an image processing device.

尚、CPU2001が実行する符号化アプリケーションプログラムは、基本的に図1の各部に相当する関数を備えることになる。同様に復号アプリケーションプログラムは、図2の各部に相当する関数を備える。ここで、画像処理結果は外部記憶装置2007に保存することになる。なお、このコンピュータは、以降の各実施形態に係る画像処理装置にも同様に適用可能であることは、以下の説明より明らかである。 The coding application program executed by the CPU 2001 basically includes functions corresponding to each part of FIG. Similarly, the decoding application program includes functions corresponding to each part of FIG. Here, the image processing result is stored in the external storage device 2007. It is clear from the following description that this computer can be similarly applied to the image processing apparatus according to each subsequent embodiment.

(第2の実施形態)
第1の実施形態では、大きなノイズによって本来の距離とは大きく異なる値が新背景と判定すべき範囲に現れた場合、この値で背景距離値が置き換わり、実態とは大きく異なる背景画像が生成される問題があった。そこで、このような問題に対処するための方法を説明する。
(Second Embodiment)
In the first embodiment, when a value significantly different from the original distance appears in the range to be determined as the new background due to a large noise, the background distance value is replaced by this value, and a background image significantly different from the actual situation is generated. There was a problem. Therefore, a method for dealing with such a problem will be described.

本実施形態の構成ブロックは第1の実施形態と同じものであるが、図4のフローチャートの背景画素の処理(S403)の詳細処理フローが異なる。図5に記されていたフローチャートが図7に置き換わる。図5と図7ではS701とS501、S702とS502が対応している。以下で本実施形態のS403の詳細処理フローを説明する。 The constituent blocks of this embodiment are the same as those of the first embodiment, but the detailed processing flow of the background pixel processing (S403) in the flowchart of FIG. 4 is different. The flowchart shown in FIG. 5 is replaced with FIG. 7. In FIGS. 5 and 7, S701 and S501 and S702 and S502 correspond to each other. The detailed processing flow of S403 of the present embodiment will be described below.

背景画素の判定S701により、新背景と判定された場合に、再度この値が、本当に新背景が現れたのか、新背景が現れていないがノイズによって現在の背景の距離値よりも大きく遠くを表す値が観測されたのかを判定する処理S703が追加されている。ここで、正常な値であると判定されれば背景画素の更新S702を行い、誤りと判定されれば更新は行わない。 When the background pixel determination S701 determines that the background is new, this value indicates whether the new background has really appeared or whether the new background has not appeared but is farther than the distance value of the current background due to noise. A process S703 for determining whether a value has been observed has been added. Here, if it is determined that the value is normal, the background pixel is updated S702, and if it is determined that the value is incorrect, the background pixel is not updated.

次に、具体的な数値処理の一例を示す。入力画像をIとし、背景画像記憶部は背景画像B、背景の更新数C、そして新背景の連続出現回数を表す新背景連続数Fを保持するものとする。FもI、Bと同様にN個の要素を持つベクトルであり、距離画像のピクセルと対応づいている。背景画像の初期化S402は、入力画像Iで背景画像を初期化する。
すなわち、C←1、B←I、F←0とする。
Next, an example of specific numerical processing is shown. It is assumed that the input image is I, and the background image storage unit holds a background image B, a background update number C, and a new background continuous number F indicating the number of consecutive appearances of the new background. Like I and B, F is also a vector having N elements, and corresponds to the pixels of the distance image. Initialization of background image S402 initializes the background image with the input image I.
That is, C ← 1, B ← I, and F ← 0.

背景画素の処理S403の具体的フローチャートを図8に示す。S801は背景画素の判定S701、S802、S803は背景画素の更新S702、S804は測定誤りの判定S703に相当する。背景画素の判定S801によりB+δ<I(新背景)と判定されると、測定誤りの判定S804を行う。測定誤りの判定では、新背景連続数Fがパラメータとして与えたω回以上となれば、YESとして背景画像の距離値を入力の距離値と置き換え、ωに満たなければNOとして更新は行わない。新背景連続数Fの更新は入力値が新背景と判定されかつ測定誤りと判定される場合は1加算し(S806)、それ以外は0にリセット(S805)して終了する。この構成でω=0とすれば、実施形態1と同じ挙動をする。 A specific flowchart of the background pixel processing S403 is shown in FIG. S801 corresponds to the background pixel determination S701, S802, and S803, and the background pixel update S702 and S804 correspond to the measurement error determination S703. If it is determined by the determination S801 of the background pixel and the B n + δ 2 <I n ( new background), determination S804 of measurement error. In the determination of measurement error, if the new background continuous number F is ω times or more given as a parameter, the distance value of the background image is replaced with the input distance value as YES, and if it is less than ω, the update is not performed as NO. The update of the new background continuous number F n ends by adding 1 (S806) when the input value is determined to be a new background and determining a measurement error, and resetting to 0 (S805) otherwise. If ω = 0 in this configuration, the behavior is the same as that in the first embodiment.

このようにすることで、ある程度の時間で連続して新背景と判定された場合のみ新背景への置き換えを実行することができ、より信頼性の高い背景画像の更新を行うことができる。 By doing so, the replacement with the new background can be executed only when the new background is continuously determined for a certain period of time, and the background image can be updated with higher reliability.

上記構成により、小さなノイズに加えて大きなノイズへのロバスト性を強化した背景画像を生成する画像処理装置を実現することができる。 With the above configuration, it is possible to realize an image processing device that generates a background image having enhanced robustness to large noise in addition to small noise.

(第3の実施形態)
第1の実施形態では、画像の生成に伴う丸め誤差の影響を無視して議論を進めた。しかし、実用的には背景を表現する背景画像は参照する距離画像と同じ形式を取ることが望ましく、これら距離画像は整数で表現されることが多いため、自ずと整数丸め誤差の影響を受けることになる。本実施形態では、背景画像生成で生じる丸め誤差とそれを低減する方法について説明する。
(Third Embodiment)
In the first embodiment, the discussion proceeded ignoring the influence of the rounding error associated with the generation of the image. However, practically, it is desirable that the background image expressing the background has the same format as the reference distance image, and since these distance images are often expressed by integers, they are naturally affected by the integer rounding error. .. In this embodiment, a rounding error caused by background image generation and a method for reducing the rounding error will be described.

第一の実施形態ではS602で、B←(C+I)/(C+1)としていたが、Bが整数であるという条件を設けるならば、四捨五入が必要である。この時切り捨て(上げ)られる値の蓄積が問題となる場合がある。そこで、背景距離情報に数ビットの丸め誤差を保存しておくためのバッファEを用意することで、この問題を低減する方法を説明する。背景画素の処理の具体的な数値処理のフローを図9に示す。 In the first embodiment, in S602, B ← (C n B n + I) / (C n +1) was set, but if the condition that B is an integer is provided, rounding is necessary. Accumulation of values that are truncated (raised) at this time may become a problem. Therefore, a method of reducing this problem will be described by preparing a buffer E for storing a rounding error of several bits in the background distance information. FIG. 9 shows a specific flow of numerical processing for processing the background pixels.

Eのビット深度をdとすると、その階調数rは2である。そして、S902は、以下のようにEに丸め誤差を保持して背景画像の更新を行う。すなわち、b←(C+I)/(C+1)+E/r、B←ROUND(b)、C←C+1、E←FLOOR(r(b−B))である。 Assuming that the bit depth of E is d , the number of gradations r is 2 d . Then, S902 updates the background image by holding a rounding error in E as follows. That, b ← (C n B n + I n) / (C n +1) + E n / r, B n ← ROUND (b), C n ← C n + 1, E n ← FLOOR (r (b-B n) ).

ただし、上式において、ROUND(X)はXを四捨五入した値、FLOOR(X)はXを超えない最大の整数を表す。上のEを計算すると、丸め誤差b−ROUND(b)は−0.5〜0.5の値を取るため、FLOOR(r(b−B))は−2d−1〜2d−1−1となりEに入力する際にオーバーフローを起こすことはない。ここで保持した丸め誤差の情報を次の更新時に反映させることで、整数化による誤差を低減することができる。この時d=0とすれば、実施形態1と同じ挙動をする。
以上で本実施形態の説明を終える。上記構成により、第1の実施形態と同様に、ノイズに対してロバストな背景画像を生成することができる。さらに、更新処理による丸め誤差を小さく抑えることができる。
However, in the above equation, ROUND (X) represents the value rounded to X, and FLOOR (X) represents the maximum integer not exceeding X. When the above E is calculated, the rounding error b-ROUND (b) takes a value of -0.5 to 0.5, so the FLOOR (r (b-B n )) is -2 d-1 to 2 d-1. It does not cause overflow when entering -1 next E n. By reflecting the rounding error information held here at the next update, the error due to integerization can be reduced. At this time, if d = 0, the behavior is the same as that of the first embodiment.
This is the end of the description of this embodiment. With the above configuration, it is possible to generate a background image robust against noise as in the first embodiment. Further, the rounding error due to the update process can be suppressed to a small value.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention is also realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiment is supplied to the system or device via a network or various storage media, and the computer (or CPU, MPU, etc.) of the system or device reads the program. This is the process to be executed.

Claims (9)

撮影空間の背景の距離情報を画素ごとに有する背景画像を保持する保持手段と、
前記撮影空間の距離画像を入力する入力手段と、
前記距離画像に基づき、前記背景画像の距離情報を画素ごとに更新する更新手段と、を有し、
前記更新手段は、前記背景画像の背景を示す距離の範囲を設定し、
前記距離画像が示す距離情報が前記範囲よりも手前側であると判定した場合は、前記背景画像の距離情報を変更せず、
前記距離画像が示す距離情報が前記範囲内であると判定した場合は、前記距離画像が示す距離情報と前記背景画像の距離情報とに基づき、前記背景画像の距離情報を更新し、
前記距離画像が示す距離情報が前記範囲よりも奥側であると判定した場合は、前記背景画像の距離情報を前記距離画像が示す距離情報で置き換えることを特徴とする画像処理装置。
A holding means for holding a background image having distance information of the background of the shooting space for each pixel,
An input means for inputting a distance image of the shooting space and
It has an updating means for updating the distance information of the background image for each pixel based on the distance image.
The updating means sets a range of distances indicating the background of the background image.
When it is determined that the distance information indicated by the distance image is on the front side of the range, the distance information of the background image is not changed.
When it is determined that the distance information indicated by the distance image is within the range, the distance information of the background image is updated based on the distance information indicated by the distance image and the distance information of the background image.
An image processing apparatus characterized in that when it is determined that the distance information indicated by the distance image is behind the range, the distance information of the background image is replaced with the distance information indicated by the distance image.
前記更新手段は、前記距離画像が示す距離情報が前記範囲よりも奥側であると判定した場合は前記距離画像が示す距離情報が測定誤りであるか否かを判定し、測定誤りであると判定された場合は、前記背景画像の距離情報を変更せず、測定誤りであると判定されなかった場合は、前記背景画像の距離情報を前記距離画像が示す距離情報で置き換えることを特徴とする請求項1に記載の画像処理装置。 When the updating means determines that the distance information indicated by the distance image is behind the range, it determines whether or not the distance information indicated by the distance image is a measurement error, and determines that the measurement error. If it is determined, the distance information of the background image is not changed, and if it is not determined that the measurement is incorrect, the distance information of the background image is replaced with the distance information indicated by the distance image. The image processing apparatus according to claim 1. 前記更新手段は、前記距離画像が示す距離情報が前記範囲よりも奥側であると連続して判定した回数に基づき、前記測定誤りであるか否かを判定することを特徴とする請求項2に記載の画像処理装置。 2. The updating means is characterized in that it determines whether or not the measurement error is based on the number of times that the distance information indicated by the distance image is continuously determined to be on the back side of the range. The image processing apparatus according to. 前記背景画像の距離情報を更新する値として得られた値を整数に丸める丸め手段と、
前記丸め手段の丸めによって生じる丸め誤差を量子化して保持する第二の保持手段と、を更に有することを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。
A rounding means for rounding the value obtained as a value for updating the distance information of the background image to an integer, and
The image processing apparatus according to any one of claims 1 to 3, further comprising a second holding means for quantizing and holding a rounding error caused by the rounding of the rounding means.
前記背景画像を予測符号化のリファレンスとして、前記距離画像を予測符号化する符号化手段を更に有することを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。 The image processing apparatus according to any one of claims 1 to 4, further comprising a coding means for predictively coding the distance image using the background image as a reference for predictive coding. 前記符号化手段は、前記距離画像を測定する際の測距ノイズの大きさと予測符号化のパラメータとに応じて、ノイズの範囲を設定することを特徴とする請求項5に記載の画像処理装置。 The image processing apparatus according to claim 5, wherein the coding means sets a noise range according to a magnitude of ranging noise when measuring the distance image and a parameter of predictive coding. .. 前記符号化手段は、前記測距ノイズの大きさと符号化パラメータとに応じて、前記ノイズの範囲を設定することを特徴とする請求項6に記載の画像処理装置。 The image processing apparatus according to claim 6, wherein the coding means sets a range of the noise according to the magnitude of the ranging noise and a coding parameter. 保持手段が、撮影空間の背景の距離情報を画素ごとに有する背景画像を保持する保持工程と、
入力手段が、前記撮影空間の距離画像を入力する入力工程と、
更新手段が、前記距離画像に基づき、前記背景画像の距離情報を画素ごとに更新する更新工程と、を有し、
前記更新工程は、前記背景画像の背景を示す距離の範囲を設定し、
前記距離画像が示す距離情報が前記範囲よりも手前側であると判定した場合は、前記背景画像の距離情報を変更せず、
前記距離画像が示す距離情報が前記範囲内であると判定した場合は、前記距離画像が示す距離情報と前記背景画像の距離情報とに基づき、前記背景画像の距離情報を更新し、
前記距離画像が示す距離情報が前記範囲よりも奥側であると判定した場合は、前記背景画像の距離情報を前記距離画像が示す距離情報で置き換えることを特徴とする画像処理方法。
The holding step is a holding step of holding a background image having distance information of the background of the shooting space for each pixel.
The input means is an input process for inputting a distance image of the shooting space, and
The updating means has an updating step of updating the distance information of the background image for each pixel based on the distance image.
In the update step, a range of distances indicating the background of the background image is set.
When it is determined that the distance information indicated by the distance image is on the front side of the range, the distance information of the background image is not changed.
When it is determined that the distance information indicated by the distance image is within the range, the distance information of the background image is updated based on the distance information indicated by the distance image and the distance information of the background image.
An image processing method characterized in that when it is determined that the distance information indicated by the distance image is on the back side of the range, the distance information of the background image is replaced with the distance information indicated by the distance image.
コンピュータを、
撮影空間の背景の距離情報を画素ごとに有する背景画像を保持する保持手段と、
前記撮影空間の距離画像を入力する入力手段と、
前記距離画像に基づき、前記背景画像の距離情報を画素ごとに更新する更新手段と、を有し、
前記更新手段は、前記背景画像の背景を示す距離の範囲を設定し、
前記距離画像が示す距離情報が前記範囲よりも手前側であると判定した場合は、前記背景画像の距離情報を変更せず、
前記距離画像が示す距離情報が前記範囲内であると判定した場合は、前記距離画像が示す距離情報と前記背景画像の距離情報とに基づき、前記背景画像の距離情報を更新し、
前記距離画像が示す距離情報が前記範囲よりも奥側であると判定した場合は、前記背景画像の距離情報を前記距離画像が示す距離情報で置き換えることを特徴とする画像処理装置として機能させるためのコンピュータプログラム。
Computer,
A holding means for holding a background image having distance information of the background of the shooting space for each pixel,
An input means for inputting a distance image of the shooting space and
It has an updating means for updating the distance information of the background image for each pixel based on the distance image.
The updating means sets a range of distances indicating the background of the background image.
When it is determined that the distance information indicated by the distance image is on the front side of the range, the distance information of the background image is not changed.
When it is determined that the distance information indicated by the distance image is within the range, the distance information of the background image is updated based on the distance information indicated by the distance image and the distance information of the background image.
When it is determined that the distance information indicated by the distance image is on the back side of the range, the image processing device functions as a feature of replacing the distance information of the background image with the distance information indicated by the distance image. Computer program.
JP2016193548A 2016-09-30 2016-09-30 Image processing equipment, image processing methods and computer programs Active JP6800681B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016193548A JP6800681B2 (en) 2016-09-30 2016-09-30 Image processing equipment, image processing methods and computer programs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016193548A JP6800681B2 (en) 2016-09-30 2016-09-30 Image processing equipment, image processing methods and computer programs

Publications (2)

Publication Number Publication Date
JP2018054548A JP2018054548A (en) 2018-04-05
JP6800681B2 true JP6800681B2 (en) 2020-12-16

Family

ID=61836456

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016193548A Active JP6800681B2 (en) 2016-09-30 2016-09-30 Image processing equipment, image processing methods and computer programs

Country Status (1)

Country Link
JP (1) JP6800681B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0771286B2 (en) * 1986-10-27 1995-07-31 松下電工株式会社 Image monitoring method
JP3941790B2 (en) * 2004-04-08 2007-07-04 石川島播磨重工業株式会社 Moving object detection apparatus and method
JP5723096B2 (en) * 2009-12-24 2015-05-27 日本信号株式会社 Distance image processing system
JP2014158118A (en) * 2013-02-15 2014-08-28 Canon Inc Imaging device
JP6054771B2 (en) * 2013-02-22 2016-12-27 Kddi株式会社 Background model construction apparatus, background model construction method, and program

Also Published As

Publication number Publication date
JP2018054548A (en) 2018-04-05

Similar Documents

Publication Publication Date Title
TWI538488B (en) Video decoding apparatus, video coding apparatus, video decoding method, video coding method, and storage medium
JP2018526881A5 (en)
US9602842B2 (en) Encoding apparatus and method of controlling the same
US20160373688A1 (en) Non-transitory computer-readable storage medium, coded data generation method and coded data generation device
WO2016189404A1 (en) Foreground motion detection in compressed video data
US20140169444A1 (en) Image sequence encoding/decoding using motion fields
JP6800681B2 (en) Image processing equipment, image processing methods and computer programs
US9729880B2 (en) Information processing apparatus, information processing method, and storage medium
JP5786988B2 (en) Moving picture decoding method, moving picture decoding apparatus, and moving picture decoding program
KR102066012B1 (en) Motion prediction method for generating interpolation frame and apparatus
JP5786989B2 (en) Moving picture coding method, moving picture coding apparatus, and moving picture coding program
AU2015272009B2 (en) Video decoding apparatus, video coding apparatus, video decoding method, video coding method, and storage medium
JP5786987B2 (en) Moving picture coding apparatus, moving picture coding method, and moving picture coding program
JP2018117239A (en) Compression apparatus of video data, and compression method of video data
JP2016076920A (en) Encoding device and control method therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190924

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201009

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: 20201027

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20201125

R151 Written notification of patent or utility model registration

Ref document number: 6800681

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151