JP2012037929A - Three-dimensional shape acquisition device and three-dimensional shape acquisition program - Google Patents

Three-dimensional shape acquisition device and three-dimensional shape acquisition program Download PDF

Info

Publication number
JP2012037929A
JP2012037929A JP2010174574A JP2010174574A JP2012037929A JP 2012037929 A JP2012037929 A JP 2012037929A JP 2010174574 A JP2010174574 A JP 2010174574A JP 2010174574 A JP2010174574 A JP 2010174574A JP 2012037929 A JP2012037929 A JP 2012037929A
Authority
JP
Japan
Prior art keywords
image
block image
parallax
color
target area
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
Application number
JP2010174574A
Other languages
Japanese (ja)
Other versions
JP5457976B2 (en
Inventor
Kensuke Hisatomi
健介 久富
Takesuke Iketani
健佑 池谷
Miwa Katayama
美和 片山
Yuichi Iwadate
祐一 岩舘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Hoso Kyokai NHK filed Critical Nippon Hoso Kyokai NHK
Priority to JP2010174574A priority Critical patent/JP5457976B2/en
Publication of JP2012037929A publication Critical patent/JP2012037929A/en
Application granted granted Critical
Publication of JP5457976B2 publication Critical patent/JP5457976B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Measurement Of Optical Distance (AREA)
  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a three-dimensional shape acquisition device and a three-dimensional shape acquisition program for generating depth information from a plurality of images with high accuracy.SOLUTION: A three-dimensional shape acquisition device comprises: block image cut-out means for cutting out block images as a standard block image and a reference block image from a standard image and a reference image respectively; target region extracting means for specifying a prescribed color in the standard block image as a standard color and extracting pixels of a color similar to the standard color in a prescribed range as a target region, in the standard block image and the reference block image; color replacing means for specifying a prescribed color in the standard block image as a replacement color for masking the background of the target region and replacing the color of pixels which is not included in the target region with the replacement color, in the standard block image and the reference block image; parallax measuring means for measuring parallax through phase limited correlation; and three-dimensional coordinate position generating means for generating a three-dimensional coordinate position from the parallax measured by the parallax measuring means.

Description

本発明は、複数の画像から高い精度で奥行き情報を生成する3次元形状取得装置および3次元形状取得プログラムの技術に関する。   The present invention relates to a technique of a three-dimensional shape acquisition apparatus and a three-dimensional shape acquisition program that generate depth information from a plurality of images with high accuracy.

従来、異なる2点の位置からある被写体を撮影し、一方の画像の各画素に対応するもう一方の画素との位置の差を求めることで、奥行き情報を取得する技術が提案されており、その一つとして、位相限定相関法を用いた奥行き推定法がある。   Conventionally, a technique has been proposed in which depth information is acquired by photographing a subject from two different positions and obtaining a difference in position from the other pixel corresponding to each pixel of one image. One is a depth estimation method using a phase-only correlation method.

ここで、位相限定相関法を用いた奥行き推定法について図10〜図12を参照して説明する。
図10に示すように、位相限定相関法は、2つの画像をそれぞれフーリエ変換(FFT)して位相成分を取り出し、これらを合成したものに逆フーリエ変換(IFFT)を施すことにより、位相相関関数を求める。そして、この位相相関関数のピークの中心からのずれ量が2つの画像の平行移動量を示している。
Here, the depth estimation method using the phase only correlation method will be described with reference to FIGS.
As shown in FIG. 10, in the phase only correlation method, two images are each subjected to Fourier transform (FFT) to extract a phase component, and the resultant is subjected to inverse Fourier transform (IFFT) to obtain a phase correlation function. Ask for. And the deviation | shift amount from the center of the peak of this phase correlation function has shown the parallel displacement amount of two images.

位相限定相関法を用いた奥行き推定法では、2つの画像の一部分をブロック(以下、「ブロック画像」という。)として切り出し、ブロック画像内の位相情報を抽出して、2つのブロック画像の平行移動量を求めるために、ブロック処理をするのが一般的である。
図11に示すように、ブロック処理は、2つの画像からそれぞれ所定の大きさのブロック画像を切り出し、2つのブロック画像を入力として位相限定相関法を行うことにより、2つのブロック画像の平行移動量を求めるものである。
図12に示すように、最終的に得られる位相相関関数のピークの中心からのずれ量が2つの画像の平行移動量となる。なお、この位相相関関数の表示は、入力される両画像の一致点の多さとその平行移動量を示すものであり、一致点が少なすぎるとピークがあいまいとなる。
In the depth estimation method using the phase-only correlation method, a part of two images is cut out as a block (hereinafter referred to as “block image”), phase information in the block image is extracted, and the two block images are translated. In general, block processing is performed to determine the quantity.
As shown in FIG. 11, the block processing is performed by extracting a block image of a predetermined size from two images and performing phase-only correlation using the two block images as input, thereby moving the parallel movement amount of the two block images. Is what you want.
As shown in FIG. 12, the amount of deviation from the center of the peak of the finally obtained phase correlation function is the amount of parallel movement of the two images. The display of the phase correlation function indicates the number of coincidence points of both inputted images and the amount of parallel movement thereof. If there are too few coincidence points, the peak becomes ambiguous.

また、2次元のブロック画像の代わりに1次元のブロックを用いて高速に奥行き情報を取得する技術も提案されている(例えば、非特許文献1参照)。   In addition, a technique for acquiring depth information at high speed using a one-dimensional block instead of a two-dimensional block image has been proposed (see, for example, Non-Patent Document 1).

柴原琢磨、沼徳仁、長嶋聖、青木孝文、中島寛、小林孝次著、「一次元位相限定相関法に基づくステレオ画像の高精度サブピクセル対応付け手法」 電子情報通信学会論文誌D,Vol. J91-D, No. 9, pp. 2343-2356, September 2008Takuma Shibahara, Tokuhito Numa, Kiyoshi Nagashima, Takafumi Aoki, Hiroshi Nakajima, Koji Kobayashi, "High-precision subpixel matching method for stereo images based on one-dimensional phase-only correlation method" IEICE Transactions D, Vol. J91 -D, No. 9, pp. 2343-2356, September 2008

しかし、2つの画像から切り出したブロック画像において奥行きに不連続な部分が存在したり、奥行きが連続であっても奥行きが大きく異なる部分が存在したりする場合に、これらのブロック画像を用いて位相限定相関法を行うと、手前の位相成分と奥の位相成分とがブロック画像内で混合してしまうため、奥行き計測の精度が低下するという問題がある。
すなわち、異なる位置から被写体を撮影し、それら2つの画像から切り出した2つのブロック画像内に被写体と背景が映っている場合を例にとると、近いところは大きくずれ遠いところは小さくずれるため、例えば、被写体が5ピクセルずれており、背景が2ピクセルずれているということとなる。そして、これらのブロック画像をそのまま用いて位相限定相関法を行うと、図12に示す位相相関関数のピークがあいまいとなり、平均移動量を精度良く求めることができない。結果として奥行き計測の精度が低下してしまうという問題がある。
However, when there are discontinuous parts in the depth of block images cut out from two images, or there are parts with greatly different depths even if the depth is continuous, the phase is determined using these block images. When the limited correlation method is performed, the phase component in the foreground and the phase component in the back are mixed in the block image, so that there is a problem that the accuracy of depth measurement is lowered.
That is, when taking a subject from different positions and the subject and the background are shown in two block images cut out from these two images, for example, the near part is greatly shifted and the far part is shifted slightly. The subject is shifted by 5 pixels, and the background is shifted by 2 pixels. If the phase-only correlation method is performed using these block images as they are, the peak of the phase correlation function shown in FIG. 12 becomes ambiguous, and the average movement amount cannot be obtained with high accuracy. As a result, there is a problem that the accuracy of depth measurement is lowered.

本発明は、以上のような問題点に鑑みてなされたものであり、複数の画像から高い精度で奥行き情報を生成する3次元形状取得装置および3次元形状取得プログラムを提供することを課題とする。   The present invention has been made in view of the above problems, and an object thereof is to provide a three-dimensional shape acquisition apparatus and a three-dimensional shape acquisition program that generate depth information from a plurality of images with high accuracy. .

本発明は、前記課題を解決するために創案されたものであり、まず、請求項1に記載の3次元形状取得装置は、異なる位置から撮影した被写体の画像である基準画像と参照画像とを入力として前記被写体の奥行き情報を生成する3次元形状取得装置であって、ブロック画像切出手段と、対象領域抽出手段と、色置換手段と、視差計測手段と、3次元座標位置生成手段と、を備える構成とした。   The present invention has been made to solve the above-described problems. First, the three-dimensional shape acquisition apparatus according to claim 1 includes a reference image and a reference image that are images of a subject photographed from different positions. A three-dimensional shape acquisition device for generating depth information of the subject as an input, comprising: a block image cutout means, a target area extraction means, a color replacement means, a parallax measurement means, a three-dimensional coordinate position generation means, It was set as the structure provided with.

かかる構成において、3次元形状取得装置は、ブロック画像切出手段によって、入力される前記基準画像および前記参照画像から視差計測に用いる所定の大きさの画像であるブロック画像を、それぞれ基準ブロック画像および参照ブロック画像として切り出す。これによって、入力される画像から視差を計測するためのブロック画像が切り出される。   In such a configuration, the three-dimensional shape acquisition apparatus converts a block image, which is an image of a predetermined size used for parallax measurement, from the input reference image and the reference image by the block image cutout unit, respectively, Cut out as a reference block image. Thereby, a block image for measuring parallax is cut out from the input image.

そして、3次元形状取得装置は、対象領域抽出手段によって、視差計測のための対象領域を抽出するために前記基準ブロック画像における所定の色を基準色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出する。   Then, the three-dimensional shape acquisition apparatus specifies a predetermined color in the reference block image as a reference color in order to extract a target area for parallax measurement by the target area extraction unit, and the reference block image and the reference block In the image, a pixel having a color similar to the reference color within a predetermined range is extracted as a target region.

そして、3次元形状取得装置は、色置換手段によって、前記基準ブロック画像における所定の色を、前記対象領域の背景をマスクする色である置換色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記対象領域に含まれない画素の色を前記置換色で置き換える。これによって、背景がマスクされて視差計測手段における位相成分の混合を抑制できる。   Then, the three-dimensional shape acquisition apparatus specifies a predetermined color in the reference block image as a replacement color that masks the background of the target area by color replacement means, and the reference block image and the reference block image The color of the pixel not included in the target area is replaced with the replacement color. Thereby, the background is masked and mixing of phase components in the parallax measuring means can be suppressed.

また、3次元形状取得装置は、視差計測手段によって、前記色置換手段から入力される前記基準ブロック画像と前記参照ブロック画像とから、位相限定相関法により視差を計測する。   In the three-dimensional shape acquisition apparatus, the parallax measurement unit measures the parallax by the phase-only correlation method from the reference block image and the reference block image input from the color replacement unit.

そして、3次元形状取得装置は、3次元座標位置生成手段によって、前記視差計測手段が計測した前記視差から3次元座標位置を生成する。   Then, the three-dimensional shape acquisition apparatus generates a three-dimensional coordinate position from the parallax measured by the parallax measurement unit by a three-dimensional coordinate position generation unit.

また、請求項2に記載の3次元形状取得装置は、請求項1に記載の3次元形状取得装置において、対象領域抽出手段が、前記基準ブロック画像の中央画素の色を基準色とする構成とした。これによって、基準ブロック画像の中央画素の色を基準として対象領域が抽出される。   Further, the 3D shape acquisition apparatus according to claim 2 is configured such that in the 3D shape acquisition apparatus according to claim 1, the target area extraction unit uses the color of the center pixel of the reference block image as a reference color. did. As a result, the target area is extracted based on the color of the central pixel of the reference block image.

そして、請求項3に記載の3次元形状取得装置は、請求項1または請求項2に記載の3次元形状取得装置において、ブロック画像切出手段が、動画像における連続する複数のフレームの画像から視差計測に用いる所定の大きさの画像であるブロック画像を切り出す構成とした。これによって、連続するそれぞれのフレームに対応する奥行き情報を生成することで動的な奥行き情報を生成することができる。   The three-dimensional shape acquisition apparatus according to claim 3 is the three-dimensional shape acquisition apparatus according to claim 1 or 2, wherein the block image cutting-out means is based on images of a plurality of continuous frames in the moving image. A block image which is an image of a predetermined size used for parallax measurement is cut out. Thus, dynamic depth information can be generated by generating depth information corresponding to each successive frame.

また、請求項4に記載の3次元形状取得装置は、異なる位置から撮影した被写体の画像である基準画像と参照画像とを入力として前記被写体の奥行き情報を生成する3次元形状取得装置であって、視差推定手段と、ブロック画像切出手段と、対象領域抽出手段と、色置換手段と、視差計測手段と、3次元座標位置生成手段と、を備える構成とした。   The three-dimensional shape acquisition apparatus according to claim 4 is a three-dimensional shape acquisition apparatus that generates depth information of the subject by inputting a reference image that is an image of the subject photographed from different positions and a reference image. The apparatus includes a parallax estimation unit, a block image cutout unit, a target region extraction unit, a color replacement unit, a parallax measurement unit, and a three-dimensional coordinate position generation unit.

かかる構成において、3次元形状取得装置は、視差推定手段によって、入力される前記基準画像と前記参照画像とから、一方の画像の各画素に対応するもう一方の画像の画素の平行移動量を表した視差画像である基準視差画像および参照視差画像を生成する。これによって、基準画像および参照画像に対応する奥行き情報を予め取得できる。   In such a configuration, the three-dimensional shape acquisition apparatus displays, by the parallax estimation unit, the parallel movement amount of the pixel of the other image corresponding to each pixel of the one image from the input standard image and the reference image. A standard parallax image and a reference parallax image, which are parallax images, are generated. Thereby, depth information corresponding to the standard image and the reference image can be acquired in advance.

そして、3次元形状取得装置は、ブロック画像切出手段によって、前記基準画像、前記参照画像、前記基準視差画像および前記参照視差画像から視差計測に用いる所定の大きさの画像であるブロック画像を、それぞれ基準ブロック画像、参照ブロック画像、基準視差ブロック画像および参照視差ブロック画像として切り出す。これによって、入力される画像から視差を計測するためのブロック画像が切り出される。   Then, the three-dimensional shape acquisition device uses a block image cutout unit to obtain a block image that is an image of a predetermined size used for parallax measurement from the reference image, the reference image, the reference parallax image, and the reference parallax image. Cut out as a standard block image, a reference block image, a standard parallax block image, and a reference parallax block image, respectively. Thereby, a block image for measuring parallax is cut out from the input image.

そして、3次元形状取得装置は、対象領域抽出手段によって、視差計測のための対象領域を抽出するために前記基準視差ブロック画像における所定の色を基準色として特定し、前記基準視差ブロック画像および前記参照視差ブロック画像において前記基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出し、前記基準視差ブロック画像および前記参照視差ブロック画像において抽出される前記対象領域に基づいて、それぞれ前記基準ブロック画像および前記参照ブロック画像において対象領域を抽出する。これによって、ブロック画像内に類似した色の画素の塊が大きくまとまっていないことで対象領域が十分確保できず、正確な奥行き情報を得るための位相情報を十分取得することができない場合にも、奥行きが類似する画素が十分まとまっていれば、それらの画素を対象領域とすることができる。   Then, the three-dimensional shape acquisition apparatus specifies a predetermined color in the reference parallax block image as a reference color in order to extract a target area for parallax measurement by the target area extraction unit, A pixel having a color similar to the reference color within a predetermined range in the reference parallax block image is extracted as a target area, and based on the target area extracted in the reference parallax block image and the reference parallax block image, respectively A target area is extracted from the standard block image and the reference block image. As a result, a block of similar-colored pixels in the block image is not large and the target area cannot be secured sufficiently, and even when phase information for obtaining accurate depth information cannot be acquired sufficiently, If pixels having similar depths are sufficiently gathered, those pixels can be set as a target region.

また、3次元形状取得装置は、色置換手段によって、前記基準ブロック画像における所定の色を置換色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記対象領域に含まれない画素の色を前記置換色で置き換える。これによって、背景がマスクされて視差計測手段における位相成分の混合を抑制できる。   Further, the three-dimensional shape acquisition apparatus specifies a predetermined color in the standard block image as a replacement color by a color replacement unit, and the color of a pixel not included in the target region in the standard block image and the reference block image Is replaced with the replacement color. Thereby, the background is masked and mixing of phase components in the parallax measuring means can be suppressed.

そして、3次元形状取得装置は、視差計測手段によって、前記色置換手段から出力される、前記基準ブロック画像と前記参照ブロック画像とから位相限定相関法により視差を計測する。   In the three-dimensional shape acquisition apparatus, the parallax is measured by the phase-only correlation method from the reference block image and the reference block image output from the color replacement unit by the parallax measuring unit.

そして、3次元形状取得装置は、3次元座標位置生成手段によって、前記視差計測手段が計測した前記視差から3次元座標位置を生成する。   Then, the three-dimensional shape acquisition apparatus generates a three-dimensional coordinate position from the parallax measured by the parallax measurement unit by a three-dimensional coordinate position generation unit.

また、請求項5に記載の3次元形状取得装置は、請求項4に記載の3次元形状取得装置において、ブロック画像切出手段が、切出位置算出手段によって、基準ブロック画像の位置に前記基準視差ブロック画像の中央画素の値を加算して、前記参照ブロック画像および前記参照視差ブロック画像の切出位置を算出する構成とした。これによって、基準ブロック画像における対象領域と参照ブロック画像における対象領域とが大きくずれている場合にも、互いの対象領域がある程度重なるように参照ブロック画像が切り出される。   Further, the three-dimensional shape acquisition apparatus according to claim 5 is the three-dimensional shape acquisition apparatus according to claim 4, wherein the block image cutout unit sets the reference block image at the position of the reference block image by the cutout position calculation unit. A configuration is used in which the value of the central pixel of the parallax block image is added to calculate the cut-out positions of the reference block image and the reference parallax block image. Thus, even when the target area in the base block image and the target area in the reference block image are greatly shifted, the reference block image is cut out so that the target areas overlap each other to some extent.

そして、3次元形状取得装置は、視差計測手段によって、前記色置換手段から入力される前記基準ブロック画像と前記参照ブロック画像とから、位相限定相関法により視差を計測し、計測した視差と、前記基準視差ブロック画像の中央画素の値とを加算する。これによって、被写体の3次元形状を取得するために必要な視差を求める。   The three-dimensional shape acquisition apparatus measures the parallax by a phase-only correlation method from the reference block image and the reference block image input from the color replacement unit by the parallax measuring unit, The value of the center pixel of the reference parallax block image is added. Thus, the parallax necessary for acquiring the three-dimensional shape of the subject is obtained.

また、請求項6に記載の3次元形状取得装置は、請求項4または請求項5に記載の3次元形状取得装置において、対象領域抽出手段が、前記基準視差ブロック画像の中央画素の色を基準色とする構成とした。これによって、基準視差ブロック画像の中央画素の色を基準として対象領域が抽出される。   Further, the three-dimensional shape acquisition apparatus according to claim 6 is the three-dimensional shape acquisition apparatus according to claim 4 or 5, wherein the target area extraction unit uses the color of the central pixel of the reference parallax block image as a reference. It was set as the color. As a result, the target region is extracted based on the color of the central pixel of the reference parallax block image.

そして、請求項7に記載の3次元形状取得装置は、請求項4から請求項6のいずれか一項に記載の3次元形状取得装置において、視差推定手段が、動画像における連続する複数のフレームの画像から前記基準視差画像および前記参照視差画像を生成する構成とした。
また、ブロック画像切出手段が、動画像における連続する複数のフレームの画像から視差計測に用いる所定の大きさの画像であるブロック画像を切り出す構成とした。これによって、連続するそれぞれのフレームに対応する奥行き情報を生成することで動的な奥行き情報を生成することができる。
The three-dimensional shape acquisition apparatus according to claim 7 is the three-dimensional shape acquisition apparatus according to any one of claims 4 to 6, wherein the parallax estimation means includes a plurality of continuous frames in the moving image. The standard parallax image and the reference parallax image are generated from the images.
Further, the block image cutout unit is configured to cut out a block image that is an image of a predetermined size used for parallax measurement from images of a plurality of continuous frames in the moving image. Thus, dynamic depth information can be generated by generating depth information corresponding to each successive frame.

また、請求項8に記載の3次元形状取得プログラムは、異なる位置から撮影した被写体の画像である基準画像と参照画像とを入力として前記被写体の奥行き情報を生成する3次元形状取得装置を制御するために、前記3次元形状取得装置のコンピュータを、ブロック画像切出手段、対象領域抽出手段、色置換手段、視差計測手段、3次元座標位置生成手段、として機能させる構成とした。   The three-dimensional shape acquisition program according to claim 8 controls a three-dimensional shape acquisition device that generates depth information of the subject by inputting a reference image and a reference image that are images of the subject taken from different positions. Therefore, the computer of the three-dimensional shape acquisition apparatus is configured to function as a block image cutting unit, a target region extracting unit, a color replacing unit, a parallax measuring unit, and a three-dimensional coordinate position generating unit.

かかる構成において、3次元形状取得プログラムは、ブロック画像切出手段によって、入力される前記基準画像および前記参照画像から視差計測に用いる所定の大きさの画像であるブロック画像を、それぞれ基準ブロック画像および参照ブロック画像として切り出す。これによって、入力される画像から視差を計測するためのブロック画像が切り出される。   In this configuration, the three-dimensional shape acquisition program converts block images, which are images of a predetermined size used for parallax measurement, from the reference image and the reference image that are input by the block image cutout unit, respectively, Cut out as a reference block image. Thereby, a block image for measuring parallax is cut out from the input image.

そして、3次元形状取得プログラムは、対象領域抽出手段によって、視差計測のための対象領域を抽出するために前記基準ブロック画像における所定の色を基準色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出する。   Then, the three-dimensional shape acquisition program specifies a predetermined color in the reference block image as a reference color in order to extract a target area for parallax measurement by the target area extraction unit, and the reference block image and the reference block In the image, a pixel having a color similar to the reference color within a predetermined range is extracted as a target region.

そして、3次元形状取得プログラムは、色置換手段によって、前記基準ブロック画像における所定の色を、前記対象領域の背景をマスクする色である置換色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記対象領域に含まれない画素の色を前記置換色で置き換える。これによって、背景がマスクされて視差計測手段における位相成分の混合を抑制できる。   Then, the three-dimensional shape acquisition program specifies a predetermined color in the reference block image as a replacement color that masks the background of the target area by color replacement means, and the reference block image and the reference block image The color of the pixel not included in the target area is replaced with the replacement color. Thereby, the background is masked and mixing of phase components in the parallax measuring means can be suppressed.

また、3次元形状取得プログラムは、視差計測手段によって、前記色置換手段から入力される前記基準ブロック画像と前記参照ブロック画像とから、位相限定相関法により視差を計測する。   The three-dimensional shape acquisition program measures parallax by the phase-only correlation method from the reference block image and the reference block image input from the color replacement unit by the parallax measuring unit.

そして、3次元形状取得プログラムは、3次元座標位置生成手段によって、前記視差計測手段が計測した前記視差から3次元座標位置を生成する。   Then, the three-dimensional shape acquisition program generates a three-dimensional coordinate position from the parallax measured by the parallax measurement unit by a three-dimensional coordinate position generation unit.

また、請求項9に記載の3次元形状取得プログラムは、異なる位置から撮影した被写体の画像である基準画像と参照画像とを入力として前記被写体の奥行き情報を生成する3次元形状取得装置を制御するために、前記3次元形状取得装置のコンピュータを、視差推定手段、ブロック画像切出手段、対象領域抽出手段、色置換手段、視差計測手段、3次元座標位置生成手段、として機能させる構成とした。   The three-dimensional shape acquisition program according to claim 9 controls a three-dimensional shape acquisition device that generates depth information of the subject by inputting a reference image that is an image of the subject taken from different positions and a reference image. For this purpose, the computer of the three-dimensional shape acquisition apparatus is configured to function as a parallax estimation unit, a block image extraction unit, a target region extraction unit, a color replacement unit, a parallax measurement unit, and a three-dimensional coordinate position generation unit.

かかる構成において、3次元形状取得プログラムは、視差推定手段によって、入力される前記基準画像と前記参照画像とから、一方の画像の各画素に対応するもう一方の画像の画素の平行移動量を表した視差画像である基準視差画像および参照視差画像を生成する。これによって、基準画像および参照画像に対応する奥行き情報を予め取得できる。   In such a configuration, the three-dimensional shape acquisition program displays the parallel movement amount of the pixel of the other image corresponding to each pixel of the one image from the input standard image and the reference image by the parallax estimation unit. A standard parallax image and a reference parallax image, which are parallax images, are generated. Thereby, depth information corresponding to the standard image and the reference image can be acquired in advance.

そして、3次元形状取得プログラムは、ブロック画像切出手段によって、前記基準画像、前記参照画像、前記基準視差画像および前記参照視差画像から視差計測に用いる所定の大きさの画像であるブロック画像を、それぞれ基準ブロック画像、参照ブロック画像、基準視差ブロック画像および参照視差ブロック画像として切り出す。これによって、入力される画像から視差を計測するためのブロック画像が切り出される。   Then, the three-dimensional shape acquisition program uses a block image cutout unit to obtain a block image that is an image of a predetermined size used for parallax measurement from the reference image, the reference image, the reference parallax image, and the reference parallax image. Cut out as a standard block image, a reference block image, a standard parallax block image, and a reference parallax block image, respectively. Thereby, a block image for measuring parallax is cut out from the input image.

そして、3次元形状取得プログラムは、対象領域抽出手段によって、視差計測のための対象領域を抽出するために前記基準視差ブロック画像における所定の色を基準色として特定し、前記基準視差ブロック画像および前記参照視差ブロック画像において前記基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出し、前記基準視差ブロック画像および前記参照視差ブロック画像において抽出される前記対象領域に基づいて、それぞれ前記基準ブロック画像および前記参照ブロック画像において対象領域を抽出する。これによって、ブロック画像内に類似した色の画素の塊が大きくまとまっていないことで対象領域が十分確保できず、正確な奥行き情報を得るための位相情報を十分取得することができない場合にも、奥行きが類似する画素が十分まとまっていれば、それらの画素を対象領域とすることができる。   Then, the three-dimensional shape acquisition program specifies a predetermined color in the reference parallax block image as a reference color in order to extract a target area for parallax measurement by the target area extraction unit, A pixel having a color similar to the reference color within a predetermined range in the reference parallax block image is extracted as a target area, and based on the target area extracted in the reference parallax block image and the reference parallax block image, respectively A target area is extracted from the standard block image and the reference block image. As a result, a block of similar-colored pixels in the block image is not large and the target area cannot be secured sufficiently, and even when phase information for obtaining accurate depth information cannot be acquired sufficiently, If pixels having similar depths are sufficiently gathered, those pixels can be set as a target region.

また、3次元形状取得プログラムは、色置換手段によって、前記基準ブロック画像における所定の色を置換色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記対象領域に含まれない画素の色を前記置換色で置き換える。これによって、背景がマスクされて視差計測手段における位相成分の混合を抑制できる。   The three-dimensional shape acquisition program specifies a predetermined color in the standard block image as a replacement color by a color replacement unit, and the color of a pixel not included in the target region in the standard block image and the reference block image Is replaced with the replacement color. Thereby, the background is masked and mixing of phase components in the parallax measuring means can be suppressed.

そして、3次元形状取得プログラムは、視差計測手段によって、前記色置換手段から出力される、前記基準ブロック画像と前記参照ブロック画像とから位相限定相関法により視差を計測する。   Then, the three-dimensional shape acquisition program measures the parallax by the phase-only correlation method from the reference block image and the reference block image output from the color replacement unit by the parallax measuring unit.

そして、3次元形状取得プログラムは、3次元座標位置生成手段によって、前記視差計測手段が計測した前記視差から3次元座標位置を生成する。   Then, the three-dimensional shape acquisition program generates a three-dimensional coordinate position from the parallax measured by the parallax measurement unit by a three-dimensional coordinate position generation unit.

本発明は、以下に示す優れた効果を奏するものである。
請求項1,2,8に記載の発明によれば、ブロック画像内の奥行きが不連続である部分や奥行きが大きく異なる部分が置換色で置き換えられているため、平均移動量を精度良く求めることができ、高い精度で3次元座標位置を生成できる。
The present invention has the following excellent effects.
According to the first, second, and eighth aspects of the present invention, since the portion where the depth in the block image is discontinuous or the portion whose depth is greatly different is replaced with the replacement color, the average movement amount can be obtained with high accuracy. 3D coordinate positions can be generated with high accuracy.

請求項3,7に記載の発明によれば、これによって、連続するそれぞれのフレームに対応する奥行き情報を生成することで動的な奥行き情報を生成することができる。   According to the third and seventh aspects of the present invention, dynamic depth information can be generated by generating depth information corresponding to each successive frame.

請求項4,6,9に記載の発明によれば、ブロック画像内に類似した色の画素の塊が大きくまとまっていないことで正確な奥行き情報を得るために位相情報を十分取得することができない場合にも、奥行きが類似する画素が十分まとまっていれば、平均移動量を精度良く求めることができ、高い精度で3次元座標位置を生成できる。   According to the fourth, sixth, and ninth aspects of the invention, the phase information cannot be sufficiently obtained in order to obtain accurate depth information because the block image of similar colors is not large in the block image. Even in this case, if the pixels having similar depths are sufficiently gathered, the average movement amount can be obtained with high accuracy, and the three-dimensional coordinate position can be generated with high accuracy.

請求項5に記載の発明によれば、基準ブロック画像における対象領域と参照ブロック画像における対象領域とが大きくずれている場合にも、互いの対象領域がある程度重なるように参照ブロック画像が切り出されるため、視差計測手段において、十分な位相情報を取得することができる。   According to the fifth aspect of the present invention, even when the target area in the base block image and the target area in the reference block image are greatly shifted, the reference block image is cut out so that the target areas overlap each other to some extent. In the parallax measuring means, sufficient phase information can be acquired.

本発明の第1実施形態に係る3次元形状取得装置の構成を示すブロック構成図である。It is a block block diagram which shows the structure of the three-dimensional shape acquisition apparatus which concerns on 1st Embodiment of this invention. 本発明の実施形態に係る3次元形状取得装置において、基準画像と参照画像を説明するための平面図である。FIG. 4 is a plan view for explaining a base image and a reference image in the three-dimensional shape acquisition apparatus according to the embodiment of the present invention. 本発明の第1実施形態に係る3次元形状取得装置のブロック画像切出手段、対象領域抽出手段および色置換手段における処理の一例を模式的に示した図である。It is the figure which showed typically an example of the process in the block image extraction means, the target area extraction means, and the color replacement means of the three-dimensional shape acquisition apparatus which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係る3次元形状取得装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the three-dimensional shape acquisition apparatus which concerns on 1st Embodiment of this invention. 本発明の第2実施形態に係る3次元形状取得装置の構成を示すブロック構成図である。It is a block block diagram which shows the structure of the three-dimensional shape acquisition apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る3次元形状取得装置のブロック画像切出手段、対象領域抽出手段および色置換手段における処理の一例を模式的に示した図である。It is the figure which showed typically an example of the process in the block image extraction means, the object area | region extraction means, and color replacement means of the three-dimensional shape acquisition apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る3次元形状取得装置の切出位置算出手段による作用効果を説明するための図であり、(a)は、切出位置算出手段を用いない場合を説明する図である。(b)は、切出位置算出手段を用いる場合を説明する図である。(c)は、基準ブロック画像と参照ブロック画像を重ね合わせたときの対象領域の位置を示す図である。It is a figure for demonstrating the effect by the cutting position calculation means of the three-dimensional shape acquisition apparatus which concerns on 2nd Embodiment of this invention, (a) is a figure explaining the case where a cutting position calculation means is not used. It is. (B) is a figure explaining the case where a cutting position calculation means is used. (C) is a figure which shows the position of the object area | region when a standard block image and a reference block image are overlapped. 本発明の第2実施形態に係る3次元形状取得装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the three-dimensional shape acquisition apparatus which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る3次元形状取得装置の動作におけるブロック画像切出処理のフローチャートである。It is a flowchart of the block image cutting-out process in operation | movement of the three-dimensional shape acquisition apparatus which concerns on 2nd Embodiment of this invention. 従来技術の位相限定相関法の概念を示した図である。It is the figure which showed the concept of the phase only correlation method of a prior art. 従来技術の位相限定相関法のブロック処理を説明する図である。It is a figure explaining the block processing of the phase only correlation method of a prior art. 従来技術の位相限定相関法による処理の結果の一例を示す図である。It is a figure which shows an example of the result of the process by the phase only correlation method of a prior art.

<第1実施形態>
以下、本発明の第1実施形態について、図1〜図4を参照して説明する。
図1に示すように、3次元形状取得装置1は、基準画像30と参照画像31とを入力として、それらについて正確な位相成分を取得するための前処理を行い、その後、位相限定相関法を用いて3次元座標位置60を得るものである。
基準画像30とは、位相限定相関法によって視差を求める際、基準となる画像である。この画像から切り出したブロック画像である基準ブロック画像を基準として、参照画像31から切り出したブロック画像である参照ブロック画像との平行移動量を求めることになる。
<First Embodiment>
Hereinafter, a first embodiment of the present invention will be described with reference to FIGS.
As shown in FIG. 1, the three-dimensional shape acquisition apparatus 1 receives a reference image 30 and a reference image 31 and performs preprocessing for acquiring accurate phase components for them, and then performs a phase-only correlation method. It is used to obtain the three-dimensional coordinate position 60.
The reference image 30 is an image serving as a reference when parallax is obtained by the phase-only correlation method. Based on the standard block image that is a block image cut out from this image, the amount of parallel movement with the reference block image that is a block image cut out from the reference image 31 is obtained.

ここで、基準画像30と参照画像31は、図2に示すように、異なる位置からカメラ(カメラ32、カメラ33)により撮影された画像である。カメラ32およびカメラ33は、被写体34が写るように設置する。このとき、カメラ32およびカメラ33は、カメラの光軸が平行になるように設置する。高さも同じである方が好ましい。なお、ここでは、カメラ32で撮影された画像が基準画像30であり、カメラ33で撮影された画像が参照画像31であるが、逆でもよい。   Here, as shown in FIG. 2, the standard image 30 and the reference image 31 are images taken by cameras (camera 32, camera 33) from different positions. The camera 32 and the camera 33 are installed so that the subject 34 can be captured. At this time, the camera 32 and the camera 33 are installed so that the optical axes of the cameras are parallel. It is preferable that the height is the same. Here, the image captured by the camera 32 is the reference image 30, and the image captured by the camera 33 is the reference image 31, but the reverse may be possible.

ところで、カメラ32およびカメラ33は、設置しただけで完全な平行になることは困難である。そのため、以下の従来技術により、平行化画像を取得する。被写体付近に既知の模様が描画されたパターンを置き、両カメラで撮影してカメラの位置や姿勢、焦点距離、レンズ歪曲率等をカメラキャリブレーション手法により取得する。例えば、TsaiやZhangのキャリブレーション法がある。
取得した内部パラメータ行列Aが、例えば、式(1)であるとする。
By the way, it is difficult for the camera 32 and the camera 33 to be completely parallel only by being installed. Therefore, a parallel image is acquired by the following conventional technique. A pattern on which a known pattern is drawn is placed in the vicinity of the subject, photographed by both cameras, and the camera position and orientation, focal length, lens distortion, and the like are acquired by a camera calibration method. For example, there are Tsai and Zhang calibration methods.
Assume that the acquired internal parameter matrix A is, for example, Equation (1).

ここで、Fは、式(2)で表される。aは、式(3)で表される。なお、fは焦点距離、C,Cはそれぞれ画像座標によるx方向,y方向の中心画素の位置、Δ,Δはそれぞれx方向,y方向の撮像素子の間隔である。 Here, F is represented by Formula (2). a is represented by Formula (3). Note that f is the focal length, C u and C v are the positions of the central pixels in the x and y directions, respectively, and Δ x and Δ y are the distances between the image sensors in the x and y directions, respectively.

Rを世界座標からカメラ座標への3×3回転行列とすると、画像中の点Pは、式(4)で平行画像化することが可能である。 When 3 × 3 rotation matrix R from world coordinates to camera coordinates, P C point in the image, it is possible to parallel imaging by the formula (4).

ただし、Pcrectは平行画像化後の点の位置、Arectは平行化した後の内部パラメータ行列、Rrectは平行化した後の回転行列である。なお、R-1,A-1はそれぞれ行列R,Aの逆行列である。Arectは、カメラ32の内部パラメータ行列とカメラ33の内部パラメータ行列の平均値とすることが一般的である。詳細は、参考文献(http://www.cs.cmu.edu/~rgw/TsaiCode.html,http://research.micosoft.com/en−us/um/people/zhang/calib/)に譲る。 Here, Pc rect is the position of the point after parallel image formation , A rect is the internal parameter matrix after parallelization, and R rect is the rotation matrix after parallelization. R −1 and A −1 are inverse matrices of the matrices R and A, respectively. A rect is generally an average value of the internal parameter matrix of the camera 32 and the internal parameter matrix of the camera 33. For details, refer to the reference (http://www.cs.cmu.edu/~rgw/TsaiCode.html, http://research.microsoft.com/en-us/um/people/zhang/calib/). .

2台のカメラ32,33で撮影された画像それぞれについて、すべての画素について、上記の変換を行うことで、平行化画像を取得することができる。   For each of the images taken by the two cameras 32 and 33, a parallelized image can be obtained by performing the above conversion for all the pixels.

図1に戻って、3次元形状取得装置1の構成の説明をする。
[3次元形状取得装置1の構成]
3次元形状取得装置1は、ブロック画像切出手段11(基準ブロック画像切出部11a,参照ブロック画像切出部11b)と、対象領域抽出手段12(基準ブロック画像対象領域抽出部12a,参照ブロック画像対象領域抽出部12b)と、色置換手段13(基準ブロック画像色置換部13a,参照ブロック画像色置換部13b)と、視差計測手段14と、3次元座標位置生成手段15とを備えている。
Returning to FIG. 1, the configuration of the three-dimensional shape acquisition apparatus 1 will be described.
[Configuration of the three-dimensional shape acquisition apparatus 1]
The three-dimensional shape acquisition apparatus 1 includes a block image cutout unit 11 (a standard block image cutout unit 11a and a reference block image cutout unit 11b) and a target region extraction unit 12 (a base block image target region extraction unit 12a and a reference block). An image target area extracting unit 12b), a color replacing unit 13 (a standard block image color replacing unit 13a, a reference block image color replacing unit 13b), a parallax measuring unit 14, and a three-dimensional coordinate position generating unit 15. .

ブロック画像切出手段11は、入力された画像からブロック画像を切り出し、それらのブロック画像を対象領域抽出手段12へ出力するものである。なお、基準ブロック画像切出部11aは、基準画像30から基準ブロック画像を切り出すものであり、参照ブロック画像切出部11bは、参照画像31から参照ブロック画像を切り出すものである。   The block image cutout unit 11 cuts out block images from the input image and outputs the block images to the target area extraction unit 12. Note that the standard block image cutout unit 11 a cuts out a standard block image from the standard image 30, and the reference block image cutout unit 11 b cuts out a reference block image from the reference image 31.

このブロック画像切出手段11は、例えば、図3に示すように、基準画像30と参照画像31の左上座標から一定の大きさの画像を切り出す。そして、後記する一連の処理が行われた後、ブロック画像切出手段11は、前回切り出したブロック画像から1ピクセル分横にずらして、次のブロック画像を切り出す。例えば、ブロック画像のサイズが64×64ピクセルの場合、次のブロック画像のうち、64×63ピクセルは重ねて切り出すことになる。ただし、これはピクセル単位の奥行き情報を取得する場合であり、切り出す間隔をあけることで、荒い奥行き情報を速く取得することができる。4ピクセルごとに切り出す処理を行う場合には、次のブロック画像は、64×60ピクセルが重なる計算になる。   For example, as illustrated in FIG. 3, the block image cutout unit 11 cuts out an image having a certain size from the upper left coordinates of the standard image 30 and the reference image 31. Then, after a series of processes to be described later is performed, the block image cutout unit 11 cuts out the next block image by shifting by one pixel from the block image cut out last time. For example, when the size of a block image is 64 × 64 pixels, 64 × 63 pixels of the next block image are cut out in an overlapping manner. However, this is a case where depth information in units of pixels is acquired, and rough depth information can be acquired quickly by providing an interval for extraction. When the process of cutting out every 4 pixels is performed, the next block image is calculated by overlapping 64 × 60 pixels.

図3に示すように、基準ブロック画像切出部11aは、入力された基準画像30から基準ブロック画像35aを切り出す。参照ブロック画像切出部11bは、入力された参照画像31から参照ブロック画像35bを切り出す。基準画像30および参照画像31のそれぞれから切り出された基準ブロック画像35aおよび参照ブロック画像35bの大きさと基準画像30および参照画像31に対する位置は同じものとする。
ブロック画像の大きさは、2つのブロック画像の重なる部分がある程度確保できる所定の大きさとする。例えば、64ピクセル×64ピクセルとする。この大きさでは、ずれが大きすぎて平行移動量を求めることができないときは、例えば、128ピクセル×128ピクセル、256ピクセル×256ピクセルとしてもよい。
なお、図3に示すものは、画像の左上からブロック画像を切り出しているが、この処理は、画像の左上の画素から走査状に右下の画素まで繰り返し行うことになる。
As illustrated in FIG. 3, the reference block image cutout unit 11 a cuts out the reference block image 35 a from the input reference image 30. The reference block image cutout unit 11b cuts out the reference block image 35b from the input reference image 31. It is assumed that the sizes of the standard block image 35a and the reference block image 35b cut out from the standard image 30 and the reference image 31 and the positions with respect to the standard image 30 and the reference image 31 are the same.
The size of the block image is set to a predetermined size that allows a certain amount of overlap between the two block images. For example, it is assumed to be 64 pixels × 64 pixels. In this size, when the shift is too large to obtain the translation amount, for example, it may be 128 pixels × 128 pixels, 256 pixels × 256 pixels.
In FIG. 3, the block image is cut out from the upper left of the image, but this process is repeated from the upper left pixel of the image to the lower right pixel in a scanning manner.

対象領域抽出手段12は、視差計測のための対象領域を抽出するものである。この対象領域抽出手段12は、基準ブロック画像対象領域抽出部12aと、参照ブロック画像対象領域抽出部12bとを備える。
基準ブロック画像対象領域抽出部12aは、基準ブロック画像切出部11aが切り出した基準ブロック画像から視差計測のための対象領域を抽出するために所定の位置の色を基準色として特定し、基準ブロック画像において、基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出するものである。また、基準ブロック画像対象領域抽出部12aは、特定した基準色を参照ブロック画像対象領域抽出部12bへ出力する。基準色は、例えば、基準ブロック画像の中央画素の色とする。基準色に所定の範囲内で類似とは、視差計測の際に十分な位相情報を得られるような対象領域になるよう予め設定する。例えば、RGB値がそれぞれ256階調のとき基準色とのRGB値の差がそれぞれ±16の範囲内とする。
The target area extracting unit 12 extracts a target area for parallax measurement. The target area extracting unit 12 includes a standard block image target area extracting unit 12a and a reference block image target area extracting unit 12b.
The reference block image target area extraction unit 12a specifies a color at a predetermined position as a reference color in order to extract a target area for parallax measurement from the reference block image cut out by the reference block image cutout unit 11a. In the image, a pixel having a color similar to a reference color within a predetermined range is extracted as a target region. The standard block image target region extraction unit 12a outputs the specified standard color to the reference block image target region extraction unit 12b. The reference color is, for example, the color of the central pixel of the reference block image. The similarity to the reference color within a predetermined range is set in advance so as to be a target region where sufficient phase information can be obtained during parallax measurement. For example, when the RGB values are 256 gradations, the difference between the RGB values from the reference color is within a range of ± 16.

参照ブロック画像対象領域抽出部12bは、参照ブロック画像切出部11bが切り出した参照ブロック画像と、基準ブロック画像対象領域抽出部12aが特定した基準色とから、参照ブロック画像において、基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出するものである。ここでの所定の範囲内で類似する色は、基準ブロック画像と同じとする。   The reference block image target area extraction unit 12b determines a reference color as a reference color in the reference block image from the reference block image cut out by the reference block image cutout part 11b and the reference color specified by the reference block image target area extraction unit 12a. In this range, pixels having similar colors are extracted as target areas. The similar colors in the predetermined range here are the same as those of the reference block image.

例えば図3に示すように、基準ブロック画像対象領域抽出部12aは、基準ブロック画像36aの中央画素38の色を基準色として特定し、基準ブロック画像36aにおいて、基準色に所定の範囲内で類似する色を持つ画素を対象領域39aとして抽出する。
また、参照ブロック画像対象領域抽出部12bは、基準ブロック画像36aの中央画素38の色である基準色から、参照ブロック画像36bにおいて、基準色に所定の範囲内で類似する色を持つ画素を対象領域39bとして抽出する。
For example, as shown in FIG. 3, the reference block image target region extraction unit 12a specifies the color of the central pixel 38 of the reference block image 36a as the reference color, and the reference block image 36a is similar to the reference color within a predetermined range. A pixel having the color to be extracted is extracted as the target area 39a.
In addition, the reference block image target region extraction unit 12b targets pixels having a color similar to the reference color within a predetermined range in the reference block image 36b from the reference color that is the color of the central pixel 38 of the reference block image 36a. Extracted as a region 39b.

色置換手段13は、対象領域の背景をマスクするものである。この色置換手段13は、基準ブロック画像色置換部13aと、参照ブロック画像色置換部13bとを備える。
基準ブロック画像色置換部13aは、基準ブロック画像対象領域抽出部12aが出力した基準ブロック画像における所定の色を置換色として特定し、基準ブロック画像において、対象領域に含まれない画素の色を置換色で置き換えるものである。また、基準ブロック画像色置換部13aは、置換色を参照ブロック画像色置換部13bへ出力する。置換色は、例えば、基準ブロック画像対象領域抽出部12aが特定した基準色、あるいは、その基準色に所定の範囲内で類似する色の平均色とする。
The color replacement unit 13 masks the background of the target area. The color replacement unit 13 includes a standard block image color replacement unit 13a and a reference block image color replacement unit 13b.
The reference block image color replacement unit 13a specifies a predetermined color in the reference block image output from the reference block image target region extraction unit 12a as a replacement color, and replaces the color of pixels not included in the target region in the reference block image. Replace with color. The standard block image color replacement unit 13a outputs the replacement color to the reference block image color replacement unit 13b. The replacement color is, for example, a reference color specified by the reference block image target region extraction unit 12a or an average color similar to the reference color within a predetermined range.

参照ブロック画像色置換部13bは、参照ブロック画像において、対象領域に含まれない画素の色を基準ブロック画像色置換部13aが特定した置換色で置き換えるものである。
例えば図3に示すように、基準ブロック画像色置換部13aは、基準ブロック画像37aにおける中央画素38の色を置換色として特定し、基準ブロック画像37aにおいて、対象領域39aに含まれない画素(網掛部)の色を置換色で置き換える。また、参照ブロック画像色置換部13bは、参照ブロック画像37bにおいて、対象領域39bに含まれない画素(網掛部)の色を置換色で置き換える。
これにより、ブロック画像内の奥行きが不連続である部分や奥行きが対象領域と大きく異なる部分の画素の色が置換色に置き換えられ(背景がマスクされ)、視差計測手段14における位相情報の混合を抑制できる。
The reference block image color replacement unit 13b replaces the color of a pixel not included in the target area in the reference block image with the replacement color specified by the standard block image color replacement unit 13a.
For example, as shown in FIG. 3, the reference block image color replacement unit 13a specifies the color of the central pixel 38 in the reference block image 37a as a replacement color, and in the reference block image 37a, pixels that are not included in the target region 39a (shaded) Part) color with the replacement color. Further, the reference block image color replacement unit 13b replaces the color of the pixel (shaded portion) not included in the target area 39b with the replacement color in the reference block image 37b.
As a result, the color of the pixel in the block image where the depth is discontinuous or where the depth is significantly different from the target area is replaced with the replacement color (the background is masked), and the phase information is mixed in the parallax measurement unit 14. Can be suppressed.

