JP7003342B2 - Video separator, program and video separation method - Google Patents
Video separator, program and video separation method Download PDFInfo
- Publication number
- JP7003342B2 JP7003342B2 JP2021559701A JP2021559701A JP7003342B2 JP 7003342 B2 JP7003342 B2 JP 7003342B2 JP 2021559701 A JP2021559701 A JP 2021559701A JP 2021559701 A JP2021559701 A JP 2021559701A JP 7003342 B2 JP7003342 B2 JP 7003342B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- foreground
- images
- pixels
- moving image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/174—Segmentation; Edge detection involving the use of two or more images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/194—Segmentation; Edge detection involving foreground-background segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/20—Analysis of motion
- G06T7/254—Analysis of motion involving subtraction of images
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Description
本開示は、動画分離装置、プログラム及び動画分離方法に関する。 The present disclosure relates to a moving image separation device, a program and a moving image separation method.
動画に含まれているフレームにおいて、背景と前景とを分離する技術として、特許文献1に記載されている動画像処理装置がある。
従来の動画像処理装置は、各フレームを小領域に分割し、分割された領域毎に動きに基づく特徴量を算出し、算出された特徴量によって、小領域を分類することで、前景と背景とを分離する。As a technique for separating the background and the foreground in a frame included in a moving image, there is a moving image processing apparatus described in Patent Document 1.
The conventional moving image processing device divides each frame into small areas, calculates the feature amount based on the movement for each divided area, and classifies the small area according to the calculated feature amount, thereby performing the foreground and the background. And separate.
従来の技術は、各フレームを小領域に分割し、分割された領域毎に動きに基づく特徴量を算出しなければならないため、各フレームにおける前景と背景とを分離する際の処理コストが非常に高くなっている。 In the conventional technology, each frame must be divided into small areas, and the feature amount based on the movement must be calculated for each divided area, so that the processing cost for separating the foreground and the background in each frame is very high. It's getting higher.
そこで、本開示の一又は複数の態様は、動像データに含まれている画像において前景と背景とを分離する際の処理コストを低くすることを目的とする。 Therefore, one or more aspects of the present disclosure are aimed at reducing the processing cost when separating the foreground and the background in the image included in the moving image data.
本開示の一態様に係る動画分離装置は、移動する視点で撮像された動画から、前景が含まれる二つの画像を取得する画像取得部と、前記二つの画像から選択された一つの画像である選択画像から、前記前景に対応する部分の画像である部分画像を抽出し、前記部分画像と、前記二つの画像における前記選択画像とは異なる一つの画像である非選択画像とを用いて、前記二つの画像における前記前景の位置がずれているズレ量を特定するズレ量特定部と、前記ズレ量に従って、前記二つの画像の位置のずれを補正して、補正後の前記二つの画像の対応する画素毎に、又は、補正後の前記二つの画像の対応する複数の画素のグループ毎に、予め定められた面積の相関を算出する相関算出部と、前記算出された相関が予め定められた閾値よりも大きい画素を前記前景の画素とし、前記動画に含まれる一つの画像から、前記前景の画素の画素値を抽出した画像を前景画像として生成する閾値処理部と、を備えることを特徴とする。 The moving image separation device according to one aspect of the present disclosure is an image acquisition unit that acquires two images including a foreground from a moving image captured from a moving viewpoint, and one image selected from the two images. A partial image, which is an image of a portion corresponding to the foreground, is extracted from the selected image, and the partial image and a non-selected image, which is one image different from the selected image in the two images, are used. Correspondence between the corrected amount of deviation specifying part for specifying the amount of deviation of the foreground position in the two images and the corrected amount of deviation of the two images by correcting the deviation of the positions of the two images according to the amount of deviation. A correlation calculation unit that calculates the correlation of a predetermined area and the calculated correlation are predetermined for each pixel to be used or for each group of a plurality of corresponding pixels of the two images after correction. A feature is that a pixel larger than the threshold is used as the foreground pixel, and a threshold processing unit for generating an image obtained by extracting the pixel value of the foreground pixel from one image included in the moving image as a foreground image is provided. do.
本開示の一態様に係るプログラムは、コンピュータを、移動する視点で撮像された動画から、前景が含まれる二つの画像を取得する画像取得部、前記二つの画像から選択された一つの画像である選択画像から、前記前景に対応する部分の画像である部分画像を抽出し、前記部分画像と、前記二つの画像における前記選択画像とは異なる一つの画像である非選択画像とを用いて、前記二つの画像における前記前景の位置がずれているズレ量を特定するズレ量特定部、前記ズレ量に従って、前記二つの画像の位置のずれを補正して、補正後の前記二つの画像の対応する画素毎に、又は、補正後の前記二つの画像の対応する複数の画素のグループ毎に、予め定められた面積の相関を算出する相関算出部、及び、前記算出された相関が予め定められた閾値よりも大きい画素を前記前景の画素とし、前記動画に含まれる一つの画像から、前記前景の画素の画素値を抽出した画像を前景画像として生成する閾値処理部、として機能させることを特徴とする。 The program according to one aspect of the present disclosure is an image acquisition unit that acquires two images including a foreground from a moving image captured by a moving viewpoint, and one image selected from the two images. A partial image, which is an image of a portion corresponding to the foreground, is extracted from the selected image, and the partial image and a non-selected image, which is one image different from the selected image in the two images, are used. The deviation amount specifying unit that specifies the deviation amount of the foreground position in the two images, and the deviation amount of the two images is corrected according to the deviation amount, and the corrected two images correspond to each other. A correlation calculation unit for calculating the correlation of a predetermined area and the calculated correlation are predetermined for each pixel or for each group of a plurality of corresponding pixels of the two images after correction. A feature is that pixels larger than the threshold are used as the foreground pixels, and the image is used as a threshold processing unit that generates an image obtained by extracting the pixel values of the foreground pixels from one image included in the moving image as a foreground image. do.
本発明の一態様に係る動画分離方法は、画像取得部が、移動する視点で撮像された動画から、前景が含まれる二つの画像を取得し、ズレ量特定部が、前記二つの画像から選択された一つの画像である選択画像から、前記前景に対応する部分の画像である部分画像を抽出し、前記部分画像と、前記二つの画像における前記選択画像とは異なる一つの画像である非選択画像とを用いて、前記二つの画像における前記前景の位置がずれているズレ量を特定し、相関算出部が、前記ズレ量に従って、前記二つの画像の位置のずれを補正し、補正後の前記二つの画像の対応する画素毎に、又は、補正後の前記二つの画像の対応する複数の画素のグループ毎に、予め定められた面積の相関を算出し、閾値処理部が、前記算出された相関が予め定められた閾値よりも大きい画素を前記前景の画素とし、前記動画に含まれる一つの画像から、前記前景の画素の画素値を抽出した画像を前景画像として生成することを特徴とする。 In the moving image separation method according to one aspect of the present invention, the image acquisition unit acquires two images including the foreground from the moving image captured from the moving viewpoint, and the deviation amount specifying unit selects from the two images. A partial image which is an image of a portion corresponding to the foreground is extracted from the selected image which is one image, and the partial image and the non-selection which is one image different from the selected image in the two images. Using the images, the amount of misalignment of the foreground in the two images is specified, and the correlation calculation unit corrects the misalignment of the positions of the two images according to the amount of misalignment, and after correction . Correlation of a predetermined area is calculated for each corresponding pixel of the two images or for each group of a plurality of corresponding pixels of the corrected two images, and the threshold processing unit calculates the above. A pixel whose correlation is larger than a predetermined threshold is used as the foreground pixel, and an image obtained by extracting the pixel values of the foreground pixel from one image included in the moving image is generated as the foreground image. It is a feature.
本開示の一又は複数の態様によれば、動像に含まれている画像において前景と背景とを分離する際の処理コストを低くすることができる。 According to one or more aspects of the present disclosure, it is possible to reduce the processing cost when separating the foreground and the background in the image included in the moving image.
実施の形態1.
図1は、実施の形態1に係る動画分離装置100の構成を概略的に示すブロック図である。
動画分離装置100は、動画入力部101と、画像取得部102と、ズレ量特定部103と、相関算出部104と、閾値処理部105と、画像出力部106とを備える。Embodiment 1.
FIG. 1 is a block diagram schematically showing the configuration of the moving
The moving
動画入力部101は、外部のカメラから動画の入力を受け付ける。動画入力部101は、入力された動画を画像取得部102に与える。動画には、複数の画像が複数のフレームとして含まれている。
ここでの動画は、カメラが移動しながら前景となる対象を撮像した動画である。言い換えると、カメラを移動させることで、カメラの視点も移動しているものとする。具体的には、実施の形態1における動画は、ヘリコプターから電線を写したものとする。このため、実施の形態1における動画は、移動する視点で撮像された動画である。The
The moving image here is a moving image of an object in the foreground while the camera is moving. In other words, by moving the camera, it is assumed that the viewpoint of the camera is also moving. Specifically, it is assumed that the moving image in the first embodiment is a copy of an electric wire from a helicopter. Therefore, the moving image in the first embodiment is a moving image taken from a moving viewpoint.
実施の形態1においては、動画において、前景は時間によって大きく変化せず、前景と背景とは時間によって変化に差があることを前提とする。 In the first embodiment, it is premised that the foreground does not change significantly with time in the moving image, and there is a difference in the change between the foreground and the background with time.
画像取得部102は、動画から、前景が含まれる二つの画像を取得する。
例えば、画像取得部102は、動画に含まれている複数のフレームから、時間的に近い二つのフレームを取得する。ここでは、取得された二つのフレームの内、時間的に早い方のフレームを第1のフレーム、遅い方のフレームを第2のフレームとする。The image acquisition unit 102 acquires two images including the foreground from the moving image.
For example, the image acquisition unit 102 acquires two frames that are close in time from a plurality of frames included in the moving image. Here, of the two acquired frames, the earlier frame in time is referred to as the first frame, and the later frame is referred to as the second frame.
具体的には、画像取得部102は、動画に含まれている複数のフレームの内、予め定められた時間内に含まれる二つのフレーム、又は、予め定められたフレーム数内に含まれている二つのフレームを取得すればよい。ここでは、画像取得部102は、連続する二つのフレームを取得するものとする。 Specifically, the image acquisition unit 102 is included in two frames included in a predetermined time or within a predetermined number of frames among a plurality of frames included in the moving image. All you have to do is get two frames. Here, it is assumed that the image acquisition unit 102 acquires two consecutive frames.
図2(A)及び(B)は、画像取得部102が取得した二つのフレームを示す概略図である。ここでは、図2(A)が第1のフレーム110を示し、図2(B)が第2のフレーム111を示す。
第1のフレーム110には、前景となる電線112Aが写っており、電線112A以外の部分が背景となる。ここでは、前景となる電線112Aに焦点が合っており、その背景の森は、ぼけて写っているものとする。背景がぼけているため、森がぼけた模様113A、114Aとして写っているものとする。2A and 2B are schematic views showing two frames acquired by the image acquisition unit 102. Here, FIG. 2A shows the
The
また、第2のフレームにも、前景となる電線112Bが写っており、電線112B以外の部分が背景となる。背景には、ぼけた模様113B、114Bとして、森が写っている。
ここで、カメラは、D方向に移動しているものとする。Further, the
Here, it is assumed that the camera is moving in the D direction.
ズレ量特定部103、取得された二つのフレームにおける前景の位置がずれているズレ量を特定する。
例えば、ズレ量特定部103は、取得された二つのフレームに写っている部分が一致するように、これらの二つのフレームの位置がずれているズレ量を特定する。
具体的には、ズレ量特定部103は、これらの二つのフレームに含まれている前景となる部分が一致するように、これらの二つのフレームの位置のズレ量を特定すればよい。具体的には、ズレ量特定部103は、二つのフレームの全体の相関を求めることで、ズレ量を特定している。なお、ズレ量特定部103は、特徴点のマッチングで、ズレ量を特定してもよい。The deviation amount specifying unit 103 specifies the deviation amount in which the positions of the foregrounds in the two acquired frames are displaced.
For example, the deviation amount specifying unit 103 specifies the deviation amount in which the positions of these two frames are displaced so that the portions reflected in the two acquired frames match.
Specifically, the deviation amount specifying unit 103 may specify the deviation amount of the positions of these two frames so that the foreground portions included in these two frames match. Specifically, the deviation amount specifying unit 103 specifies the deviation amount by obtaining the correlation of the entire two frames. The deviation amount specifying unit 103 may specify the deviation amount by matching feature points.
図3は、ズレ量特定部103でのズレ量の特定を説明するための概略図である。
第1のフレーム110及び第2のフレーム111は、D方向に移動するカメラで撮像されている。このため、第1のフレーム110に含まれている部分と、第2のフレーム111に含まれている対応する部分とを重ね合わせると、図3に示されているように、第2のフレーム111は、第1のフレーム110に対してD方向にずれることとなる。また、カメラの振動又は移動方向に応じて、フレームは、縦方向にもずれる。FIG. 3 is a schematic diagram for explaining the specification of the deviation amount by the deviation amount specifying unit 103.
The
以上のようなずれを補正するため、ズレ量特定部103は、横方向のズレ量Xと、縦方向のズレ量Yとを特定する。例えば、上述のように、前景である電線112A、112Bに焦点が合っており、背景がぼけている場合には、第1のフレーム110及び第2のフレーム111の画像全体の相関を算出すると、電線112Aの対応する部分と、電線112Bの対応する部分とが一致している場合に、相関が高くなる。このため、図3に示されているように、第1のフレーム110に写っている電線112Aと、第2のフレーム111に写っている電線112Bとの対応する部分同士が重なり合っている場合に、相関が高くなる。
In order to correct the deviation as described above, the deviation amount specifying unit 103 specifies the deviation amount X in the horizontal direction and the deviation amount Y in the vertical direction. For example, as described above, when the foreground
また、特徴点のマッチングを行う場合でも、焦点の合っている対象同士が一致している場合に、マッチングしている度合いが高くなるため、図3と同様のズレ量X、Yを特定することができる。 Further, even when matching feature points, the degree of matching is high when the focused objects match each other. Therefore, the same deviation amounts X and Y as in FIG. 3 should be specified. Can be done.
相関算出部104は、ズレ量特定部103で特定されたズレ量に従って、二つのフレームの位置のずれを補正して、補正後の二つのフレームの対応する画素毎に、予め定められた面積の相関を算出する。
例えば、相関算出部104は、第1のフレーム110及び第2のフレーム111の何れか一方を、ズレ量特定部103で特定されたズレ量だけずらして、一致する画素毎に、予め定められた大きさのウィンドウの相関を算出する。The
For example, the
図4は、相関算出部104で算出された相関を、画素毎に予め定められた範囲の値毎に分類した相関画像114を示す概略図である。
図4の相関画像114に示されているように、前景となる電線に対応する部分は、相対的に相関が高くなり、その他の部分である背景は、相対的に相関が低くなる。FIG. 4 is a schematic diagram showing a
As shown in the
このため、閾値処理部105は、画素毎の相関を、予め定められた閾値と比較することにより、予め定められた閾値よりも高い相関となっている画素を前景の画素として特定し、それ以外の画素を背景の画素として特定する。 Therefore, the threshold processing unit 105 identifies the pixel having a higher correlation than the predetermined threshold as the pixel in the foreground by comparing the correlation for each pixel with the predetermined threshold, and other than that. Is specified as a background pixel.
そして、閾値処理部105は、動画に含まれているフレーム、ここでは、第1のフレーム110及び第2のフレーム111の少なくとも何れか一方において、前景の画素の画素値を抽出した画像である前景画像と、背景の画素の画素値を抽出した画像である背景画像とを生成する。
なお、前景画像は、背景の画素の画素値を抽出せずに、前景の画素の画素値を抽出した画像であり、背景画像は、前景の画素の画素値を抽出せずに、背景の画素の画素値を抽出した画像である。Then, the threshold processing unit 105 is an image obtained by extracting the pixel values of the pixels of the foreground in at least one of the frames included in the moving image, here, the
The foreground image is an image obtained by extracting the pixel values of the foreground pixels without extracting the pixel values of the background pixels, and the background image is an image obtained by extracting the pixel values of the foreground pixels without extracting the pixel values of the foreground pixels. It is an image obtained by extracting the pixel value of.
画像出力部106は、前景画像及び背景画像の少なくとも何れか一方を出力する。
The
図5は、動画分離装置100のハードウェア構成例を示すブロック図である。
動画分離装置100は、I/O(In or Out)インタフェース120と、不揮発性メモリとして機能する補助記憶装置121と、プロセッサとして機能するCPU(Central Processing Unit)122と、メインメモリ123とがバス124に接続されているコンピュータにより実現することができる。FIG. 5 is a block diagram showing a hardware configuration example of the moving
In the moving
具体的には、動画入力部101及び画像出力部106は、I/Oインタフェース120より実現することができる。
画像取得部102、ズレ量特定部103、相関算出部104及び閾値処理部105は、CPU122が、補助記憶装置121に記憶されているプログラムをメインメモリ123に読み出して、そのプログラムを実行することで実現することができる。Specifically, the moving
The image acquisition unit 102, the deviation amount specifying unit 103, the
なお、そのようなプログラムは、ネットワークを通じて提供されてもよく、また、記録媒体に記録されて提供されてもよい。即ち、このようなプログラムは、例えば、プログラムプロダクトとして提供されてもよい。 It should be noted that such a program may be provided through a network, or may be recorded and provided on a recording medium. That is, such a program may be provided, for example, as a program product.
なお、撮像装置としてのカメラ125は、動画を動画分離装置100に出力する。
動画分離装置100は、生成された前景画像及び生成された背景画像の少なくとも何れか一方を、表示装置としてのディスプレイ126に出力することで、前景画像及び背景画像の少なくとも何れか一方を、ディスプレイ126に表示させる。The
The moving
また、図5に示されている例では、カメラ125及びディスプレイ126は、動画分離装置100に含まれていないが、これらの少なくとも何れか一方が、動画分離装置100に含まれていてもよい。
例えば、カメラ125が動画分離装置100に含まれている場合には、カメラ125は、動画を撮像する撮像部として機能する。
また、ディスプレイ126が動画分離装置100に含まれている場合には、ディスプレイ126は、前景画像及び背景画像の少なくとも何れか一方を表示する表示部として機能する。Further, in the example shown in FIG. 5, the
For example, when the
Further, when the
図6は、実施の形態1における動画分離装置100での処理を示すフローチャートである。
まず、動画入力部101は、外部のカメラから動画の入力を受け付ける(S10)。動画入力部101は、入力された動画を画像取得部102に与える。FIG. 6 is a flowchart showing the processing in the moving
First, the
次に、画像取得部102は、動画に含まれている複数のフレームから、時間的に近い二つのフレームを、第1のフレーム及び第2のフレームとして取得する(S11)。ここでは、取得された二つのフレームの内、時間的に早い方のフレームを第1のフレーム、遅い方のフレームを第2のフレームとする。そして、画像取得部102は、取得された第1のフレーム及び第2のフレームをズレ量特定部103に与える。 Next, the image acquisition unit 102 acquires two frames that are close in time from a plurality of frames included in the moving image as a first frame and a second frame (S11). Here, of the two acquired frames, the earlier frame in time is referred to as the first frame, and the later frame is referred to as the second frame. Then, the image acquisition unit 102 gives the acquired first frame and the second frame to the deviation amount specifying unit 103.
次に、ズレ量特定部103は、取得された二つのフレームに写っている部分が一致するように、これらの二つのフレームの位置がずれているズレ量を特定する(S12)。ズレ量特定部103は、特定されたズレ量と、第1のフレーム及び第2のフレームとを相関算出部104に与える。
Next, the deviation amount specifying unit 103 specifies the deviation amount in which the positions of these two frames are displaced so that the portions reflected in the two acquired frames match (S12). The deviation amount specifying unit 103 gives the specified deviation amount and the first frame and the second frame to the
次に、相関算出部104は、第1のフレーム110及び第2のフレーム111の何れか一方を、与えられたズレ量だけずらして、一致する画素毎に、予め定められた大きさのウィンドウ毎に相関を算出する(S13)。そして、相関算出部104は、算出された相関を画素毎に示す相関データと、ズレ量と、第1のフレーム及び第2のフレームとを閾値処理部105に与える。
Next, the
次に、閾値処理部105は、相関データで示されている相関を、画素毎に、予め定められた閾値と比較することで、予め定められた閾値よりも高い相関となっている画素を前景の画素として特定し、それ以外の画素を背景の画素として特定する(S14)。 Next, the threshold value processing unit 105 compares the correlation shown in the correlation data with a predetermined threshold value for each pixel, so that the pixel having a higher correlation than the predetermined threshold value is in the foreground. The other pixels are specified as background pixels (S14).
そして、閾値処理部105は、第1のフレーム110及び第2のフレーム111の少なくとも何れか一方において、前景の画素の画素値からなる画像である前景画像と、背景の画素の画素値からなる画像である背景画像とを生成する(S15)。閾値処理部105は、生成された前景画像及び背景画像の少なくとも何れか一方を、画像出力部106に与える。
Then, the threshold processing unit 105 in at least one of the
次に、画像出力部106は、前景画像及び背景画像の少なくとも何れか一方を出力する(S16)。
Next, the
以上のように、実施の形態1に係る動画分離装置100によれば、処理コストが少なく、精度よく背景と前景とを分離することができる。
As described above, according to the moving
実施の形態1では、ズレ量特定部103は、図3に示されているように、第1のフレーム110及び第2のフレーム111の全体からズレ量X、Yを特定しているが、実施の形態1は、このような例に限定されない。例えば、ズレ量特定部103は、第1のフレーム110及び第2のフレームを、同じように複数の分割フレームに分割して、分割フレーム毎にズレ量を算出してもよい。
In the first embodiment, as shown in FIG. 3, the deviation amount specifying unit 103 specifies the deviation amounts X and Y from the entire
図7(A)~(H)は、第1のフレーム110及び第2のフレームを分割して、ズレ量を算出する処理を説明するための概略図である。
例えば、ズレ量特定部103は、図7(A)に示されている第1のフレーム110を、横方向の真ん中で分割することにより、図7(B)に示されている第1の分割フレーム110Aと、図7(C)に示されている第2の分割フレーム110Bとを生成する。7 (A) to 7 (H) are schematic views for explaining a process of dividing the
For example, the deviation amount specifying unit 103 divides the
同様に、ズレ量特定部103は、図7(D)に示されている第2のフレーム111を、横方向の真ん中で分割することにより、図7(E)に示されている第3の分割フレーム111Aと、図7(F)に示されている第4の分割フレーム111Bとを生成する。
Similarly, the deviation amount specifying unit 103 divides the
そして、ズレ量特定部103は、図7(G)に示されているように、第1の分割フレーム110Aと、第3の分割フレーム111Aとの間で位置のズレ量を、図3と同様に特定することで、これらの位置のズレ量である分割ズレ量X1、Y1を特定する。
同様に、ズレ量特定部103は、図7(H)に示されているように、第2の分割フレーム110Bと、第4の分割フレーム111Bとの間で位置のズレ量を特定し、これらの位置のズレ量である分割ズレ量X2、Y2を特定する。Then, as shown in FIG. 7 (G), the deviation amount specifying unit 103 sets the deviation amount between the first divided
Similarly, as shown in FIG. 7 (H), the deviation amount specifying unit 103 identifies the displacement amount between the second divided
このような場合、相関算出部104は、第1の分割フレーム110A又は第3の分割フレーム111Aに含まれている画素については、分割ズレ量X1、Y1を用いて、対応する画素を特定して、相関を算出すればよい。
同様に、相関算出部104は、第2の分割フレーム110B又は第4の分割フレーム111Bに含まれている画素については、分割ズレ量X2、Y2を用いて、対応する画素を特定して、相関を算出すればよい。In such a case, the
Similarly, for the pixels included in the second
また、画像取得部102又はズレ量特定部103は、第1のフレーム及び第2のフレームがカラーである場合に、これらをグレースケールに変換してもよい。そして、ズレ量特定部及び相関算出部104は、グレースケールに変換された第1のフレーム及び第2のフレームを用いて、上述の処理を行ってもよい。
Further, the image acquisition unit 102 or the deviation amount specifying unit 103 may convert the first frame and the second frame into gray scale when they are in color. Then, the deviation amount specifying unit and the
なお、実施の形態1では、取得された二つのフレームの内、時間的に早い方のフレームを第1のフレーム、遅い方のフレームを第2のフレームとしているが、時間的に早い方のフレームを第2のフレーム、遅い方のフレームを第1のフレームとしてもよい。 In the first embodiment, of the two acquired frames, the earlier frame is the first frame and the later frame is the second frame, but the earlier frame is the earlier frame. May be the second frame, and the slower frame may be the first frame.
実施の形態2.
図1に示されているように、実施の形態2に係る動画分離装置200は、動画入力部101と、画像取得部202と、ズレ量特定部103と、相関算出部104と、閾値処理部205と、画像出力部106とを備える。Embodiment 2.
As shown in FIG. 1, the moving image separation device 200 according to the second embodiment includes a moving
実施の形態2に係る動画分離装置200の動画入力部101、ズレ量特定部103、相関算出部104及び画像出力部106は、実施の形態1に係る動画分離装置100の動画入力部101、ズレ量特定部103、相関算出部104及び画像出力部106と同様である。
The
なお、実施の形態2では、動画入力部101に入力される動画は、インターレース方式で撮像された動画であるものとする。インターレース方式は、画像伝送の方式の一種で、走査線を1本おきに2回に分けて伝送する方式である。
In the second embodiment, the moving image input to the moving
画像取得部202は、動画に含まれている一つのフレームから、二つのフレームを取得する。ここでは、インターレース方式の動画であるため、画像取得部202は、一つのフレームに含まれている奇数行の画素の画素値を抽出した第1のフレームと、偶数行の画素の画素値を抽出した第2のフレームとを取得する。 The image acquisition unit 202 acquires two frames from one frame included in the moving image. Here, since it is an interlaced moving image, the image acquisition unit 202 extracts the pixel values of the pixels of the even-numbered rows and the first frame from which the pixel values of the pixels of the odd-numbered rows included in one frame are extracted. The second frame is acquired.
図8(A)~(C)は、実施の形態2において、動画に含まれている一つのフレーム215と、その一つのフレーム215から取得された第1のフレーム210及び第2のフレーム211とを示す概略図である。
実施の形態2では、図8(A)に示されている一つのフレーム215から、図8(B)に示されているように、奇数行の画素のみが抽出された第1のフレーム210と、図8(C)に示されているように、偶数行の画素のみが抽出された第2のフレーム211とが取得される。8 (A) to 8 (C) show, in the second embodiment, one
In the second embodiment, from one
閾値処理部205は、相関算出部104で算出された相関を、画素毎に予め定められた閾値と比較することにより、予め定められた閾値よりも高い相関となっている画素を前景の画素として特定し、それ以外の画素を背景の画素として特定する。
The threshold processing unit 205 compares the correlation calculated by the
そして、閾値処理部205は、第1のフレーム及び第2のフレームを取得した元のフレームから、前景の画素の画素値を抽出した画像である前景画像と、背景の画素の画素値を抽出した画像である背景画像とを生成する。 Then, the threshold processing unit 205 extracts the foreground image, which is an image obtained by extracting the pixel values of the foreground pixels, and the pixel values of the background pixels from the original frame from which the first frame and the second frame are acquired. Generates a background image that is an image.
以上のように、実施の形態2では、インターレース方式の動画の一つのフレームから、奇数行のみの第1のフレームと、偶数行のみの第2のフレームとが取得される。このように取得された第1のフレーム及び第2のフレームは、ズレ量特定部103でズレ量が特定されるため、インターレース方式における、奇数行と偶数行との時間的なズレによるボケが解消される。 As described above, in the second embodiment, the first frame having only odd-numbered rows and the second frame having only even-numbered rows are acquired from one frame of the interlaced moving image. Since the deviation amount of the first frame and the second frame acquired in this way is specified by the deviation amount specifying unit 103, the blurring due to the temporal deviation between the odd-numbered rows and the even-numbered rows in the interlace method is eliminated. Will be done.
従って、実施の形態2によれば、一つのフレームから、その一つのフレームのボケを解消しながら、前景と背景との分離を行うことができる。 Therefore, according to the second embodiment, it is possible to separate the foreground and the background from one frame while eliminating the blurring of the one frame.
実施の形態3.
図1に示されているように、実施の形態3に係る動画分離装置300は、動画入力部101と、画像取得部102と、ズレ量特定部303と、相関算出部104と、閾値処理部105と、画像出力部106とを備える。Embodiment 3.
As shown in FIG. 1, the moving image separation device 300 according to the third embodiment includes a moving
実施の形態3に係る動画分離装置300の動画入力部101、画像取得部102、相関算出部104、閾値処理部105及び画像出力部106は、実施の形態1に係る動画分離装置100の動画入力部101、画像取得部102、相関算出部104、閾値処理部105及び画像出力部106と同様である。
The
ズレ量特定部303は、取得された二つのフレームに写っている部分が一致するように、これらの二つのフレームの位置がずれているズレ量を特定する。
実施の形態3では、これらの二つのフレームから選択された一つのフレームから、前景の特徴に一致する部分のみを抽出した部分画像を用いて、他のフレームとのズレ量を特定する。ここで、二つのフレームから選択された一つのフレームを選択画像、残りのフレームを非選択画像ともいう。The deviation amount specifying unit 303 specifies the deviation amount in which the positions of these two frames are displaced so that the portions reflected in the two acquired frames match.
In the third embodiment, the amount of deviation from the other frames is specified by using a partial image obtained by extracting only the portion matching the characteristics of the foreground from one frame selected from these two frames. Here, one frame selected from the two frames is also referred to as a selected image, and the remaining frames are also referred to as a non-selected image.
図9(A)及び(B)は、実施の形態3におけるズレ量特定部303の処理を説明するための概略図である。
ここでは、取得された二つのフレームの内の第1のフレームを例に、具体例を説明するが、第2のフレームが用いられてもよい。
ズレ量特定部303は、例えば、図9(A)に示されている第1のフレーム110から、前景となる電線112Aの特徴を用いて、図9(B)に示されているようなマスク画像316を生成する。9 (A) and 9 (B) are schematic views for explaining the processing of the deviation amount specifying unit 303 in the third embodiment.
Here, a specific example will be described using the first frame of the two acquired frames as an example, but the second frame may be used.
The deviation amount specifying unit 303 is, for example, a mask as shown in FIG. 9 (B) from the
電線112Aは、例えば、灰色に近い色を備えているため、ズレ量特定部303は、第1のフレーム110から、電線112Aの灰色に対応する彩度の範囲を特定することで、図9(B)に示されているようなマスク画像316を生成することができる。
Since the
図9(A)に示されている第1のフレーム110には、実施の形態1と同様、前景となる電線112Aが写っており、電線112A以外の部分が背景となり、背景となる森がぼけた模様113A、114Aとして写っている。
図9(B)に示されているマスク画像316は、前景に対応する領域317と、背景に対応する領域318とに分けられる。Similar to the first embodiment, the
The
そして、ズレ量特定部303は、図9(B)に示されているマスク画像316を用いて、図9(A)に示されている第1のフレーム110から、前景に対応する領域317の部分の画像である部分画像を抽出することができる。
Then, the deviation amount specifying unit 303 uses the
ズレ量特定部303は、抽出された部分画像と、第2のフレームとの全体の相関を求めることで、ズレ量を特定する。
ここで、抽出された部分画像には、図9(A)に示されている模様113A、114Aが含まれないため、ズレ量特定部303は、前景のズレを正確に特定することができる。The deviation amount specifying unit 303 specifies the deviation amount by obtaining the overall correlation between the extracted partial image and the second frame.
Here, since the extracted partial image does not include the
以上のように、実施の形態3によれば、背景の影響を抑制して、前景のズレを正確に特定することができるようになる。 As described above, according to the third embodiment, it is possible to suppress the influence of the background and accurately identify the deviation of the foreground.
以上に記載された実施の形態1~3では、閾値処理部105、205は、前景画像及び背景画像を生成しているが、前景画像だけを生成してもよい。 In the above-described embodiments 1 to 3, the threshold processing units 105 and 205 generate the foreground image and the background image, but only the foreground image may be generated.
以上に記載された実施の形態1~3では、相関算出部104は、補正後の二つのフレームの対応する画素毎に、予め定められた面積の相関を算出しているが、実施の形態1~3は、このような例に限定されない。
例えば、相関算出部104は、補正後の二つのフレームの対応する複数の画素のグループ毎に、予め定められた面積の相関を算出してもよい。具体的には、相関算出部104は、5×9等の予め定められた大きさのウィンドウにおける相関を、そのウィンドウ内の予め定められた複数の画素のグループに含まれている各々の画素における相関とすることもできる。これにより、相関を算出する際の算出負荷を軽減することができる。なお、複数の画素のグループには、そのウィンドウの中心の画素が含まれていることが望ましい。In the above-described embodiments 1 to 3, the
For example, the
100,200,300 動画分離装置、 101 動画入力部、 102,202 画像取得部、 103,303 ズレ量特定部、 104 相関算出部、 105,205 閾値処理部、 106 画像出力部。 100, 200, 300 video separator, 101 video input unit, 102, 202 image acquisition unit, 103, 303 deviation amount identification unit, 104 correlation calculation unit, 105, 205 threshold processing unit, 106 image output unit.
Claims (11)
前記二つの画像から選択された一つの画像である選択画像から、前記前景に対応する部分の画像である部分画像を抽出し、前記部分画像と、前記二つの画像における前記選択画像とは異なる一つの画像である非選択画像とを用いて、前記二つの画像における前記前景の位置がずれているズレ量を特定するズレ量特定部と、
前記ズレ量に従って、前記二つの画像の位置のずれを補正して、補正後の前記二つの画像の対応する画素毎に、又は、補正後の前記二つの画像の対応する複数の画素のグループ毎に、予め定められた面積の相関を算出する相関算出部と、
前記算出された相関が予め定められた閾値よりも大きい画素を前記前景の画素とし、前記動画に含まれる一つの画像から、前記前景の画素の画素値を抽出した画像を前景画像として生成する閾値処理部と、を備えること
を特徴とする動画分離装置。 An image acquisition unit that acquires two images including the foreground from a moving image captured from a moving viewpoint, and an image acquisition unit.
A partial image, which is an image of a portion corresponding to the foreground, is extracted from the selected image, which is one image selected from the two images, and the partial image and the selected image in the two images are different from each other. Using a non-selected image, which is one image, a deviation amount specifying unit for specifying a deviation amount in which the position of the foreground is displaced in the two images is used .
According to the amount of deviation, the displacement of the positions of the two images is corrected for each corresponding pixel of the corrected two images, or for each group of a plurality of corresponding pixels of the corrected two images. In addition, a correlation calculation unit that calculates the correlation of a predetermined area,
Pixels whose calculated correlation is larger than a predetermined threshold value are defined as the foreground pixels, and an image obtained by extracting the pixel values of the foreground pixels from one image included in the moving image is generated as the foreground image. A video separation device characterized by having a processing unit.
を特徴とする請求項1に記載の動画分離装置。 The threshold processing unit is characterized in that, in the one image, pixels other than the pixels in the foreground are used as background pixels, and an image obtained by extracting the pixel values of the background pixels from the one image is generated as the background image. The moving image separation device according to claim 1.
を特徴とする請求項1又は2に記載の動画分離装置。 The moving image separation device according to claim 1 or 2, wherein the image acquisition unit acquires two frames within a predetermined time in the moving image as the two images.
を特徴とする請求項1又は2に記載の動画分離装置。 The moving image separation device according to claim 1 or 2, wherein the image acquisition unit acquires two frames within a predetermined number of frames in the moving image as the two images.
を特徴とする請求項1から4の何れか一項に記載の動画分離装置。 The moving image separation device according to any one of claims 1 to 4, wherein the one image is one of the two images.
前記画像取得部は、前記動画に含まれる一つのフレームから、奇数行の画素の画素値を抽出した画像と、偶数行の画素の画素値を抽出した画像とを前記二つの画像として取得すること
を特徴とする請求項1又は2に記載の動画分離装置。 The moving image is a moving image captured by an interlaced method.
The image acquisition unit acquires, as the two images, an image obtained by extracting the pixel values of the pixels of the odd-numbered rows and an image obtained by extracting the pixel values of the pixels of the even-numbered rows from one frame included in the moving image. The moving image separation device according to claim 1 or 2, wherein the moving image separating device is characterized.
を特徴とする請求項6に記載の動画分離装置。 The moving image separation device according to claim 6 , wherein the one image is the one frame.
を特徴とする請求項1から7の何れか一項に記載の動画分離装置。 The moving image separation device according to any one of claims 1 to 7 , further comprising an imaging unit for capturing the moving image.
を特徴とする請求項1から8の何れか一項に記載の動画分離装置。 The moving image separation device according to any one of claims 1 to 8, further comprising a display unit for displaying the foreground image.
移動する視点で撮像された動画から、前景が含まれる二つの画像を取得する画像取得部、
前記二つの画像から選択された一つの画像である選択画像から、前記前景に対応する部分の画像である部分画像を抽出し、前記部分画像と、前記二つの画像における前記選択画像とは異なる一つの画像である非選択画像とを用いて、前記二つの画像における前記前景の位置がずれているズレ量を特定するズレ量特定部、
前記ズレ量に従って、前記二つの画像の位置のずれを補正して、補正後の前記二つの画像の対応する画素毎に、又は、補正後の前記二つの画像の対応する複数の画素のグループ毎に、予め定められた面積の相関を算出する相関算出部、及び、
前記算出された相関が予め定められた閾値よりも大きい画素を前記前景の画素とし、前記動画に含まれる一つの画像から、前記前景の画素の画素値を抽出した画像を前景画像として生成する閾値処理部、として機能させること
を特徴とするプログラム。 Computer,
An image acquisition unit that acquires two images including the foreground from a moving image captured from a moving viewpoint.
A partial image, which is an image of a portion corresponding to the foreground, is extracted from the selected image, which is one image selected from the two images, and the partial image and the selected image in the two images are different from each other. A deviation amount specifying unit that specifies the deviation amount of the foreground position in the two images using a non-selected image, which is one image .
According to the amount of deviation, the displacement of the positions of the two images is corrected for each corresponding pixel of the corrected two images, or for each group of a plurality of corresponding pixels of the corrected two images. In addition, a correlation calculation unit that calculates the correlation of a predetermined area, and
Pixels whose calculated correlation is larger than a predetermined threshold value are defined as the foreground pixels, and an image obtained by extracting the pixel values of the foreground pixels from one image included in the moving image is generated as the foreground image. A program characterized by functioning as a processing unit.
ズレ量特定部が、前記二つの画像から選択された一つの画像である選択画像から、前記前景に対応する部分の画像である部分画像を抽出し、前記部分画像と、前記二つの画像における前記選択画像とは異なる一つの画像である非選択画像とを用いて、前記二つの画像における前記前景の位置がずれているズレ量を特定し、
相関算出部が、前記ズレ量に従って、前記二つの画像の位置のずれを補正し、補正後の前記二つの画像の対応する画素毎に、又は、補正後の前記二つの画像の対応する複数の画素のグループ毎に、予め定められた面積の相関を算出し、
閾値処理部が、前記算出された相関が予め定められた閾値よりも大きい画素を前記前景の画素とし、前記動画に含まれる一つの画像から、前記前景の画素の画素値を抽出した画像を前景画像として生成すること
を特徴とする動画分離方法。 The image acquisition unit acquires two images including the foreground from the video captured from the moving viewpoint.
The deviation amount specifying unit extracts a partial image, which is an image of a portion corresponding to the foreground, from a selected image, which is one image selected from the two images, and the partial image and the said in the two images. Using a non-selected image, which is one image different from the selected image, the amount of misalignment of the foreground in the two images is specified.
The correlation calculation unit corrects the misalignment of the positions of the two images according to the amount of deviation, and for each corresponding pixel of the corrected two images, or for each corresponding plurality of the corrected two images. Calculate the correlation of the predetermined area for each group of pixels of
The threshold processing unit uses pixels whose calculated correlation is larger than a predetermined threshold as the foreground pixels, and obtains an image obtained by extracting the pixel values of the foreground pixels from one image included in the moving image. A video separation method characterized by generating as a foreground image.
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2019/048991 WO2021117233A1 (en) | 2019-12-13 | 2019-12-13 | Moving image separation device, program, and moving image separation method |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2021117233A1 JPWO2021117233A1 (en) | 2021-06-17 |
JP7003342B2 true JP7003342B2 (en) | 2022-02-10 |
Family
ID=76330115
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021559701A Active JP7003342B2 (en) | 2019-12-13 | 2019-12-13 | Video separator, program and video separation method |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP7003342B2 (en) |
WO (1) | WO2021117233A1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004334818A (en) | 2003-03-07 | 2004-11-25 | Fuji Photo Film Co Ltd | Dynamic image cut-out device, method and program |
JP2005202706A (en) | 2004-01-16 | 2005-07-28 | Seiko Epson Corp | Synthetic processing of image which does not contain body in motion |
-
2019
- 2019-12-13 JP JP2021559701A patent/JP7003342B2/en active Active
- 2019-12-13 WO PCT/JP2019/048991 patent/WO2021117233A1/en active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2004334818A (en) | 2003-03-07 | 2004-11-25 | Fuji Photo Film Co Ltd | Dynamic image cut-out device, method and program |
JP2005202706A (en) | 2004-01-16 | 2005-07-28 | Seiko Epson Corp | Synthetic processing of image which does not contain body in motion |
Also Published As
Publication number | Publication date |
---|---|
WO2021117233A1 (en) | 2021-06-17 |
JPWO2021117233A1 (en) | 2021-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10277812B2 (en) | Image processing to obtain high-quality loop moving image | |
US8773548B2 (en) | Image selection device and image selecting method | |
US7855731B2 (en) | Image vibration-compensating apparatus and method thereof | |
US10026155B1 (en) | Image-processing apparatus | |
WO2019008693A1 (en) | Image processing device, imaging device, image processing method, image processing program and storage medium | |
JP2018061130A (en) | Image processing device, image processing method, and program | |
GB2553447A (en) | Image processing apparatus, control method thereof, and storage medium | |
JP6557499B2 (en) | FOCUS DETECTION DEVICE, ITS CONTROL METHOD, IMAGING DEVICE, PROGRAM, AND STORAGE MEDIUM | |
JP6772000B2 (en) | Image processing equipment, image processing methods and programs | |
JP7003342B2 (en) | Video separator, program and video separation method | |
US9106926B1 (en) | Using double confirmation of motion vectors to determine occluded regions in images | |
WO2014077024A1 (en) | Image processing device, image processing method and image processing program | |
JP2006215657A (en) | Method, apparatus, program and program storage medium for detecting motion vector | |
JP6415330B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
JP4656391B2 (en) | Image processing apparatus, image processing method, and program | |
JP2009200981A (en) | Video camera | |
JP2008072428A (en) | Image processor, electronic camera, and image processing program | |
JP6671975B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and computer program | |
JP6091082B2 (en) | Image processing apparatus, image processing method, and program | |
KR20140117242A (en) | Apparatus and method for processing image | |
JP5824937B2 (en) | Motion vector deriving apparatus and method | |
JP2014039105A (en) | Image processor, image processing method, and computer program | |
JP4696059B2 (en) | Inter-screen movement vector calculation method and apparatus, inter-screen movement vector calculation program, electronic camera shake correction method and apparatus, electronic camera shake correction program, and imaging apparatus | |
JP2019097004A (en) | Image generation apparatus, image generation method and image generation program | |
JP5025432B2 (en) | Frame interpolation apparatus and frame interpolation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211007 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211007 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20211007 |
|
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: 20211130 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20211228 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7003342 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |