JP2017107407A - Image processing device, control program, and foreground image specification method - Google Patents
Image processing device, control program, and foreground image specification method Download PDFInfo
- Publication number
- JP2017107407A JP2017107407A JP2015240747A JP2015240747A JP2017107407A JP 2017107407 A JP2017107407 A JP 2017107407A JP 2015240747 A JP2015240747 A JP 2015240747A JP 2015240747 A JP2015240747 A JP 2015240747A JP 2017107407 A JP2017107407 A JP 2017107407A
- Authority
- JP
- Japan
- Prior art keywords
- value
- map
- area
- pixel
- fine movement
- 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
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、画像処理技術に関する。 The present invention relates to an image processing technique.
特許文献1〜5に記載されているように、従来から様々な画像処理技術が提案されています。
As described in
特許文献1及び2等に記載されているように、入力動画像における前景画像を特定する場合には、前景画像を精度良く特定できることが望まれる。
As described in
そこで、本発明は上述の点に鑑みて成されたものであり、入力動画像における前景画像を特定する際の特定精度を向上することが可能な技術を提供することを目的とする。 Therefore, the present invention has been made in view of the above-described points, and an object thereof is to provide a technique capable of improving the specifying accuracy when specifying a foreground image in an input moving image.
画像処理装置の一態様は、入力動画像における検出対象動体の画像を前景画像として特定する画像処理装置であって、第1背景モデルに基づいて、前記入力動画像のフレーム画像に含まれる画素が、前景画素か背景画素かを暫定的に判定する第1判定処理を行う第1判定部と、前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第1の値が、当該複数の画素の位置に応じて並ぶ第1マップを更新する第1マップ更新処理を行う第1マップ更新部と、前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第2の値が、当該複数の画素の位置に応じて並ぶ第2マップを更新する第2マップ更新処理を行う第2マップ更新部と、前記フレーム画像に基づいて前記第1背景モデルを更新する第1背景モデル更新処理を行う第1背景モデル更新部と、前記入力動画像に写る撮影領域において、前記検出対象動体の微動が発生している微動発生領域を特定する第1特定処理を行う微動特定部とを備え、前記第1マップ更新部は、前記第1マップ更新処理において、前記フレーム画像に含まれる、前記第1判定処理で前記前景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第1所定値だけ増加し、前記フレーム画像に含まれる、前記第1判定処理で前記背景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第2所定値だけ減少し、前記第2マップ更新部は、前記第2マップ更新処理において、前記第1特定処理で前記微動発生領域が特定されると、前記第1マップにおける、特定された前記微動発生領域に対応する微動対応領域内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用するコピー処理を実行し、前記第2マップにおいて、前記コピー処理が実行される前記第2の値以外の前記第2の値を第3所定値だけ減少し、前記画像処理装置は、前記第1判定処理、前記第1マップ更新処理、前記第2マップ更新処理、前記第1背景モデル更新処理及び前記第1特定処理を繰り返し実行し、前記第2更新処理が行われた前記第2マップに基づいて前記前景画像を特定する前景特定部をさらに備える。 One aspect of the image processing apparatus is an image processing apparatus that identifies an image of a detection target moving object in an input moving image as a foreground image, and pixels included in a frame image of the input moving image based on a first background model. A first determination unit that performs a first determination process for tentatively determining whether the pixel is a foreground pixel or a background pixel, and a plurality of first values respectively corresponding to the plurality of pixels included in the frame image A first map update unit for performing a first map update process for updating the first map arranged according to the position of the plurality of second values respectively corresponding to the plurality of pixels included in the frame image, A second map update unit that performs a second map update process that updates a second map arranged according to the position of the pixel, and a first background model update process that updates the first background model based on the frame image A first background model update unit; and a fine movement specifying unit that performs a first specifying process for specifying a fine movement generation area in which a fine movement of the detection target moving object is generated in a shooting region that is reflected in the input moving image, The map update unit corresponds to the first map in the first map that corresponds to the pixel determined to be the foreground pixel in the first determination process included in the frame image in the first map update process. The value is increased by a first predetermined value, and the first value in the first map corresponding to the pixel determined to be the background pixel in the first determination process is included in the frame image. The second map updating unit is identified in the first map when the fine movement occurrence area is identified in the first identifying process in the second map updating process. Microtremor generation area Copy processing is performed in which the first value in the corresponding fine movement corresponding area is adopted as the second value corresponding to the first value in the second map, and the copy is performed in the second map. The second value other than the second value to be processed is decreased by a third predetermined value, and the image processing apparatus performs the first determination process, the first map update process, and the second map update. A foreground specifying unit that repeatedly executes the process, the first background model update process, and the first specifying process, and specifies the foreground image based on the second map on which the second update process has been performed;
また、画像処理置の一態様では、前記第3所定値は、前記第2所定値よりも大きい。 In one aspect of the image processing apparatus, the third predetermined value is greater than the second predetermined value.
また、画像処理置の一態様では、前記第2マップ更新部は、前記第1マップにおいて、前記撮像領域での、前記検出対象動体が存在する可能性が高い領域に対応する、互いに独立した複数の検出対象対応領域を特定し、前記第2マップ更新部は、前記微動対応領域を含む前記検出対象対応領域内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用する。 Further, in one aspect of the image processing apparatus, the second map update unit includes a plurality of independent multiples corresponding to an area where the detection target moving object is likely to exist in the imaging area in the first map. The second map update unit corresponds the first value in the detection target corresponding area including the fine movement corresponding area to the first value in the second map. This is adopted as the second value.
また、画像処理置の一態様では、前記第2マップ更新部は、前記微動対応領域を含む前記検出対象対応領域内の前記第1の値のうち、第1しきい値以上あるいは当該第1しきい値よりも大きい前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用する。 Further, in one aspect of the image processing device, the second map update unit has a first threshold value greater than or equal to the first threshold value in the detection target corresponding area including the fine movement corresponding area. The first value larger than the threshold value is adopted as the second value corresponding to the first value in the second map.
また、画像処理置の一態様では、前記第2マップ更新部は、互いに独立する複数の微動対応領域を含む前記検出対象対応領域の面積が第2しきい値以上あるいは当該第2しきい値よりも大きい場合には、当該複数の微動対応領域の外接矩形を求め、前記検出対象対応領域内の第1の値のうち、求めた当該外接矩形内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用する。 In one aspect of the image processing apparatus, the second map update unit has an area of the detection target corresponding region including a plurality of fine motion corresponding regions that are independent from each other or greater than or equal to the second threshold value. Is larger, a circumscribed rectangle of the plurality of fine movement corresponding regions is obtained, and among the first values in the detection target corresponding region, the obtained first value in the circumscribed rectangle is determined as the second map. Is adopted as the second value corresponding to the first value.
また、画像処理置の一態様では、前記第2マップ更新部は、互いに独立する複数の微動対応領域を含む前記検出対象対応領域の面積が前記第2しきい値以上あるいは当該第2しきい値よりも大きい場合には、当該検出対象対応領域に対して、互いに距離が近い複数の微動対応領域を1つの微動グループとする微動グループ分け処理を行い、前記第2マップ更新部は、前記検出対象対応領域に対する前記微動グループ分け処理で得られた各微動グループについて、当該微動グループを構成する複数の微動対応領域の外接矩形を求め、求めた各外接矩形について、当該検出対象対応領域内の第1の値のうち、当該外接矩形内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用する。 In one aspect of the image processing apparatus, the second map update unit has an area of the detection target corresponding area including a plurality of fine movement corresponding areas independent from each other or the second threshold value. Is larger than the detection target corresponding area, a fine movement grouping process is performed in which a plurality of fine movement corresponding areas that are close to each other are set as one fine movement group, and the second map update unit is configured to detect the detection target corresponding area. For each fine movement group obtained by the fine movement grouping process for the corresponding area, a circumscribed rectangle of a plurality of fine movement corresponding areas constituting the fine movement group is obtained, and the first circumscribed rectangle in the detection target corresponding area is obtained for each obtained circumscribed rectangle. Among the values, the first value in the circumscribed rectangle is adopted as the second value corresponding to the first value in the second map.
また、画像処理置の一態様では、前記微動特定部は、前記入力動画像の第1及び第2フレーム画像間の差分画像を生成し、前記差分画像における互いに独立する複数の動体領域を動体領域群として特定し、前記動体領域群に対して、互いに距離が近い複数の動体領域を1つの第1グループとする第1グループ分け処理を行い、前記微動特定部は、前記第1グループ分け処理において、動体領域が近くに存在しない孤立動体領域が前記動体領域群に存在する場合には、当該孤立動体領域を1つの前記第1グループとし、前記差分画像に対する前記第1グループ分け処理の結果得られる複数の第1グループのそれぞれについての、当該第1グループを構成する動体領域を含む第1包含領域のうち、第1及び第2条件を満たす第1包含領域を特定する第2特定処理を行い、前記第1条件は、前記第1包含領域の面積が第3しきい値以下あるいは当該第3しきい値未満であるという条件であって、
前記第2条件は、前記第1包含領域から所定距離以内に、前記第1条件を満たさない前記第1包含領域が存在しないという条件であり、前記微動特定部は、前記撮影領域のうち、前記第2特定処理で特定された前記第1包含領域に対応する対応領域を前記微動発生領域とする。
In one aspect of the image processing apparatus, the fine movement specifying unit generates a difference image between the first and second frame images of the input moving image, and a plurality of independent moving object regions in the difference image are determined as a moving object region. A first grouping process is performed in which a plurality of moving body regions that are close to each other are set as one first group for the moving body region group, and the fine movement specifying unit is configured to perform the first grouping process. When there is an isolated moving object region in the moving object region group that does not have a moving object region nearby, the isolated moving object region is set as one first group and obtained as a result of the first grouping process on the difference image. For each of the plurality of first groups, a first inclusion region that satisfies the first and second conditions is specified from among the first inclusion regions that include the moving body regions that constitute the first group. Performing a second identification processing, the first condition is a condition that the area of the first inclusion region is less than the third threshold value or less or the third threshold value,
The second condition is a condition that the first inclusion area that does not satisfy the first condition does not exist within a predetermined distance from the first inclusion area. A corresponding area corresponding to the first inclusion area specified in the second specifying process is set as the fine movement occurrence area.
また、画像処理置の一態様では、前記微動特定部は、前記第1グループ分け処理において、処理対象に対して1つの第2グループを決定するグループ決定処理を繰り返し行う第2グループ分け処理を繰り返し実行し、前記微動特定部は、最初の前記第2グループ分け処理での最初の前記グループ決定処理では、前記動体領域群を構成する複数の動体領域を前記処理対象とし、前記微動特定部は、前記グループ決定処理において、前記処理対象において、基準となる動体領域との距離が第4しきい値以下あるいは第4しきい値未満の他の動体領域が存在する場合には、当該基準となる動体領域と当該他の動体領域とを1つの前記第2グループとして決定し、前記処理対象において前記他の動体領域が存在しない場合には、前記基準となる動体領域を1つの前記第2グループとして決定し、前記微動特定部は、前記第2グループ分け処理において、2回目以降の前記グループ決定処理を行う場合には、直近の前記グループ決定処理での前記処理対象から、直近の前記グループ決定処理で決定された前記第2グループを除いた残りの部分を、新たな前記処理対象として前記グループ決定処理を実行し、前記微動特定部は、前記第2グループ分け処理において、前記第2グループが決定できなくなるまで前記グループ決定処理を繰り返し実行すると、次の前記第2グループ分け処理を実行し、前記微動特定部は、2回目以降の前記第2グループ分け処理を実行する場合には、直近の前記第2グループ分け処理で決定された各前記第2グループについての、当該第2グループを構成する動体領域を含む第2包含領域を新たな動体領域とし、当該新たな動体領域を前記処理対象として、前記第2グループ分け処理の最初の前記グループ決定処理を実行し、前記微動特定部は、前記第2グループ分け処理で決定される前記第2グループの数がその前の前記第2グループ分け処理で決定される前記第2グループの数よりも減少しなくなるまで前記第2グループ分け処理を繰り返し実行したとき、前記第1グループ分け処理を終了し、前記微動特定部は、前記第1グループ分け処理において最終的に得られた各前記第2グループについての、当該第2グループを構成する動体領域を、前記第1包含領域とする。 In one aspect of the image processing apparatus, the fine movement identifying unit repeatedly performs a second grouping process in which a group determination process for determining one second group for a processing target is repeated in the first grouping process. The fine movement identifying unit performs processing in a plurality of moving body areas constituting the moving body area group in the first group determination process in the first second grouping process, and the fine movement identifying section includes: In the group determination process, if there is another moving object region whose distance from the reference moving object region is equal to or less than the fourth threshold value or less than the fourth threshold value in the processing target, the reference moving object When the region and the other moving object region are determined as one second group and the other moving object region does not exist in the processing target, the reference moving object region Is determined as one second group, and in the second grouping process, the fine movement specifying unit performs the second and subsequent group determination processes, and the processing target in the most recent group determination process The group determination process is executed with the remaining part excluding the second group determined in the most recent group determination process as the new process target, and the fine movement specifying unit performs the second grouping process. When the group determination process is repeatedly executed until the second group cannot be determined, the next second grouping process is executed, and the fine movement specifying unit executes the second and subsequent second grouping processes. If so, for each of the second groups determined in the most recent second grouping process, the moving object area constituting the second group The second inclusion area including the new moving object area, the new moving object area as the processing target, the first group determination process of the second grouping process is executed, and the fine movement specifying unit When the second grouping process is repeatedly executed until the number of the second groups determined by the grouping process does not decrease below the number of the second groups determined by the previous second grouping process , Ending the first grouping process, the fine movement specifying unit, for each of the second group finally obtained in the first grouping process, the moving body area constituting the second group, Let it be a first inclusion region.
また、画像処理置の一態様では、前記第1背景モデルと異なる第2背景モデルに基づいて、前記入力動画像のフレーム画像に含まれる画素が、前景画素か背景画素かを暫定的に判定する第2判定処理を行う第2判定部と、前記フレーム画像に基づいて、前記第1背景モデル更新部とは異なる方法で前記第2背景モデルを更新する第2背景モデル更新部とをさらに設けられ、前記前景特定部は、前記第2マップと、前記第2判定処理の結果とに基づいて、前記前景画像を特定する。 In one aspect of the image processing apparatus, it is temporarily determined whether a pixel included in the frame image of the input moving image is a foreground pixel or a background pixel based on a second background model different from the first background model. A second determination unit that performs a second determination process; and a second background model update unit that updates the second background model based on the frame image by a method different from the first background model update unit. The foreground specifying unit specifies the foreground image based on the second map and the result of the second determination process.
また、画像処理置の一態様では、前記第1背景モデル更新部は、前記フレーム画像でのある画素において、同程度の画素値が現れる頻度に応じて、前記第1背景モデルに含まれる、当該ある画素に対応する背景情報を更新する。 Further, in one aspect of the image processing device, the first background model update unit is included in the first background model according to a frequency at which a similar pixel value appears in a certain pixel in the frame image. The background information corresponding to a certain pixel is updated.
また、画像処理置の一態様では、前記第1背景モデルは、過去の前記フレーム画像の画素値をモデル化した混合正規分布に基づく背景モデルであって、前記第1背景モデル更新部は、前記第1背景モデル更新処理において、前記フレーム画像のある画素の画素値に基づいて、当該ある画素に対応する前記混合正規分布を更新し、更新後の前記混合正規分布に含まれる複数の正規分布から、当該ある画素に対応する前記背景情報として使用する正規分布を決定する。 In one aspect of the image processing apparatus, the first background model is a background model based on a mixed normal distribution obtained by modeling pixel values of the past frame image, and the first background model update unit includes the first background model In the first background model update process, based on a pixel value of a certain pixel of the frame image, the mixed normal distribution corresponding to the certain pixel is updated, and from the plurality of normal distributions included in the mixed normal distribution after the update The normal distribution used as the background information corresponding to the certain pixel is determined.
また、画像処理置の一態様では、前記第1背景モデル更新部は、前記第2マップ更新部が前記コピー処理を実行したとき、前記フレーム画像における、前記第1マップの前記微動対応領域内の前記第1の値に対応する画素に応じた前記混合正規分布を更新する際の学習率を減少させる。 Further, in one aspect of the image processing device, the first background model update unit includes a frame image in the fine movement corresponding region of the first map when the second map update unit executes the copy process. A learning rate when updating the mixed normal distribution according to the pixel corresponding to the first value is decreased.
また、画像処理置の一態様では、前記第2背景モデル更新部は、前記フレーム画像に含まれる画素の画素値が一定期間連続して同程度の値を示す場合に、当該画素値に基づいて前記第2背景モデルを更新する。 Further, in one aspect of the image processing device, the second background model update unit, based on the pixel value when the pixel value of the pixel included in the frame image shows the same value continuously for a certain period of time The second background model is updated.
また、制御プログラムの一態様は、コンピュータに、入力動画像における検出対象動体の画像を前景画像として特定させるための制御プログラムであって、前記コンピュータに、(a)背景モデルに基づいて、前記入力動画像のフレーム画像に含まれる画素が、前景画素か背景画素かを暫定的に判定する工程と、(b)前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第1の値が、当該複数の画素の位置に応じて並ぶ第1マップを更新する工程と、(c)前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第2の値が、当該複数の画素の位置に応じて並ぶ第2マップを更新する工程と、(d)前記フレーム画像に基づいて、前記背景モデルを更新する工程と、(e)前記入力動画像に写る撮影領域において、前記検出対象動体の微動が発生している微動発生領域を特定する特定処理を行う工程とを実行させ、前記工程(b)において、(b−1)前記フレーム画像に含まれる、前記判定処理で前記前景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第1所定値だけ増加する工程と、(b−2)前記フレーム画像に含まれる、前記判定処理で前記背景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第2所定値だけ減少する工程とを実行させ、前記工程(c)において、(c−1)前記特定処理で前記微動発生領域が特定されると、前記第1マップにおける、特定された前記微動発生領域に対応する微動対応領域内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用するコピー処理を実行する工程と、(c−2)前記第2マップにおいて、前記コピー処理が実行される前記第2の値以外の前記第2の値を第3所定値だけ減少する工程とを実行させ、前記工程(a)〜(e)を繰り返し実行させ、(f)前記工程(c)で更新された前記第2マップに基づいて前記前景画像を特定する工程をさらに実行させるためのものである。 Further, one aspect of the control program is a control program for causing a computer to specify an image of a moving object to be detected in an input moving image as a foreground image, and (a) the input based on a background model Tentatively determining whether a pixel included in a frame image of a moving image is a foreground pixel or a background pixel; and (b) a plurality of first values respectively corresponding to a plurality of pixels included in the frame image, Updating the first map arranged according to the positions of the plurality of pixels, and (c) a plurality of second values respectively corresponding to the plurality of pixels included in the frame image at the positions of the plurality of pixels. A step of updating the second map arranged accordingly, (d) a step of updating the background model based on the frame image, and (e) a shooting region reflected in the input moving image, In the step (b), in the step (b-1), the determination process included in the frame image is performed. A step of increasing the first value in the first map corresponding to the pixel determined to be the foreground pixel by a first predetermined value; and (b-2) included in the frame image, A step of decreasing the first value in the first map corresponding to the pixel determined to be the background pixel by the determination process by a second predetermined value, and in the step (c), (C-1) When the fine movement occurrence area is specified by the specifying process, the first value in the fine movement corresponding area corresponding to the specified fine movement generation area in the first map is set to the second value. Corresponds to the first value in the map (C-2) In the second map, a second predetermined value other than the second value at which the copy process is executed is set to a third predetermined value. And a step of repeatedly executing the steps (a) to (e), and (f) specifying the foreground image based on the second map updated in the step (c). Is for further execution.
また、前景画像特定方法の一態様は、画像処理装置での前景画像特定方法であって、(a)背景モデルに基づいて、前記入力動画像のフレーム画像に含まれる画素が、前景画素か背景画素かを暫定的に判定する工程と、(b)前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第1の値が、当該複数の画素の位置に応じて並ぶ第1マップを更新する工程と、(c)前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第2の値が、当該複数の画素の位置に応じて並ぶ第2マップを更新する工程と、(d)前記フレーム画像に基づいて、前記背景モデルを更新する工程と、(e)前記入力動画像に写る撮影領域において、前記検出対象動体の微動が発生している微動発生領域を特定する特定処理を行う工程とを備え、前記工程(b)は、(b−1)前記フレーム画像に含まれる、前記判定処理で前記前景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第1所定値だけ増加する工程と、(b−2)前記フレーム画像に含まれる、前記判定処理で前記背景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第2所定値だけ減少する工程とを有し、前記工程(c)は、(c−1)前記特定処理で前記微動発生領域が特定されると、前記第1マップにおける、特定された前記微動発生領域に対応する微動対応領域内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用するコピー処理を実行する工程と、(c−2)前記第2マップにおいて、前記コピー処理が実行される前記第2の値以外の前記第2の値を第3所定値だけ減少する工程とを有し、前記工程(a)〜(e)は繰り返し実行され、(f)前記工程(c)で更新された前記第2マップに基づいて前記前景画像を特定する工程をさらに備える。 Further, one aspect of the foreground image specifying method is a foreground image specifying method in an image processing apparatus, wherein (a) a pixel included in a frame image of the input moving image is a foreground pixel or a background based on a background model (B) updating a first map in which a plurality of first values respectively corresponding to a plurality of pixels included in the frame image are arranged in accordance with the positions of the plurality of pixels; (C) updating a second map in which a plurality of second values respectively corresponding to a plurality of pixels included in the frame image are arranged in accordance with the positions of the plurality of pixels; A step of updating the background model based on the frame image; and (e) a specifying process for specifying a fine motion generation region in which a fine motion of the detection target moving body is generated in a photographing region reflected in the input moving image. With processes In the step (b), (b-1) the first value in the first map corresponding to the pixel determined to be the foreground pixel in the determination process, included in the frame image, A step of increasing by a first predetermined value; and (b-2) the first map in the first map corresponding to a pixel included in the frame image and determined to be the background pixel in the determination process. A step of decreasing the value by a second predetermined value, wherein the step (c) is specified in the first map when the fine movement occurrence region is specified in (c-1) the specifying process. Executing a copy process that employs the first value in the fine movement corresponding area corresponding to the fine movement generation area as the second value corresponding to the first value in the second map; (C-2) In the second map, the copy process is Reducing the second value other than the second value to be performed by a third predetermined value, the steps (a) to (e) are repeatedly executed, and (f) the step (c) The method further includes the step of specifying the foreground image based on the second map updated in step).
入力動画像における前景画像を特定する際の特定精度を向上することができる。 It is possible to improve the accuracy of specifying the foreground image in the input moving image.
<画像処理システムの構成>
図1は画像処理システム1の構成を示す図である。画像処理システム1は、画像処理を用いて、所定空間に存在する検出対象動体を検出するシステムである。画像処理システム1は、例えば、オフィス、学校等に導入される。画像処理システム1は、オフィス等の室内に存在する人を検出する。なお、検出対象動体は人以外であっても良い。
<Configuration of image processing system>
FIG. 1 is a diagram showing a configuration of the
図1に示されるように、画像処理システム1は、カメラ2及び画像処理装置3を備える。カメラ2は、例えば、室内の天井に取り付けられる。カメラ2は、例えば全方位カメラであって、室内を俯瞰撮影する。したがって、カメラ2の撮影範囲は室内となる。カメラ2は、所定のフレームレート(例えば30fps)で動画像100を撮影して出力する。カメラ2から出力される動画像100は画像処理装置3に入力される。つまり、動画像100を構成する複数枚のフレーム画像は、順次画像処理装置3に入力される。以後、動画像100を「入力動画像100」と呼ぶことがある。また、入力動画像100のフレーム画像を「入力フレーム画像101」と呼ぶことがある。
As shown in FIG. 1, the
本例では、入力動画像100は、カラー画像であるが、グレースケール画像であっても良い。また、カメラ2は、天井以外に取り付けられても良い。また、カメラ2は全方位カメラ以外であっても良い。
In this example, the
図2は入力フレーム画像101の一例を示す図である。入力フレーム画像101は魚眼画像とも呼ばれる。図2に示されるように、入力フレーム画像101に写る室内300の床320の上には、複数の机330と複数の椅子340とが配置されている。室内300には複数の人200が存在する。具体的には、室内300には、壁350の傍に立っている2人の人200a,200bと、椅子340に座っている1人の人200cが存在している。したがって、入力フレーム画像101には、3人の人200a,200b,200cが写っている。
FIG. 2 is a diagram illustrating an example of the
画像処理装置3は、入力動画像100における人200の画像を前景画像として特定することによって、カメラ2の撮影範囲内、つまり室内300に存在する人200を検出する。
The
本例では、画像処理装置3は、室内300に存在する人をすべて検出するのではなく、室内300に存在する人のうち、静止している人、言い換えれば移動していない人を検出する。つまり、画像処理装置3は、入力動画像100における、静止している人200の画像(移動していない人200の画像)を前景画像として特定する。静止している人としては、例えば、図2に示される、椅子340に座っている人200c、室内300内で立ち話をしている人、室内300内の本棚の前で本を読んでいる人などが挙げられる。
In this example, the
画像処理装置3は、例えば、一種のコンピュータであって、図1に示されるように、CPU4+(Central Processing Unit)及び記憶部5を備えている。画像処理装置3は、一種の回路構成であると言える。記憶部5は、ROM(Read Only Memory)及びRAM(Random Access Memory)等の、CPU4が読み取り可能な非一時的な記録媒体で構成されている。記憶部5には、画像処理装置3(コンピュータ)を制御するための制御プログラム6が記憶されている。CPU4が記憶部5内の制御プログラム6を実行することによって、画像処理装置3には様々な機能ブロックが形成される。
The
なお、画像処理装置3の機能の一部又は全部は、その機能の実現のためにプログラム(ソフトフェア)が不要な、論理回路等を含むハードウェア回路で実現しても良い。また記憶部5は、ROM及びRAM以外の、コンピュータが読み取り可能な非一時的な記録媒体を備えていても良い。記憶部5は、例えば、小型のハードディスクドライブ及びSSD(Solid State Drive)等を備えていても良い。
Note that some or all of the functions of the
<画像処理装置の構成>
図3は画像処理装置3の構成を示す図である。図3に示されるように、画像処理装置3は、前処理部30、判定部31、背景モデル更新部32、微動特定部33、前景特定部34、第1マップ更新部41及び第2マップ更新部42を備えている。
<Configuration of image processing apparatus>
FIG. 3 is a diagram showing the configuration of the
前処理部30は、カメラ2からの入力動画像100に対して前処理を実行し、前処理後の入力動画像100を入力動画像110として出力する。具体的には、前処理部30は、カメラ2から順次入力される入力フレーム画像101に対してグレースケール変換及びサイズ縮小処理を行い、処理後の入力フレーム画像101を入力フレーム画像111として順次出力する。したがって、前処理部30から出力される入力動画像110はグレースケール画像となる。なお、カメラ2から出力される入力動画像100の形式によっては、前処理部30は不要となる。以後、入力動画像110の入力フレーム画像111の画素「入力画素」と呼ぶことがある。
The preprocessing
判定部31は、記憶部5内の背景モデル500に基づいて、入力フレーム画像111の入力画素が前景画素か背景画素かを暫定的に判定する暫定判定処理を行う。背景モデル500は、入力動画像110に写る背景をモデル化した情報である。判定部31は、入力画素が、移動している人を示す画素であるか、静止している人を示す画素であるかを区別せずに、人を示す入力画素を前景画素として判定する。
The
背景モデル更新部32は、入力フレーム画像111と、記憶部5内の後述する出現画素値情報510とに基づいて、背景モデル500を更新する背景モデル更新処理を行う。
The background
微動特定部33は、入力動画像110に基づいて、当該入力動画像110に写る撮影領域において、検出対象動体である人の微動が発生している微動発生領域を特定する微動特定処理を行う。
Based on the
第1マップ更新部41は、判定部31での判定結果に基づいて、記憶部5内の第1マップ410を更新する第1マップ更新処理を行う。第1マップ410は、入力フレーム画像111での前景画素の特定頻度(検出頻度)の分布を示す情報である。以後、第1マップ410を「第1頻度マップ410」と呼ぶことがある。
The first
第2マップ更新部42は、微動特定部33で特定された微動発生領域と第1頻度マップ410に基づいて、記憶部5内の第2マップ420を更新する第2マップ更新処理を行う。第2マップ420は、入力フレーム画像111における、撮影範囲の微動発生領域が写る領域での前景画素の特定頻度の分布を示す情報である。以後、第2マップ420を「第2頻度マップ420」と呼ぶことがある。
The second
前景特定部34は、第2頻度マップ420に基づいて、入力フレーム画像111における静止している人の画像を、前景画像として特定する前景特定処理を行う。
Based on the
画像処理装置3は、カメラ2から入力フレーム画像101が入力されるたびに、入力された入力フレーム画像101を処理対象として、前処理、暫定判定処理、背景モデル更新処理、微動特定処理、第1マップ更新処理、第2マップ更新処理及び前景特定処理を行う。以後、前処理部30が処理対象の入力フレーム画像101に対して前処理を行うことによって得られた入力フレーム画像111を「処理対象の入力フレーム画像111」と呼ぶことがある。
Each time the
<画像処理装置の詳細動作>
次に画像処理装置3の各構成要素の詳細な動作について説明する。画像処理装置3の動作を理解し易くするために、まず、背景モデル、暫定判定処理及び背景モデル更新処理について説明する。
<Detailed operation of image processing apparatus>
Next, detailed operation of each component of the
<背景モデル>
本例では、背景モデル500は、過去のフレーム画像の画素値をモデル化した混合正規分布(MoG)に基づく背景モデルである。このような背景モデルの一例については、例えば、上述の特許文献4及び5に開示されている。本例での画素値は例えば輝度である。
<Background model>
In this example, the
図4は背景モデル500の構成を示す図である。図4に示されるように、背景モデル500では、入力フレーム画像111を構成する複数の画素のそれぞれに対して、少なくとも1つの背景情報501が対応付けられている。背景情報501は正規分布で表されている。以後、背景情報501を「背景正規分布501」と呼ぶことがある。
FIG. 4 is a diagram showing the configuration of the
一方で、記憶部5には出現画素値情報510が記憶されている。出現画素値情報510は、過去のフレーム画像において現れた画素値に関する情報である。出現画素値情報510には、図5に示されるように、入力フレーム画像111を構成する複数の画素にそれぞれ対応する複数の混合正規分布511が含まれている。
On the other hand, appearance
混合正規分布511は、それに対応する画素についての過去の画素値をモデル化したものである。混合正規分布511は、それに対応する画素についての画素値ごとの出現確率を示している。言い換えれば、混合正規分布511は、それに対応する画素についての画素値ごとの出現頻度を示している。
The mixed
混合正規分布511は、複数の正規分布512と、当該複数の正規分布512にそれぞれ設定された複数の重みwとで表される。混合正規分布511に含まれる複数の正規分布512のうちの一部が、当該混合正規分布511に対応する画素に対応する背景正規分布501として採用される。具体的には、混合正規分布511に含まれる複数の正規分布512のうち、重みwが第1しきい値よりも大きい正規分布512が、当該混合正規分布511に対応する画素に対応する背景正規分布501として採用される。
The mixed
<暫定判定処理の詳細>
判定部31は、暫定判定処理において、処理対象の入力フレーム画像111の各入力画素について、当該入力画素が前景画素か背景画素であるか否かを暫定的に判定する。判定部31は、ある入力画素が前景画素か背景画素であるか否かを暫定的に判定する場合には、背景モデル500における、当該入力画素に対応する背景正規分布501と、出現画素値情報510における、当該入力画素に対応する混合正規分布511とを使用する。以後、説明対象の入力画素を「対象入力画素」と呼ぶことがある。
<Details of provisional judgment processing>
In the provisional determination process, the
判定部31は、対象入力画素に対応する混合正規分布511に含まれる複数の正規分布512において、対象入力画素の画素値に適合する正規分布512(以後、「適合正規分布512」と呼ぶことがある)が存在するか否かを判定する。判定部31は、対象入力画素に対応する混合正規分布511に含まれる複数の正規分布512に、適合正規分布512が存在しない場合には、対象入力画素が前景画素であると判定する。
In the plurality of
一方で、判定部31は、対象入力画素に対応する混合正規分布511に含まれる複数の正規分布512に、適合正規分布512が存在する場合には、背景モデル500における、対象入力画素に対応する背景正規分布501において、当該適合正規分布512と一致する背景正規分布501が存在するか否かを判定する。判定部31は、背景モデル500における、対象入力画素に対応する背景正規分布501に、適合正規分布512と一致する背景正規分布501が存在しない場合には、対象入力画素が前景画素であると判定する。これに対して、判定部31は、背景モデル500における、対象入力画素に対応する背景正規分布501に、適合正規分布512と一致する背景正規分布501が存在する場合には、対象入力画素が背景画素であると判定する。
On the other hand, the
判定部31は、入力画素の画素値が、正規分布512の所定範囲内に存在する場合、当該正規分布512を適合正規分布512とする。ここで、正規分布の平均値及び分散値をそれぞれμ及びσで表すと、所定範囲は、例えば、正規分布512のμ±3σの範囲である。図6は、入力画素の画素値115に適合する適合正規分布512の一例を示す図である。図7は、入力画素の画素値115に適合しない正規分布512の一例を示す図である。
When the pixel value of the input pixel is within a predetermined range of the
なお、入力画素の画素値が正規分布512に適合するということは、背景モデル500における、当該入力画素に対応する、当該正規分布512と同じ背景正規分布501にも適合することを意味する。したがって、判定部31は、背景モデル500における、対象入力画素に対応する背景正規分布501に、対象入力画素の画素値に適合する背景正規分布501が存在しない場合には、対象入力画素が前景画素であると判定すると言える。また、判定部31は、背景モデル500における、対象入力画素に対応する背景正規分布501に、対象入力画素の画素値に適合する背景正規分布501が存在する場合には、対象入力画素が背景画素であると判定すると言える。
Note that that the pixel value of the input pixel matches the
<背景モデル更新処理の詳細>
背景モデル更新処理において、背景モデル更新部32は、処理対象の入力フレーム画像111のある入力画素に対する判定部31での暫定判定処理の結果に基づいて、出現画素値情報510での当該ある入力画素に対応する混合正規分布511を更新し、更新後の混合正規分布511に基づいて、背景モデル500での当該ある入力画素に対応する背景情報501(背景正規分布501)を更新する処理を行う。この処理を「画素単位背景更新処理」と呼ぶ。背景モデル更新部32は、背景モデル更新処理において、入力フレーム画像111の各画素について画素単位背景更新処理を行う。
<Details of background model update processing>
In the background model update process, the background
図8は画素単位背景更新処理を示すフローチャートである。図8を用いて画素単位背景更新処理を説明する。以後、処理対象の入力フレーム画像111の対象入力画素に対応する混合正規分布511を「対象混合正規分布511」と呼ぶ。また、対象入力画素に対応する背景情報501を「対象背景情報501」と呼ぶ。
FIG. 8 is a flowchart showing the pixel unit background update processing. The pixel unit background update process will be described with reference to FIG. Hereinafter, the mixed
図8に示されるように、ステップs1において、背景モデル更新部32は、対象入力画素に対する判定部31での暫定判定処理の結果に基づいて、対象混合正規分布511を更新する。そしてステップs2において、背景モデル更新部32は、更新後の対象混合正規分布511に基づいて対象背景情報501を更新する。ステップs1はステップs11〜ステップs14で構成されている。
As shown in FIG. 8, in step s1, the background
ステップs11において、背景モデル更新部32は、対象混合正規分布511に含まれる各正規分布512の重みwを更新する。背景モデル更新部32は、以下の式(1)に従って重みwを更新する。
In step s11, the background
式(1)中のw0、w1は、それぞれ、現在の重みw及び更新後の重みwを示している。式(1)中のMは、1あるいは0に設定される値である。対象混合正規分布511に含まれる複数の正規分布512のうち、判定部31において、対象入力画素の画素値に適合すると判定された適合正規分布512の重みwを更新する際にはM=1に設定される。一方で、対象混合正規分布511に含まれる複数の正規分布512のうち、判定部31において、対象入力画素の画素値に適合しないと判定された正規分布512の重みwを更新する際にはM=0に設定される。
In equation (1), w0 and w1 indicate the current weight w and the updated weight w, respectively. M in the formula (1) is a value set to 1 or 0. Among the plurality of
式(1)中のαは学習率であって、0<α<1である。学習率αは、重みwを現在の値を元にして更新する際に、現在の値に対して、暫定判定処理の結果をどの程度影響させるかを示している。学習率αが大きいほど、更新後の重みwは、暫定判定処理の結果の影響を大きく受ける。したがって、学習率αが小さいほど重みwは変化しにくくなる。 Α in the equation (1) is a learning rate, and 0 <α <1. The learning rate α indicates how much the result of the provisional determination process is affected to the current value when the weight w is updated based on the current value. As the learning rate α is larger, the updated weight w is more affected by the result of the provisional determination process. Therefore, the weight w is less likely to change as the learning rate α is smaller.
背景モデル更新部32は、対象混合正規分布511の複数の重みwを更新すると、更新後の複数の重みwの総和が“1”となるように各重みwを正規化する。
When the plurality of weights w of the target mixed
式(1)から理解できるように、対象混合正規分布511に含まれる複数の正規分布512のうち、対象入力画素の画素値に適合する正規分布512の重みwは大きくなり、対象入力画素の画素値に適合しない正規分布512の重みwは小さくなる。
As can be understood from Equation (1), among the plurality of
ステップs11の後、ステップs12において、背景モデル更新部32は、対象混合正規分布511に適合正規分布512が含まれていると判定すると、ステップs13において、適合正規分布512の平均値μ及び分散値σを更新する。
After step s11, when the background
背景モデル更新部32は、以下の式(2)に従って適合正規分布512の平均値μを更新する。また、背景モデル更新部32は、以下の式(3)に従って適合正規分布512の分散値σを更新する。
The background
式(2)中のμ0、μ1は、それぞれ、更新前の平均値μ及び更新後の平均値μを示している。式(3)中のσ0、σ1は、それぞれ、更新前の分散値σ及び更新後の分散値σを示している。式(2),(3)中のXは、対象入力画素の画素値を示している。 In the equation (2), μ0 and μ1 indicate an average value μ before update and an average value μ after update, respectively. In the equation (3), σ0 and σ1 indicate the variance value σ before update and the variance value σ after update, respectively. X in the expressions (2) and (3) indicates the pixel value of the target input pixel.
式(2),(3)中のβは学習率を示しており、0<β<1である。式(2)での学習率βは、平均値μを現在の値を元にして更新する際に、現在の値に対して、対象入力画素の画素値Xをどの程度影響させるかを示している。学習率βが大きいほど、更新後の平均値μは、対象入力画素の画素値Xの影響を大きく受ける。したがって、学習率βが小さいほど平均値μは変化しにくくなる。また、式(3)での学習率βは、分散値σを現在の値を元にして更新する際に、現在の値に対して、対象入力画素の画素値Xをどの程度影響させるかを示している。学習率βが大きいほど、更新後の分散値σは、対象入力画素の画素値Xの影響を大きく受ける。したがって、学習率βが小さいほど分散値σは変化しにくくなる。 In equations (2) and (3), β represents a learning rate, and 0 <β <1. The learning rate β in Expression (2) indicates how much the pixel value X of the target input pixel affects the current value when the average value μ is updated based on the current value. Yes. As the learning rate β increases, the updated average value μ is more influenced by the pixel value X of the target input pixel. Therefore, the smaller the learning rate β, the less the average value μ changes. Further, the learning rate β in Expression (3) indicates how much the pixel value X of the target input pixel affects the current value when the variance value σ is updated based on the current value. Show. As the learning rate β is larger, the updated variance value σ is more influenced by the pixel value X of the target input pixel. Therefore, the variance value σ is less likely to change as the learning rate β is smaller.
学習率α,βは例えば以下の式(4),(5)で表される。 The learning rates α and β are expressed by the following equations (4) and (5), for example.
式(4)に示されるように、学習率αは、基準値REFに対して定数Aを足し合わせた値である。また式(5)に示されるように、学習率βは、基準値REFに対して定数Bを足し合わせた値である。基準値REFは、固定値であって、学習率α,βで共通に使用される。定数Aは学習率αに固有の値である。定数Bは学習率βに固有の値である。定数Aと定数Bとは互いに異なっている。 As shown in Expression (4), the learning rate α is a value obtained by adding a constant A to the reference value REF. Further, as shown in Expression (5), the learning rate β is a value obtained by adding a constant B to the reference value REF. The reference value REF is a fixed value and is commonly used for the learning rates α and β. The constant A is a value specific to the learning rate α. The constant B is a value specific to the learning rate β. The constant A and the constant B are different from each other.
一方で、背景モデル更新部32は、ステップs12において、対象混合正規分布511に適合正規分布512が含まれていないと判定すると、ステップs13を実行する。
On the other hand, if the background
ステップs13において、背景モデル更新部32は、対象入力画素の画素値を平均値μとした正規分布を新たに作成する。そして、背景モデル更新部32は、対象混合正規分布511に含まれる複数の正規分布512のうちの1つの正規分布512を削除して、削除した正規分布512の代わりに新たに作成した正規分布を使用する。新たに作成された正規分布の重みw及び分散値σは、削除された正規分布512の重みw及び分散値σとそれぞれ一致する。背景モデル更新部32は、対象混合正規分布511に含まれる複数の正規分布512のうち、例えば、重みwが最小の正規分布512を削除する。
In step s13, the background
背景モデル更新部32がステップs13を実行すると、対象混合正規分布511の更新が完了する。つまりステップs1が終了する。また、背景モデル更新部32がステップs14を実行すると、対象混合正規分布511の更新が完了する。つまりステップs1が終了する。
When the background
背景モデル更新部32は、ステップs1の後、ステップs2において、更新後の対象混合正規分布511に基づいて対象背景情報501を更新する。具体的には、背景モデル更新部511は、更新後の対象混合正規分布511に含まれる複数の正規分布512から、背景情報501として使用する正規分布512を決定する。背景モデル更新部511は、更新後の対象混合正規分布511に含まれる複数の正規分布511のうち、例えば、重みwが第1しきい値よりも大きい正規分布512を、背景情報として501として使用することを決定する。更新後の対象混合正規分布511に含まれる複数の正規分布511において、重みwが第1しきい値よりも大きい正規分布512が複数存在する場合には、複数の正規分布512が、背景情報として501として使用されると決定される。そして、背景モデル更新部32は、現在の対象背景情報501を、決定した新たな背景情報501に置き換える。これにより、対象背景情報501が更新される。
After step s1, the background
以上の説明から理解できるように、対象入力画素において、同程度の画素値が現れる頻度が大きくなれば、対象入力画素に現れる画素値に応じた正規分布512が対象入力画素に対応する背景情報501として採用されるようになる。したがって、対象入力画素において、同程度の画素値が現れる頻度が大きくなれば、対象入力画素は判定部31において背景画素として判定されるようになる。一方で、対象入力画素において、同程度の画素値が現れる頻度が小さくなれば、その画素値に応じた背景正規分布501は削除される。したがって、対象入力画素において、同程度の画素値が現れる頻度が小さくなれば、対象入力画素は判定部31において前景画素として判定されるようになる。
As can be understood from the above description, when the frequency of appearance of the same pixel value in the target input pixel increases, the
このように、背景モデル更新部32は、対象入力画素において、同程度の画素値が現れる頻度に応じて、背景モデル500に含まれる、対象入力画素に対応する背景情報501を更新している。以後、このような背景情報の更新を「頻度型背景更新」と呼ぶ。
As described above, the background
以上のような背景モデル500及びその更新方法を使用することによって、一時的に背景が変化する場合や、急激に背景が変化する場合であっても、適切に背景モデル500を更新することが可能となる。
By using the
<画像処理装置の動作段階>
画像処理装置3の動作段階として、準備段階と実動作段階とが存在する。画像処理装置3は、準備段階において、背景モデル500の初期学習処理を行う。背景モデル500の初期学習処理では、人が存在しない室内300が写る入力動画像100に基づいて背景モデル500が繰り返し更新される。画像処理装置3では、初期学習処理が完了すると、動作段階が準備段階から実動作段階へ移行する。画像処理装置3は、実動作段階において、入力動画像100での前景画像を特定する。以後、初期学習処理で使用する、人が存在しない室内300が写る入力動画像100のフレーム画像101を特に「学習用フレーム画像101」と呼ぶ。初期学習では、カメラ2から学習用フレーム画像101が順次画像処理装置3に入力される。
<Operation Stage of Image Processing Device>
The operation stage of the
<準備段階での画像処理装置の動作>
図9は準備段階で行われる初期学習処理を示すフローチャートである。図9に示されるように、ステップs21において、画像処理装置3は、カメラ2から入力される学習用フレーム画像101を処理対象として、ステップs22において前処理、暫定判定処理及び背景モデル更新処理を行う。ステップs22での背景モデル更新処理では、前処理部30が出力する、学習用フレーム画像101に対応する入力フレーム画像111を構成する各入力画素について、上述の画素単位背景更新処理が行われる。これにより、背景モデル500が1回更新される。
<Operation of Image Processing Device in Preparation Stage>
FIG. 9 is a flowchart showing the initial learning process performed in the preparation stage. As illustrated in FIG. 9, in step s21, the
ステップs22の後、画像処理装置3は、背景モデル500を所定回数更新したか否かを判定する。画像処理装置3は、背景モデル500を所定回数更新したと判定すると初期学習処理を終了する。一方で、画像処理装置3は、背景モデル500を所定回数更新していないと判定すると、ステップs21を再度実行して、カメラ2から新たに入力される学習用フレーム画像101を新たな処理対象として、ステップs22において前処理、暫定判定処理及び背景モデル更新処理を行う。以後、画像処理装置3は同様に動作する。
After step s22, the
このように、人が存在しない室内300が写る入力動画像100に基づいて背景モデル500が繰り返し更新されることによって、記憶部5には、室内300内の背景に応じた背景モデル500が記憶される。
As described above, the
<実動作段階での画像処理装置の動作>
図10は実働動作段階での画像処理装置3の動作を示すフローチャートである。図10に示されるように、ステップs31において、画像処理装置3は、カメラ2から入力フレーム画像101が入力されると、入力された入力フレーム画像101を処理対象とする。次に、ステップs32において、前処理部30は、処理対象の入力フレーム画像101に対して前処理を行って、前処理後の処理対象の入力フレーム画像101を処理対象の入力フレーム画像111として出力する。
<Operation of Image Processing Device in Actual Operation Stage>
FIG. 10 is a flowchart showing the operation of the
次にステップs33において、判定部31は、処理対象の入力フレーム画像111に基づいて暫定判定処理を行う。
Next, in step s33, the
次にステップs34において、背景モデル更新部32は、処理対象の入力フレーム画像111に基づいて背景モデル更新処理を行う。
In step s34, the background
次にステップs35において、微動特定部33は、処理対象の入力フレーム画像111に基づいて微動特定処理を行う。
Next, in step s35, the fine
次にステップs36において、第1マップ更新部41は、判定部31での暫定判定処理の結果に基づいて、第1頻度マップ410を更新する第1マップ更新処理を行う。
Next, in step s36, the first
次にステップs37において、第2マップ更新部42は、ステップs35で特定された微動発生領域と、ステップs36で更新された第1頻度マップ410とに基づいて、第2頻度マップ420を更新する第2マップ更新処理を行う。
Next, in step s37, the second
次にステップs38において、前景特定部34は、ステップs37で更新された第2頻度マップ420に基づいて、静止している人の画像を前景画像として特定する前景特定処理を行う。
Next, in step s38, the
画像処理装置3は、カメラ2から新たな入力フレーム画像101が入力されると(ステップs31)、当該入力フレーム画像101を新たな処理対象として、ステップs32〜s38を再度実行する。画像処理装置3は、以後同様に動作して、カメラ2から入力フレーム画像101が入力されるたびに(ステップs31)、ステップs32〜s38を実行する。
When a new
<微動特定処理の詳細>
次にステップs35での微動特定処理について詳細に説明する。
<Details of microtremor identification processing>
Next, the fine movement specifying process in step s35 will be described in detail.
上述のように、本実施の形態に係る背景モデル更新処理で採用されている頻度型背景更新では、対象入力画素において、同程度の画素値が現れる頻度が大きくなれば、対象入力画素は判定部31において背景画素として判定されるようになる。撮影領域でのある場所において、人がしばらくの間静止すると、入力フレーム画像111における、その場所に対応する各画素では、同程度の画素値が現れる頻度が大きくなる。したがって、撮影領域において人がしばらくの間静止すると、判定部31は、入力フレーム画像111における当該人の画像の画素を、誤って背景画素であると判定する可能性が高くなる。
As described above, in the frequency-type background update employed in the background model update process according to the present embodiment, if the frequency at which the same pixel value appears in the target input pixel increases, the target input pixel is determined by the determination unit. At 31, the pixel is determined as a background pixel. When a person stays still for a while at a certain place in the shooting region, the frequency with which the same pixel value appears in each pixel corresponding to the place in the
一方で、椅子に座っている人などの静止している人(移動していない人)は、ほとんどの場合、完全に動きが止まっているわけではなく、微動している(小さく動いている)。例えば、椅子に座って仕事をしている人、あるいは立ち話している人は、手、頭、体あるいは脚が少し動いている。 On the other hand, a stationary person (a person who has not moved) such as a person sitting in a chair is almost always not moving completely but moving slightly (moving small). . For example, a person who is sitting on a chair and working or standing is moving a hand, head, body or leg slightly.
本実施の形態では、画像処理装置3は、撮影領域において人の微動が発生している微動発生領域を特定し、その特定結果と、判定部31での判定結果とを用いて、処理対象の入力フレーム画像111において、静止している人の画像を前景画像として特定する。これにより、前景画像をより正しく特定することが可能となる。
In the present embodiment, the
図11は微動特定処理を示すフローチャートである。図11に示されるように、ステップs351において、微動特定部33は、処理対象の入力フレーム画像111と、そのNフレーム前の入力フレーム画像111との間の差分画像600を生成する。Nは例えば“3”に設定される。微動特定部33は、各画素について、処理対象の入力フレーム画像111の画素値とNフレーム前の入力フレーム画像111の画素値との差分を求めて、それによって得られる各画素の差分値を2値化することによって差分画像600を生成する。したがって、差分画像600は2値化画像である。
FIG. 11 is a flowchart showing the fine movement specifying process. As shown in FIG. 11, in step s351, the fine
次にステップs352において、微動特定部33は、差分画像600における、互いに独立する複数の動体領域を動体領域群として特定する。ステップs352において、微動特定部33は、まず、差分画像600での、画素値が“1”の部分(高輝度領域)に対して、4連結あるいは8連結等を用いたラベリングを行う。そして、微動特定部33は、ラベリングによって得られた各独立領域(各連結領域)についての外接矩形を求める。そして、微動特定部33は、求めた各外接矩形を、1つの動体領域(動画素領域)601とする。これにより、差分画像600における、互いに独立する複数の動体領域601が動体領域群610として特定される。
Next, in step s352, the fine
図12は、差分画像600における動体領域群610の一例を示す図である。図12に示される動体領域群610は、動体領域601a〜601hで構成されている。
FIG. 12 is a diagram illustrating an example of the moving
次にステップs353において、微動特定部33は、動体領域群610に対して、互いに距離が近い複数の動体領域601を1つの第1グループ602とする第1グループ分け処理を行う。第1グループ分け処理では、動体領域群610において、近くに他の動体領域601が存在しない孤立動体領域601が含まれる場合には、孤立動体領域601だけで1つの第1グループ602が構成される。
Next, in step s353, the fine
図13は、図12に示される動体領域群610に対して第1グループ分け処理を行った結果を示す図である。図13の例では、互いに距離が近い複数の動体領域601a〜601eが1つの第1グループ602Aを構成している。また、互いに距離が近い複数の動体領域601g,601fが1つの第1グループ602Bを構成している。図13の例では、動体領域601hは孤立動体領域601であるので、動体領域601hだけで1つの第1グループ602Cが構成される。
FIG. 13 is a diagram illustrating a result of the first grouping process performed on the moving
次にステップs354において、微動特定部33は、ステップs353で得られた各第1グループ602についての、当該第1グループ602を構成する動体領域601を包含する第1包含領域603のうち、第1及び第2条件を満たす第1包含領域603を特定する。
Next, in step s354, the fine
本例では、第1グループ602を構成する複数の動体領域601の外接矩形を、当該複数の動体領域601を包含する第1包含領域603とする。また、第1グループ602が1つ動体領域601で構成されている場合には、当該1つの動体領域601がそのまま第1包含領域603となる。図14の例では、第1グループ602Aを構成する動体領域601a〜601eの外接矩形が第1包含領域603Aとなっており、第1グループ602Bを構成する動体領域601f,601gの外接矩形が第1包含領域603Bとなっている。また、第1グループ602Cを構成する動体領域601hが第1包含領域603Cとなっている。
In this example, a circumscribed rectangle of the plurality of moving
ステップs354での第1条件は、第1包含領域603の面積が小さいという条件である。具体的には、第1条件は、第1包含領域603の面積が第2しきい値以下であるという条件である。第1条件は、第1包含領域603の面積が第2しきい値未満であるという条件であっても良い。以後、第1条件を「サイズ条件」と呼ぶ。
The first condition in step s354 is a condition that the area of the
第2条件は、第1包含領域603の近傍(周辺)に、面積が大きい他の第1包含領域603が存在しないという条件である。具体的には、第2条件は、第1包含領域603から所定距離以内に、サイズ条件を満たさない第1包含領域603が存在しないという条件である。以後、第2条件を「孤立条件」と呼ぶ。
The second condition is a condition that another
図14の例では、第1包含領域603Aの面積は第2しきい値よりも大きく、第1包含領域603Aはサイズ条件を満たさない。一方で、第1包含領域603B,603Cの面積は第2しきい値以下であり、第1包含領域603B,603Cはサイズ条件を満たす。また、第1包含領域603Aの近傍には第1包含領域603Bが存在し、第1包含領域603Bの近傍には第1包含領域603Aが存在することから、第1包含領域603A,603Cのそれぞれは孤立条件を満たさない。一方で、第1包含領域603Bの近傍には他の第1包含領域603が存在しないことから、第1包含領域603Bは孤立条件を満たす。よって、第1包含領域603A〜603Cのうち、サイズ条件及び孤立条件を満たす第1包含領域603は、第1包含領域603Bとなる。以後、サイズ条件及び孤立条件を満たす第1包含領域603を「適合包含領域603」と呼ぶことがある。
In the example of FIG. 14, the area of the
ステップs354の後、ステップs355において、微動特定部33は、撮影領域のうち、ステップs354において特定された適合包含領域603に対応する対応領域を微動発生領域とする。図14の例では、撮影領域のうち、第1包含領域603cに対応する対応領域が微動発生領域となる。つまり、撮影領域において、差分画像600での第1包含領域603cの相対的な位置と同じ相対的な位置に存在する一部の領域が微動発生領域となる。ステップs354において複数の適合包含領域603が特定された場合には、撮影領域における、当該複数の適合包含領域にそれぞれ対応する複数の対応領域のそれぞれが微動発生領域となる。したがって、ステップs355では、複数の微動発生領域が特定されることがある。
After step s354, in step s355, the fine
ここで、差分画像600からは、同じ人の動きに応じた、互いに近くに存在する複数の動体領域601が得られることがある。一方で、ある人の動きに応じた動体領域601と、別の人の動きに応じた動体領域601とは、互いに離れて存在する可能性が高い。したがって、互いに距離が近い複数の動体領域601は、同じ人の動きに対応している可能性が高い。よって、互いに距離が近い複数の動体領域601を包含する1つの第1包含領域603は、1人の人の動きに応じた動体領域と見ることができる。以後、第1包含領域603を「動体領域603」と呼ぶことがある。
Here, from the
また、人が通路等を移動している場合には、当該人は大きく動くことから、当該人の動きに応じた動体領域603(第1包含領域603)の面積は大きくなる。一方で、人が微動している場合には、当該人の動きに応じた動体領域603(第1包含領域603)の面積は小さくなる。したがって、動体領域603(第1包含領域603)がサイズ条件を満たす場合、当該動体領域603は、1人の人の微動に対応している可能性が高い。
In addition, when a person is moving in a passage or the like, the person moves greatly, and thus the area of the moving object area 603 (first inclusion area 603) corresponding to the movement of the person increases. On the other hand, when a person is moving slightly, the area of the moving body region 603 (first inclusion region 603) corresponding to the movement of the person is reduced. Therefore, when the moving object region 603 (first inclusion region 603) satisfies the size condition, the moving
また、差分画像600から、同じ人の動きに応じた複数の動体領域603が得られることがある。例えば、ある人の頭に応じた動体領域603と、当該ある人の脚の動きに応じた動体領域603とが得られることがある。同じ人の動きに応じた複数の動体領域603は互いに近くに存在する。そして、ある人が移動している場合、当該ある人の動きに応じた複数の動体領域603では、面積が小さい動体領域603の近傍に面積が大きい動体領域603が存在することがある。例えば、胸に小さいバッチが付けられた、模様の無い服を着た人が通路等を移動している場合を考える。この場合、差分画像600では模様の無い服の動きは現れにくいことから、服に取り付けられたバッチの動きに応じた、面積が小さい動体領域603と、頭等の動きに応じた、面積が大きい動体領域603とが別々に得られることがある。このとき、バッチの動きに応じた、面積が小さい動体領域603の近傍に、頭等の動きに応じた、面積が大きい動体領域603が存在することになる。一方で、同じ人の微動に対応する複数の動体領域603では、各動体領域603の面積が小さくなり、面積が小さい動体領域603の近傍に面積が大きい動体領域603が存在する可能性は低い。したがって、動体領域603が孤立条件を満たす場合、当該動体領域603は、人の移動に応じた動体領域603である可能性は低く、人の微動に応じた動体領域603である可能性が高い。
In addition, a plurality of moving
以上より、本例では、動体領域603がサイズ条件及び孤立条件を満たす場合には、当該動体領域603は、1人の人の微動に応じた動体領域603であると判定し、撮影領域のうち、サイズ条件及び孤立条件を満たす動体領域603に対応する対応領域を、1人の人に対応する微動発生領域としている。撮影領域のうち、サイズ条件及び孤立条件を満たす動体領域603に対応する対応領域を微動発生領域とすることによって、微動発生領域を適切に特定することができる。なお、微動特定部33で特定された複数の微動発生領域は、複数の人にそれぞれ対応することもあれば、同じ人に対応することもある。
As described above, in this example, when the moving
<第1グループ分け処理>
上述のステップs353において、微動特定部33は、2つの動体領域601間の距離を、2つの動体領域601の全ての組み合わせてについて求め、求めた全組み合わせに係る距離を用いて、第1グループ分け処理を行うことが可能である。つまり、微動特定部33は、求めた全組み合わせに係る距離を用いて、互いの距離が所定値以下となる複数の動体領域601を特定し、特定した複数の動体領域601を、互いに距離が近い複数の動体領域601として、特定した複数の動体領域601を1つの第1グループ602として決定することが可能である。
<First grouping process>
In step s353 described above, the fine
しかしながら、2つの動体領域601間の距離を、2つの動体領域601の全ての組み合わせてについて求める処理は負荷が大きい。
However, the processing for obtaining the distance between the two moving
そこで、以下に、2つの動体領域601間の距離を求める回数を低減することが可能な第1グループ分け処理を行う方法について説明する。
Therefore, a method for performing the first grouping process that can reduce the number of times of obtaining the distance between the two moving
図15は第1グループ分け処理の一例の概要を示す図である。図15に示されるように、微動特定部33は、第1グループ分け処理において、処理対象に対して1つ第2グループを決定するグループ決定処理を繰り返し行う第2グループ分け処理を繰り返し実行する。
FIG. 15 is a diagram showing an outline of an example of the first grouping process. As shown in FIG. 15, in the first grouping process, the fine
図16はグループ決定処理を示すフローチャートである。微動特定部33は、第2グループ分け処理において、処理対象に対するグループ決定処理を、当該処理対象を変えながら繰り返し行う。
FIG. 16 is a flowchart showing the group determination process. In the second grouping process, the fine
図16に示されるように、ステップs451において、微動特定部33は、処理対象の動体領域601から、基準となる動体領域601(以後、「基準動体領域601」と呼ぶ)を決定する。処理対象の動体領域601のうちの任意の動体領域601が基準動体領域601とされて良い。
As shown in FIG. 16, in step s 451, the fine
ここで、微動特定部33は、最初の第2グループ分け処理において、最初のグループ決定処理を行う場合には、動体領域群610を構成する複数の動体領域601のすべてを処理対象とする。
Here, when performing the first group determination process in the first second grouping process, the fine
次にステップs452において、微動特定部33は、処理対象の動体領域601において、基準動体領域601との距離が第3しきい値以下の他の動体領域601が存在するか否かを判定する。つまり、微動特定部33は、処理対象において、基準動体領域601から近い位置の他の動体領域601が存在するか否かを判定する。
Next, in step s452, the fine
微動特定部33は、処理対象において、基準動体領域601との距離が第3しきい値以下の他の動体領域601が存在すると判定すると、ステップs453において、当該基準動体領域601と当該他の動体領域601とを1つの第2グループ620として決定する。一方で、微動特定部33は、処理対象において、基準動体領域601との距離が第3しきい値以下の他の動体領域601が存在しないと判定すると、ステップs454において、当該基準動体領域601だけを1つの第2グループ620として決定する。処理対象が1つの動体領域601だけ構成される場合には、処理対象において、基準動体領域601との距離が第3しきい値以下の他の動体領域601が存在しないことになる。
If the fine
なお、微動特定部33は、ステップs452において、処理対象において、基準動体領域601との距離が第3しきい値未満の他の動体領域601が存在するか否かを判定しても良い。この場合、微動特定部33は、処理対象において、基準動体領域601との距離が第3しきい値未満の他の動体領域601が存在する場合には、当該基準動体領域601と当該他の動体領域601とを1つの第2グループ620として決定する。また、微動特定部33は、処理対象において、基準動体領域601との距離が第3しきい値未満の他の動体領域601が存在しない場合には、当該基準動体領域601だけを1つの第2グループ620として決定する。
In step s452, the fine
微動特定部33は、第2グループ分け処理において、2回目以降のグループ決定処理を行う場合には、直近のグループ決定処理での処理対象から、直近のグループ決定処理で決定された第2グループを除いた残りの部分を、新たな処理対象としてグループ決定処理を行う。
In the second grouping process, when the second grouping process is performed, the fine
微動特定部33は、第2グループ分け処理において、第2グループが決定できなくなるまでグループ決定処理を繰り返し実行すると、次の第2グループ分け処理を実行する。具体的には、微動特定部33は、第2グループ分け処理において、処理対象から、直近のグループ決定処理で決定された第2グループを除いた結果、動体領域601が1つも残らずに、次の処理対象を決定できないとき、次の第2グループ分け処理を実行する。
When the group determination process is repeatedly executed until the second group cannot be determined in the second grouping process, the fine
以下に、図14に示される動体領域群610を用いて、最初の第2グループ分け処理の具体例について説明する。微動特定部33は、最初の第2グループ分け処理での最初のグループ決定処理では、動体領域群610を構成する複数の動体領域601a〜601hを処理対象とする。微動特定部33は、処理対象である動体領域601a〜601hから基準動体領域601を決定する(ステップs451)。微動特定部33は、例えば、動体領域601aを基準動体領域601とする。
A specific example of the first second grouping process will be described below using the moving
次に、微動特定部33は、動体領域601a〜601hにおいて、基準動体領域601である動体領域601aとの距離が第3しきい値以下の他の動体領域601が存在するか否かを判定する(ステップs452)。このとき、微動特定部33は、図17に示されるように、動体領域601aと、動体領域601b〜601hのそれぞれとの間の距離を求める。そして、微動特定部33は、求めた各距離が第3しきい値以下であるか否かを判定する。これにより、動体領域601a〜601hにおいて、動体領域601aとの距離が第3しきい値以下の他の動体領域601が存在するか否か判定される。図17の例では、動体領域601aとの距離が第3しきい値以下の動体領域601は、動体領域601b,601cとなる。微動特定部33は、図18に示されるように、動体領域601a〜601cを1つの第2グループ620A1として決定する(ステップs453)。これにより、最初のグループ決定処理が終了する。
Next, the fine
次に、微動特定部33は、現在の処理対象である動体領域601a〜601hから、直近のグループ決定処理で決定された第2グループ620A1を除いた残りの部分、つまり動体領域601d〜601hを、新たな処理対象として2回目のグループ決定処理を行う。
Next, the fine
微動特定部33は、2回目のグループ決定処理において、処理対象である動体領域601d〜601hから基準動体領域601を決定する(ステップs451)。微動特定部33は、例えば、動体領域601dを基準動体領域601とする。
The fine
次に、微動特定部33は、動体領域601d〜601hにおいて、動体領域601dとの距離が第3しきい値以下の他の動体領域601が存在するか否かを判定する(ステップs452)。このとき、微動特定部33は、図19に示されるように、動体領域601dと、動体領域601e〜601hのそれぞれとの間の距離を求める。そして、微動特定部33は、求めた各距離が第3しきい値以下であるか否かを判定する。これにより、動体領域601e〜601hにおいて、動体領域601eとの距離が第3しきい値以下の他の動体領域601が存在するか否か判定される。図19の例では、動体領域601dとの距離が第3しきい値以下の動体領域601は、動体領域601eとなる。微動特定部33は、図20に示されるように、動体領域601d,601eを1つの第2グループ620B1として決定する(ステップs453)。これにより、2回目のグループ決定処理が終了する。
Next, the fine
次に、微動特定部33は、現在の処理対象である動体領域601d〜601hから、直近のグループ決定処理で決定された第2グループ620B1を除いた残りの部分、つまり動体領域601f〜601hを、新たな処理対象として3回目のグループ決定処理を行う。
Next, the fine
微動特定部33は、3回目のグループ決定処理において、処理対象である動体領域601f〜601hから基準動体領域601を決定する(ステップs451)。微動特定部33は、例えば、動体領域601hを基準動体領域601とする。
The fine
次に、微動特定部33は、動体領域601f〜601hにおいて、動体領域601fとの距離が第3しきい値以下の他の動体領域601が存在するか否かを判定する(ステップs452)。このとき、微動特定部33は、図21に示されるように、動体領域601hと、動体領域601f,601gのそれぞれとの間の距離を求める。そして、微動特定部33は、求めた各距離が第3しきい値以下であるか否かを判定する。これにより、動体領域601f,601gにおいて、動体領域601hとの距離が第3しきい値以下の動体領域601が存在するか否か判定される。図21の例では、動体領域601f,601gにおいて、動体領域601hとの距離が第3しきい値以下の動体領域601は存在しない。したがって、微動特定部33は、図22に示されるように、基準動体領域601である動体領域601hを1つの第2グループ620C1として決定する(ステップs454)。これにより、3回目のグループ決定処理が終了する。
Next, the fine
次に、微動特定部33は、現在の処理対象である動体領域601f〜601hから、直近のグループ決定処理で決定された第2グループ620C1を除いた残りの部分、つまり動体領域601f,601gを、新たな処理対象として4回目のグループ決定処理を行う。
Next, the fine
微動特定部33は、4回目のグループ決定処理において、処理対象である動体領域601f,601gから基準動体領域601を決定する(ステップs451)。微動特定部33は、例えば、動体領域601fを基準動体領域601とする。
The fine
次に、微動特定部33は、動体領域601gが、動体領域601fからの距離が第3しきい値以下の動体領域601であるか否かを判定する(ステップs452)。このとき、微動特定部33は、図23に示されるように、動体領域601fと動体領域601gの間の距離を求める。そして、微動特定部33は、求めた距離が第3しきい値以下の場合、動体領域601gが、動体領域601fとの距離が第3しきい値以下である動体領域601であると判定する。一方で、微動特定部33は、求めた距離が第3しきい値未満の場合、動体領域601gは、動体領域601fからの距離が第3しきい値以下の動体領域601ではないと判定する。図23の例では、動体領域601gは、動体領域601hとの距離が第3しきい値以下の動体領域601となる。微動特定部33は、図24に示されるように、動体領域601f,601gを1つの第2グループ620D1として決定する(ステップs454)。これにより、4回目のグループ決定処理が終了する。
Next, the fine
次に、微動特定部33は、現在の処理対象である動体領域601f,601gから、直近のグループ決定処理で決定された第2グループ620D1を除いた結果、動体領域601が1つも残らないため、第2グループ620が決定できず、最初の第2グループ分け処理を終了して、次の第2グループ分け処理を実行する。
Next, as a result of excluding the second group 620D1 determined in the most recent group determination process from the moving
微動特定部33は、2回目以降の第2グループ分け処理を実行する場合には、直近の第2グループ分け処理で決定された各第2グループ620についての、当該第2グループ620を構成する動体領域601を含む第2包含領域630を新たな動体領域601とする。そして、微動特定部33は、決定した新たな動体領域601を処理対象として、第2グループ分け処理の最初のグループ決定処理を実行する。
When executing the second grouping process for the second and subsequent times, the fine
上述の図17〜図24に示される最初の第2グループ分け処理では、第2グループ620A1〜620D1が決定されている。したがって、微動特定部33は、第2グループ620A1〜620D1のそれぞれについての、当該第2グループ620を構成する動体領域601を含む第2包含領域630を新たな動体領域601とする。具合的には、図25に示されるように、第2グループ620A1を構成する動体領域601a〜601xを含む第2包含領域630A1が新たな動体領域601A1とされる。また、第2グループ620B1を構成する動体領域601d,601eを含む第2包含領域630B1が新たな動体領域601B1とされる。また、第2グループ620C1を構成する動体領域601hを含む第2包含領域630C1が新たな動体領域601C1とされる。そして、第2グループ620D1を構成する動体領域601f,601gを含む第2包含領域630D1が新たな動体領域601D1とされる。本例では、第2グループ620A1,620B1,620D1のように、複数の動体領域601で構成される第2グループ620については、当該複数の動体領域601の外接矩形を第2包含領域630とする。また、第2グループ620C1のように、1つの動体領域601で構成されている第2グループ620については、当該1つの動体領域601をそのまま第2包含領域630とする。微動特定部33は、新たな動体領域601A1,601B1,601C1,601D1を処理対象として、2回目の第2グループ分け処理の最初のグループ決定処理を行う。
In the first second grouping process shown in FIGS. 17 to 24 described above, the second groups 620A1 to 620D1 are determined. Therefore, the fine
微動特定部33は、第2グループ分け処理で決定される第2グループ620の数がその前の第2グループ分け処理で決定される第2グループ620の数よりも減少しなくなるまで第2グループ分け処理620を繰り返し実行したとき、第1グループ分け処理を終了する。言い換えれば、微動特定部33は、第2グループ分け処理で、複数の動体領域601で構成される第2グループ620が決定できなくなるまで第2グループ分け処理を繰り返し実行したとき、第1グループ分け処理を終了する。
The fine
上述の図25に示される例では、2回目の第2グループ分け処理の最初のグループ決定処理での処理対象は動体領域601A1,601B1,601C1,601D1となる。微動特定部33は、2回目の第2グループ分け処理の最初のグループ決定処理において、例えば、動体領域601A1,601B1,601C1,601D1のうちの動体領域601A1を基準動体領域601とする。
In the example shown in FIG. 25 described above, the processing objects in the first group determination process of the second grouping process for the second time are moving object areas 601A1, 601B1, 601C1, and 601D1. In the first group determination process of the second grouping process for the second time, the fine
次に、微動特定部33は、動体領域601A1,601B1,601C1,601D1において、動体領域601A1との距離が第3しきい値以下の他の動体領域601が存在するか否かを判定する(ステップs452)。このとき、微動特定部33は、図26に示されるように、動体領域601A1と、動体領域601B1,601C1,601D1のそれぞれとの間の距離を求める。そして、微動特定部33は、求めた各距離が第3しきい値以下であるか否かを判定する。図26の例では、動体領域601A1との距離が第3しきい値以下の動体領域601は、動体領域601B1となる。微動特定部33は、図27に示されるように、動体領域601A1,601B1を1つの第2グループ620A2として決定する(ステップs453)。これにより、最初のグループ決定処理が終了する。
Next, the fine
次に、微動特定部33は、現在の処理対象である動体領域601A1,601B1,601C1,601D1から、直近のグループ決定処理で決定された第2グループ620A2を除いた残りの部分、つまり動体領域601C1,601D1を、新たな処理対象として2回目のグループ決定処理を行う。
Next, the fine
微動特定部33は、2回目のグループ決定処理において、例えば、動体領域601C1,601D1のうち、動体領域601C1を基準動体領域601とする。次に、微動特定部33は、動体領域601C1,601D1において、動体領域601C1との距離が第3しきい値以下の他の動体領域601が存在するか否かを判定する(ステップs452)。このとき、微動特定部33は、図28に示されるように、動体領域601C1と動体領域601D1との間の距離を求める。そして、微動特定部33は、求めた距離が第3しきい値以下であるか否かを判定する。図28の例では、動体領域601C1,601D1において、動体領域601C1との距離が第3しきい以下の他の動体領域601は存在しない。したがって、微動特定部33は、図29に示されるように、基準動体領域601である動体領域601C1を1つの第2グループ620B2として決定する(ステップs454)。これにより、2回目のグループ決定処理が終了する。
In the second group determination process, for example, the fine
次に、微動特定部33は、現在の処理対象である動体領域601C1,601D1から、直近のグループ決定処理で決定された第2グループ620B2を除いた残りの部分、つまり動体領域601D1を、新たな処理対象として3回目のグループ決定処理を行う。そして、微動特定部33は、動体領域601D1を基準動体領域601とする。3回目のグループ決定処理では、処理対象が1つの動体領域601D1で構成されていることから、処理対象において、基準動体領域601との距離が第3しきい値以下の他の動体領域601は存在しない。したがって、微動特定部33は、図30に示されるように、基準動体領域601である動体領域601D1を1つの第2グループ620C2として決定する(ステップs454)。これにより、3回目のグループ決定処理が終了する。
Next, the fine
次に、微動特定部33は、現在の処理対象である動体領域601D1から、直近のグループ決定処理で決定された第2グループ620C2を除いた結果、動体領域601が1つも残らないため、第2グループ620が決定できず、2回目の第2グループ分け処理を終了して、3回目の第2グループ分け処理を実行する。
Next, as a result of excluding the second group 620C2 determined by the most recent group determination process from the moving object region 601D1 that is the current processing target, the fine
微動特定部33は、3回目の第2グループ分け処理を実行する場合、直近の2回目の第2グループ分け処理で決定された第2グループ620A2,620B2,620C2のそれぞれついての、当該第2グループ620を構成する動体領域601を含む第2包含領域630を新たな動体領域601とする。図31に示されるように、第2グループ620A2を構成する動体領域601A1,601Bを包含する包含領域630A2が新たな動体領域601A2となり、第2グループ620B2を構成する動体領域601C1を包含する包含領域630B2が新たな動体領域601B2となり、第2グループ620C2を構成する動体領域601D1を包含する包含領域630C2が新たな動体領域601C2となる。微動特定部33は、決定した新たな動体領域601A2,601B2,601C2を処理対象として、3回目の第2グループ分け処理の最初のグループ決定処理を実行する。
When performing the second grouping process for the third time, the fine
微動特定部33は、3回目の第2グループ分け処理の最初のグループ決定処理において、例えば、処理対象の動体領域601A2,601B2,601C2のうちの動体領域601A2を基準動体領域601とする。次に、微動特定部33は、動体領域601A2,601B2,601C2において、動体領域601A2との距離が第3しきい値以下の他の動体領域601が存在するか否かを判定する(ステップs452)。このとき、微動特定部33は、図32に示されるように、動体領域601A2と、動体領域601B2,601C2のそれぞれとの間の距離を求める。そして、微動特定部33は、求めた各距離が第3しきい値以下であるか否かを判定する。図32の例では、動体領域601A2,601B2,601C2において、動体領域601A2との距離が第3しきい以下の動体領域601は存在しない。したがって、微動特定部33は、図33に示されるように、基準動体領域601である動体領域601A2を1つの第2グループ620A3として決定する(ステップs454)。これにより、最初のグループ決定処理が終了する。
In the first group determination process of the second grouping process for the third time, the fine
次に、微動特定部33は、現在の処理対象である動体領域601A2,601B2,601C2から、直近のグループ決定処理で決定された第2グループ620A3を除いた残りの部分、つまり動体領域601B2,601C2を、新たな処理対象として2回目のグループ決定処理を行う。2回目のグループ決定処理において、例えば、処理対象の動体領域601B2,601C2のうちの動体領域601B2を基準動体領域601とする。次に、微動特定部33は、動体領域601B2,601C2において、動体領域601B2との距離が第3しきい値以下の他の動体領域601が存在するか否かを判定する(ステップs452)。図32の例では、動体領域601B2,601C2において、動体領域601B2との距離が第3しきい以下の動体領域601は存在しない。したがって、微動特定部33は、基準動体領域601である動体領域601B2を1つの第2グループ620B3として決定する。これにより、2回目のグループ決定処理が終了する。
Next, the fine
次に、微動特定部33は、現在の処理対象である動体領域601B2,601C2から、直近のグループ決定処理で決定された第2グループ620B3を除いた残りの部分、つまり動体領域601C2を、新たな処理対象として3回目のグループ決定処理を行う。そして、微動特定部33は、動体領域601C2を基準動体領域601とする。3回目のグループ決定処理では、処理対象が1つの動体領域601C2で構成されていることから、処理対象において、基準動体領域601との距離が第3しきい値以下の他の動体領域601は存在しない。したがって、微動特定部33は、基準動体領域601である動体領域601C2を1つの第2グループ620C3として決定する(ステップs454)。これにより、3回目のグループ決定処理が終了する。
Next, the fine
図34に示されるように、3回目の第2グループ分け処理では、第2グループ620A3,620B3,620C3が決定される。 As shown in FIG. 34, in the second second grouping process, second groups 620A3, 620B3, and 620C3 are determined.
3回目の第2グループ分け決定処理で決定された第2グループ620の数は、2回目の第2グループ分け処理で決定された第2グループ620の数よりも減少していない。言い換えれば、3回目の第2グループ分け処理で決定された第2グループ620A3,620B3,620C3のそれぞれは、1つの動体領域601で構成されており、3回目の第2グループ分け決定処理では、複数の動体領域601を構成する第2グループ620は決定されていない。したがって、微動特定部33は、第2グループ分け処理で決定される第2グループ620の数がその前の第2グループ分け処理で決定される第2グループ620の数よりも減少しなくなるまで第2グループ分け処理620を繰り返し実行したことになり、第1グループ分け処理を終了する。言い換えれば、微動特定部33は、複数の動体領域601で構成される第2グループ620が決定できなくなるまで第2グループ分け処理を繰り返し実行したことになり、第1グループ分け処理を終了する。
The number of
以上のような第1グループ分け処理では、最終的に得られた第2グループ620を構成する動体領域601の元になる、動体領域群610での動体領域601によって、上述の第1グループ602が構成される。図34の例では、第2グループ620A3を構成する動体領域601A2の元になる、動体領域群610での動体領域601a〜601eで第1グループ602A(図14参照)が構成される。また、第2グループ620B3を構成する動体領域601B2の元になる、動体領域群610での動体領域601hで第1グループ602C(図14参照)が構成される。そして、第2グループ620C3を構成する動体領域601C2の元になる、動体領域群610での動体領域601f,601gで第1グループ602B(図14参照)が構成される。
In the first grouping process as described above, the
微動特定部33は、第1グループ分け処理での最後の第2グループ分け処理で決定された各第2グループ620についての、当該第2グループ620を構成する動体領域を、上述の第1包含領域603とする。図34の例では、第2グループ620A3を構成する動体領域601A2が第1包含領域603A(図14参照)となる。また、第2グループ620B3を構成する動体領域601B2が第1包含領域603C(図14参照)。そして、第2グループ620C3を構成する動体領域601C2が第1包含領域603B(図14参照)となる。
The fine
以上ようにして、第1グループ分け処理において、グループ決定処理を繰り返し行う第2グループ分け処理を繰り返し実行することによって、動体領域間の距離を求める回数を低減することができる。よって、第1グループ分け処理が簡素化される。 As described above, in the first grouping process, by repeatedly executing the second grouping process in which the group determination process is repeatedly performed, the number of times of obtaining the distance between the moving object regions can be reduced. Therefore, the first grouping process is simplified.
<第1マップ更新処理の詳細>
次にステップs36での第1マップ更新処理について詳細に説明する。
<Details of the first map update process>
Next, the first map update process in step s36 will be described in detail.
図35は第1頻度マップ410を示す図である。第1頻度マップ410では、入力フレーム画像111に含まれる複数の入力画素にそれぞれ対応する複数の第1頻度値411が、当該複数の入力画素の位置に応じて並んでいる。第1頻度マップ410での第1頻度値411の相対的な位置は、入力フレーム画像111での、当該第1頻度値411に対応する入力画素の相対的な位置と一致している。
FIG. 35 shows the
ステップs36での第1マップ更新処理において、第1マップ更新部41は、入力フレーム画像111に含まれる、ステップs33での暫定判定処理において前景画素であると判定された入力画素に対応する第1頻度値411を、所定値だけ増加する。この所定値を「第1増加量」と呼ぶ。一方で、第1マップ更新部41は、入力フレーム画像111に含まれる、ステップs33での暫定判定処理で背景画素であると判定された入力画素に対応する第1頻度値411を、所定値だけ減少する。この所定値を「第1減少量」と呼ぶ。第1増加量と第1減少量とは、互いに同じであっても良いし、互いに異なっていても良い。第1頻度値411については最小値と最大値が定められている。最小値は例えば零である。したがって、前景画素であると判定された入力画素に対応する第1頻度値411が最大値を示す場合には、その第1頻度値411は増加しない。また、背景画素であると判定された入力画素に対応する第1頻度値411が最小値を示す場合には、その第1頻度値411は減少しない。
In the first map update process in step s36, the first
第1頻度マップ410をこのように更新することによって、第1頻度マップ410では、入力フレーム画像111において、前景画素であると頻繁に判定される入力画素に対応する第1頻度値411が大きくなる。言い換えれば、第1頻度マップ410では、撮影領域における、人が頻繁に現れる領域に対応する第1頻度値411が大きくなる。したがって、第1頻度マップ410を参照することによって、撮影領域において、人が存在する可能性が高い領域を特定することができる。
By updating the
<第2マップ更新処理の詳細>
次にステップs37での第2マップ更新処理について詳細に説明する。
<Details of the second map update process>
Next, the second map update process in step s37 will be described in detail.
図36は第2頻度マップ420を示す図である。第1頻度マップ410と同様に、第2頻度マップ420では、入力フレーム画像111に含まれる複数の入力画素にそれぞれ対応する複数の第2頻度値421が、当該複数の入力画素の位置に応じて並んでいる。第2頻度マップ420での第2頻度値421の相対的な位置は、入力フレーム画像111での、当該第2頻度値421に対応する入力画素の相対的な位置と一致している。
FIG. 36 is a diagram showing the
ステップs37での第2マップ更新処理では、第2マップ更新部42は、ステップs35で微動発生領域が特定されない場合には、第2頻度マップ420の各第2頻度値421を所定値だけ減少する。以後、この所定値を「第2減少量」と呼ぶ。
In the second map update process in step s37, the second
一方で、第2マップ更新部42は、ステップs35で微動発生領域が特定された場合には、基本的には、第1頻度マップ410における、特定された微動発生領域に対応する微動対応領域内の第1頻度値411を、第2頻度マップ420における、当該第1頻度値411に対応する第2頻度値421として採用するコピー処理を実行する。つまり、第2マップ更新部42は、基本的には、第1頻度マップ410において、特定された微動発生領域の撮影領域での相対的な位置と同じ相対的な位置に存在する微動対応領域内の第1頻度値411を、第2頻度マップ420における、当該第1頻度値411に対応する第2頻度値421として採用するコピー処理を実行する。そして、第2マップ更新部42は、第2頻度マップ420において、コピー処理が実行される第2頻度値421以外の第2頻度値421を第2減少量だけ減少する。第2マップ更新部42は、第1頻度値411を第2頻度値421として採用することはあっても、第1頻度値411とは異なり、第2頻度値421を所定値だけ増加することはない。以下に、ステップs35で微動発生領域が特定された場合の第2マップ更新処理について詳細に説明する。
On the other hand, when the fine movement occurrence area is specified in step s35, the second
<微動発生領域が特定された場合の第2マップ更新処理>
図37は、微動発生領域が特定された場合の第2マップ更新処理を示すフローチャートである。ステップs35で微動発生領域が特定された場合、第2マップ更新部42は、ステップs371において、ステップs36で更新された第1頻度マップ410において、撮像領域での、人(検出対象動体)が存在する可能性が高い領域に対応する、互いに独立した複数の検出対象対応領域を特定する。
<Second map update process when a fine movement occurrence area is specified>
FIG. 37 is a flowchart showing the second map update process when the fine movement occurrence area is specified. When the fine movement occurrence area is specified in step s35, the second
ステップs371において、第2マップ更新部42は、まず、第1頻度マップ410を2値化して2値化マップを生成する。具体的には、第2マップ更新部42は、第1頻度マップ410において、“0”よりも大きい各第1頻度値411を“1”に設定し、“0”の第1頻度値411を“0”に設定して、2値化マップを生成する。次に、第2マップ更新部42は、2値化マップにおける、値が“1”を示す領域に対して、4連結あるいは8連結等を用いたラベリングを行う。そして、第2マップ更新部42は、2値化マップからラベリングによって得られた各独立領域についての、当該独立領域に対応する、第1頻度マップ410での対応領域を特定する。この対応領域を「独立領域対応領域」と呼ぶ。
In step s371, the second
第2マップ更新部42は、第1頻度マップ410での各独立領域対応領域について、当該独立領域対応領域の外接矩形を求める。そして、第2マップ更新部42は、求めた各外接矩形を検出対象対応領域とする。
The second
ここで、第1頻度マップ410の独立領域対応領域は、第1頻度値411が“1”以上を示す領域である。したがって、第1頻度マップ410において、独立領域対応領域は、撮影領域での、人が存在する可能性が高い領域に対応する領域であると言える。よって、第1頻度マップ410において、独立領域対応領域の外接矩形、つまり検出対象対応領域も、撮影領域での、人が存在する可能性が高い領域に対応する領域であると言える。
Here, the independent area corresponding area of the
なお、第2マップ更新部42は、第1頻度マップ410において、基準値(≧1)よりも大きい各第1頻度値411を“1”に設定し、当該基準値以下の第1頻度値411を“0”に設定して、2値化マップを生成しても良い。
The second
次にステップs372において、第2マップ更新部42は、ステップs371で特定した検出対象対応領域において、微動対応領域を含む検出対象対応領域を特定する。以後、微動対応領域を含む検出対象対応領域を「特定検出対象対応領域」と呼ぶ。特定検出対象対応領域には、複数の微動対応領域が含まれることがある。
Next, in step s372, the second
次にステップs373において、第2マップ更新部42は、ステップs372で特定された特定検出対象対応領域内の第1頻度値411を、第2頻度マップ420での当該第1頻度値411に対応する第2頻度値421として採用する。つまり、第2マップ更新部42は、特定検出対象対応領域内の第1頻度値411を、第2頻度マップ420において、当該第1頻度値411の第1頻度マップ410での相対的な位置と同じ相対的な位置に存在する第2頻度値421として採用する。以後、特定検出対象対応領域内の第1頻度値411を、第2頻度マップ420での当該第1頻度値411に対応する第2頻度値421として採用することを、特定検出対象対応領域内の第1頻度値411についての第2頻度マップ420へのコピーと表現する。
Next, in step s373, the second
第2マップ更新部42が特定検出対象対応領域内の第1頻度値を第2頻度マップ420にコピーする際の当該第2マップ更新部42の動作は、特定検出対象対応領域の面積が大きいか否かに応じて異なる。
The operation of the second
第2マップ更新部42は、特定検出対象対応領域内の第1頻度値を第2頻度マップ420にコピーする際には、当該特定検出対象対応領域の面積が第4しきい値以上であるか否かを判定する。第2マップ更新部42は、特定検出対象対応領域の面積が第4しきい値未満の場合、特定検出対象対応領域の面積が小さいと判定し、当該特定検出対象対応領域内の複数の第1頻度値411のうち、第5しきい値以上の第1頻度値411だけを第2頻度マップ420にコピーする。第2マップ更新部42は、面積が第4しきい値未満の特定検出対象対応領域のすべての第1頻度値411が第5しきい値未満の場合には、当該特定検出対象対応領域内の第1頻度値411を第2頻度マップ420にコピーしない。なお、第2マップ更新部42は、特定検出対象対応領域の面積が第4しきい値未満の場合、当該特定検出対象対応領域内の複数の第1頻度値411のうち、第5しきい値よりも大きい第1頻度値411だけを第2頻度マップ420にコピーしても良い。
When the second
図38は、特定検出対象対応領域内の第1頻度値411が第2頻度マップ420にコピーされる様子の一例を示す図である。図38に示されるように、カメラ2の撮影領域800において、3つの微動発生領域810a〜810cが特定され、第1頻度マップ410において、4つの検出対象対応領域416A〜416Dが特定されたとする。第2マップ更新部42は、第1マップ410での、微動発生領域810aに対応する微動対応領域415aを含む特定検出対象対応領域416Aの面積が第4しきい値以上であるか否かを判定する。また、第2マップ更新部42は、第1マップ410での、微動発生領域810bに対応する微動対応領域415bを含む特定検出対象対応領域416Bの面積が第4しきい値以上であるか否かを判定する。また、第2マップ更新部42は、第1マップ410での、微動発生領域810cに対応する微動対応領域415cを含む特定検出対象対応領域416Dの面積が第4しきい値以上であるか否かを判定する。図38の例では、特定検出対象対応領域416A,416B,416Dのそれぞれの面積は第4しきい値未満とする。なお、検出対象対応領域416Cは微動対応領域を含んでいない。
FIG. 38 is a diagram illustrating an example of a state in which the
第2マップ更新部42は、特定検出対象対応領域416A内の第1頻度値411のうち、第5しきい値以上の第1頻度値411を第2頻度マップ420にコピーする。また、第2マップ更新部42は、特定検出対象対応領域416B内の第1頻度値411のうち、第5しきい値以上の第1頻度値411を第2頻度マップ420にコピーする。また、第2マップ更新部42は、特定検出対象対応領域416D内の第1頻度値411のうち、第5しきい値以上の第1頻度値411を第2頻度マップ420にコピーする。図38の例では、特定検出対象対応領域416A内の第1頻度値411のうちの一部の第1頻度値411は第5しきい値未満なので、特定検出対象対応領域416A内の第1頻度値411のうちの一部の第1頻度値411だけがコピーされる。特定検出対象対応領域416B内の第1頻度値411のすべてが第5しきい値以上なので、特定検出対象対応領域416C内の第1頻度値411のすべてがコピーされる。特定検出対象対応領域416D内の第1頻度値411のすべてが第5しきい値未満なので、特定検出対象対応領域416D内の第1頻度値411のすべてがコピーされない。
The second
第2マップ更新部42は、特定検出対象対応領域の面積が第4しきい値以上の場合、当該特定検出対象対応領域の面積が大きいと判定し、当該特定検出対象対応領域に含まれる微動対応領域の外接矩形を求める。そして、第2マップ更新部42は、求めた外接矩形内の第1頻度値411のうち、第5しきい値以上の第1頻度値411を第2頻度マップ420にコピーする。なお、第2マップ更新部42は、求めた外接矩形内の第1頻度値411のうち、第5しきい値よりも大きい第1頻度値411を第2頻度マップ420にコピーしても良い。
The second
特定検出対象対応領域に1つの微動対応領域だけが含まれる場合には、当該1つの微動対応領域(矩形領域)がそのまま外接矩形となる。 When the specific detection target corresponding area includes only one fine movement corresponding area, the one fine movement corresponding area (rectangular area) becomes a circumscribed rectangle as it is.
一方で、特定検出対象対応領域に複数の微動対応領域だけが含まれる場合には、第2マップ更新部42は、当該特定検出対象対応領域に対して、互いに距離が近い複数の微動対応領域を1つの微動グループとする微動グループ分け処理を行う。微動グループ分け処理は、例えば、上述の第1グループ分け処理と同様に行うことができる。
On the other hand, when only the plurality of fine movement corresponding areas are included in the specific detection target corresponding area, the second
第2マップ更新部42は、微動グループ分け処理の結果得られた各微動グループについて、当該微動グループを構成する複数の微動対応領域の外接矩形を求める。そして、第2マップ更新部42は、求めた外接矩形内の第1頻度値411のうち、第5しきい値以上の第1頻度値411を第2頻度マップ420にコピーする。なお、微動グループが1つの微動対応領域だけで構成される場合には、当該1つの微動対応領域がそのまま外接矩形となる。
For each fine movement group obtained as a result of the fine movement grouping process, the second
図39,40は、微動グループ内の第1頻度値411が第2頻度マップ420にコピーさる様子の一例を示す図である。図39の例では、3つの微動対応領域415a〜415cを含む特定検出対象対応領域416Aの面積が第4しきい値以上である。そして、3つの微動対応領域415a〜415cが1つの微動グループ417Aを構成している。この場合、第2マップ更新部42は、3つの微動対応領域415a〜415cの外接矩形418Aを求める。そして、第2マップ更新部42は、外接矩形418Aの第1頻度値411のうち、第5しきい値以上の第1頻度値411を第2頻度マップ420にコピーする。
39 and 40 are diagrams illustrating an example of a state in which the
図40の例では、6個の微動対応領域415a〜415fを含む特定検出対象対応領域416Aの面積が第4しきい値以上である。そして、3個の微動対応領域415a〜415cが1つの微動グループ417Aを構成し、3個の微動対応領域415d〜415fが1つの微動グループ417Bを構成している。この場合、第2マップ更新部42は、3個の微動対応領域415a〜415cの外接矩形418Aと、3個の微動対応領域415d〜415fの外接矩形418Bとを求める。そして、第2マップ更新部42は、外接矩形418Aの第1頻度値411のうち、第5しきい値以上の第1頻度値411を第2頻度マップ420にコピーし、外接矩形418Bの第1頻度値411のうち、第5しきい値以上の第1頻度値411を第2頻度マップ420にコピーする。
In the example of FIG. 40, the area of the specific detection
なお、第2マップ更新部42は、特定検出対象対応領域の面積が第4しきい値よりも大きいか否かを判定し、特定検出対象対応領域の面積が第4しきい値以下の場合、特定検出対象対応領域の面積が小さいと判定し、特定検出対象対応領域の面積が第4しきい値よりも大きい場合、特定検出対象対応領域の面積が大きいと判定しても良い。
The second
以上のようにして、第1頻度マップ410の特定検出対象対応領域内の第1頻度値411が第2頻度マップ420にコピーされる。第2マップ更新部42は、第2頻度マップ420において、コピー処理が実行される第2頻度値421以外の第2頻度値421については第2減少量だけ減少する。
As described above, the
<前景特定処理の詳細>
以上の説明から理解できるように、撮影領域での、人が存在する可能性が高い領域に対応する、第1頻度マップ410での検出対象対応領域では、第1頻度値411が大きくなる。そして、特定検出対象対応領域は、撮影領域での、人が存在する可能性が高い領域に対応するとともに、撮影領域での微動発生領域に対応する微動対応領域を含んでいる。したがって、特定検出対象対応領域は、撮影領域での、微動している人が存在する領域に対応する可能性が非常に高く、その第1頻度値411は大きくなる。そのため、特定検出対象対応領域内の第1頻度値411を、第2頻度マップ420における、当該第1頻度値411に対応する第2頻度値421として採用することによって、第2頻度マップ420では、撮影領域での、微動している人が存在する領域に対応する第2頻度値421が大きくなる。よって、第2頻度マップ420において、第2頻度値421が“0”よりも大きい領域は、入力フレーム画像111での前景画像に対応する可能性が高い。
<Details of foreground identification processing>
As can be understood from the above description, the
そこで、ステップs38での前景特定処理において、前景特定部34は、第2頻度マップ420において、第2頻度値421が“0”よりも大きい領域を前景対応領域とする。そして、前景特定部34は、処理対象の入力フレーム画像111において、前景対応領域に対応する領域を前景画像として特定する。
Therefore, in the foreground specifying process in step s38, the
図41は、第2頻度マップ420に基づいて前景画像が特定される様子の一例を示す図である。図41の例では、第2頻度マップ420には、第2頻度値421が“0”よりも大きい領域として、3個の領域425a〜425cが含まれている。前景特定部34は、領域425a〜425cをそれぞれ前景対応領域425a〜425cとする。そして、前景特定部34は、処理対象の入力フレーム画像111において、前景対応領域425aに対応する領域を前景画像112aとして特定する。つまり、前景特定部34は、処理対象の入力フレーム画像111において、前景対応領域425aの第2頻度マップ420での相対的な位置と同じ相対的な位置に存在する領域を前景画像112aとして特定する。同様に、前景特定部34は、処理対象の入力フレーム画像111において、前景対応領域425bに対応する領域を前景画像112bとして特定し、前景対応領域425cに対応する領域を前景画像112cとして特定する。基本的には、前景画像112a〜112cは、互い異なる複数の人にそれぞれ対応している。したがって、図41の例では、撮影領域には、静止している人が3人存在している。
FIG. 41 is a diagram illustrating an example of a state in which a foreground image is specified based on the
<矩形領域間の距離の求め方>
画像処理装置3は、微動特定処理及び第2マップ更新処理等において、2つの矩形領域間の距離を求めることがある。例えば、上述のステップs353では、動体領域群610に対して、互いに距離が近い複数の動体領域601を1つの第1グループ602とする第1グループ分け処理が行われ、動体領域601は矩形領域であることから、画像処理装置3は、第1グループ分け処理では、2つの矩形領域間の距離を求める必要がある。また、第2マップ更新処理では、特定検出対象対応領域に対して、互いに距離が近い複数の微動対応領域を1つの微動グループとする微動グループ分け処理が行われ、微動対応領域は矩形領域であることから、画像処理装置3は、微動グループ分け処理では、2つの矩形領域間の距離を求める必要がある。
<How to find the distance between rectangular areas>
The
2つの矩形領域間の距離として、一方の矩形領域の中心(重心)と他方の矩形領域の中心(重心)との間の距離を採用することができる。また、2つの矩形領域間の距離として、一方の矩形領域の外形と、他方の矩形領域の外形との間の最短距離を採用することができる。以下に当該最短距離の求め方の一例について説明する。 As the distance between the two rectangular areas, the distance between the center (centroid) of one rectangular area and the center (centroid) of the other rectangular area can be adopted. Further, as the distance between the two rectangular regions, the shortest distance between the outer shape of one rectangular region and the outer shape of the other rectangular region can be employed. An example of how to determine the shortest distance will be described below.
図42は、一方の矩形領域の外形と、他方の矩形領域の外形との間の最短距離の求め方を説明するための図である。画像処理装置3は、2つの矩形領域において、一方を第1矩形領域701とし、他方を第2矩形領域702とする。そして、画像処理装置3は、図42に示されるように、真上領域710、真下領域711、真右領域712、真左領域713、右上領域714、左上領域715、左下領域716及び右下領域717を考える。
FIG. 42 is a diagram for explaining how to obtain the shortest distance between the outer shape of one rectangular region and the outer shape of the other rectangular region. In the two rectangular areas, the
ここで、真上領域710は、第1矩形領域701の真上に位置する領域である。真下領域711は、第1矩形領域701の真下に位置する領域である。真右領域712は、第1矩形領域701の真右に位置する領域である。真左領域713は、第1矩形領域701の真左に位置する領域である。右上領域714は、第1矩形領域701の右上に位置する領域である。左上領域715は、第1矩形領域701の左上に位置する領域である。左下領域716は、第1矩形領域701の左下に位置する領域である。右下領域717は、第1矩形領域701の右下に位置する領域である。
Here, the directly above
画像処理装置3は、第2矩形領域702の少なくとも一部が、真上領域710、真下領域711、真右領域712及び真左領域713のいずれかに存在する場合には、第1矩形領域701及び第2矩形領域702での互いに対向する2辺の間の距離を、第1矩形領域701の外形と第2矩形領域702の外形との間の最短距離とする。言い換えれば、画像処理装置3は、第2矩形領域702の少なくとも一部が、第1矩形領域701の真上、真下、真右、真左のいずれかに存在する場合には、第1矩形領域701及び第2矩形領域702での互いに対向する2辺の間の距離を、第1矩形領域701の外形と第2矩形領域702の外形との間の最短距離とする。
When at least a part of the second
一方で、画像処理装置3は、第2矩形領域702の全領域が、右上領域714、左上領域715、左下領域716及び右下領域717のいずれか1つだけに存在する場合には、第1矩形領域701及び第2矩形領域702での最も近い角同士の間の距離を、第1矩形領域701の外形と第2矩形領域702の外形との間の最短距離とする。
On the other hand, when the entire area of the second
図42に示されるように、例えば、真上領域710に一部が存在する第2矩形領域702aの外形と第1矩形領域701の外形との間の最短距離は、第2矩形領域702aの下側の辺702aaと、それに対向する、第1矩形領域701の上側の辺701aとの間の距離Daとなる。
As shown in FIG. 42, for example, the shortest distance between the outer shape of the second
また、図42に示されるように、真右領域712に一部が存在する第2矩形領域702bの外形と第1矩形領域701の外形との間の最短距離は、第2矩形領域702bの左側の辺702bbと、それに対向する、第1矩形領域701の右側の辺701bとの間の距離Dbとなる。
Further, as shown in FIG. 42, the shortest distance between the outer shape of the second
また、図42に示されるように、左下領域716だけに存在する第2矩形領域702cの外形と第1矩形領域701の外形との間の最短距離は、第2矩形領域702cの右上の角702ccと、第1矩形領域701の左の角701cとの間の距離Dcとなる。
As shown in FIG. 42, the shortest distance between the outer shape of the second
以上のようにして、画像処理装置3は、入力フレーム画像111における、静止している人の画像を前景画像をとして特定すると、その特定結果を出力する。画像処理装置3での前景画像の特定結果は、例えば、室内300内の空調制御で使用される。室内300の空調を制御する空調制御装置は、画像処理装置3での前景画像の特定結果に基づいて、室内300における、静止している人が存在する領域を特定する。そして、空調制御装置は、特定した領域の温度が一定温度に近づくように空調制御を行う。なお、画像処理装置3での前景画像の特定結果は空調制御以外に利用されても良い。
As described above, when the
以上のように、画像処理装置3では、撮影領域において微動発生領域が特定されると、第1頻度マップ410における、特定された微動発生領域に対応する微動対応領域内の第1頻度値411が、第2頻度マップ420における、当該第1頻度値411に対応する第2頻度値421として採用される。
As described above, in the
一方で、背景モデル500の更新によって、入力フレーム画像111に含まれる、静止している人の画素が判定部31で前景画素として判定されなくなった場合であっても、第1頻度マップ410における、当該静止している人に対応する領域の第1頻度値411はすぐに零にはならない。つまり、背景モデル500の更新によって、入力フレーム画像111に含まれる、静止している人の画素が判定部31で前景画素として判定されなくなってから、第1頻度マップ410における、当該静止している人に対応する領域の第1頻度値411が零になるまで時間がかかる。
On the other hand, even when the stationary person pixel included in the
したがって、第1頻度マップ410における、撮影領域の微動発生領域に対応する微動対応領域内の第1頻度値411が、第2頻度マップ420にコピーされることによって、第2頻度マップ420では、撮影領域における、人の微動が発生している微動発生領域に対応する領域での第2頻度値421は、静止している人の画素が判定部31で前景画素として検出されなくなった後において、すぐに零にはならない。例えば、第2頻度マップ420では、撮影領域における、人の微動が発生している微動発生領域に対応する領域での第2頻度値421は、静止している人の画素が判定部31で前景画素として検出されなくなった後、数百フレームの間、零にならない。よって、判定部31において、人の画素が前景画素として検出されなくなった後においても、第2頻度マップ420に基づいて、入力フレーム画像111における、静止している人の画像を前景画像として特定することができる。その結果、入力動画像110における前景画像を特定する際の特定精度が向上する。
Accordingly, in the
また、第1頻度マップ410での複数の微動対応領域が、同じ人の微動に対応することがある。この場合、当該複数の微動対応領域のそれぞれについて、当該微動対応領域内の第1頻度値411を第2頻度マップ420にコピーすると、当該複数の微動対応領域にそれぞれ対応する複数の前景画像が特定される。この複数の前景画像は同じ人についての画像である。画像処理装置3での前景画像の特定結果に基づいて撮影領域での静止している人の数をカウントする場合には、画像処理装置3で特定された複数の前景画像が、一人の人の画像であったり、複数の人の画像であったりすると、静止している人の数を正しくカウントできない可能性がある。
In addition, a plurality of fine movement corresponding areas in the
一方で、第1頻度マップ410での検出対象対応領域は、撮像領域での、人が存在する可能性が高い領域に対応する独立した検出対象対応領域であることから、一人の人に対応する可能性が高い。本例では、画像処理装置3では、第1頻度マップ410において、微動対応領域を含む検出対象対応領域(特定検出対象対応領域)内の第1頻度値411が第2頻度マップ420にコピーされることから、入力フレーム画像111における、当該検出対象領域に対応する前景画像は一人の人の画像である可能性が高い。よって、画像処理装置3での前景画像の特定結果に基づいて、撮影領域での静止している人の数をより正しくカウントすることができる。
On the other hand, the detection target corresponding region in the
また、入力フレーム画像111に含まれるノイズ成分等によって、判定部31では、人の画素を誤って背景画素であると判定する可能性がある。したがって、特定検出対応領域において、第1頻度値411が小さい領域は、前景画素に対応する可能性があまり高くない。
Further, the
本例では、特定検出対象対応領域内の第1頻度値411のうち、第5しきい値以上あるいは第5しきい値よりも大きい第1頻度値411を第2頻度マップ420にコピーすることから、背景画素に対応する第1頻度値411が第2頻度マップ420にコピーされることを抑制することができる。よって、前景画像の特定精度がさらに向上する。
In this example, among the first frequency values 411 in the specific detection target corresponding region, the
また、撮影領域において固まって存在する複数の人に対応して、1つの検出対象対応領域が得られることがある。そして、その検出対象対応領域の面積は大きくなる。 In addition, one detection target corresponding region may be obtained corresponding to a plurality of people who are firmly present in the imaging region. Then, the area of the detection target corresponding region becomes large.
一方で、撮影領域において人が存在していた領域に人が存在しなくなった場合であっても、その領域に対応する第1頻度マップ410の第1頻度値411はすぐに零にならない。したがって、撮影領域において、複数の人が固まって存在している領域から、当該複数の人のうちのある人が存在しなくなった場合、当該複数の人に対応する検出対象対応領域では、撮影領域での当該ある人が存在していた領域に対応する第1頻度値411はしばらく大きな値となる。よって、面積が大きい検出対象対応領域内のすべての第1頻度値411が第2頻度マップ420にコピーされると、撮影領域においてすでに人が存在しなくなった領域に対応する第1頻度値411が第2頻度マップ420にコピーされてしまう可能性がある。
On the other hand, even when the person no longer exists in the area where the person exists in the imaging area, the
本例では、第2マップ更新部42は、複数の微動対応領域を含む特定検出対象領域の面積が第4しきい値以上あるいは第4しきい値よりも大きい場合、当該特定検出対象領域内のすべての第1頻度値411を第2頻度マップ420にコピーするのではなく、当該特定検出対象領域に含まれる複数の微動対応領域の外接矩形内の第1頻度値411だけを、第2頻度マップ420にコピーしている。これにより、撮影領域においてすでに人が存在しなくなった領域に対応する第1頻度値411が第2頻度マップ420にコピーされてしまうことを抑制することができる。よって、前景画像の特定精度がさらに向上する。
In this example, when the area of the specific detection target region including the plurality of fine movement corresponding regions is equal to or larger than the fourth threshold value or larger than the fourth threshold value, the second
また、同じ人の微動に対応する複数の微動対応領域は互いに近くに存在する。したがって、固まって存在する複数の人に対応する特定検出対象領域では、互いに近くに存在する複数の微動対応領域は同じ人の微動に対応する可能性が高い。 Also, a plurality of fine movement corresponding regions corresponding to the same person's fine movement are close to each other. Therefore, in the specific detection target area corresponding to a plurality of persons who are present together, there is a high possibility that a plurality of fine movement corresponding areas existing close to each other correspond to the same person's fine movement.
本例では、第2マップ更新部42は、複数の微動対応領域を含む特定検出対象対応領域に対して、互いに距離が近い複数の微動対応領域を1つの微動グループとする微動グループ分け処理を行っている。そして、第2マップ更新部42は、得られた各微動グループについて、当該微動グループを構成する複数の微動対応領域の外接矩形内の第1頻度値411を、第2頻度マップ420にコピーしている。1つの微動グループは、1人の人に対応する可能性が高いことから、固まって存在している複数の人にそれぞれ対応する複数の前景画像を得ることができる。よって、画像処理装置3での前景画像の特定結果に基づいて、撮影領域での静止している人の数をより正しくカウントすることができる。
In this example, the second
また、特定検出対象対応領域が、互いに近くに存在するP1個(P1≧2)の微動対応領域からなる第1微動グループと、互いに近くに存在するP2個(P2≧2)の微動対応領域からなる第2微動グループとを含み、第1微動グループと第2微動グループとが離れている場合、第1頻度マップ410における、第1微動グループと第2微動グループとの間の領域は、前景画素に対応する可能性が低い。したがって、第1及び第2微動グループを構成する(P1+P2)個の微動対応領域の外接矩形内の第1頻度値411を第2頻度マップ420にコピーすると、背景画素に対応する第1頻度値411が第2頻度マップ420にコピーされる可能性がある。
In addition, the specific detection target corresponding area includes a first fine movement group including P1 (P1 ≧ 2) fine movement corresponding areas that are close to each other, and P2 (P2 ≧ 2) fine movement corresponding areas that are close to each other. When the first fine movement group is separated from the second fine movement group, the region between the first fine movement group and the second fine movement group in the
本例では、第2マップ更新部42は、得られた各微動グループについて、当該微動グループを構成する複数の微動対応領域の外接矩形内の第1頻度値411を、第2頻度マップ420にコピーしていることから、2つの微動グループ間の領域、つまり、前景画素に対応する可能性が低い領域の第1頻度値411が第2頻度マップ420にコピーされることを抑制することができる。よって、前景画像の特定精度がさらに向上する。
In this example, the second
なお、特定検出対象対応領域内の第1頻度値411を第2頻度マップ420にコピーするのではなく、検出対象対応領域を求めずに微動対応領域内の第1頻度値411だけを第2頻度マップ420にコピーしても良い。この場合には、微動対応領域内の第1頻度値411のすべてを第2頻度マップ420にコピーするのではなく、微動対応領域内の第1頻度値411のうち、第5しきい値以上あるいは第5しきい値よりも大きい第1頻度値411を第2頻度マップ420にコピーしても良い。
Note that the
また、特定検出対象対応領域内の第1頻度値411のうち、第5しきい値以上あるいは第5しきい値よりも大きい第1頻度値411を第2頻度マップ420にコピーするのではなく、特定検出対象対応領域内のすべての第1頻度値411を第2頻度マップ420にコピーしても良い。
Also, instead of copying the
また、特定検出対象領域に含まれる複数の微動対応領域の外接矩形を求めることなく、当該特定検出対象領域内の第1頻度値411のすべて、あるいは当該特定検出対象領域内の第1頻度値411のうち、第5しきい値以上あるいは第5しきい値よりも大きい第1頻度値411を、第2頻度マップ420にコピーしても良い。
Further, all of the first frequency values 411 in the specific detection target area or the first frequency values 411 in the specific detection target area are obtained without obtaining circumscribed rectangles of the plurality of fine movement corresponding areas included in the specific detection target area. Of these, the
また、特定検出対象対応領域に対して微動グループ分け処理を行わずに、当該特定検出対象領域内の第1頻度値411のすべて、あるいは当該特定検出対象領域内の第1頻度値411のうち、第5しきい値以上あるいは第5しきい値よりも大きい第1頻度値411を、第2頻度マップ420にコピーしても良い。
Further, without performing the fine movement grouping process on the specific detection target corresponding area, all of the first frequency values 411 in the specific detection target area or the first frequency values 411 in the specific detection target area, The
また、第2頻度マップ420についての第2減少量は、第1頻度マップ410についての第1減少量よりも大きくしても良い。第2減少量が小さい場合には、第2頻度マップ420において、撮影領域での人がすでに存在しない領域に対応する対応領域の第2頻度値421が小さくなりにくい。したがって、当該対応領域がいつまでも前景対応領域とされてしまう可能性がある。また、第1減少量が大きい場合には、判定部31において静止している人の画素が前景画素として判定されなくなった後、第1頻度マップ410における、当該静止している人に対応する領域の第1頻度値411が小さくなり易くなってしまう。そのため、判定部31において静止している人の画素が前景画素として判定されなくなった後、前景特定部34において、当該静止している人の画像が前景画像として特定されなくなるまでの時間が短くなってしまう。第2減少量を第1減少量よりも大きくすることによって、第2頻度マップ420において、撮影領域での人がすでに存在しない領域に対応する対応領域の第2頻度値421が小さくなり易くなる。さらに、第1頻度マップ410における、静止している人に対応する領域の第1頻度値411が小さくなりにくくなる。よって、第2頻度マップ420において、撮影領域での人がすでに存在しない領域に対応する対応領域が前景対応領域とされることを抑制することができるとともに、前景特定部34において、静止している人の画像が前景画像として特定されなくなるまでの時間を長くすることができる。その結果、前景画像の特定精度がさらに向上する。
Further, the second decrease amount for the
また上記の例では、画像処理装置3での背景モデルの更新方法として、MOGを用いた頻度型背景更新が使用されているが、他の種類の頻度型背景更新が使用されても良い。例えば、コードブック法を用いた背景更新が使用されても良い。また、頻度型背景更新以外の背景更新が使用されても良い。
In the above example, the frequency type background update using MOG is used as the background model update method in the
<各種変形例>
以下に画像処理装置3の各種変形例について説明する。
<Various modifications>
Hereinafter, various modified examples of the
<頻度型背景更新と連続型背景更新との組み合わせ>
図43は本変形例にかかる画像処理装置3の構成を示す図である。本変形例に係る画像処理装置3は、上述の図3に示される画像処理装置3と比較して、判定部37及び背景モデル更新部38を備えている。
<Combination of frequency type background update and continuous type background update>
FIG. 43 is a diagram showing the configuration of the
判定部37は、前処理部30から入力フレーム画像111が出力されるたびに、背景モデル550に基づいて、当該入力フレーム画像111の各入力画素が前景画素か背景画素であるかを暫定的に判定する。
Each time the
背景モデル550は、背景モデル500とは異なる背景モデルであって、記憶部5に記憶されている。背景モデル550には、入力フレーム画像111を構成する複数の入力画素にそれぞれ対応する複数の背景情報が含まれている。背景モデル550に含まれる背景情報は、背景画素の画素値(以後、「背景画素値」と呼ぶ)で構成されている。
The
判定部37は、上述の図10に示されるフローチャートにおいて、ステップs32の後であって、ステップs38の前に、処理対象の入力フレーム画像111の入力画素が前景画素か背景画素であるかを暫定的に判定する第2暫定判定処理を行う。第2暫定判定処理において、判定部37は、処理対象の入力フレーム画像111の対象入力画素の画素値が、背景モデル550における、対象入力画素に対応する背景画素値と一致するか否かを判定する。判定部37は、対象入力画素の画素値が、それに対応する背景画素値と一致する場合には、対象入力画素が背景画素であると暫定的に判定する。一方で、判定部37は、対象入力画素の画素値が、それに対応する背景画素値と一致しない場合には、対象入力画素が前景画素であると暫定的に判定する。以後、判定部31での暫定判定処理を「第1暫定判定処理」と呼ぶことがある。
In the flowchart shown in FIG. 10 described above, the
なお、判定部37は、対象入力画素の画素値と、それに対応する背景画素値との差分の絶対値が第6しきい値未満のときに、対象入力画素が背景画素であると暫定的に判定し、当該絶対値が当該第6しきい値以上のときに、対象入力画素が前景画素であると暫定的に判定しても良い。また、判定部37は、対象入力画素の画素値と、それに対応する背景画素値との差分の絶対値が第6しきい値以下のときに、対象入力画素が背景画素であると暫定的に判定し、当該絶対値が当該第6しきい値よりも大きいときに、対象入力画素が前景画素であると暫定的に判定しても良い。
The
背景モデル更新部38は、前処理部30から入力フレーム画像111が出力されるたびに、当該入力フレーム画像111に基づいて背景モデル550を更新する。背景モデル更新部38は、背景モデル更新部32とは異なる方法で背景モデル550を更新する。背景モデル更新部38は、入力フレーム画像111に含まれる対象入力画素の画素値が一定期間連続して同程度の値を示す場合に、当該画素値に基づいて、背景モデル550における、対象入力画素に対応する背景画素値を更新する。背景モデル更新部38は、背景モデル550の各背景画素値を同様に更新する。
The background
図44は対象入力画素に関する背景モデル更新部38の動作を示すフローチャートである。背景モデル更新部38は、前処理部30から入力フレーム画像111が出力されるたびに、図44に示される処理を実行する。また、背景モデル更新部38は、入力フレーム画像111の各入力画素について図44に示される処理を実行する。
FIG. 44 is a flowchart showing the operation of the background
図44に示されるように、背景モデル更新部38は、ステップs41において、処理対象の入力フレーム画像111の対象入力画素が背景画素であると判定部37で暫定的に判定されたか否かを判断する。背景モデル更新部38は、対象入力画素が背景画素であると判定部37で暫定的に判定されたと判断すると、ステップs44においてカウント値をリセットして零に設定する。一方で、背景モデル更新部38は、対象入力画素が前景画素であると判定部37で暫定的に判定されたと判断すると、ステップs42を実行する。
As illustrated in FIG. 44, the background
ステップs42では、背景モデル更新部38は、前回のフレームにおいて、対象入力画素が背景画素であると判定部37で暫定的に判定されたか否かを判断する。つまり、背景モデル更新部38は、処理対象の入力フレーム画像111よりも1つ前の入力フレーム画像111での対象入力画素が背景画素であると判定部37で暫定的に判定されたか否かを判断する。背景モデル更新部38は、前回のフレームにおいて、対象入力画素が背景画素であると判定部37で暫定的に判定されたと判断すると、ステップs43において、処理対象の入力フレーム画像111の対象入力画素の画素値を基準画素値とする。そして、ステップs44において、背景モデル更新部38はカウント値をリセットする。
In step s42, the background
このように、背景モデル更新部38は、現在のフレームにおいて、対象入力画素が前景画素であると判定部37で暫定的に判定された場合、前回のフレームにおいて、対象入力画素が背景画素であると判定部37で暫定的に判定されていたときには、現在のフレームでの対象入力画素の画素値を基準画素値とし、カウント値をリセットする。
As described above, when the
一方で、ステップs42において、背景モデル更新部38は、前回のフレームにおいて、対象入力画素が前景画素であると判定部37で暫定的に判定されたと判断すると、ステップs45を実行する。ステップs45において、背景モデル更新部38は、処理対象の入力フレーム画像111の対象入力画素の画素値が基準画素値と同程度であるか否かを判断する。背景モデル更新部38は、処理対象の入力フレーム画像111での対象入力画素の画素値と基準画素値との差分の絶対値が第7しきい値未満の場合、対象入力画素の画素値が基準画素値と同程度であると判断する。背景モデル更新部38は、当該絶対値が第7しきい値以上の場合、対象入力画素の画素値が基準画素値と同程度ではないと判断する。なお、背景モデル更新部38は、対象入力画素の画素値と基準画素値との差分の絶対値が第7しきい値以下の場合、対象入力画素の画素値が基準画素値と同程度であると判断し、当該絶対値が第7しきい値よりも大きい場合、対象入力画素の画素値が基準画素値と同程度ではないと判断しても良い。
On the other hand, when the background
背景モデル更新部38は、対象入力画素の画素値が基準画素値と同程度ではないと判断すると、ステップs44を実行して、カウント値をリセットする。一方で、背景モデル更新部38は、対象入力画素の画素値が基準画素値と同程度であると判断すると、ステップs46において、カウント値を1つだけ増加する。そして、ステップs47において、背景モデル更新部38は、カウント値が第8しきい値以上であるか否かを判定する。第8しきい値は、例えば“100”に設定される。
If the background
背景モデル更新部38は、カウント値が第8しきい値以上であると判定すると、対象入力画素の画素値に基づいて、背景モデル550での対象入力画素に対応する背景画素値を更新する。背景モデル更新部38は、例えば、基準画素値を、背景モデル550での対象入力画素に対応する新たな背景画素値として採用することによって、当該背景画素値を更新する。なお、背景モデル更新部38は、基準画素値が設定されてから現在まで得られた、対象入力画素についての複数の画素値(基準画素値を含む)の平均値を、背景モデル550での対象入力画素に対応する新たな背景画素値として採用しても良い。
When the background
背景モデル更新部38は、背景画素値を更新すると、次の入力フレーム画像111(新たな処理対象の入力フレーム画像111)での対象入力画素についてステップs41を実行する。以後、背景モデル更新部38は同様に動作する。
When the background model value is updated, the background
一方で、背景モデル更新部38は、カウント値が第8しきい値未満であると判定すると、次の入力フレーム画像111での対象入力画素についてステップs41を実行する。以後、背景モデル更新部38は同様に動作する。
On the other hand, when the background
なお、背景モデル更新部38は、ステップs47において、カウント値が第8しきい値よりも大きいか否かを判定しても良い。この場合には、背景モデル更新部38は、カウント値が第8しきい値よりも大きい場合にステップs48を実行し、カウント値が第8しきい値以下の場合にステップs41を実行する。
The background
背景モデル更新部38が以上のように動作することによって、判定部37で前景画素であると暫定的に判定される入力画素の画素値が、複数フレームの間(一定期間)連続して同程度の値を示す場合、当該画素値に基づいて、背景モデル550における、当該入力画素に対応する背景情報(背景画素値)が更新される。以後、このような背景情報の更新を「連続型背景更新」と呼ぶことがある。
As the background
本変形例では、前景特定部34は、第2頻度マップ420と、判定部37での判定結果とに基づいて、前景画像を特定する。以下に、本変形例に係る前景特定部34の動作について詳細に説明する。
In the present modification, the
図10のステップs38において、前景特定部34は、上記と同様に、第2頻度マップ420において、第2頻度値421が“0”よりも大きい領域を前景対応領域する。そして、前景特定部34は、処理対象の入力フレーム画像111において、第2頻度マップ420での前景対応領域に対応する領域を、第1前景候補領域とする。また、前景特定部34は、処理対象の入力フレーム画像111において、判定部37で前景画素であると暫定的に判定された複数の入力画素で構成された領域を、第2前景候補領域とする。そして、前景特定部34は、処理対象の入力フレーム画像111において、第1前景候補領域であるとともに第2前景候補領域である領域を、前景画像として特定する。
In step s38 of FIG. 10, the
このように、前景特定部34は、第1暫定判定処理の結果に基づいて更新される第2頻度マップ420だけではなく、第1暫定判定処理とは異なる第2暫定判定処理の結果に基づいて、前景画像を特定することから、前景画像をより正しく特定することができる。
As described above, the
ここで、上述のように、第2頻度マップ420の第2頻度値421は、第2減少量ずつ減少することから、第2頻度マップ420において、撮影領域での人が存在しなくなった領域に対応する第2頻度値421はすぐに零にはならない。したがって、静止している人のある部分(手あるいは頭など)が動いている場合、当該ある部分の現在の位置に応じた第2頻度値421だけではなく、当該ある部分の過去の位置に応じた第2頻度値421も“0”よりも大きくなる可能性がある。よって、処理対象の入力フレーム画像111において、第2頻度マップ420での、第2頻度値421が“0”よりも大きい前景対応領域に対応する領域を前景画像として特定する場合には、特定した前景画像の範囲が、静止している人の撮影領域での現在の範囲から少しずれる可能性がある。
Here, as described above, the
一方で、連続型背景更新では、入力画素の画素値が、一定期間連続して同程度の値を示す場合にだけ、背景モデル550での当該入力画素に対応する背景情報が更新されることから、静止している人のある部分が動く場合、そのある部分の動きに応じて背景モデル550は更新されにくい。したがって、判定部37は、静止している人のある部分が動く場合であっても、処理対象の入力フレーム画像111において、当該ある部分の現在の位置に応じた入力画素を前景画素であると判定することができるとともに、当該ある部分の過去の位置に応じた入力画素を背景画素であると判定することができる。
On the other hand, in the continuous background update, the background information corresponding to the input pixel in the
本変形例では、前景特定部34は、このような判定部37での判定結果と、第2頻度マップ420とに基づいて前景画像を特定することから、特定した前景画像の範囲と、静止している人についての撮影領域での現在の範囲とのずれを小さくすることができる。よって、撮影範囲において静止している人が存在する領域をより正しく特定することができる。
In the present modification, the
なお、上述の図3に示される構成において、判定部31の代わりに判定部37を使用し、出現画素値情報510及び背景モデル500の代わりに背景モデル550を使用しても良い。この場合、第1マップ更新部41は、判定部37での判定結果に基づいて第1頻度マップ410を更新する。
In the configuration shown in FIG. 3 described above, the
<学習率の調整>
本変形例では、混合正規分布511を更新する際の学習率α,βの値として、コピー非発生時の値α1,β1と、コピー発生時の値α2,β2が定められている。α1、β1、α2、β2は、例えば、以下の式(6)〜(9)でそれぞれ表される。
<Adjustment of learning rate>
In this modification, values α1 and β1 when no copy occurs and values α2 and β2 when a copy occurs are determined as the learning rates α and β when updating the mixed
式(6)に示されるように、コピー非発生時の値α1は、基準値REF1に対して定数Aを足し合わせた値である。また式(7)に示されるように、コピー非発生時の値β1は、基準値REF1に対して定数Bを足し合わせた値である。基準値REF1は、固定値であって、α1及びβ1で共通に使用される。 As shown in Expression (6), the value α1 when no copy occurs is a value obtained by adding a constant A to the reference value REF1. Further, as shown in Expression (7), the value β1 when no copy occurs is a value obtained by adding a constant B to the reference value REF1. The reference value REF1 is a fixed value and is commonly used for α1 and β1.
一方で、式(8)に示されるように、コピー発生時の値α2は、基準値REF2に対して定数Aを足し合わせた値である。また式(9)に示されるように、コピー発生時の値β2は、基準値REF2に対して定数Bを足し合わせた値である。基準値REF2は、固定値であって、α2及びβ2で共通に使用される。RFE1>REF2であることから、α2はα1よりも小さく、β2はβ1よりも小さくなっている。 On the other hand, as shown in Expression (8), the value α2 at the time of occurrence of copying is a value obtained by adding a constant A to the reference value REF2. Further, as shown in Expression (9), the value β2 at the time of occurrence of copying is a value obtained by adding a constant B to the reference value REF2. The reference value REF2 is a fixed value and is commonly used for α2 and β2. Since RFE1> REF2, α2 is smaller than α1, and β2 is smaller than β1.
背景モデル更新部32は、学習率α,βの値を決定する学習率決定処理を行う。学習率決定処理は、上述の図10に示されるフローチャートにおいて、ステップs37とステップs38の間に行われる。以下に学習率決定処理について詳細に説明する。
The background
背景モデル更新部32は、第2マップ更新部42がステップs37において第2頻度マップ420にコピーした第1頻度値411に対応する、入力フレーム画像111での入力画素に応じた混合正規分布511を更新する際の学習率α,βの値を、コピー発生時の値α2,β2にそれぞれ設定する。背景モデル更新部32は、この処理を、第2マップ更新部42がステップs37において第2頻度マップ420にコピーした各第1頻度値411について行う。
The background
一方で、背景モデル更新部32は、第2マップ更新部42がステップs37において第2頻度マップ420にコピーしなかった第1頻度値411に対応する、入力フレーム画像111での入力画素に応じた混合正規分布511を更新する際の学習率α,βの値を、コピー非発生時の値α1,β1にそれぞれ設定する。背景モデル更新部32は、この処理を、第2マップ更新部42がステップs37において第2頻度マップ420にコピーしなかった各第1頻度値411について行う。
On the other hand, the background
このように、本変形例では、背景モデル更新部32は、第2頻度マップ420にコピーされた第1頻度値411に対応する入力画素に応じた混合正規分布511を更新する際の学習率α,βを小さくしている(減少させている)。これにより、第2頻度マップ420にコピーされた第1頻度値411に対応する入力画素に応じた混合正規分布511が更新されにくくなる。第2頻度マップ420にコピーされた第1頻度値411に対応する入力画素は、静止している人の画素である可能性が高いことから、当該入力画素に応じた混合正規分布511が更新されにくくなることによって、判定部31において、静止している人の画素が前景画素として特定されなくなるまでの時間が長くなる。よって、前景画像の特定精度がさらに向上する。
Thus, in this modification, the background
以上のように、画像処理システム1及び画像処理装置3は詳細に説明されたが、上記した説明は、全ての局面において例示であって、この発明がそれに限定されるものではない。また、上述した各種変形例は、相互に矛盾しない限り組み合わせて適用可能である。そして、例示されていない無数の変形例が、この発明の範囲から外れることなく想定され得るものと解される。
As described above, the
3 画像処理装置
6 制御プログラム
31,37 判定部
32,38 背景モデル更新部
33 微動特定部
34 前景特定部
41 第1マップ更新部
42 第2マップ更新部
410 第1マップ(第1頻度マップ)
420 第2マップ(第2頻度マップ)
500,550 背景モデル
DESCRIPTION OF
420 Second map (second frequency map)
500,550 Background model
Claims (15)
第1背景モデルに基づいて、前記入力動画像のフレーム画像に含まれる画素が、前景画素か背景画素かを暫定的に判定する第1判定処理を行う第1判定部と、
前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第1の値が、当該複数の画素の位置に応じて並ぶ第1マップを更新する第1マップ更新処理を行う第1マップ更新部と、
前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第2の値が、当該複数の画素の位置に応じて並ぶ第2マップを更新する第2マップ更新処理を行う第2マップ更新部と、
前記フレーム画像に基づいて前記第1背景モデルを更新する第1背景モデル更新処理を行う第1背景モデル更新部と、
前記入力動画像に写る撮影領域において、前記検出対象動体の微動が発生している微動発生領域を特定する第1特定処理を行う微動特定部と
を備え、
前記第1マップ更新部は、前記第1マップ更新処理において、
前記フレーム画像に含まれる、前記第1判定処理で前記前景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第1所定値だけ増加し、
前記フレーム画像に含まれる、前記第1判定処理で前記背景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第2所定値だけ減少し、
前記第2マップ更新部は、前記第2マップ更新処理において、
前記第1特定処理で前記微動発生領域が特定されると、前記第1マップにおける、特定された前記微動発生領域に対応する微動対応領域内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用するコピー処理を実行し、
前記第2マップにおいて、前記コピー処理が実行される前記第2の値以外の前記第2の値を第3所定値だけ減少し、
前記画像処理装置は、前記第1判定処理、前記第1マップ更新処理、前記第2マップ更新処理、前記第1背景モデル更新処理及び前記第1特定処理を繰り返し実行し、
前記第2更新処理が行われた前記第2マップに基づいて前記前景画像を特定する前景特定部をさらに備える、画像処理装置。 An image processing apparatus that identifies an image of a moving object to be detected in an input moving image as a foreground image,
A first determination unit that performs a first determination process that tentatively determines whether a pixel included in a frame image of the input moving image is a foreground pixel or a background pixel based on a first background model;
A first map update unit for performing a first map update process for updating a first map in which a plurality of first values respectively corresponding to a plurality of pixels included in the frame image are arranged according to the positions of the plurality of pixels; ,
A second map update unit for performing a second map update process for updating a second map in which a plurality of second values respectively corresponding to a plurality of pixels included in the frame image are arranged according to the positions of the plurality of pixels; ,
A first background model update unit for performing a first background model update process for updating the first background model based on the frame image;
A fine movement specifying unit that performs a first specifying process for specifying a fine movement generation area in which a fine movement of the detection target moving body is generated in a shooting area that is reflected in the input moving image;
In the first map update process, the first map update unit includes:
Increasing the first value in the first map corresponding to the pixel determined to be the foreground pixel in the first determination process included in the frame image by a first predetermined value;
The first value in the first map corresponding to the pixel determined to be the background pixel in the first determination process included in the frame image is decreased by a second predetermined value,
In the second map update process, the second map update unit includes:
When the fine movement occurrence area is specified in the first specifying process, the first value in the fine movement corresponding area corresponding to the specified fine movement generation area in the first map is set in the second map. Performing a copy process adopted as the second value corresponding to the first value;
In the second map, the second value other than the second value at which the copy process is executed is decreased by a third predetermined value,
The image processing apparatus repeatedly executes the first determination process, the first map update process, the second map update process, the first background model update process, and the first specifying process,
An image processing apparatus, further comprising: a foreground specifying unit that specifies the foreground image based on the second map on which the second update process has been performed.
前記第3所定値は、前記第2所定値よりも大きい、画像処理装置。 The image processing apparatus according to claim 1,
The image processing apparatus, wherein the third predetermined value is larger than the second predetermined value.
前記第2マップ更新部は、前記第1マップにおいて、前記撮像領域での、前記検出対象動体が存在する可能性が高い領域に対応する、互いに独立した複数の検出対象対応領域を特定し、
前記第2マップ更新部は、前記微動対応領域を含む前記検出対象対応領域内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用する、画像処理装置。 An image processing apparatus according to any one of claims 1 and 2,
The second map update unit identifies a plurality of detection target corresponding regions independent of each other in the first map, corresponding to a region where the detection target moving object is likely to exist in the imaging region,
The second map updating unit employs the first value in the detection target corresponding area including the fine movement corresponding area as the second value corresponding to the first value in the second map. , Image processing device.
前記第2マップ更新部は、前記微動対応領域を含む前記検出対象対応領域内の前記第1の値のうち、第1しきい値以上あるいは当該第1しきい値よりも大きい前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用する、画像処理装置。 The image processing apparatus according to claim 3,
The second map updating unit includes the first value greater than or equal to a first threshold value or greater than the first threshold value among the first values in the detection target corresponding region including the fine motion corresponding region. Is adopted as the second value corresponding to the first value in the second map.
前記第2マップ更新部は、互いに独立する複数の微動対応領域を含む前記検出対象対応領域の面積が第2しきい値以上あるいは当該第2しきい値よりも大きい場合には、当該複数の微動対応領域の外接矩形を求め、前記検出対象対応領域内の第1の値のうち、求めた当該外接矩形内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用する、画像処理装置。 An image processing apparatus according to any one of claims 3 and 4,
When the area of the detection target corresponding area including a plurality of fine movement corresponding areas independent from each other is greater than or equal to a second threshold value or larger than the second threshold value, the second map updating unit A circumscribed rectangle of the corresponding area is obtained, and among the first values in the detection target corresponding area, the obtained first value in the circumscribed rectangle corresponds to the first value in the second map. An image processing apparatus employed as the second value.
前記第2マップ更新部は、互いに独立する複数の微動対応領域を含む前記検出対象対応領域の面積が前記第2しきい値以上あるいは当該第2しきい値よりも大きい場合には、当該検出対象対応領域に対して、互いに距離が近い複数の微動対応領域を1つの微動グループとする微動グループ分け処理を行い、
前記第2マップ更新部は、前記検出対象対応領域に対する前記微動グループ分け処理で得られた各微動グループについて、当該微動グループを構成する複数の微動対応領域の外接矩形を求め、求めた各外接矩形について、当該検出対象対応領域内の第1の値のうち、当該外接矩形内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用する、画像処理装置。 The image processing apparatus according to claim 5,
The second map update unit is configured to detect the detection target when the area of the detection target corresponding region including a plurality of fine motion corresponding regions independent from each other is greater than or equal to the second threshold value or larger than the second threshold value. A fine movement grouping process in which a plurality of fine movement corresponding areas that are close to each other is made into one fine movement group is performed on the corresponding area,
The second map update unit obtains circumscribed rectangles of a plurality of fine movement corresponding areas constituting the fine movement group for each fine movement group obtained by the fine movement grouping process for the detection target corresponding area, and calculates each circumscribed rectangle. For the first value in the detection target corresponding region, the first value in the circumscribed rectangle is employed as the second value corresponding to the first value in the second map. , Image processing device.
前記微動特定部は、
前記入力動画像の第1及び第2フレーム画像間の差分画像を生成し、
前記差分画像における互いに独立する複数の動体領域を動体領域群として特定し、
前記動体領域群に対して、互いに距離が近い複数の動体領域を1つの第1グループとする第1グループ分け処理を行い、
前記微動特定部は、前記第1グループ分け処理において、動体領域が近くに存在しない孤立動体領域が前記動体領域群に存在する場合には、当該孤立動体領域を1つの前記第1グループとし、
前記差分画像に対する前記第1グループ分け処理の結果得られる複数の第1グループのそれぞれについての、当該第1グループを構成する動体領域を含む第1包含領域のうち、第1及び第2条件を満たす第1包含領域を特定する第2特定処理を行い、
前記第1条件は、前記第1包含領域の面積が第3しきい値以下あるいは当該第3しきい値未満であるという条件であって、
前記第2条件は、前記第1包含領域から所定距離以内に、前記第1条件を満たさない前記第1包含領域が存在しないという条件であり、
前記微動特定部は、前記撮影領域のうち、前記第2特定処理で特定された前記第1包含領域に対応する対応領域を前記微動発生領域とする、画像処理装置。 An image processing apparatus according to any one of claims 1 to 6,
The fine movement specifying unit
Generating a difference image between the first and second frame images of the input moving image;
A plurality of independent moving object regions in the difference image are specified as a moving object region group,
A first grouping process is performed on the moving object region group, with a plurality of moving object regions that are close to each other as one first group,
In the first grouping process, when the isolated moving object region in which no moving object region exists nearby exists in the moving object region group, the fine moving specifying unit sets the isolated moving object region as one first group,
For each of the plurality of first groups obtained as a result of the first grouping process on the difference image, the first and second conditions are satisfied among the first inclusion regions including the moving object regions constituting the first group. Performing a second specifying process for specifying the first inclusion region;
The first condition is a condition that an area of the first inclusion region is a third threshold value or less or less than the third threshold value,
The second condition is a condition that there is no first inclusion area that does not satisfy the first condition within a predetermined distance from the first inclusion area.
The fine movement specifying unit is an image processing apparatus in which a corresponding area corresponding to the first inclusion area specified in the second specifying process is set as the fine movement generation area in the photographing area.
前記微動特定部は、前記第1グループ分け処理において、処理対象に対して1つの第2グループを決定するグループ決定処理を繰り返し行う第2グループ分け処理を繰り返し実行し、
前記微動特定部は、最初の前記第2グループ分け処理での最初の前記グループ決定処理では、前記動体領域群を構成する複数の動体領域を前記処理対象とし、
前記微動特定部は、前記グループ決定処理において、
前記処理対象において、基準となる動体領域との距離が第4しきい値以下あるいは第4しきい値未満の他の動体領域が存在する場合には、当該基準となる動体領域と当該他の動体領域とを1つの前記第2グループとして決定し、
前記処理対象において前記他の動体領域が存在しない場合には、前記基準となる動体領域を1つの前記第2グループとして決定し、
前記微動特定部は、前記第2グループ分け処理において、2回目以降の前記グループ決定処理を行う場合には、直近の前記グループ決定処理での前記処理対象から、直近の前記グループ決定処理で決定された前記第2グループを除いた残りの部分を、新たな前記処理対象として前記グループ決定処理を実行し、
前記微動特定部は、前記第2グループ分け処理において、前記第2グループが決定できなくなるまで前記グループ決定処理を繰り返し実行すると、次の前記第2グループ分け処理を実行し、
前記微動特定部は、2回目以降の前記第2グループ分け処理を実行する場合には、直近の前記第2グループ分け処理で決定された各前記第2グループについての、当該第2グループを構成する動体領域を含む第2包含領域を新たな動体領域とし、当該新たな動体領域を前記処理対象として、前記第2グループ分け処理の最初の前記グループ決定処理を実行し、
前記微動特定部は、前記第2グループ分け処理で決定される前記第2グループの数がその前の前記第2グループ分け処理で決定される前記第2グループの数よりも減少しなくなるまで前記第2グループ分け処理を繰り返し実行したとき、前記第1グループ分け処理を終了し、
前記微動特定部は、前記第1グループ分け処理において最終的に得られた各前記第2グループについての、当該第2グループを構成する動体領域を、前記第1包含領域とする、画像処理装置。 The image processing apparatus according to claim 7,
In the first grouping process, the fine movement specifying unit repeatedly executes a second grouping process for repeatedly performing a group determination process for determining one second group for a processing target;
In the first group determination process in the first second grouping process, the fine movement specifying unit sets a plurality of moving body areas constituting the moving body area group as the processing target.
In the group determination process, the fine movement specifying unit
In the processing target, when there is another moving body area whose distance from the reference moving body area is equal to or smaller than the fourth threshold value or less than the fourth threshold value, the reference moving body area and the other moving body object A region is determined as one second group,
When the other moving object region does not exist in the processing target, the moving object region serving as the reference is determined as one second group,
In the second grouping process, the fine movement specifying unit is determined by the most recent group determination process from the process target in the most recent group determination process when performing the second or subsequent group determination process. The remaining portion excluding the second group is set as a new processing target, and the group determination process is executed.
In the second grouping process, the fine movement specifying unit repeatedly executes the group determination process until the second group cannot be determined, and then executes the second grouping process.
When executing the second grouping process after the second time, the fine movement specifying unit configures the second group for each of the second groups determined in the most recent second grouping process. The second inclusion area including the moving object area is set as a new moving object area, the new moving object area is set as the processing target, and the first group determination process of the second grouping process is executed.
The fine movement specifying unit may perform the first until the number of the second groups determined in the second grouping process does not decrease below the number of the second groups determined in the preceding second grouping process. When the two grouping process is repeatedly executed, the first grouping process is terminated,
The fine movement specifying unit is an image processing apparatus in which a moving body area constituting the second group for each of the second groups finally obtained in the first grouping process is the first inclusion area.
前記第1背景モデルと異なる第2背景モデルに基づいて、前記入力動画像のフレーム画像に含まれる画素が、前景画素か背景画素かを暫定的に判定する第2判定処理を行う第2判定部と、
前記フレーム画像に基づいて、前記第1背景モデル更新部とは異なる方法で前記第2背景モデルを更新する第2背景モデル更新部と
をさらに備え、
前記前景特定部は、前記第2マップと、前記第2判定処理の結果とに基づいて、前記前景画像を特定する、画像処理装置。 An image processing apparatus according to any one of claims 1 to 8,
A second determination unit that performs a second determination process that tentatively determines whether a pixel included in the frame image of the input moving image is a foreground pixel or a background pixel based on a second background model different from the first background model When,
A second background model update unit that updates the second background model based on the frame image in a different manner from the first background model update unit;
The said foreground specific part is an image processing apparatus which specifies the said foreground image based on the said 2nd map and the result of the said 2nd determination process.
前記第1背景モデル更新部は、前記フレーム画像でのある画素において、同程度の画素値が現れる頻度に応じて、前記第1背景モデルに含まれる、当該ある画素に対応する背景情報を更新する、画像処理装置。 An image processing apparatus according to any one of claims 1 to 9, wherein
The first background model update unit updates background information corresponding to the certain pixel included in the first background model according to the frequency with which a similar pixel value appears in a certain pixel in the frame image. , Image processing device.
前記第1背景モデルは、過去の前記フレーム画像の画素値をモデル化した混合正規分布に基づく背景モデルであって、
前記第1背景モデル更新部は、前記第1背景モデル更新処理において、前記フレーム画像のある画素の画素値に基づいて、当該ある画素に対応する前記混合正規分布を更新し、更新後の前記混合正規分布に含まれる複数の正規分布から、当該ある画素に対応する前記背景情報として使用する正規分布を決定する、画像処理装置。 The image processing apparatus according to claim 10,
The first background model is a background model based on a mixed normal distribution obtained by modeling pixel values of the past frame image,
In the first background model update process, the first background model update unit updates the mixed normal distribution corresponding to the certain pixel based on a pixel value of the certain pixel of the frame image, and the mixed mixture after the update An image processing apparatus that determines a normal distribution to be used as the background information corresponding to a certain pixel from a plurality of normal distributions included in the normal distribution.
前記第1背景モデル更新部は、前記第2マップ更新部が前記コピー処理を実行したとき、前記フレーム画像における、前記第1マップの前記微動対応領域内の前記第1の値に対応する画素に応じた前記混合正規分布を更新する際の学習率を減少させる、画像処理装置。 The image processing apparatus according to claim 11,
The first background model update unit applies pixels corresponding to the first value in the fine motion corresponding area of the first map in the frame image when the second map update unit executes the copy process. An image processing apparatus that reduces a learning rate when the corresponding mixed normal distribution is updated.
前記第2背景モデル更新部は、前記フレーム画像に含まれる画素の画素値が一定期間連続して同程度の値を示す場合に、当該画素値に基づいて前記第2背景モデルを更新する、画像処理装置。 An image processing apparatus according to any one of claims 9 to 12,
The second background model update unit updates the second background model based on the pixel value when the pixel value of the pixel included in the frame image continuously shows the same value for a certain period of time. Processing equipment.
前記コンピュータに、
(a)背景モデルに基づいて、前記入力動画像のフレーム画像に含まれる画素が、前景画素か背景画素かを暫定的に判定する工程と、
(b)前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第1の値が、当該複数の画素の位置に応じて並ぶ第1マップを更新する工程と、
(c)前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第2の値が、当該複数の画素の位置に応じて並ぶ第2マップを更新する工程と、
(d)前記フレーム画像に基づいて、前記背景モデルを更新する工程と、
(e)前記入力動画像に写る撮影領域において、前記検出対象動体の微動が発生している微動発生領域を特定する特定処理を行う工程と
を実行させ、
前記工程(b)において、
(b−1)前記フレーム画像に含まれる、前記判定処理で前記前景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第1所定値だけ増加する工程と、
(b−2)前記フレーム画像に含まれる、前記判定処理で前記背景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第2所定値だけ減少する工程と
を実行させ、
前記工程(c)において、
(c−1)前記特定処理で前記微動発生領域が特定されると、前記第1マップにおける、特定された前記微動発生領域に対応する微動対応領域内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用するコピー処理を実行する工程と、
(c−2)前記第2マップにおいて、前記コピー処理が実行される前記第2の値以外の前記第2の値を第3所定値だけ減少する工程と
を実行させ、
前記工程(a)〜(e)を繰り返し実行させ、
(f)前記工程(c)で更新された前記第2マップに基づいて前記前景画像を特定する工程をさらに実行させるための制御プログラム。 A control program for causing a computer to specify an image of a moving object to be detected in an input moving image as a foreground image,
In the computer,
(A) tentatively determining whether a pixel included in the frame image of the input moving image is a foreground pixel or a background pixel based on a background model;
(B) updating a first map in which a plurality of first values respectively corresponding to a plurality of pixels included in the frame image are arranged according to the positions of the plurality of pixels;
(C) updating a second map in which a plurality of second values respectively corresponding to a plurality of pixels included in the frame image are arranged according to the positions of the plurality of pixels;
(D) updating the background model based on the frame image;
(E) performing a specifying process for specifying a fine movement occurrence area in which a fine movement of the detection target moving body is generated in a shooting area reflected in the input moving image;
In the step (b),
(B-1) Increasing the first value in the first map corresponding to the pixel determined to be the foreground pixel by the determination process included in the frame image by a first predetermined value. Process,
(B-2) Decrease the first value in the first map corresponding to the pixel determined to be the background pixel in the determination process included in the frame image by a second predetermined value. Process and
In the step (c),
(C-1) When the fine movement occurrence area is specified by the specifying process, the first value in the fine movement corresponding area corresponding to the specified fine movement generation area in the first map is set to the second value. Executing a copy process employed as the second value corresponding to the first value in the map;
(C-2) In the second map, executing a step of reducing the second value other than the second value for which the copy process is executed by a third predetermined value;
The steps (a) to (e) are repeatedly executed,
(F) A control program for further executing a step of specifying the foreground image based on the second map updated in the step (c).
(a)背景モデルに基づいて、前記入力動画像のフレーム画像に含まれる画素が、前景画素か背景画素かを暫定的に判定する工程と、
(b)前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第1の値が、当該複数の画素の位置に応じて並ぶ第1マップを更新する工程と、
(c)前記フレーム画像に含まれる複数の画素にそれぞれ対応する複数の第2の値が、当該複数の画素の位置に応じて並ぶ第2マップを更新する工程と、
(d)前記フレーム画像に基づいて、前記背景モデルを更新する工程と、
(e)前記入力動画像に写る撮影領域において、前記検出対象動体の微動が発生している微動発生領域を特定する特定処理を行う工程と
を備え、
前記工程(b)は、
(b−1)前記フレーム画像に含まれる、前記判定処理で前記前景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第1所定値だけ増加する工程と、
(b−2)前記フレーム画像に含まれる、前記判定処理で前記背景画素であると判定された画素に対応する、前記第1マップでの前記第1の値を、第2所定値だけ減少する工程と
を有し、
前記工程(c)は、
(c−1)前記特定処理で前記微動発生領域が特定されると、前記第1マップにおける、特定された前記微動発生領域に対応する微動対応領域内の前記第1の値を、前記第2マップにおける、当該第1の値に対応する前記第2の値として採用するコピー処理を実行する工程と、
(c−2)前記第2マップにおいて、前記コピー処理が実行される前記第2の値以外の前記第2の値を第3所定値だけ減少する工程と
を有し、
前記工程(a)〜(e)は繰り返し実行され、
(f)前記工程(c)で更新された前記第2マップに基づいて前記前景画像を特定する工程をさらに備える、前景画像特定方法。 A foreground image specifying method in an image processing apparatus,
(A) tentatively determining whether a pixel included in the frame image of the input moving image is a foreground pixel or a background pixel based on a background model;
(B) updating a first map in which a plurality of first values respectively corresponding to a plurality of pixels included in the frame image are arranged according to the positions of the plurality of pixels;
(C) updating a second map in which a plurality of second values respectively corresponding to a plurality of pixels included in the frame image are arranged according to the positions of the plurality of pixels;
(D) updating the background model based on the frame image;
(E) performing a specifying process for specifying a fine movement occurrence area in which a fine movement of the detection target moving body is generated in a shooting area reflected in the input moving image;
The step (b)
(B-1) Increasing the first value in the first map corresponding to the pixel determined to be the foreground pixel by the determination process included in the frame image by a first predetermined value. Process,
(B-2) Decrease the first value in the first map corresponding to the pixel determined to be the background pixel in the determination process included in the frame image by a second predetermined value. A process,
The step (c)
(C-1) When the fine movement occurrence area is specified by the specifying process, the first value in the fine movement corresponding area corresponding to the specified fine movement generation area in the first map is set to the second value. Executing a copy process employed as the second value corresponding to the first value in the map;
(C-2) in the second map, a step of reducing the second value other than the second value at which the copy process is executed by a third predetermined value;
The steps (a) to (e) are repeatedly executed,
(F) A foreground image specifying method further comprising the step of specifying the foreground image based on the second map updated in the step (c).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015240747A JP6630140B2 (en) | 2015-12-10 | 2015-12-10 | Image processing apparatus, control program, and foreground image specifying method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015240747A JP6630140B2 (en) | 2015-12-10 | 2015-12-10 | Image processing apparatus, control program, and foreground image specifying method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017107407A true JP2017107407A (en) | 2017-06-15 |
JP6630140B2 JP6630140B2 (en) | 2020-01-15 |
Family
ID=59059883
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015240747A Expired - Fee Related JP6630140B2 (en) | 2015-12-10 | 2015-12-10 | Image processing apparatus, control program, and foreground image specifying method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6630140B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017151536A (en) * | 2016-02-22 | 2017-08-31 | 株式会社メガチップス | Image processing apparatus, control program, and area specification method |
JP2021531598A (en) * | 2018-07-05 | 2021-11-18 | エージェント ビデオ インテリジェンス リミテッドAgent Video Intelligence Ltd. | Systems and methods for use in object detection from video streams |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11296653A (en) * | 1998-04-06 | 1999-10-29 | Sanyo Electric Co Ltd | Image processor and human body detector using the same |
JP2003123074A (en) * | 2001-10-11 | 2003-04-25 | Sanyo Electric Co Ltd | Moving object detector, moving object detection method and moving object detection program |
JP2011123742A (en) * | 2009-12-11 | 2011-06-23 | Secom Co Ltd | Intruding object detector |
JP2014534786A (en) * | 2011-11-22 | 2014-12-18 | ペルコ インコーポレーテッドPelco, Inc. | Control based on map |
JP2015158837A (en) * | 2014-02-25 | 2015-09-03 | 株式会社メガチップス | Dynamic body detection device, dynamic body detection method and control program |
-
2015
- 2015-12-10 JP JP2015240747A patent/JP6630140B2/en not_active Expired - Fee Related
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH11296653A (en) * | 1998-04-06 | 1999-10-29 | Sanyo Electric Co Ltd | Image processor and human body detector using the same |
JP2003123074A (en) * | 2001-10-11 | 2003-04-25 | Sanyo Electric Co Ltd | Moving object detector, moving object detection method and moving object detection program |
JP2011123742A (en) * | 2009-12-11 | 2011-06-23 | Secom Co Ltd | Intruding object detector |
JP2014534786A (en) * | 2011-11-22 | 2014-12-18 | ペルコ インコーポレーテッドPelco, Inc. | Control based on map |
JP2015158837A (en) * | 2014-02-25 | 2015-09-03 | 株式会社メガチップス | Dynamic body detection device, dynamic body detection method and control program |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017151536A (en) * | 2016-02-22 | 2017-08-31 | 株式会社メガチップス | Image processing apparatus, control program, and area specification method |
JP2021531598A (en) * | 2018-07-05 | 2021-11-18 | エージェント ビデオ インテリジェンス リミテッドAgent Video Intelligence Ltd. | Systems and methods for use in object detection from video streams |
JP7255819B2 (en) | 2018-07-05 | 2023-04-11 | エージェント ビデオ インテリジェンス リミテッド | Systems and methods for use in object detection from video streams |
Also Published As
Publication number | Publication date |
---|---|
JP6630140B2 (en) | 2020-01-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020103647A1 (en) | Object key point positioning method and apparatus, image processing method and apparatus, and storage medium | |
JP6631179B2 (en) | Foreground image division method and apparatus, program, and recording medium | |
US9070207B2 (en) | Modelization of objects in images | |
KR101833364B1 (en) | Method and system for constructing personalized avatars using a parameterized deformable mesh | |
US9978119B2 (en) | Method for automatic facial impression transformation, recording medium and device for performing the method | |
JP6816058B2 (en) | Parameter optimization device, parameter optimization method, program | |
US20140072175A1 (en) | Fast articulated motion tracking | |
WO2020181872A1 (en) | Object detection method and apparatus, and electronic device | |
US9876965B2 (en) | Moving-image processing device, moving-image processing method, and information recording for determing interference | |
US20180096520A1 (en) | Image processing apparatus and method of controlling the same | |
KR20150079585A (en) | System and method for deriving accurate body size measures from a sequence of 2d images | |
JP2017510427A (en) | Radiation image lung segmentation technology and bone attenuation technology | |
US20180295289A1 (en) | Image processing apparatus, method, and storage medium | |
JP6630140B2 (en) | Image processing apparatus, control program, and foreground image specifying method | |
JP2022089839A (en) | Information processing apparatus, information processing method, and program | |
JP2010049297A (en) | Image monitoring device | |
JP5648452B2 (en) | Image processing program and image processing apparatus | |
JP2006130212A (en) | Method, device, and program for detecting abnormal shadow candidate | |
CN108885778B (en) | Image processing apparatus and image processing method | |
JP5639033B2 (en) | Image processing method, image processing apparatus, and image processing program | |
JP5620516B2 (en) | Stabilization method and computer system | |
JP2017151536A (en) | Image processing apparatus, control program, and area specification method | |
WO2021064960A1 (en) | Motion recognition method, motion recognition program, and information processing device | |
JP6952298B2 (en) | Line-of-sight conversion device and line-of-sight conversion method | |
US11481910B2 (en) | Image processing apparatus, image processing method and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181114 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20191021 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20191029 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20191107 |
|
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: 20191119 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20191206 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6630140 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
LAPS | Cancellation because of no payment of annual fees |