視差計測手段14は、色置換手段13による処理が施された基準ブロック画像および参照ブロック画像を入力として、それらの画像の輝度情報または色情報を用いて、位相限定相関法によりブロック処理を行い、2つのブロック画像の平行移動量を出力するものである。色置換手段13によってブロック画像内の奥行きが不連続である部分や奥行きが大きく異なる部分が置換色で置き換えられることで、位相相関関数のピークが明確に現れるため、視差計測手段14によって平均移動量を精度良く求めることができる。   The parallax measuring unit 14 receives the standard block image and the reference block image processed by the color replacing unit 13 and performs block processing by the phase-only correlation method using the luminance information or color information of the images, The parallel movement amount of the two block images is output. Since the color replacement unit 13 replaces a portion having a discontinuous depth in the block image or a portion having a significantly different depth with a replacement color, the peak of the phase correlation function appears clearly. Can be obtained with high accuracy.

3次元座標位置生成手段15は、視差計測手段14から入力される2つのブロック画像の平行移動量と、撮影固有値記憶手段21に記憶された撮影固有値とを入力として、三角測量の原理より、次式(5)を用いて3次元座標位置を生成するものである。ここで、zは3次元座標位置、Bはカメラ32とカメラ33の光学主点間の距離、fは焦点距離、dは2つのブロック画像の平行移動量、pは撮影面における画素ピッチの距離である。Bやfは、カメラを設置する際のキャリブレーションから得ることができる。pはカメラの仕様であるため、既知である。   The three-dimensional coordinate position generation unit 15 receives the parallel movement amount of the two block images input from the parallax measurement unit 14 and the shooting eigenvalue stored in the shooting eigenvalue storage unit 21 as input, and performs the following based on the principle of triangulation. A three-dimensional coordinate position is generated using equation (5). Here, z is the three-dimensional coordinate position, B is the distance between the optical principal points of the camera 32 and the camera 33, f is the focal length, d is the parallel movement amount of the two block images, and p is the distance of the pixel pitch on the imaging plane. It is. B and f can be obtained from calibration when the camera is installed. Since p is the specification of the camera, it is known.

記憶部20の撮影固有値記憶手段21は、カメラの光学主点間の距離B、焦点距離fおよび撮影面における画素ピッチの距離pを記憶するものである。これらは、3次元座標位置生成手段15によって参照される。なお、記憶部20は、3次元形状取得装置1の外部に設けられていてもよい。   The photographing eigenvalue storage means 21 of the storage unit 20 stores the distance B between the optical principal points of the camera, the focal length f, and the distance p of the pixel pitch on the photographing surface. These are referred to by the three-dimensional coordinate position generation means 15. The storage unit 20 may be provided outside the three-dimensional shape acquisition apparatus 1.

[3次元形状取得装置1の動作]
次に、3次元形状取得装置1の動作について、図4を参照して説明する。ここでは、基準画像および参照画像が連続する動画として入力されたこととして説明する。
[Operation of the three-dimensional shape acquisition apparatus 1]
Next, the operation of the three-dimensional shape acquisition apparatus 1 will be described with reference to FIG. Here, a description will be given assuming that the base image and the reference image are input as continuous moving images.

図4に示すように、ステップS10において、ブロック画像切出手段11は、基準画像30および参照画像31を取得する。
ステップS11において、基準ブロック画像切出部11aは、基準画像30から基準ブロック画像を順次切り出す。参照ブロック画像切出部11bは、参照画像31から参照ブロック画像を順次切り出す。
ステップS12において、基準ブロック画像対象領域抽出部12aは、基準ブロック画像切出部11aが切り出した基準ブロック画像から所定の位置の色を基準色として特定し、基準ブロック画像において、基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出し、特定した基準色を参照ブロック画像対象領域抽出部12bへ出力する。また、参照ブロック画像対象領域抽出部12bは、参照ブロック画像において、基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出する。
As shown in FIG. 4, in step S <b> 10, the block image cutout unit 11 acquires a standard image 30 and a reference image 31.
In step S <b> 11, the reference block image cutout unit 11 a sequentially cuts out the reference block images from the reference image 30. The reference block image extraction unit 11b sequentially extracts reference block images from the reference image 31.
In step S12, the reference block image target region extraction unit 12a identifies a color at a predetermined position from the reference block image cut out by the reference block image cutout unit 11a as a reference color, and the reference block image has a predetermined color as the reference color. A pixel having a similar color within the range is extracted as a target region, and the specified standard color is output to the reference block image target region extraction unit 12b. In addition, the reference block image target area extraction unit 12b extracts, as a target area, a pixel having a color similar to the standard color within a predetermined range in the reference block image.

ステップS13において、基準ブロック画像色置換部13aは、基準ブロック画像対象領域抽出部12aが出力した基準ブロック画像における所定の色を置換色として特定し、基準ブロック画像において、対象領域に含まれない画素の色を置換色で置き換え、特定した置換色を参照ブロック画像色置換部13bへ出力する。参照ブロック画像色置換部13bは、参照ブロック画像において、対象領域に含まれない画素の色を置換色で置き換える。   In step S13, the reference block image color replacement unit 13a specifies a predetermined color in the reference block image output from the reference block image target region extraction unit 12a as a replacement color, and pixels that are not included in the target region in the reference block image. Are replaced with replacement colors, and the specified replacement colors are output to the reference block image color replacement unit 13b. The reference block image color replacement unit 13b replaces the color of a pixel not included in the target region with a replacement color in the reference block image.

ステップS14において、視差計測手段14は、色置換手段13による処理が施された基準ブロック画像および参照ブロック画像の視差を求める。
ステップS15において、3次元座標位置生成手段15は、視差計測手段14から入力される値と撮影固有値記憶手段21に記憶された撮影固有値とを入力として、3次元座標位置60を生成する。
ステップS16において、ブロック画像切出手段11は、ステップS10において取得した基準画像30および参照画像31の全画素について処理が終了したか否かを判定する。全画素について処理が終了していないと判定した場合は(ステップS16・No)、ブロック画像切出手段11(基準ブロック画像切出部11a,参照ブロック画像切出部11b)は、次のブロック画像を切り出す(ステップS11)。
In step S14, the parallax measuring unit 14 obtains the parallax of the base block image and the reference block image that have been processed by the color replacing unit 13.
In step S <b> 15, the three-dimensional coordinate position generation unit 15 receives the value input from the parallax measurement unit 14 and the shooting eigenvalue stored in the shooting eigenvalue storage unit 21 and generates a three-dimensional coordinate position 60.
In step S16, the block image cutout unit 11 determines whether or not the processing has been completed for all the pixels of the base image 30 and the reference image 31 acquired in step S10. When it is determined that the processing has not been completed for all pixels (No in step S16), the block image cutout unit 11 (the base block image cutout unit 11a and the reference block image cutout unit 11b) Is cut out (step S11).

全画素について処理が終了したと判定した場合は(ステップS16・Yes)、ステップS17において、ブロック画像切出手段11は、動画像におけるすべてのフレームについて処理が終了したか否かを判定する。すべてのフレームについて処理が終了していないと判定した場合は(ステップS17・No)、ブロック画像切出手段11は、次の画像を取得する(ステップS10)。
すべてのフレームについて処理が終了したと判定した場合は(ステップS17・Yes)、処理部10は、3次元形状取得処理を終了する。
When it is determined that the processing has been completed for all the pixels (step S16 / Yes), in step S17, the block image cutout unit 11 determines whether the processing has been completed for all the frames in the moving image. When it is determined that the processing has not been completed for all the frames (step S17 / No), the block image cutout unit 11 acquires the next image (step S10).
If it is determined that the processing has been completed for all frames (step S17: Yes), the processing unit 10 ends the three-dimensional shape acquisition process.

以上の動作によって、3次元形状取得装置1は、ブロック画像内の奥行きが不連続である部分や奥行きが大きく異なる部分が置換色で置き換えられているため、平均移動量を精度良く求めることができ、高い精度で3次元座標位置を生成できる。   With the above operation, the three-dimensional shape acquisition apparatus 1 can accurately obtain the average movement amount because the discontinuous depth portion or the greatly different depth portion in the block image is replaced with the replacement color. A three-dimensional coordinate position can be generated with high accuracy.

<第2実施形態>
次に、本発明の第2実施形態について、図5〜図9を参照して説明する。
第1実施形態では、対象領域を、基準ブロック画像の中央画素の色に類似する範囲に基づいて抽出したが、第2実施形態では、対象領域を、奥行き(視差)に基づいて抽出する。また、付加的な機能として、参照ブロック画像の切り出し方法を工夫することで、視差計測の精度を上げている。
[3次元形状取得装置1Aの構成]
図5に示すように、3次元形状取得装置1Aは、ブロック画像切出手段11Aと、対象領域抽出手段12Aと、視差計測手段14Aと、視差推定手段16とを備えている。なお、第1実施形態の構成と同一の構成には同一の符号を付して、重複した説明は省略する。
Second Embodiment
Next, a second embodiment of the present invention will be described with reference to FIGS.
In the first embodiment, the target area is extracted based on a range similar to the color of the central pixel of the reference block image. In the second embodiment, the target area is extracted based on the depth (parallax). In addition, as an additional function, the accuracy of parallax measurement is improved by devising a reference block image clipping method.
[Configuration of 3D Shape Acquisition Device 1A]
As shown in FIG. 5, the three-dimensional shape acquisition apparatus 1A includes a block image cutting unit 11A, a target area extracting unit 12A, a parallax measuring unit 14A, and a parallax estimating unit 16. In addition, the same code | symbol is attached | subjected to the structure same as the structure of 1st Embodiment, and the overlapping description is abbreviate | omitted.

まず、視差推定手段16について、説明する。
視差推定手段16は、従来の手法により、おおよその平行移動量(視差)を推定するものである。ここでは、例えば、視差推定手段16は、入力される基準画像30と参照画像31から、既存の対応点探索手法(例えば、ブロックマッチング法やBelief Propagation法)を用いて、基準画像30の画素に対応する参照画像31の画素との平行移動量を輝度または色で表示した基準視差画像40を生成する。また、視差推定手段16は、入力される基準画像30と参照画像31から、既存の対応点探索手法を用いて、参照画像31の画素に対応する基準画像30の画素との平行移動量を輝度または色で表示した参照視差画像41を生成する。なお、基準視差画像40および参照視差画像41は、例えば、明るい部分は平行移動量が多く、暗い部分は平行移動量が少ないことを示す。
First, the parallax estimation means 16 will be described.
The parallax estimation means 16 estimates an approximate amount of parallel movement (parallax) by a conventional method. Here, for example, the parallax estimation means 16 uses the existing corresponding point search method (for example, the block matching method or the Belief Propagation method) from the input standard image 30 and the reference image 31 to the pixels of the standard image 30. A reference parallax image 40 in which the amount of parallel movement with the pixel of the corresponding reference image 31 is displayed in luminance or color is generated. In addition, the parallax estimation unit 16 calculates the amount of parallel movement from the input standard image 30 and the reference image 31 to the pixels of the standard image 30 corresponding to the pixels of the reference image 31 using an existing corresponding point search method. Alternatively, the reference parallax image 41 displayed in color is generated. The standard parallax image 40 and the reference parallax image 41 indicate that, for example, a bright part has a large amount of parallel movement and a dark part has a small amount of parallel movement.

ブロック画像切出手段11Aは、基準画像、参照画像、基準視差画像および参照視差画像からそれぞれ基準ブロック画像、参照ブロック画像、基準視差ブロック画像および参照視差ブロック画像として切り出すものである。このブロック画像切出手段11Aは、基準ブロック画像切出部11Aaと、参照ブロック画像切出部11Abと、基準視差ブロック画像切出部11Acと、参照視差ブロック画像切出部11Adと、切出位置算出手段17とを備える。   The block image cutout unit 11A cuts out a standard block image, a reference block image, a standard parallax block image, and a reference parallax block image from the standard image, reference image, standard parallax image, and reference parallax image, respectively. The block image cutout unit 11A includes a standard block image cutout unit 11Aa, a reference block image cutout unit 11Ab, a standard parallax block image cutout unit 11Ac, a reference parallax block image cutout unit 11Ad, and a cutout position. And calculating means 17.

基準ブロック画像切出部11Aaは、基準画像30から基準ブロック画像を切り出すものである。また、基準ブロック画像切出部11Aaは、切出位置算出手段17に、基準ブロック画像の切出位置情報を出力するものである。
参照ブロック画像切出部11Abは、参照画像31と、後記する切出位置算出手段17が算出した切出位置情報とから参照ブロック画像を切り出すものである。
基準視差ブロック画像切出部11Acは、基準視差画像40から、基準ブロック画像と同じ位置、大きさのブロック画像である基準視差ブロック画像を切り出すものである。また、基準視差ブロック画像切出部11Acは、切出位置算出手段17および視差計測手段14Aに、基準視差ブロック画像の中央画素の値を出力するものである。
参照視差ブロック画像切出部11Adは、参照視差画像41と、後記する切出位置算出手段17が算出した切出位置情報とから、参照ブロック画像と同じ位置、大きさのブロック画像である参照視差ブロック画像を切り出すものである。
The reference block image cutout unit 11 </ b> Aa cuts out a reference block image from the reference image 30. The reference block image cutout unit 11 </ b> Aa outputs cutout position information of the reference block image to the cutout position calculation unit 17.
The reference block image cutout unit 11Ab cuts out a reference block image from the reference image 31 and cutout position information calculated by the cutout position calculation means 17 described later.
The reference parallax block image cutout unit 11Ac cuts out a reference parallax block image that is a block image having the same position and size as the reference block image from the reference parallax image 40. The reference parallax block image cutout unit 11Ac outputs the value of the central pixel of the reference parallax block image to the cutout position calculation unit 17 and the parallax measurement unit 14A.
The reference parallax block image cutout unit 11Ad is a reference parallax that is a block image having the same position and size as the reference block image, based on the reference parallax image 41 and the cutout position information calculated by the cutout position calculation unit 17 described later. A block image is cut out.

切出位置算出手段17は、基準ブロック画像の切出位置のx座標に、基準視差ブロック画像の中央画素の値を加算して、参照ブロック画像および参照視差ブロック画像の切出位置を算出するものである。また、切出位置算出手段17は、参照ブロック画像切出部11Abおよび参照視差ブロック画像切出部11Adに、算出した切出位置情報を出力する。   The cutout position calculating means 17 calculates the cutout position of the reference block image and the reference parallax block image by adding the value of the center pixel of the reference parallax block image to the x coordinate of the cutout position of the standard block image. It is. In addition, the cutout position calculation unit 17 outputs the calculated cutout position information to the reference block image cutout unit 11Ab and the reference parallax block image cutout unit 11Ad.

すなわち、ブロック画像切出手段11Aにおいて、基準ブロック画像と基準視差ブロック画像は、同じ位置、大きさで切り出される。基準視差ブロック画像の中央画素の値は、基準ブロック画像の中央画素と、その画素に対応する参照ブロック画像における画素との間の平行移動量を示すものである。基準ブロック画像の中央画素の位置のx座標に、この平行移動量を加算し、算出された値を参照ブロック画像の中央画素の位置とする。
例えば図6に示すように、基準画像30から基準ブロック画像35aが切り出される。また、基準視差画像40から基準視差ブロック画像45cが切り出される。そして、基準ブロック画像35aの中央画素の位置のx座標に、基準視差ブロック画像45cの中央画素の値を加算し、これを参照ブロック画像35bおよび参照視差ブロック画像45dの中央画素の位置とする。
That is, in the block image cutout unit 11A, the reference block image and the reference parallax block image are cut out at the same position and size. The value of the center pixel of the reference parallax block image indicates the amount of translation between the center pixel of the reference block image and the pixel in the reference block image corresponding to the pixel. This parallel movement amount is added to the x coordinate of the position of the center pixel of the reference block image, and the calculated value is used as the position of the center pixel of the reference block image.
For example, as shown in FIG. 6, a reference block image 35 a is cut out from the reference image 30. Further, the reference parallax block image 45 c is cut out from the reference parallax image 40. Then, the value of the central pixel of the standard parallax block image 45c is added to the x coordinate of the position of the central pixel of the standard block image 35a, and this is used as the position of the central pixel of the reference block image 35b and the reference parallax block image 45d.

このような切り出し方法を用いる理由を、図7を参照して説明する。
図7(a)に示すように、基準視差ブロック画像の中央画素の値を用いずに、基準ブロック画像50aおよび参照ブロック画像50bを、それぞれ基準画像および参照画像に対して同じ位置から切り出すと、対象領域52bが参照ブロック画像50bから外れてしまうことがある。この場合、視差計測手段14A(図5参照)において対象領域の十分な位相情報を取得できず、視差計測の精度が落ちることとなる。
The reason for using such a clipping method will be described with reference to FIG.
As illustrated in FIG. 7A, when the base block image 50a and the reference block image 50b are cut out from the same position with respect to the base image and the reference image without using the value of the center pixel of the base parallax block image, The target area 52b may deviate from the reference block image 50b. In this case, the parallax measurement unit 14A (see FIG. 5) cannot acquire sufficient phase information of the target region, and the accuracy of the parallax measurement is reduced.

一方、図7(b)に示すように、基準ブロック画像51aの中央画素の位置のx座標に、基準視差ブロック画像の中央画素の値を加算して、参照ブロック画像51bの中央画素の位置として参照ブロック画像51bを切り出すと、対象領域53bは、参照ブロック画像51bから外れずに切り出される。d2は、前記した基準視差ブロック画像の中央画素の値となる。このような切り出し方法により、基準ブロック画像51aと参照ブロック画像51bとにおいて、対象領域52a,53bの全体が現れるため、後記する視差計測手段14A(図5参照)において対象領域の十分な位相情報を取得することができ、視差計測の精度を上げることができる。
なお、基準視差画像および参照視差画像は、従来手法により、おおよその視差を推定したものであるため、このような切り出し方法によると、図7(c)に示すように、対象領域53a,53bのそれぞれ基準ブロック画像51a,参照ブロック画像51bに対する位置が僅かにずれて切り出されることがある。このずれをd1とする。視差計測手段14Aは、このずれであるd1を計測し、d2を加算することにより、被写体の3次元形状を取得するために必要な元の視差Dを求めることになる。
On the other hand, as shown in FIG. 7B, the value of the center pixel of the reference parallax block image is added to the x coordinate of the position of the center pixel of the reference block image 51a to obtain the position of the center pixel of the reference block image 51b. When the reference block image 51b is cut out, the target area 53b is cut out without detaching from the reference block image 51b. d2 is the value of the center pixel of the reference parallax block image. By such a clipping method, the entire target areas 52a and 53b appear in the standard block image 51a and the reference block image 51b. Therefore, sufficient phase information of the target area is obtained in the parallax measuring unit 14A (see FIG. 5) described later. Can be obtained, and the accuracy of parallax measurement can be increased.
Note that the standard parallax image and the reference parallax image are obtained by estimating the approximate parallax by a conventional method. Therefore, according to such a clipping method, as shown in FIG. In some cases, the positions relative to the base block image 51a and the reference block image 51b are slightly shifted from each other. Let this shift be d1. The parallax measuring unit 14A measures d1, which is the deviation, and adds d2, thereby obtaining the original parallax D necessary for acquiring the three-dimensional shape of the subject.

図5に戻って説明を続ける。
対象領域抽出手段12Aは、視差計測のための対象領域を抽出するものである。この対象領域抽出手段12Aは、基準ブロック画像対象領域抽出部12Aaと、参照ブロック画像対象領域抽出部12Abと、基準視差ブロック画像対象領域抽出部12Acと、参照視差ブロック画像対象領域抽出部12Adとを備える。
Returning to FIG.
The target area extraction unit 12A extracts a target area for parallax measurement. The target area extraction unit 12A includes a standard block image target area extraction unit 12Aa, a reference block image target area extraction unit 12Ab, a standard parallax block image target area extraction unit 12Ac, and a reference parallax block image target area extraction unit 12Ad. Prepare.

基準視差ブロック画像対象領域抽出部12Acは、基準視差ブロック画像切出部11Acが切り出した基準視差ブロック画像から所定の位置の色または輝度を基準色として特定し、基準視差ブロック画像において、基準色に所定の範囲内で類似する色または輝度を持つ画素を対象領域として抽出するものである。また、基準視差ブロック画像対象領域抽出部12Acは、特定した基準色を参照視差ブロック画像対象領域抽出部12Adへ出力する。基準色は、例えば、基準視差ブロック画像の中央画素の視差量を表した色または輝度とする。
参照視差ブロック画像対象領域抽出部12Adは、参照視差ブロック画像切出部11Adが切り出した参照視差ブロック画像と、基準視差ブロック画像対象領域抽出部12Acが特定した基準色とから、参照視差ブロック画像において、基準色に所定の範囲内で類似する色または輝度を持つ画素を対象領域として抽出するものである。ここでの所定の範囲内で類似する色または輝度は、基準視差ブロック画像と同じとする。
The reference parallax block image target area extraction unit 12Ac identifies a color or luminance at a predetermined position as a reference color from the reference parallax block image cut out by the reference parallax block image cutout unit 11Ac, and sets the reference color in the reference parallax block image. A pixel having a similar color or luminance within a predetermined range is extracted as a target region. In addition, the standard parallax block image target region extraction unit 12Ac outputs the specified standard color to the reference parallax block image target region extraction unit 12Ad. The reference color is, for example, a color or luminance representing the parallax amount of the central pixel of the reference parallax block image.
The reference parallax block image target area extraction unit 12Ad is configured to generate a reference parallax block image from the reference parallax block image extracted by the reference parallax block image extraction unit 11Ad and the reference color specified by the standard parallax block image target area extraction unit 12Ac. A pixel having a color or luminance similar to a reference color within a predetermined range is extracted as a target region. The color or brightness similar within the predetermined range here is the same as that of the reference parallax block image.

基準ブロック画像対象領域抽出部12Aaは、基準視差ブロック画像に対する対象領域の位置と同じ位置に、基準ブロック画像切出部11Aaが切り出した基準ブロック画像において、対象領域を抽出する。
参照ブロック画像対象領域抽出部12Abは、参照視差ブロック画像に対する対象領域の位置と同じ位置に、参照ブロック画像切出部11Abが切り出した参照ブロック画像において、対象領域を抽出する。
The reference block image target area extraction unit 12Aa extracts a target area in the reference block image cut out by the reference block image cutout part 11Aa at the same position as the position of the target area with respect to the reference parallax block image.
The reference block image target region extraction unit 12Ab extracts a target region in the reference block image cut out by the reference block image cutout unit 11Ab at the same position as the position of the target region with respect to the reference parallax block image.

例えば図6に示すように、基準視差ブロック画像対象領域抽出部12Acは、基準視差ブロック画像46cの中央画素48の色を基準色として特定し、基準視差ブロック画像46cにおいて、基準色に所定の範囲内で類似する色を持つ画素を対象領域49cとして抽出する。
また、基準ブロック画像対象領域抽出部12Aaは、基準視差ブロック画像46cに対する対象領域49cの位置と同じ位置に、基準ブロック画像36aにおいて、対象領域39aを抽出する。
For example, as illustrated in FIG. 6, the reference parallax block image target region extraction unit 12Ac specifies the color of the central pixel 48 of the reference parallax block image 46c as the reference color, and the reference parallax block image 46c has a predetermined range in the reference color. A pixel having a similar color is extracted as a target area 49c.
Further, the reference block image target area extraction unit 12Aa extracts the target area 39a in the reference block image 36a at the same position as the position of the target area 49c with respect to the reference parallax block image 46c.

参照視差ブロック画像対象領域抽出部12Adは、参照視差ブロック画像46dと、基準視差ブロック画像対象領域抽出部12Acが特定した基準色とから、参照視差ブロック画像46dにおいて、基準色に所定の範囲内で類似する色を持つ画素を対象領域49dとして抽出する。
また、参照ブロック画像対象領域抽出部12Abは、参照視差ブロック画像46dに対する対象領域49dの位置と同じ位置に、参照ブロック画像36bにおいて、対象領域39bを抽出する。
このように、視差画像から対象領域を決定することにより、ブロック画像内に類似した色の画素の塊が大きくまとまっていないために正確な奥行き情報を得るために位相情報を十分取得することができない場合にも、奥行きが類似する画素が十分まとまっていれば、平均移動量を精度良く求めることができ、高い精度で3次元座標位置を生成できる。
The reference parallax block image target region extraction unit 12Ad is within a predetermined range of the reference color in the reference parallax block image 46d from the reference parallax block image 46d and the standard color specified by the standard parallax block image target region extraction unit 12Ac. Pixels having similar colors are extracted as the target area 49d.
Further, the reference block image target area extraction unit 12Ab extracts the target area 39b in the reference block image 36b at the same position as the position of the target area 49d with respect to the reference parallax block image 46d.
As described above, by determining the target region from the parallax image, the block of similar-color pixels in the block image is not large and the phase information cannot be sufficiently acquired to obtain accurate depth information. Even in this case, if the pixels having similar depths are sufficiently gathered, the average movement amount can be obtained with high accuracy, and the three-dimensional coordinate position can be generated with high accuracy.

その後、第1実施形態と同様に、基準ブロック画像色置換部13aは、基準ブロック画像37aにおける中央画素38の色、あるいは、基準色に所定の範囲内で類似する色の平均色を置換色として特定し、基準ブロック画像37aにおいて、対象領域39aに含まれない画素(網掛部)の色を置換色で置き換える。
また、参照ブロック画像色置換部13bは、参照ブロック画像37bにおいて、対象領域39bに含まれない画素(網掛部)の色を基準ブロック画像色置換部13aが特定した置換色で置き換える。
Thereafter, as in the first embodiment, the reference block image color replacement unit 13a uses the color of the central pixel 38 in the reference block image 37a or the average color similar to the reference color within a predetermined range as the replacement color. In particular, in the reference block image 37a, the color of the pixel (shaded portion) not included in the target area 39a is replaced with a replacement color.
Further, the reference block image color replacement unit 13b replaces the color of the pixel (shaded portion) not included in the target region 39b with the replacement color specified by the standard block image color replacement unit 13a in the reference block image 37b.

視差計測手段14Aは、色置換手段13から入力される基準ブロック画像と参照ブロック画像とから位相限定相関法により視差を計測し、計測した視差に、参照ブロック画像の切出位置を算出する際に用いた基準視差ブロック画像の中央画素の値を加算するものである。これにより、被写体の3次元形状を取得するために必要な視差を求めることができる。   The parallax measuring unit 14A measures the parallax from the reference block image and the reference block image input from the color replacing unit 13 by the phase-only correlation method, and calculates the cut-out position of the reference block image based on the measured parallax. The value of the central pixel of the used reference parallax block image is added. Thereby, the parallax required to acquire the three-dimensional shape of the subject can be obtained.

[3次元形状取得装置1Aの動作]
次に、3次元形状取得装置1Aの3次元形状取得処理について、図8を参照して説明する。ここでは、第1実施形態と同様に、基準画像および参照画像が連続する動画が入力されたこととして説明する。
[Operation of 3D Shape Acquisition Device 1A]
Next, the three-dimensional shape acquisition process of the three-dimensional shape acquisition apparatus 1A will be described with reference to FIG. Here, as in the first embodiment, it will be described that a moving image in which a base image and a reference image are continuous is input.

図8に示すように、ステップS20において、ブロック画像切出手段11Aは、基準画像30および参照画像31を取得する。
ステップS21において、視差推定手段16は、基準画像30と参照画像31とから、基準視差画像40および参照視差画像41を生成する。
ステップS22において、ブロック画像切出手段11Aは、ブロック画像の切出処理を行う。なお、このステップにおける処理は後に詳述する。
As shown in FIG. 8, in step S <b> 20, the block image cutout unit 11 </ b> A acquires the standard image 30 and the reference image 31.
In step S <b> 21, the parallax estimation unit 16 generates a standard parallax image 40 and a reference parallax image 41 from the standard image 30 and the reference image 31.
In step S22, the block image cutout unit 11A performs block image cutout processing. The process in this step will be described in detail later.

ステップS23において、基準視差ブロック画像対象領域抽出部12Acは、基準視差ブロック画像から基準色として特定し、基準視差ブロック画像において、基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出する。また、基準視差ブロック画像対象領域抽出部12Acは、特定した基準色を参照視差ブロック画像対象領域抽出部12Adへ出力する。さらに、基準ブロック画像対象領域抽出部12Aaは、基準視差ブロック画像に対する対象領域の位置と同じ位置に、基準ブロック画像において、対象領域を抽出する。
また、参照視差ブロック画像対象領域抽出部12Adは、参照視差ブロック画像と、基準視差ブロック画像対象領域抽出部12Acが特定した基準色とから、参照視差ブロック画像において、基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出する。さらに、参照ブロック画像対象領域抽出部12Abは、参照視差ブロック画像に対する対象領域の位置と同じ位置に、参照ブロック画像において、対象領域を抽出する。
In step S23, the reference parallax block image target region extraction unit 12Ac specifies a reference color from the reference parallax block image, and a pixel having a color similar to the reference color within a predetermined range in the reference parallax block image is set as the target region. Extract. In addition, the standard parallax block image target region extraction unit 12Ac outputs the specified standard color to the reference parallax block image target region extraction unit 12Ad. Further, the reference block image target area extraction unit 12Aa extracts the target area in the reference block image at the same position as the position of the target area with respect to the reference parallax block image.
In addition, the reference parallax block image target region extraction unit 12Ad, within the reference parallax block image within a predetermined range in the reference parallax block image, from the reference parallax block image and the standard color specified by the standard parallax block image target region extraction unit 12Ac. Pixels having similar colors are extracted as target areas. Further, the reference block image target area extraction unit 12Ab extracts the target area in the reference block image at the same position as the position of the target area with respect to the reference parallax block image.

ステップS24において、基準ブロック画像色置換部13aは、基準ブロック画像対象領域抽出部12Aaが出力した基準ブロック画像における所定の色を置換色として特定し、基準ブロック画像において、対象領域に含まれない画素の色を置換色で置き換え、特定した置換色を参照ブロック画像色置換部13bへ出力する。参照ブロック画像色置換部13bは、参照ブロック画像対象領域抽出部12Abが出力した参照ブロック画像において、対象領域に含まれない画素の色を置換色で置き換える。   In step S24, the reference block image color replacement unit 13a specifies a predetermined color in the reference block image output from the reference block image target region extraction unit 12Aa as a replacement color, and pixels that are not included in the target region in the reference block image Are replaced with replacement colors, and the specified replacement colors are output to the reference block image color replacement unit 13b. The reference block image color replacement unit 13b replaces the color of a pixel not included in the target region with a replacement color in the reference block image output from the reference block image target region extraction unit 12Ab.

ステップS25において、視差計測手段14Aは、色置換手段13から入力される基準ブロック画像と参照ブロック画像とから位相限定相関法により視差を計測し、計測した視差に、参照ブロック画像の切出位置を算出する際に用いた基準視差ブロック画像の中央画素の値を加算する。
ステップS26からステップS28は、図4のステップS15からステップS17と同様であるため、説明を省略する。
In step S25, the parallax measuring unit 14A measures the parallax from the reference block image and the reference block image input from the color replacing unit 13 by the phase-only correlation method, and sets the cut-out position of the reference block image to the measured parallax. The value of the central pixel of the reference parallax block image used when calculating is added.
Steps S26 to S28 are the same as steps S15 to S17 in FIG.

[ブロック画像切出手段11Aにおけるブロック画像切出処理]
次に、ブロック画像切出手段11Aにおけるブロック画像切出処理について、図9を参照して説明する。
図9に示すように、ステップS221において、基準ブロック画像切出部11Aaは、基準画像30から基準ブロック画像を切り出す。また、基準ブロック画像切出部11Aaは、切出位置算出手段17に、基準ブロック画像の切出位置情報を出力する。
ステップS222において、基準視差ブロック画像切出部11Acは、基準視差画像40から、基準ブロック画像と同じ位置、大きさのブロック画像である基準視差ブロック画像を切り出す。
[Block Image Cutting Process in Block Image Cutting Unit 11A]
Next, block image cutting processing in the block image cutting means 11A will be described with reference to FIG.
As illustrated in FIG. 9, in step S <b> 221, the reference block image cutout unit 11 </ b> Aa cuts out a reference block image from the reference image 30. Further, the reference block image cutout unit 11 </ b> Aa outputs the cutout position information of the reference block image to the cutout position calculation unit 17.
In step S222, the reference parallax block image cutout unit 11Ac cuts out from the reference parallax image 40 a reference parallax block image that is a block image having the same position and size as the reference block image.

ステップS223において、基準視差ブロック画像切出部11Acは、基準視差ブロック画像の中央画素の値を取得する。また、基準視差ブロック画像切出部11Acは、切出位置算出手段17に、基準視差ブロック画像の中央画素の値を出力する。
ステップS224において、切出位置算出手段17は、基準視差ブロック画像の中央画素の値と、基準ブロック画像の切出位置情報とを加算して、参照ブロック画像および参照視差ブロック画像の切出位置を算出する。また、切出位置算出手段17は、参照ブロック画像切出部11Abおよび参照視差ブロック画像切出部11Adに、算出した切出位置情報を出力する。
In step S223, the reference parallax block image cutout unit 11Ac acquires the value of the center pixel of the reference parallax block image. Further, the reference parallax block image cutout unit 11Ac outputs the value of the center pixel of the reference parallax block image to the cutout position calculation unit 17.
In step S224, the cut-out position calculation unit 17 adds the value of the center pixel of the standard parallax block image and the cut-out position information of the standard block image, and determines the cut-out positions of the reference block image and the reference parallax block image. calculate. In addition, the cutout position calculation unit 17 outputs the calculated cutout position information to the reference block image cutout unit 11Ab and the reference parallax block image cutout unit 11Ad.

ステップS225において、参照ブロック画像切出部11Abは、参照画像31と、切出位置算出手段17が算出した切出位置情報とから参照ブロック画像を切り出す。
ステップS226において、参照視差ブロック画像切出部11Adは、参照視差画像41と、切出位置算出手段17が算出した切出位置情報とから、参照ブロック画像と同じ位置、大きさのブロック画像である参照視差ブロック画像を切り出す。
以上で、ブロック画像切出手段11Aは、ブロック画像切出処理を終了する。
なお、趣旨が同じであれば、必ずしもこの順序で動作させる必要はない。
In step S225, the reference block image cutout unit 11Ab cuts out the reference block image from the reference image 31 and the cutout position information calculated by the cutout position calculating unit 17.
In step S226, the reference parallax block image cutout unit 11Ad is a block image having the same position and size as the reference block image from the reference parallax image 41 and the cutout position information calculated by the cutout position calculating unit 17. A reference parallax block image is cut out.
Thus, the block image cutout unit 11A ends the block image cutout process.
In addition, if the purpose is the same, it is not always necessary to operate in this order.

以上の3次元形状取得処理によって、3次元形状取得装置1Aは、ブロック画像内に類似した色の画素の塊が大きくまとまっていないために位相情報が十分取得することができない場合にも、奥行きが類似する画素が十分まとまっていれば、平均移動量を精度良く求めることができ、高い精度で3次元座標位置を生成できる。
また、参照ブロック画像を切り出す際に視差画像を用いることで、視差計測の精度を上げることができる。
With the above three-dimensional shape acquisition processing, the three-dimensional shape acquisition device 1A can obtain a depth even when phase information cannot be acquired sufficiently because a block of similar-colored pixels is not large in the block image. If similar pixels are sufficiently gathered, the average movement amount can be obtained with high accuracy, and a three-dimensional coordinate position can be generated with high accuracy.
Moreover, the accuracy of parallax measurement can be improved by using a parallax image when extracting a reference block image.

<変形例>
以上、本発明の実施形態に係る3次元形状取得装置の構成および動作について説明したが、本発明はこれらの実施形態に限定されるものではない。
例えば、第2実施形態において、ブロック画像切出手段11Aにおいて、切出位置算出手段17により、参照ブロック画像の切出位置を算出しているが、必ずしもこの切り出し方による必要はなく、第1実施形態のように、参照ブロック画像も、基準ブロック画像と同じ位置から切り出してもよい。この場合は、視差計測手段14Aは、色置換手段13から入力される基準ブロック画像と参照ブロック画像とから位相限定相関法により視差を計測するが、計測した視差に、参照ブロック画像の切出位置を算出する際に用いた基準視差ブロック画像の中央画素の値を加算する必要はない。
<Modification>
The configuration and operation of the three-dimensional shape acquisition apparatus according to the embodiments of the present invention have been described above, but the present invention is not limited to these embodiments.
For example, in the second embodiment, in the block image cutout unit 11A, the cutout position calculation unit 17 calculates the cutout position of the reference block image. As in the embodiment, the reference block image may be cut out from the same position as the standard block image. In this case, the parallax measurement unit 14A measures the parallax from the standard block image and the reference block image input from the color replacement unit 13 by the phase-only correlation method, and the reference block image clipping position is included in the measured parallax. It is not necessary to add the value of the central pixel of the reference parallax block image used when calculating.

また、本実施形態では、光軸が平行に設置されたカメラからの画像を入力とすることを前提としたが、平行化画像に変換された画像を入力として用いれば、カメラの設置方向は平行でなくてもよい。   In this embodiment, it is assumed that an image from a camera installed with parallel optical axes is used as an input. However, if an image converted into a parallelized image is used as an input, the installation direction of the camera is parallel. Not necessarily.

また、ブロック画像切出手段において、ブロック画像を切り出すサイズを可変とするようにしたが、ブロック画像を切り出すサイズは固定にしておき、入力された画像の解像度は一定にして画像のサイズを変更した画像の組をいくつか用意し、その画像のサイズの組ごとに階層的に平行移動量を求めてもよい。   In the block image cutout means, the size to cut out the block image is made variable, but the size to cut out the block image is fixed and the resolution of the input image is fixed and the image size is changed. Several sets of images may be prepared, and the translation amount may be obtained hierarchically for each set of image sizes.

また、第1実施形態において、RGB値がそれぞれ256階調のとき基準色とのRGB値の差がそれぞれ±16の範囲内を、基準色に所定の範囲内で類似する色としたが、他にも、RGB空間の色ベクトルの内積値が所定の範囲内であるものでもよい。HSV空間など各種色空間において、所定の範囲内としてもよい。さらに、Mean Shift法などの統計処理を用いて所定の範囲内としてもよい。   Further, in the first embodiment, when the RGB values are 256 gradations, the difference between the RGB values of the reference color within ± 16 is set to be similar to the reference color within the predetermined range. Alternatively, the inner product value of the color vectors in the RGB space may be within a predetermined range. It may be within a predetermined range in various color spaces such as the HSV space. Furthermore, it may be within a predetermined range by using statistical processing such as Mean Shift method.

また、本実施形態では、画像の全画素についてブロック画像を切り出すようにしているが、必ずしもすべての画素について行う必要はなく、所定の間隔ごとに行うことで解像度の低い3次元形状を速く生成することができる。さらに、動画についても、必ずしもすべてのフレームについて行う必要はない。   In the present embodiment, the block image is cut out for all the pixels of the image. However, it is not necessarily performed for all the pixels, and a three-dimensional shape with a low resolution can be generated quickly by performing it at every predetermined interval. be able to. Furthermore, it is not always necessary to carry out the moving image for every frame.

また、3台以上のカメラを用いる場合は、2台のペアを複数組み、各ペアの取得結果を統合することにより、より精度の高い奥行き情報を生成することができる。
例えば、複数の視差推定結果が出た場合に、それらのメディアン値(小さい値から順番に並べて、中央に位置する値をとる手法)を最終結果とする手段や位相相関関数のピークが高い推定結果を最終的な視差値とすることなどが考えられる。
Further, when using three or more cameras, it is possible to generate depth information with higher accuracy by combining a plurality of two pairs and integrating the acquisition results of each pair.
For example, when a plurality of parallax estimation results are obtained, the median value (a method of arranging the values in the order from the smallest value and taking the value located in the center) as the final result or the estimation result with a high peak of the phase correlation function Can be considered as the final parallax value.

さらに、ブロック画像切出手段において、2次元のブロック画像を切り出したが、1次元のブロックを用いることも可能である。これにより、処理時間を短縮することができる。   Further, although the two-dimensional block image is cut out by the block image cutout means, it is also possible to use a one-dimensional block. Thereby, processing time can be shortened.

1 3次元形状取得装置
1A 3次元形状取得装置
11 ブロック画像切出手段
11A ブロック画像切出手段
12 対象領域抽出手段
12A 対象領域抽出手段
13 色置換手段
14 視差計測手段
14A 視差計測手段
15 3次元座標位置生成手段
16 視差推定手段
17 切出位置算出手段
30 基準画像
31 参照画像
35a,36a,37a 基準ブロック画像
35b,36b,37b 参照ブロック画像
40 基準視差画像
41 参照視差画像
45c,46c 基準視差ブロック画像
45d,46d 参照視差ブロック画像
60 3次元座標位置
DESCRIPTION OF SYMBOLS 1 3D shape acquisition apparatus 1A 3D shape acquisition apparatus 11 Block image extraction means 11A Block image extraction means 12 Target area extraction means 12A Target area extraction means 13 Color replacement means 14 Parallax measurement means 14A Parallax measurement means 15 3D coordinates Position generation means 16 Parallax estimation means 17 Cutout position calculation means 30 Reference image 31 Reference image 35a, 36a, 37a Reference block image 35b, 36b, 37b Reference block image 40 Reference disparity image 41 Reference disparity image 45c, 46c Reference disparity block image 45d, 46d Reference parallax block image 60 3D coordinate position

Claims (9)

異なる位置から撮影した被写体の画像である基準画像と参照画像とを入力として前記被写体の奥行き情報を生成する3次元形状取得装置であって、
入力される前記基準画像および前記参照画像から視差計測に用いる所定の大きさの画像であるブロック画像を、それぞれ基準ブロック画像および参照ブロック画像として切り出すブロック画像切出手段と、
視差計測のための対象領域を抽出するために前記基準ブロック画像における所定の色を基準色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出する対象領域抽出手段と、
前記基準ブロック画像における所定の色を、前記対象領域の背景をマスクする色である置換色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記対象領域に含まれない画素の色を前記置換色で置き換える色置換手段と、
前記色置換手段から入力される前記基準ブロック画像と前記参照ブロック画像とから、位相限定相関法により視差を計測する視差計測手段と、
前記視差計測手段が計測した前記視差から3次元座標位置を生成する3次元座標位置生成手段と、
を備えることを特徴とする3次元形状取得装置。
A three-dimensional shape acquisition device that generates a depth information of a subject by inputting a reference image and a reference image that are images of the subject taken from different positions,
Block image cutout means for cutting out a block image which is an image of a predetermined size used for parallax measurement from the input reference image and the reference image, respectively, as a reference block image and a reference block image;
In order to extract a target area for parallax measurement, a predetermined color in the reference block image is specified as a reference color, and in the reference block image and the reference block image, a color similar to the reference color within a predetermined range Target area extraction means for extracting pixels having a target area;
A predetermined color in the base block image is specified as a replacement color that masks a background of the target area, and in the base block image and the reference block image, the color of a pixel not included in the target area is A color replacement means for replacing with a replacement color;
Parallax measurement means for measuring parallax by the phase-only correlation method from the standard block image and the reference block image input from the color replacement means;
Three-dimensional coordinate position generation means for generating a three-dimensional coordinate position from the parallax measured by the parallax measurement means;
A three-dimensional shape acquisition apparatus comprising:
前記対象領域抽出手段は、前記基準ブロック画像の中央画素の色を基準色とする
ことを特徴とする請求項1に記載の3次元形状取得装置。
The three-dimensional shape acquisition apparatus according to claim 1, wherein the target area extraction unit uses a color of a central pixel of the reference block image as a reference color.
前記ブロック画像切出手段は、動画像における連続する複数のフレームの画像から視差計測に用いる所定の大きさの画像であるブロック画像を切り出す
ことを特徴とする請求項1または請求項2に記載の3次元形状取得装置。
The block image cutout unit cuts out a block image that is an image of a predetermined size used for parallax measurement from images of a plurality of continuous frames in a moving image. 3D shape acquisition device.
異なる位置から撮影した被写体の画像である基準画像と参照画像とを入力として前記被写体の奥行き情報を生成する3次元形状取得装置であって、
入力される前記基準画像と前記参照画像とから、一方の画像の各画素に対応するもう一方の画像の画素の平行移動量を表した視差画像である基準視差画像および参照視差画像を生成する視差推定手段と、
前記基準画像、前記参照画像、前記基準視差画像および前記参照視差画像から視差計測に用いる所定の大きさの画像であるブロック画像を、それぞれ基準ブロック画像、参照ブロック画像、基準視差ブロック画像および参照視差ブロック画像として切り出すブロック画像切出手段と、
視差計測のための対象領域を抽出するために前記基準視差ブロック画像における所定の色を基準色として特定し、前記基準視差ブロック画像および前記参照視差ブロック画像において前記基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出し、前記基準視差ブロック画像および前記参照視差ブロック画像において抽出される前記対象領域に基づいて、それぞれ前記基準ブロック画像および前記参照ブロック画像において対象領域を抽出する対象領域抽出手段と、
前記基準ブロック画像における所定の色を、前記対象領域の背景をマスクする色である置換色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記対象領域に含まれない画素の色を前記置換色で置き換える色置換手段と、
前記色置換手段から入力される前記基準ブロック画像と前記参照ブロック画像とから、位相限定相関法により視差を計測する視差計測手段と、
前記視差計測手段が計測した前記視差から3次元座標位置を生成する3次元座標位置生成手段と、
を備えることを特徴とする3次元形状取得装置。
A three-dimensional shape acquisition device that generates a depth information of a subject by inputting a reference image and a reference image that are images of the subject taken from different positions,
Parallax for generating a reference parallax image and a reference parallax image, which are parallax images representing the amount of translation of the pixel of the other image corresponding to each pixel of one image, from the input standard image and the reference image An estimation means;
Block images that are images of a predetermined size used for parallax measurement from the reference image, the reference image, the reference parallax image, and the reference parallax image are respectively referred to as a standard block image, a reference block image, a standard parallax block image, and a reference parallax. A block image cutting means for cutting out as a block image;
In order to extract a target area for parallax measurement, a predetermined color in the reference parallax block image is specified as a reference color, and similar to the reference color in the reference parallax block image and the reference parallax block image within a predetermined range A pixel having a color to be extracted as a target region, and based on the target region extracted in the standard parallax block image and the reference parallax block image, the target region is extracted in the standard block image and the reference block image, respectively. Target area extraction means;
A predetermined color in the base block image is specified as a replacement color that masks a background of the target area, and in the base block image and the reference block image, the color of a pixel not included in the target area is A color replacement means for replacing with a replacement color;
Parallax measurement means for measuring parallax by the phase-only correlation method from the standard block image and the reference block image input from the color replacement means;
Three-dimensional coordinate position generation means for generating a three-dimensional coordinate position from the parallax measured by the parallax measurement means;
A three-dimensional shape acquisition apparatus comprising:
前記ブロック画像切出手段は、基準ブロック画像の位置に前記基準視差ブロック画像の中央画素の値を加算して、前記参照ブロック画像および前記参照視差ブロック画像の切出位置を算出する切出位置算出手段を備え、
前記視差計測手段は、前記色置換手段から入力される前記基準ブロック画像と前記参照ブロック画像とから位相限定相関法により視差を計測し、計測した視差に、前記参照ブロック画像および前記参照視差ブロック画像の切出位置を算出する際に用いた前記基準視差ブロック画像の中央画素の値を加算する
ことを特徴とする請求項4に記載の3次元形状取得装置。
The block image cutout means adds the value of the center pixel of the reference parallax block image to the position of the base block image, and calculates the cutout position of the reference block image and the reference parallax block image. With means,
The parallax measurement unit measures a parallax from the base block image and the reference block image input from the color replacement unit by a phase-only correlation method, and the reference block image and the reference parallax block image are added to the measured parallax. The three-dimensional shape acquisition apparatus according to claim 4, wherein a value of a central pixel of the reference parallax block image used when calculating the cut-out position of is added.
前記対象領域抽出手段は、前記基準視差ブロック画像の中央画素の色を基準色とする
ことを特徴とする請求項4または請求項5に記載の3次元形状取得装置。
The three-dimensional shape acquisition apparatus according to claim 4 or 5, wherein the target area extraction unit uses a color of a central pixel of the reference parallax block image as a reference color.
前記視差推定手段は、動画像における連続する複数のフレームの画像から前記基準視差画像および前記参照視差画像を生成し、
前記ブロック画像切出手段は、動画像における連続する複数のフレームの画像から視差計測に用いる所定の大きさの画像であるブロック画像を切り出す
ことを特徴とする請求項4から請求項6のいずれか一項に記載の3次元形状取得装置。
The parallax estimation means generates the standard parallax image and the reference parallax image from images of a plurality of consecutive frames in a moving image,
The block image cutout unit cuts out a block image that is an image of a predetermined size used for parallax measurement from images of a plurality of continuous frames in a moving image. The three-dimensional shape acquisition apparatus according to one item.
異なる位置から撮影した被写体の画像である基準画像と参照画像とを入力として前記被写体の奥行き情報を生成する3次元形状取得装置を制御するために、前記3次元形状取得装置のコンピュータを、
入力される前記基準画像および前記参照画像から視差計測に用いる所定の大きさの画像であるブロック画像を、それぞれ基準ブロック画像および参照ブロック画像として切り出すブロック画像切出手段、
視差計測のための対象領域を抽出するために前記基準ブロック画像における所定の色を基準色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出する対象領域抽出手段、
前記基準ブロック画像における所定の色を、前記対象領域の背景をマスクする色である置換色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記対象領域に含まれない画素の色を前記置換色で置き換える色置換手段、
前記色置換手段から入力される前記基準ブロック画像と前記参照ブロック画像とから、位相限定相関法により視差を計測する視差計測手段、
前記視差計測手段が計測した前記視差から3次元座標位置を生成する3次元座標位置生成手段、
として機能させるための3次元形状取得プログラム。
In order to control the three-dimensional shape acquisition device that generates the depth information of the subject by inputting a reference image that is an image of the subject photographed from different positions and a reference image, a computer of the three-dimensional shape acquisition device,
Block image cutout means for cutting out a block image that is an image of a predetermined size used for parallax measurement from the input base image and the reference image, respectively, as a base block image and a reference block image;
In order to extract a target area for parallax measurement, a predetermined color in the reference block image is specified as a reference color, and in the reference block image and the reference block image, a color similar to the reference color within a predetermined range Target area extraction means for extracting pixels having a target area,
A predetermined color in the base block image is specified as a replacement color that masks a background of the target area, and in the base block image and the reference block image, the color of a pixel not included in the target area is Color replacement means to replace with replacement color,
Parallax measuring means for measuring parallax by the phase-only correlation method from the standard block image and the reference block image input from the color replacing means;
Three-dimensional coordinate position generation means for generating a three-dimensional coordinate position from the parallax measured by the parallax measurement means;
Program for obtaining a three-dimensional shape.
異なる位置から撮影した被写体の画像である基準画像と参照画像とを入力として前記被写体の奥行き情報を生成する3次元形状取得装置を制御するために、前記3次元形状取得装置のコンピュータを、
入力される前記基準画像と前記参照画像とから、一方の画像の各画素に対応するもう一方の画像の画素の平行移動量を表した視差画像である基準視差画像および参照視差画像を生成する視差推定手段、
前記基準画像、前記参照画像、前記基準視差画像および前記参照視差画像から視差計測に用いる所定の大きさの画像であるブロック画像を、それぞれ基準ブロック画像、参照ブロック画像、基準視差ブロック画像および参照視差ブロック画像として切り出すブロック画像切出手段、
視差計測のための対象領域を抽出するために前記基準視差ブロック画像における所定の色を基準色として特定し、前記基準視差ブロック画像および前記参照視差ブロック画像において前記基準色に所定の範囲内で類似する色を持つ画素を対象領域として抽出し、前記基準視差ブロック画像および前記参照視差ブロック画像において抽出される前記対象領域に基づいて、それぞれ前記基準ブロック画像および前記参照ブロック画像において対象領域を抽出する対象領域抽出手段、
前記基準ブロック画像における所定の色を、前記対象領域の背景をマスクする色である置換色として特定し、前記基準ブロック画像および前記参照ブロック画像において、前記対象領域に含まれない画素の色を前記置換色で置き換える色置換手段、
前記色置換手段から入力される前記基準ブロック画像と前記参照ブロック画像とから、位相限定相関法により視差を計測する視差計測手段、
前記視差計測手段が計測した前記視差から3次元座標位置を生成する3次元座標位置生成手段、
として機能させるための3次元形状取得プログラム。
In order to control the three-dimensional shape acquisition device that generates the depth information of the subject by inputting a reference image that is an image of the subject photographed from different positions and a reference image, a computer of the three-dimensional shape acquisition device,
Parallax for generating a reference parallax image and a reference parallax image, which are parallax images representing the amount of translation of the pixel of the other image corresponding to each pixel of one image, from the input standard image and the reference image Estimation means,
Block images that are images of a predetermined size used for parallax measurement from the reference image, the reference image, the reference parallax image, and the reference parallax image are respectively referred to as a standard block image, a reference block image, a standard parallax block image, and a reference parallax. Block image cutout means to cut out as a block image,
In order to extract a target area for parallax measurement, a predetermined color in the reference parallax block image is specified as a reference color, and similar to the reference color in the reference parallax block image and the reference parallax block image within a predetermined range A pixel having a color to be extracted as a target region, and based on the target region extracted in the standard parallax block image and the reference parallax block image, the target region is extracted in the standard block image and the reference block image, respectively. Target area extraction means,
A predetermined color in the base block image is specified as a replacement color that masks a background of the target area, and in the base block image and the reference block image, the color of a pixel not included in the target area is Color replacement means to replace with replacement color,
Parallax measuring means for measuring parallax by the phase-only correlation method from the standard block image and the reference block image input from the color replacing means;
Three-dimensional coordinate position generation means for generating a three-dimensional coordinate position from the parallax measured by the parallax measurement means;
Program for obtaining a three-dimensional shape.
JP2010174574A 2010-08-03 2010-08-03 3D shape acquisition apparatus and 3D shape acquisition program Expired - Fee Related JP5457976B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010174574A JP5457976B2 (en) 2010-08-03 2010-08-03 3D shape acquisition apparatus and 3D shape acquisition program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010174574A JP5457976B2 (en) 2010-08-03 2010-08-03 3D shape acquisition apparatus and 3D shape acquisition program

Publications (2)

Publication Number Publication Date
JP2012037929A true JP2012037929A (en) 2012-02-23
JP5457976B2 JP5457976B2 (en) 2014-04-02

Family

ID=45849907

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010174574A Expired - Fee Related JP5457976B2 (en) 2010-08-03 2010-08-03 3D shape acquisition apparatus and 3D shape acquisition program

Country Status (1)

Country Link
JP (1) JP5457976B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016212349A (en) * 2015-05-13 2016-12-15 オリンパス株式会社 Three-dimensional information acquisition apparatus and three-dimensional information acquisition method
CN111919086A (en) * 2018-03-30 2020-11-10 仓敷纺绩株式会社 Three-dimensional measuring device and three-dimensional measuring method for linear object

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003058885A (en) * 2001-08-20 2003-02-28 Minolta Co Ltd Method and device for searching correspondent point, and computer program
WO2009101687A1 (en) * 2008-02-14 2009-08-20 Konica Minolta Holdings, Inc. Range finder

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003058885A (en) * 2001-08-20 2003-02-28 Minolta Co Ltd Method and device for searching correspondent point, and computer program
WO2009101687A1 (en) * 2008-02-14 2009-08-20 Konica Minolta Holdings, Inc. Range finder

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016212349A (en) * 2015-05-13 2016-12-15 オリンパス株式会社 Three-dimensional information acquisition apparatus and three-dimensional information acquisition method
CN111919086A (en) * 2018-03-30 2020-11-10 仓敷纺绩株式会社 Three-dimensional measuring device and three-dimensional measuring method for linear object

Also Published As

Publication number Publication date
JP5457976B2 (en) 2014-04-02

Similar Documents

Publication Publication Date Title
JP5567179B2 (en) Stereo image processing apparatus and stereo image processing method
JP4883223B2 (en) Motion vector generation apparatus and motion vector generation method
US8842906B2 (en) Body measurement
CN109360235A (en) A kind of interacting depth estimation method based on light field data
JP5574852B2 (en) Information processing apparatus, information processing method, system, and program
WO2017023210A1 (en) Generating a merged, fused three-dimensional point cloud based on captured images of a scene
JP4941565B2 (en) Corresponding point search apparatus and corresponding point searching method
JP5852093B2 (en) Video processing apparatus, video processing method, and program
JP2014096062A (en) Image processing method and image processing apparatus
EP2372652A1 (en) Method for estimating a plane in a range image and range image camera
JP4862816B2 (en) Image correspondence point search device, distance measuring device and image motion detection device using the same
US20150010240A1 (en) Image processing apparatus, image processing method, and image processing program
KR100915298B1 (en) A system for wearing imaginary 3d footwear and an operation method of the same
JP5457976B2 (en) 3D shape acquisition apparatus and 3D shape acquisition program
JP3862402B2 (en) 3D model generation apparatus and computer-readable recording medium on which 3D model generation program is recorded
KR20170047780A (en) Low-cost calculation apparatus using the adaptive window mask and method therefor
KR101777696B1 (en) Method For Subpixel Localization Of Edges Based on Areal Symmetry
JPWO2018229812A1 (en) Three-dimensional measuring device and method
JP2010039999A (en) Image segmentation method, program and device
JP6867766B2 (en) Information processing device and its control method, program
KR20130019080A (en) Image apparatus for combining plenoptic camera and depth camera, and image processing method
JP2013148467A (en) Measurement device, method, and program
JP2016062447A (en) Image processor, image processing method, and image processing program
JP5654956B2 (en) Parallax image generation device and parallax image generation program
CN112070773A (en) ROI extraction method in space region based on TOF camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130107

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131011

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131022

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131202

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140110

R150 Certificate of patent or registration of utility model

Ref document number: 5457976

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees