JP2015141615A - Image processor and method thereof - Google Patents

Image processor and method thereof Download PDF

Info

Publication number
JP2015141615A
JP2015141615A JP2014014744A JP2014014744A JP2015141615A JP 2015141615 A JP2015141615 A JP 2015141615A JP 2014014744 A JP2014014744 A JP 2014014744A JP 2014014744 A JP2014014744 A JP 2014014744A JP 2015141615 A JP2015141615 A JP 2015141615A
Authority
JP
Japan
Prior art keywords
area
distance information
correction
pixel
region
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
JP2014014744A
Other languages
Japanese (ja)
Other versions
JP6332982B2 (en
JP2015141615A5 (en
Inventor
暁艶 戴
Xiao Yan Dai
暁艶 戴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014014744A priority Critical patent/JP6332982B2/en
Publication of JP2015141615A publication Critical patent/JP2015141615A/en
Publication of JP2015141615A5 publication Critical patent/JP2015141615A5/ja
Application granted granted Critical
Publication of JP6332982B2 publication Critical patent/JP6332982B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

PROBLEM TO BE SOLVED: To improve the estimation accuracy of distance information near a boundary between a foreground region and a background region of an image.SOLUTION: An input part inputs image data obtained by photographing a subject, the subject and distance information of the background of the subject. A boundary information generation part generates boundary information between the foreground region and the background region of the image data. A correction region setting part sets a correction region for correcting the distance information on the basis of the boundary information. A transparency calculation part calculates the transparency of a pixel of the correction region. A distance information correction part corrects distance information corresponding to the pixel of the correction region on the basis of the transparency of the pixel of the correction region.

Description

本発明は、距離情報を有する画像データの画像処理に関する。   The present invention relates to image processing of image data having distance information.

単眼カメラに搭載された距離画像センサや複数カメラから取得される多視点画像情報などを利用して、画像における距離情報(奥行情報)の推定が可能になった。奥行情報は、二次元画像から三次元画像への変換、医療関係、ロボット制御、3Dテレビ立体視の関係技術など、幅広い分野に応用されている。   The distance information (depth information) in an image can be estimated using a distance image sensor mounted on a monocular camera or multi-viewpoint image information acquired from a plurality of cameras. Depth information is applied to a wide range of fields, such as conversion from 2D images to 3D images, medical technology, robot control, and 3D television stereoscopic technology.

距離情報の推定の多くは、複数の画像を利用して距離を推定する方法を用いる。この方法は、複数のカメラを用いて、違う視点や異なる距離から被写体(物体や風景)を撮影し、カメラと被写体の間の幾何学的な関係や、画像における被写体画素の変位から距離を推定する。   Most of the estimation of distance information uses a method of estimating a distance using a plurality of images. This method uses multiple cameras to photograph subjects (objects and landscapes) from different viewpoints and different distances, and estimates the distance from the geometric relationship between the cameras and the subjects and the displacement of the subject pixels in the image. To do.

一方、一枚の二次元静止画像から距離を推定する単眼視法が研究されている。単眼視法は、画像のテクスチャ、コントラストなどを利用して距離を推定する。   On the other hand, a monocular method for estimating a distance from a single two-dimensional still image has been studied. In monocular viewing, the distance is estimated using the texture, contrast, etc. of the image.

しかし、何れの方法も、距離情報の推定精度に影響する幾つかの要因が挙げられる。
(1) 物体内のテクスチャが存在しない領域において、同じ色をもつ画素の一致度が曖昧になり、距離推定精度が低下する。
(2) 鏡面反射をする物体または輝度が低い領域は、視点が変わると大きく輝度値や色が変化するため色による一致度の計測が困難であり、距離推定に影響する。
(3) 被写体には観察位置によって隠れて見えない領域がある。つまり、手前にある物体が背後にある物体を隠すような状態(occlusion)があると、すべての画素に対応点があるわけではなく、隠された領域の対応点を探すと距離推定の誤差が大きくなる。
(4) 物体の輪郭が不鮮明な場合、輪郭付近の距離推定が不正確になる。
However, each method includes several factors that affect the estimation accuracy of distance information.
(1) In a region where there is no texture in the object, the matching degree of pixels having the same color becomes ambiguous, and the distance estimation accuracy decreases.
(2) An object that undergoes specular reflection or a low-luminance region has a large luminance value or color that changes when the viewpoint changes, making it difficult to measure the degree of coincidence by color and affects distance estimation.
(3) The subject has an area that is hidden by the observation position. In other words, if there is a state (occlusion) in which the object in the foreground hides the object behind it, not all pixels have corresponding points, and searching for corresponding points in the hidden area will cause distance estimation errors. growing.
(4) When the contour of an object is unclear, distance estimation near the contour becomes inaccurate.

要因1から3に関しては、多くの研究があり、距離推定精度の向上が図られている。しかし、要因4に関する距離推定の課題は未だ改善されていない。   Regarding factors 1 to 3, there are many studies, and distance estimation accuracy has been improved. However, the problem of distance estimation regarding factor 4 has not been improved.

図1により距離推定の課題を説明する。図1(A)は物体領域と背景領域からなる画像例を示し、撮影装置から遠い背景領域に、撮影装置に近い物体領域が重なり、物体領域がテクスチャ模様を有し、物体領域の一部と背景が近い色情報をもつ画像例である。このような画像においては、要因4により、輪郭付近の距離推定が不正確になる。   The problem of distance estimation will be described with reference to FIG. Fig. 1 (A) shows an example of an image consisting of an object area and a background area.The object area close to the imaging device overlaps the background area far from the imaging device, the object area has a texture pattern, and a part of the object area is It is an example of an image having color information with a close background. In such an image, due to factor 4, distance estimation near the contour becomes inaccurate.

図1(B)は理想的な距離情報の推定結果を示し、撮影装置との遠近が明度の違いとして提示され、明度が高い被写体ほど撮影装置に近い位置にある。図1(B)において背景領域と物体領域はそれぞれ一様な距離値をもつ。図1(B)に示す黒線は、背景領域と物体領域の距離情報の境界を表わす境界線であり、境界線は基本的に背景領域と物体領域の境界に相当する。   FIG. 1B shows an estimation result of ideal distance information. The distance from the photographing apparatus is presented as a difference in lightness, and a subject with higher lightness is closer to the photographing apparatus. In FIG. 1B, the background area and the object area have uniform distance values. The black line shown in FIG. 1B is a boundary line that represents the boundary of distance information between the background region and the object region, and the boundary line basically corresponds to the boundary between the background region and the object region.

図1(C)は距離情報の推定結果の一例を示す。距離情報の推定結果は、図1(B)に近いほど良好と言える。しかし、図1(C)に示すように、背景領域と物体領域の境界付近において、物体領域が背景領域に侵入したり、逆に、背景領域が物体領域に侵入したりして、距離推定精度が充分とは言えない領域がある。   FIG. 1C shows an example of the estimation result of distance information. It can be said that the estimation result of distance information is better as it is closer to FIG. However, as shown in Fig. 1 (C), near the boundary between the background area and the object area, the object area enters the background area, or conversely, the background area enters the object area. However, there are areas that are not sufficient.

特開2012-079251号公報JP 2012-079251 A

本発明は、画像の前景領域と背景領域の間の境界付近における距離情報の推定精度を向上することを目的とする。   An object of the present invention is to improve the estimation accuracy of distance information in the vicinity of the boundary between a foreground region and a background region of an image.

本発明は、前記の目的を達成する一手段として、以下の構成を備える。   The present invention has the following configuration as one means for achieving the above object.

本発明にかかる画像処理は、被写体を撮影した画像データ、並びに、前記被写体および前記被写体の背景の距離情報を入力し、前記画像データの前景領域と背景領域との境界情報を生成し、前記境界情報に基づき前記距離情報を補正する補正領域を設定し、前記補正領域の画素の透明度を算出し、前記補正領域の画素の透明度に基づき、当該画素に対応する距離情報を補正する。   The image processing according to the present invention inputs image data obtained by photographing a subject, and distance information of the subject and the background of the subject, generates boundary information between a foreground region and a background region of the image data, and Based on the information, a correction area for correcting the distance information is set, the transparency of the pixel in the correction area is calculated, and the distance information corresponding to the pixel is corrected based on the transparency of the pixel in the correction area.

本発明によれば、画像の前景領域と背景領域の間の境界付近における距離情報の推定精度を向上することができる。   According to the present invention, it is possible to improve the estimation accuracy of distance information in the vicinity of the boundary between the foreground region and the background region of the image.

距離推定の課題を説明する図。The figure explaining the subject of distance estimation. 実施例の画像処理機能を備える撮影装置の構成例を説明するブロック図。FIG. 3 is a block diagram illustrating a configuration example of a photographing apparatus having an image processing function according to an embodiment. 画像処理部の処理構成例を説明するブロック図。The block diagram explaining the process structural example of an image process part. 画像処理部による距離情報の補正処理を説明するフローチャート。The flowchart explaining the correction process of the distance information by an image process part. 補正領域の設定例を示す図。The figure which shows the example of a setting of a correction | amendment area | region. 透明度計算部の処理を説明するフローチャート。The flowchart explaining the process of a transparency calculation part. 透明度αの一例を示す図。The figure which shows an example of transparency (alpha). 距離情報補正部の処理を説明するフローチャート。The flowchart explaining the process of a distance information correction | amendment part. 距離情報の補正例を示す図。The figure which shows the example of correction | amendment of distance information. 注目画素に対応する距離情報を段階的に補正する距離情報補正部の処理を説明するフローチャート。The flowchart explaining the process of the distance information correction | amendment part which correct | amends the distance information corresponding to an attention pixel in steps. 実施例2における画像処理部による距離情報の補正処理を説明するフローチャート。9 is a flowchart for explaining distance information correction processing by an image processing unit according to the second embodiment. 補正領域設定部の処理を説明するフローチャート。The flowchart explaining the process of a correction area | region setting part. 実施例3における画像処理部による距離情報の補正処理を説明するフローチャート。10 is a flowchart for explaining distance information correction processing by the image processing unit according to the third embodiment. 補正領域設定部による補正領域の修正を説明するフローチャート。The flowchart explaining correction of the correction area | region by a correction area | region setting part.

以下、本発明にかかる実施例の画像処理を図面を参照して詳細に説明する。なお、以下では、本発明にかかる距離情報の推定精度を向上する画像処理について説明するが、実施例に記載する構成要素は例示であり、本発明の範囲は特許請求の範囲によって確定され、以下の個別の実施例によって限定されるわけではない。   Hereinafter, image processing according to an embodiment of the present invention will be described in detail with reference to the drawings. In the following, image processing for improving the estimation accuracy of distance information according to the present invention will be described. However, the constituent elements described in the embodiments are exemplifications, and the scope of the present invention is determined by the claims. It is not limited by the individual embodiments.

[撮像装置]
図2のブロック図により実施例の画像処理機能を備える撮影装置の構成例を説明する。
[Imaging device]
A configuration example of a photographing apparatus having the image processing function of the embodiment will be described with reference to the block diagram of FIG.

マイクロプロセッサ(CPU)1101は、内部メモリ1111のRAMをワークメモリとして、内部メモリ1111のROMに格納されたプログラムを実行し、システムバス1103を介して、後述する各構成を統括的に制御する。   The microprocessor (CPU) 1101 executes a program stored in the ROM of the internal memory 1111 using the RAM of the internal memory 1111 as a work memory, and comprehensively controls each component described later via the system bus 1103.

撮影部1102は、被写体の画像を撮影するとともに、従来の距離推定手法を用いて被写体および被写体の背景の距離情報を取得する。距離情報は、撮影画像の各画素ごとに、被写体または背景と撮影装置の間の距離を表す。被写体の距離情報を取得は、撮影部1102の一部として距離測定部を設けることで実現してもよい。   The imaging unit 1102 captures an image of the subject and acquires distance information of the subject and the background of the subject using a conventional distance estimation method. The distance information represents the distance between the subject or the background and the photographing apparatus for each pixel of the photographed image. Acquisition of subject distance information may be realized by providing a distance measurement unit as part of the imaging unit 1102.

表示部1104は、撮影画像、文字列、ユーザインタファイス(UI)などを表示する液晶ディスプレイ(LCD)である。表示制御部1105は、CPU1101の指示に従い、表示部104に撮影画像、文字列、UIなどを表示する表示制御を行う。   The display unit 1104 is a liquid crystal display (LCD) that displays captured images, character strings, user interfaces (UI), and the like. The display control unit 1105 performs display control for displaying a captured image, a character string, a UI, and the like on the display unit 104 in accordance with an instruction from the CPU 1101.

操作部1106は、ユーザ指示を入力するボタン、ダイヤル、テンキーである。CPU1101は、操作部1106を介して、ユーザ指示を受け取る。また、表示部104に付加されたタッチスクリーン機能を操作部1106の一部として利用することができる。   The operation unit 1106 is a button, a dial, or a numeric keypad for inputting user instructions. The CPU 1101 receives a user instruction via the operation unit 1106. Further, the touch screen function added to the display unit 104 can be used as a part of the operation unit 1106.

撮像部制御部1107は、CPU1101の指示に従い、撮影部1102の撮像光学系を制御して、フォーカシング、シャッタの開閉、絞り調節などを行う。ディジタル信号処理部1108は、撮影部1102から入力される撮像データにデモザイキングを含む現像処理、ホワイトバランス調整、ガンマ補正、ノイズ低減などの各種処理を施す。   The imaging unit control unit 1107 controls the imaging optical system of the imaging unit 1102 in accordance with an instruction from the CPU 1101, and performs focusing, shutter opening / closing, aperture adjustment, and the like. The digital signal processing unit 1108 performs various processes such as development processing including demosaicing, white balance adjustment, gamma correction, and noise reduction on the imaging data input from the imaging unit 1102.

画像処理部1109は、撮像部102から出力される撮像データまたはディジタル信号処理部108から出力される画像データを標準的な色空間にマッピングする色域マッピングなどの画像処理またはユーザ指示に応じた画像処理を施す。画像処理部1109は、表示部1104に表示する画像データを内部メモリ1111の所定領域に格納し、メディア(例えばHDD、メモリカード、USBメモリなどの記録媒体)1113に格納する画像データを圧縮/伸長部1110に入力する。また、画像処理部1109は、CPU1101の指示に従い、詳細は後述するが、画像データの前景領域と背景領域の境界情報を取得する。   The image processing unit 1109 is configured to perform image processing such as color gamut mapping for mapping the imaging data output from the imaging unit 102 or the image data output from the digital signal processing unit 108 into a standard color space, or an image in accordance with a user instruction. Apply processing. The image processing unit 1109 stores the image data to be displayed on the display unit 1104 in a predetermined area of the internal memory 1111, and compresses / decompresses the image data to be stored in the medium (eg, recording medium such as HDD, memory card, USB memory) 1113 Input to part 1110. Further, the image processing unit 1109 acquires boundary information between the foreground area and the background area of the image data, which will be described in detail later, in accordance with an instruction from the CPU 1101.

圧縮/伸長部1110は、撮像データまたは画像処理された画像データにデータ圧縮を伴うフォーマット変換や符号化などの各種処理を施す。また、圧縮/伸長部1110は、CPU1101の指示に従い、画像フォーマットの所定領域(例えばExifのメーカタグ)に距離情報や境界情報を記録する。   The compression / decompression unit 1110 performs various processes such as format conversion and encoding with data compression on the imaged data or the image processed image data. Further, the compression / decompression unit 1110 records distance information and boundary information in a predetermined area of the image format (for example, Exif manufacturer tag) in accordance with an instruction from the CPU 1101.

外部メモリ制御部1112は、圧縮/伸長部1110から出力される画像データを各種メディア1113に格納する。また、外部メモリ制御部1112は、CPU1101の指示に従い、各種メディア1113に格納された画像データを読み込み、読み込んだ画像データを圧縮/伸長部1110や画像処理部1109に供給することができきる。その場合、CPU1101の指示に従い、圧縮/伸長部1110は復号やデータ伸長を伴うフォーマット変換を行い、画像処理部1109は現像処理、色域マッピング、解像度変換、ガンマ補正などの各種処理を行う。   The external memory control unit 1112 stores the image data output from the compression / decompression unit 1110 in various media 1113. Further, the external memory control unit 1112 can read image data stored in various media 1113 in accordance with an instruction from the CPU 1101 and supply the read image data to the compression / decompression unit 1110 and the image processing unit 1109. In that case, the compression / decompression unit 1110 performs format conversion accompanying decoding and data expansion in accordance with instructions from the CPU 1101, and the image processing unit 1109 performs various processes such as development processing, color gamut mapping, resolution conversion, and gamma correction.

[画像処理部]
図3のブロック図により画像処理部1109の処理構成例を説明する。
[Image processing unit]
A processing configuration example of the image processing unit 1109 will be described with reference to the block diagram of FIG.

入力部11は、撮影部1102から画像データおよび画像データが表す画像に含まれる被写体と背景の距離情報を入力する。境界情報生成部12は、入力画像データに含まれる前景領域と背景領域の間の境界を示す境界情報を生成する。   The input unit 11 inputs image data and distance information between the subject and the background included in the image represented by the image data from the imaging unit 1102. The boundary information generation unit 12 generates boundary information indicating the boundary between the foreground area and the background area included in the input image data.

補正領域設定部14は、境界情報に基づき、距離情報を補正すべき入力画像データの領域(以下、補正領域)を設定する。透明度計算部15は、補正領域に含まれる、入力画像データの各画素の透明度を計算する。   Based on the boundary information, the correction area setting unit 14 sets an area of input image data whose distance information is to be corrected (hereinafter referred to as a correction area). The transparency calculation unit 15 calculates the transparency of each pixel of the input image data included in the correction area.

距離情報補正部16は、補正領域の画素ごとに透明度を用いて、距離情報を補正する。出力部17は、距離情報補正部16によって補正された距離情報を画像データに付加して内部メモリ1111やメディア1113に格納する。   The distance information correction unit 16 corrects the distance information using transparency for each pixel in the correction area. The output unit 17 adds the distance information corrected by the distance information correction unit 16 to the image data and stores it in the internal memory 1111 or the medium 1113.

図4のフローチャートにより画像処理部1109による距離情報の補正処理を説明する。   The distance information correction processing by the image processing unit 1109 will be described with reference to the flowchart of FIG.

入力部11は、処理対象の画像データおよび距離情報を入力する(S11)。境界情報生成部12は、入力画像データから前景領域として物体画像の領域(以下、物体領域)を抽出し(S12)、抽出した物体領域と物体領域以外の領域(背景領域)の間の境界を示す境界情報を生成する(S13)。境界情報は、境界線を示すベクトルデータでもよいし、境界に対応する画素のリストでもよい。   The input unit 11 inputs image data to be processed and distance information (S11). The boundary information generation unit 12 extracts an object image area (hereinafter referred to as an object area) from the input image data as a foreground area (S12), and determines a boundary between the extracted object area and an area other than the object area (background area). The boundary information shown is generated (S13). The boundary information may be vector data indicating a boundary line, or a list of pixels corresponding to the boundary.

また、境界情報生成部12は、画像データが表す画像を表示部1104に表示し、操作部1106を介して、ユーザが画像を参照して入力する物体領域と背景領域の境界線を取得し、取得した境界線を境界情報とすることもできる。   Further, the boundary information generation unit 12 displays an image represented by the image data on the display unit 1104, acquires a boundary line between the object region and the background region that the user inputs with reference to the image via the operation unit 1106, The acquired boundary line can also be used as boundary information.

次に、補正領域設定部14は、境界情報に基づき、距離情報の補正領域を設定する(S14)。透明度計算部15は、補正領域に含まれる画素の透明度を計算する(S15)。そして、距離情報補正部16は、透明度に基づき補正領域の補正後の距離情報を計算する(S16)。   Next, the correction area setting unit 14 sets a correction area for distance information based on the boundary information (S14). The transparency calculation unit 15 calculates the transparency of the pixels included in the correction area (S15). Then, the distance information correction unit 16 calculates the corrected distance information of the correction area based on the transparency (S16).

本実施例において、透明度(以下「アルファチャネル」とも呼ぶ)は、画素が前景に対応するか背景に対応するかの確率を表す。また、以下では、補正領域の設定、透明度の計算、距離情報の補正を詳細に説明する。   In this embodiment, the transparency (hereinafter also referred to as “alpha channel”) represents the probability that a pixel corresponds to the foreground or the background. In the following, setting of a correction area, calculation of transparency, and correction of distance information will be described in detail.

●補正領域の設定
図5により補正領域の設定例を示す。補正領域設定部14は、境界線を略中央とする所定幅の領域を補正領域に設定する。図5においては、物体領域を白色、背景領域を濃い灰色で表す。また、境界線を黒実線で表すが、実際の境界線に色があるわけではない。境界線の両側に広がる淡い灰色領域が補正領域である。
● Correction area setting Figure 5 shows an example of correction area setting. The correction area setting unit 14 sets an area having a predetermined width whose center is the boundary line as a correction area. In FIG. 5, the object region is represented by white and the background region is represented by dark gray. The boundary line is represented by a solid black line, but the actual boundary line does not have a color. The light gray area spreading on both sides of the boundary line is the correction area.

●透明度の計算
透明度計算部15は、境界付近の画像データの画素値は前景色と背景色の線形混合(式(1))とする理論に基づき透明度を計算する(「マッティング処理」とも呼ぶ)。
I = αF + (1-α)B …(1)
ここで、Iは画素の値、
Fは前景色、
Bは背景色、
αは透明度(アルファチャネル)。
● Transparency calculation The transparency calculation unit 15 calculates transparency based on the theory that the pixel values of the image data near the boundary are a linear mixture of the foreground color and the background color (equation (1)) (also called “mating process”) ).
I = αF + (1-α) B… (1)
Where I is the pixel value,
F is foreground color,
B is the background color,
α is transparency (alpha channel).

境界付近にある画素は、前景領域に属すか背景領域に属すかが不明確なため、前景色と背景色の混合(ブレンド)を考慮する必要である。透明度計算部15は、補正領域の画素の値は前景色Fと背景色Bによる線形混合であるという仮定に基づき、補正領域の画素の透明度αを推定する。   Since it is unclear whether a pixel near the boundary belongs to the foreground area or the background area, it is necessary to consider the blending (blending) of the foreground color and the background color. The transparency calculation unit 15 estimates the transparency α of the pixel in the correction area based on the assumption that the pixel value in the correction area is a linear mixture of the foreground color F and the background color B.

透明度の範囲を0≦α≦1とすると、前景領域に属す画素はα=1であり、背景領域に属す画素はα=0である。また、透明度が0<α<1の画素は、前景が背景の一部を遮蔽する領域に対応することを意味する。   If the transparency range is 0 ≦ α ≦ 1, the pixel belonging to the foreground area is α = 1, and the pixel belonging to the background area is α = 0. A pixel with transparency 0 <α <1 means that the foreground corresponds to a region that blocks a part of the background.

図6のフローチャートにより透明度計算部15の処理を説明する。   The processing of the transparency calculation unit 15 will be described with reference to the flowchart of FIG.

透明度計算部15は、補正領域の注目画素Iから最短距離にある、背景領域の画素IBと物体領域の画素IFを探索する(S151)。そして、それら画素IBとIFの画素値BとFを取得し(S152)、式(1)に基づき、注目画素Iの透明度αを計算する(S153)。 Transparency calculation unit 15 is the shortest distance from the target pixel I of the correction area, it searches for a pixel I F of pixel I B and the object area of the background region (S151). Then, to get the pixel value B and F thereof pixels I B and I F (S152), based on the equation (1), to calculate the transparency α of the pixel of interest I (S153).

次に、透明度計算部15は、ステップS154の判定により、補正領域のすべての画素について透明度αの計算が終了するまでステップS151からS153の処理を繰り返す。   Next, the transparency calculation unit 15 repeats the processes of steps S151 to S153 until the calculation of the transparency α is completed for all the pixels in the correction region based on the determination in step S154.

図7により透明度αの一例を示す。図7(A)は入力画像の一例を示し、図7(B)はマッティング処理によって生成されたアルファチャネルの画像例を示す。図7(B)において、白色で示す領域は補正領域設定部14によって物体領域に設定された領域であり、当該領域の透明度はα=1に設定される。また、濃い灰色で示す領域は、補正領域設定部14によって背景領域に設定された領域であり、当該領域の透明度はα=0に設定される。   FIG. 7 shows an example of the transparency α. FIG. 7A shows an example of an input image, and FIG. 7B shows an example of an alpha channel image generated by matting processing. In FIG. 7B, a white area is an area set as the object area by the correction area setting unit 14, and the transparency of the area is set to α = 1. A region indicated by dark gray is a region set as a background region by the correction region setting unit 14, and the transparency of the region is set to α = 0.

図7(B)において、淡い灰色で示す領域は補正領域設定部14によって補正領域に設定された領域であり、当該領域の各画素の透明度が透明度計算部15によって計算され、0≦α≦1の範囲の透明度が設定される。   In FIG. 7B, the light gray area is an area set as the correction area by the correction area setting unit 14, and the transparency of each pixel in the area is calculated by the transparency calculation unit 15, and 0 ≦ α ≦ 1 The transparency of the range is set.

●距離情報の補正
図8のフローチャートにより距離情報補正部16の処理を説明する。
Correction of distance information The processing of the distance information correction unit 16 will be described with reference to the flowchart of FIG.

距離情報補正部16は、補正領域の注目画素Iの透明度αを取得する(S161)。そして、注目画素Iから最短距離にある、背景領域の画素IBと物体領域の画素IFを探索する(S162)。そして、探索結果の画素IBとIF(以下、非補正画素)に対応する距離情報DBとDFを取得する(S163)。 The distance information correction unit 16 acquires the transparency α of the target pixel I in the correction area (S161). Then, in the shortest distance from the pixel of interest I, it searches the pixels I F of pixel I B and the object area of the background region (S162). Then, the search result of the pixel I B and I F (hereinafter, non-corrected pixel) to obtain the distance information D B and D F corresponding to (S163).

次に、距離情報補正部16は、注目画素Iの透明度αと非補正画素に対応する距離情報を用いて、式(2)により、注目画素Iにおける補正後の距離情報D'を計算する。つまり、透明度αが所定の閾値Th(例えばTh=0.5)か否かを判定し(S164)、透明度が閾値以上(α≧Th)の場合は注目画素Iが物体領域寄りの画素として注目画素Iにおける補正距離情報D'を計算する(S165)。また、透明度が閾値未満(α<Th)の場合は注目画素Iが背景領域寄りの画素として、注目画素における補正距離情報D'を計算する(S166)。
if (α≧ Th)
D' = αDF + (1-α)DB
else
D' = (1-α)DF + αDB; …(2)
Next, the distance information correction unit 16 calculates the corrected distance information D ′ for the target pixel I using Equation (2) using the transparency α of the target pixel I and the distance information corresponding to the non-corrected pixel. That is, it is determined whether or not the transparency α is a predetermined threshold Th (for example, Th = 0.5) (S164). If the transparency is equal to or greater than the threshold (α ≧ Th), the target pixel I is regarded as a pixel closer to the object region. The correction distance information D ′ at is calculated (S165). If the transparency is less than the threshold (α <Th), the correction distance information D ′ for the target pixel is calculated with the target pixel I as a pixel closer to the background area (S166).
if (α ≧ Th)
D '= αD F + (1-α) D B ;
else
D '= (1-α) D F + αD B ;… (2)

つまり、距離情報補正部16は、注目画素Iの透明度αと(1-α)を重みとして、二つの非補正画素に対応する距離情報を加算した結果を注目画素Iにおける補正距離情報D'とする。   That is, the distance information correction unit 16 adds the distance information corresponding to the two non-corrected pixels, with the transparency α and (1-α) of the target pixel I as weights, and the corrected distance information D ′ in the target pixel I. To do.

次に、距離情報補正部16は、ステップS167の判定により、補正領域のすべての画素について補正距離情報D'の計算が終了するまでステップS161からS166の処理を繰り返す。   Next, the distance information correction unit 16 repeats the processes of steps S161 to S166 until the calculation of the correction distance information D ′ is completed for all the pixels in the correction region based on the determination in step S167.

図9により距離情報の補正例を示す。図9(A)は物体領域と背景領域からなる画像例を示し、撮影装置から遠い背景領域に、撮影装置に近い物体領域が重なり、物体領域がテクスチャ模様を有す。なお、背景領域と物体領域はそれぞれほぼ一様な距離値をもつ。図9(B)は補正前の距離推定結果を示し、背景領域が物体領域に侵入し、境界付近の距離推定精度が低い状態を表している。図9(C)は補正後の距離情報の一例を示し、補正によって境界付近の距離推定精度が向上する。   FIG. 9 shows an example of correction of distance information. FIG. 9A shows an example of an image composed of an object region and a background region. An object region close to the photographing device overlaps a background region far from the photographing device, and the object region has a texture pattern. Note that the background area and the object area have substantially uniform distance values. FIG. 9B shows a distance estimation result before correction, and shows a state where the background area has entered the object area and the distance estimation accuracy near the boundary is low. FIG. 9C shows an example of the corrected distance information, and the distance estimation accuracy near the boundary is improved by the correction.

このように、物体領域と背景領域の境界付近において距離推定精度が低い問題に対して、境界付近に距離情報の補正領域を設定し、透明度に基づき距離情報を補正することで距離推定精度の向上を図ることができる。従って、物体の輪郭が不鮮明な場合も、輪郭付近の距離推定精度を向上することができる。   In this way, in order to solve the problem of low distance estimation accuracy near the boundary between the object area and the background area, a distance information correction area is set near the boundary, and distance information is corrected based on transparency to improve distance estimation accuracy. Can be achieved. Therefore, even when the contour of the object is unclear, the distance estimation accuracy near the contour can be improved.

このようにして得られる距離推定精度が向上した距離情報は、画像データに付加されて例えば内部メモリ1111やメディア1113に格納される。そして、画像処理部1109や外部のコンピュータ機器が実行する、複数の視点画像を用いて自由視点合成画像を生成する処理や、物体や背景など任意の部分に焦点を合わせ、その他を暈すリフォーカス処理などに利用される。   The distance information with improved distance estimation accuracy obtained in this way is added to the image data and stored in the internal memory 1111 or the medium 1113, for example. Then, the processing that is performed by the image processor 1109 or an external computer device to generate a free viewpoint composite image using multiple viewpoint images, or the refocus that focuses on an arbitrary part such as an object or background, and deceives others Used for processing.

[変形例]
境界情報生成部12は、境界情報を生成する代わりに、物体領域と背景領域の二値分離画像を生成してもよい。また、入力画像データに複数の物体領域が含まれ、それら物体領域が互いに重畳する場合、それら物体領域の間においては、物体領域の間の境界情報を生成し、上記と同様に距離情報を補正すればよい。
[Modification]
The boundary information generation unit 12 may generate a binary separated image of the object region and the background region instead of generating boundary information. If the input image data includes multiple object areas and these object areas overlap each other, the boundary information between the object areas is generated between the object areas, and the distance information is corrected in the same manner as described above. do it.

また、上記では、注目画素から最短距離にある非補正画素を探索する例を説明した。別の探索方法として、注目画素を中心として例えば左右上下および斜め方向の八方向に画素を探索し、探索された物体領域の画素と背景領域の画素の中で注目画素により近い画素を非補正画素に採用してもよい。こうすれば、距離推定精度の向上は若干低下するが、全方向について非補正画素を探索する場合に比べて、探索時間の短縮が可能になる。   In the above description, an example of searching for an uncorrected pixel at the shortest distance from the target pixel has been described. As another search method, for example, a pixel is searched in the eight directions of the left, right, up, down, and diagonal directions centering on the pixel of interest, and a pixel closer to the pixel of interest among the pixels of the searched object region and background region is uncorrected pixel May be adopted. In this way, although the improvement of the distance estimation accuracy is slightly reduced, the search time can be shortened compared to the case of searching for uncorrected pixels in all directions.

また、上記では、補正領域の全画素について、注目画素の透明度αと近傍の非補正画素に対応する距離情報を用いて、注目画素に対応する距離情報を補正する例を説明した。この補正方法によれば、補正領域の画素に対応する距離情報は、当該画素の透明度αを重みとして、物体領域の距離情報と背景領域の距離情報の間の距離情報に補正される。もし、透明度が物体領域から背景領域に向って滑らかに変化すれば、補正後の距離情報も物体領域から背景領域に向って滑らかに変化することになる。一方、注目画素に対応する距離情報を段階的に補正することもできる。   In the above description, the example in which the distance information corresponding to the target pixel is corrected using the transparency α of the target pixel and the distance information corresponding to the neighboring non-corrected pixels is described for all the pixels in the correction region. According to this correction method, the distance information corresponding to the pixel in the correction area is corrected to distance information between the distance information of the object area and the distance information of the background area, with the transparency α of the pixel as a weight. If the transparency changes smoothly from the object region to the background region, the corrected distance information also changes smoothly from the object region to the background region. On the other hand, distance information corresponding to the target pixel can be corrected step by step.

図10のフローチャートにより注目画素に対応する距離情報を段階的に補正する距離情報補正部16の処理を説明する。   The processing of the distance information correction unit 16 that corrects the distance information corresponding to the target pixel in stages will be described with reference to the flowchart of FIG.

距離情報補正部16は、補正領域の注目画素Iの透明度αを取得し(S261)、透明度αと所定の閾値Th'(例えばTh'=0.5)を比較し(S262)、比較結果に基づき非補正画素を選択する。つまり、透明度が閾値以上(α≧Th')の場合は(S263)、注目画素Iの近傍(例えば最短距離)にある、物体領域の画素を選択する(S264)。また、透明度が閾値未満(α<Th')の場合は(S263)、注目画素Iの近傍(例えば最短距離)にある、背景領域の画素を選択する(S265)。そして選択画素に対応する距離情報から注目画素における補正距離情報D'を算出する(S266)。   The distance information correction unit 16 acquires the transparency α of the target pixel I in the correction area (S261), compares the transparency α with a predetermined threshold Th ′ (for example, Th ′ = 0.5) (S262), and determines whether or not based on the comparison result. Select a correction pixel. That is, when the transparency is equal to or greater than the threshold (α ≧ Th ′) (S263), the pixel in the object region that is in the vicinity (for example, the shortest distance) of the target pixel I is selected (S264). If the transparency is less than the threshold (α <Th ′) (S263), a pixel in the background area that is in the vicinity (for example, the shortest distance) of the pixel of interest I is selected (S265). Then, the correction distance information D ′ for the target pixel is calculated from the distance information corresponding to the selected pixel (S266).

距離情報補正部16は、例えば、注目画素から最短距離にある物体領域または背景領域の画素を選択してもよいし、注目画素を中心とする所定の距離範囲に含まれる物体領域または背景領域の一画素または複数画素を選択してもよい。複数画素を選択した場合は、それら選択画素に対応する距離情報の平均値を補正距離情報D'としてもよいし、注目画素と各選択画素の距離(画素数)を重みとする距離情報の加重平均値を補正距離情報D'としてもよい。   The distance information correction unit 16 may select, for example, a pixel in the object region or background region that is the shortest distance from the target pixel, or an object region or background region included in a predetermined distance range centered on the target pixel. One pixel or a plurality of pixels may be selected. When a plurality of pixels are selected, the average value of the distance information corresponding to the selected pixels may be corrected distance information D ′, or weighting of distance information with the distance (number of pixels) between the target pixel and each selected pixel as a weight The average value may be used as the correction distance information D ′.

次に、距離情報補正部16は、ステップS267の判定により、補正領域のすべての画素について補正距離情報D'の計算が終了するまでステップS261からS266の処理を繰り返す。   Next, the distance information correction unit 16 repeats the processing of steps S261 to S266 until the calculation of the correction distance information D ′ is completed for all the pixels in the correction region based on the determination in step S267.

このように、補正領域の画素の透明度に基づき、当該画素に対応する距離情報を物体領域または背景領域に段階的補正することで、距離推定精度の向上を図ることができる。   As described above, based on the transparency of the pixel in the correction area, the distance estimation accuracy can be improved by gradually correcting the distance information corresponding to the pixel to the object area or the background area.

以下、本発明にかかる実施例2の画像処理を説明する。なお、実施例2において、実施例1と略同様の構成については、同一符号を付して、その詳細説明を省略する。   The image processing according to the second embodiment of the present invention will be described below. Note that the same reference numerals in the second embodiment denote the same parts as in the first embodiment, and a detailed description thereof will be omitted.

実施例1では、境界線を略中央とする所定幅の領域を距離情報の補正領域として設定した。実施例2では、距離情報の信頼度に基づき補正領域を設定する。   In the first embodiment, an area having a predetermined width with the boundary line being substantially in the center is set as a correction area for distance information. In the second embodiment, the correction area is set based on the reliability of the distance information.

図11のフローチャートにより実施例2における画像処理部1109による距離情報の補正処理を説明する。   The distance information correction processing by the image processing unit 1109 in the second embodiment will be described with reference to the flowchart of FIG.

入力部11は、処理対象の画像データ、距離情報および信頼度情報を入力する(S21)。境界情報生成部12は、入力画像データから物体領域を抽出し(S22)、抽出した物体領域とその他の領域(背景領域)の間の境界を示す境界情報を生成する(S23)。境界情報は、境界線を示すベクトルデータでもよいし、境界に対応する画素のリストでもよい。   The input unit 11 inputs image data to be processed, distance information, and reliability information (S21). The boundary information generation unit 12 extracts an object region from the input image data (S22), and generates boundary information indicating a boundary between the extracted object region and another region (background region) (S23). The boundary information may be vector data indicating a boundary line, or a list of pixels corresponding to the boundary.

次に、補正領域設定部14は、境界情報および信頼度情報に基づき、距離情報の補正領域を設定する(S24)。透明度計算部15は、補正領域に含まれる画素の透明度を計算する(S25)。そして、距離情報補正部16は、透明度に基づき補正領域の距離情報を補正する(S26)。   Next, the correction area setting unit 14 sets a correction area for the distance information based on the boundary information and the reliability information (S24). The transparency calculation unit 15 calculates the transparency of the pixels included in the correction area (S25). Then, the distance information correction unit 16 corrects the distance information of the correction area based on the transparency (S26).

以下では、補正領域の設定を詳細に説明する。なお、透明度の計算、距離情報の補正は実施例1と同様であり、その詳細説明を省略する。   Hereinafter, the setting of the correction area will be described in detail. The calculation of transparency and the correction of distance information are the same as in the first embodiment, and detailed description thereof is omitted.

●補正領域の設定
図12のフローチャートにより補正領域設定部14の処理を説明する。
Correction Area Setting Processing of the correction area setting unit 14 will be described with reference to the flowchart of FIG.

補正領域設定部14は、境界情報が示す境界線上の一画素を注目画素に決定し(S241)、注目画素に対応する距離情報の信頼度情報(以下、信頼度R)を取得し(S242)、信頼度Rと所定の閾値Rthを比較して比較結果を記録する(S243)。そして、ステップS244の判定により、境界線上の全画素について信頼度Rと閾値Rthの比較結果を記録するまで、ステップS241からS243の処理を繰り返す。なお、以下では、距離情報の信頼度が閾値未満(R<Rth)の画素を「低信頼度画素」と呼ぶ。   The correction area setting unit 14 determines one pixel on the boundary line indicated by the boundary information as a target pixel (S241), and obtains reliability information (hereinafter, reliability R) of distance information corresponding to the target pixel (S242). Then, the reliability R is compared with a predetermined threshold value Rth, and the comparison result is recorded (S243). Then, by the determination in step S244, the processing in steps S241 to S243 is repeated until the comparison result between the reliability R and the threshold value Rth is recorded for all pixels on the boundary line. Hereinafter, a pixel having a reliability of distance information less than a threshold (R <Rth) is referred to as a “low reliability pixel”.

境界線上の全画素について距離情報の信頼度の高低が決まると、補正領域設定部14は、境界線上の低信頼度画素を中心に低信頼度領域の領域拡大を行い、距離情報の補正領域を決定する。   When the reliability of the distance information is determined for all the pixels on the boundary line, the correction area setting unit 14 expands the area of the low reliability area around the low reliability pixels on the boundary line, and sets the correction area of the distance information. decide.

つまり、境界線上の低信頼度画素を中心として、一画素隣りの画素(隣接画素)に対応する距離情報の信頼度Rと閾値Rthの比較(以下、信頼度判定)を行い判定結果をビットマップ画像として記録する。続いて、二画素隣りの画素の信頼度判定を行い判定結果を記録し、…、n画素隣りの画素の信頼度判定を行い判定結果を記録する(S245)、…、領域拡大を繰り返す。そして、境界線上のある低信頼度画素について、一回の信頼度判定における判定対象の全画素がR≧Rthになると(S246)、当該画素を中心とする領域拡大を終了する。   In other words, comparing the reliability R of the distance information corresponding to the pixel adjacent to one pixel (adjacent pixel) and the threshold Rth (hereinafter referred to as reliability determination), centering on the low reliability pixel on the boundary line, the determination result is a bitmap. Record as an image. Subsequently, the reliability determination of the pixel adjacent to the two pixels is performed and the determination result is recorded,..., The reliability determination of the pixel adjacent to the n pixel is performed and the determination result is recorded (S245),. Then, for all low-reliability pixels on the boundary line, when all the pixels to be determined in one reliability determination satisfy R ≧ Rth (S246), the region enlargement centering on the pixel ends.

次に、領域拡大が未実行の境界線上の低信頼度画素があるか否かを判定し(S247)、あれば中心画素を移動し(S248)、処理をステップS245に戻して領域拡大を行う。   Next, it is determined whether or not there is a low-reliability pixel on the boundary line where region expansion has not been performed (S247). If there is a low-reliability pixel, the center pixel is moved (S248), and the process returns to step S245 to perform region expansion. .

なお、実施例1と同様に、境界線を中央とする所定幅の暫定補正領域を設定し、ステップS246において、一回の信頼度判定における判定対象の全画素が暫定補正領域外になった場合は、その領域拡大を終了してもよい。また、境界線上の各低信頼度画素を中心とする領域拡大において、既に、ビットマップ画像に判定結果が記録された画素(および暫定補正領域外の画素)は信頼度判定の対象にする必要はない。   As in the first embodiment, a provisional correction area having a predetermined width centered on the boundary line is set, and in step S246, all pixels to be determined in one reliability determination are outside the provisional correction area. May end the area expansion. In addition, in the area expansion centered on each low-reliability pixel on the boundary line, pixels whose determination results are already recorded in the bitmap image (and pixels outside the provisional correction area) need to be subjected to reliability determination. Absent.

領域拡大が未実行の境界線上の低信頼度画素がなくなり、領域拡大が終了すると、境界線上の低信頼度画素を含む低信頼度画素が記録されたビットマップ画像が得られる。補正領域設定部14は、ビットマップ画像が示す、低信頼度画素が構成する画素領域を距離情報の補正領域とする。   When there is no low-reliability pixel on the boundary line that has not been subjected to region expansion and the region expansion is completed, a bitmap image in which low-reliability pixels including low-reliability pixels on the boundary line are recorded is obtained. The correction area setting unit 14 sets the pixel area formed by the low reliability pixels indicated by the bitmap image as a correction area for the distance information.

実施例2においては、信頼度情報に基づき補正領域を決定するため、距離情報の信頼度が高い領域においては補正領域が狭くなり、信頼度が高い領域においては補正領域が広くなるように、補正領域の幅が領域によって変化する場合がある。   In Example 2, since the correction area is determined based on the reliability information, the correction area is narrowed in the area where the reliability of the distance information is high, and the correction area is widened in the area where the reliability is high. The width of the region may vary depending on the region.

このように、距離情報の信頼度が低い領域を距離情報の補正領域として抽出するため、境界付近の距離情報の信頼度が高い領域まで距離情報を補正することがなく、距離推定精度をより高めることができる。   As described above, since the region with the low reliability of the distance information is extracted as the correction region of the distance information, the distance information is not corrected to the region with the high reliability of the distance information near the boundary, and the distance estimation accuracy is further improved. be able to.

以下、本発明にかかる実施例3の画像処理を説明する。なお、実施例3において、実施例1、2と略同様の構成については、同一符号を付して、その詳細説明を省略する。   Hereinafter, image processing according to the third embodiment of the present invention will be described. Note that the same reference numerals in the third embodiment denote the same parts as in the first and second embodiments, and a detailed description thereof will be omitted.

実施例1では、境界線を中心に所定幅の領域を距離情報の補正領域として設定し、実施例2では、距離情報の信頼度に基づき補正領域を設定した。実施例3では、補正領域を設定し、補正領域に含まれる画素の透明度αに基づき補正領域を修正する。   In the first embodiment, an area having a predetermined width around the boundary line is set as a correction area for distance information. In the second embodiment, a correction area is set based on the reliability of distance information. In the third embodiment, a correction area is set, and the correction area is corrected based on the transparency α of the pixels included in the correction area.

図13のフローチャートにより実施例3における画像処理部1109による距離情報の補正処理を説明する。   The distance information correction processing by the image processing unit 1109 in the third embodiment will be described with reference to the flowchart of FIG.

入力部11は、処理対象の画像データおよび距離情報を入力する(S31)。境界情報生成部12は、入力画像データから物体領域を抽出し(S32)、抽出した物体領域とその他の領域(背景領域)の間の境界を示す境界情報を生成する(S33)。境界情報は、境界線を示すベクトルデータでもよいし、境界に対応する画素のリストでもよい。   The input unit 11 inputs image data to be processed and distance information (S31). The boundary information generation unit 12 extracts an object region from the input image data (S32), and generates boundary information indicating a boundary between the extracted object region and another region (background region) (S33). The boundary information may be vector data indicating a boundary line, or a list of pixels corresponding to the boundary.

次に、補正領域設定部14は、境界情報に基づき、距離情報の暫定補正領域を設定する(S34)。透明度計算部15は、暫定補正領域に含まれる画素の透明度αを計算する(S35)。補正領域設定部14は、透明度αに基づき暫定補正領域を修正した補正領域を設定する(S36)。そして、距離情報補正部16は、透明度αに基づき補正領域の距離情報を補正する(S37)。   Next, the correction area setting unit 14 sets a temporary correction area for the distance information based on the boundary information (S34). The transparency calculation unit 15 calculates the transparency α of the pixels included in the provisional correction area (S35). The correction area setting unit 14 sets a correction area obtained by correcting the provisional correction area based on the transparency α (S36). Then, the distance information correction unit 16 corrects the distance information of the correction area based on the transparency α (S37).

●補正領域の設定
図14のフローチャートにより補正領域設定部14による補正領域の修正を説明する。
Correction Area Setting Correction area correction by the correction area setting unit 14 will be described with reference to the flowchart of FIG.

補正領域設定部14は、暫定補正領域の注目画素の透明度αを取得し(S361)、取得した透明度αと所定の範囲を比較する(S362)。所定の範囲は、例えば、0.1超0.9未満(0.1<α<0.9)や0.2超0.8未満(0.2<α<0.8)などである。   The correction area setting unit 14 acquires the transparency α of the target pixel in the provisional correction area (S361), and compares the acquired transparency α with a predetermined range (S362). The predetermined range is, for example, more than 0.1 and less than 0.9 (0.1 <α <0.9), more than 0.2 and less than 0.8 (0.2 <α <0.8).

補正領域設定部14は、注目画素の透明度αが所定の範囲に含まれる場合は(S363)、当該画素を補正領域に残す(S364)。また、注目画素の透明度αが所定の範囲に含まれない場合は(S363)、補正領域から当該画素を除外する(S365)。つまり、透明度αが所定の範囲に含まれる画素は境界領域に含まれる画素として補正領域に残留させ、透明度αが所定の範囲に含まれない画素は背景領域または物体領域の画素として補正領域から除外する。   When the transparency α of the target pixel is included in the predetermined range (S363), the correction area setting unit 14 leaves the pixel in the correction area (S364). When the transparency α of the target pixel is not included in the predetermined range (S363), the pixel is excluded from the correction area (S365). In other words, pixels whose transparency α is included in the predetermined range are left in the correction region as pixels included in the boundary region, and pixels whose transparency α is not included in the predetermined range are excluded from the correction region as pixels of the background region or object region. To do.

次に、補正領域設定部14は、ステップS366の判定により、暫定補正領域のすべての画素について透明度αに基づく残留・除外処理が終了するまでステップS361からS365の処理を繰り返す。残留・除外処理が終了すると、残留した画素が修正後の補正領域に相当することになる。   Next, the correction area setting unit 14 repeats the processes from step S361 to S365 until the determination of step S366 completes the residual / exclusion process based on the transparency α for all the pixels in the provisional correction area. When the remaining / excluded process is completed, the remaining pixels correspond to the corrected correction area.

このように、透明度αに基づき補正領域を修正するため、暫定補正領域に含まれる透明度αが0または1の画素、あるいは、0または1に近い画素まで距離情報を補正することがなく、距離推定精度をより高めるとともに、補正処理を高速化することができる。   In this way, since the correction area is corrected based on the transparency α, the distance estimation is not performed without correcting the distance information to pixels with the transparency α included in the provisional correction area 0 or 1, or pixels close to 0 or 1. It is possible to increase the accuracy and speed up the correction process.

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

Claims (15)

被写体を撮影した画像データ、並びに、前記被写体および前記被写体の背景の距離情報を入力する入力手段と、
前記画像データの前景領域と背景領域との境界情報を生成する生成手段と、
前記境界情報に基づき前記距離情報を補正する補正領域を設定する設定手段と、
前記補正領域の画素の透明度を算出する算出手段と、
前記補正領域の画素の透明度に基づき、当該画素に対応する距離情報を補正する補正手段とを有する画像処理装置。
Input means for inputting image data of a subject and distance information of the subject and the background of the subject;
Generating means for generating boundary information between the foreground region and the background region of the image data;
Setting means for setting a correction area for correcting the distance information based on the boundary information;
Calculating means for calculating the transparency of the pixels in the correction region;
An image processing apparatus comprising: a correction unit that corrects distance information corresponding to a pixel based on the transparency of the pixel in the correction region.
前記生成手段は、前記画像データから前記前景として物体画像の領域を抽出し、前記物体画像の領域以外の領域を前記背景領域とする請求項1に記載された画像処理装置。   2. The image processing apparatus according to claim 1, wherein the generation unit extracts an area of an object image as the foreground from the image data, and uses an area other than the area of the object image as the background area. 前記設定手段は、前記境界情報が示す境界線を略中央とする所定幅の領域を前記補正領域として設定する請求項1または請求項2に記載された画像処理装置。   3. The image processing apparatus according to claim 1, wherein the setting unit sets a region having a predetermined width with a boundary line indicated by the boundary information as a substantially center as the correction region. 前記入力手段は、さらに前記距離情報の信頼度を入力し、
前記設定手段は、前記境界情報が示す境界線から、前記信頼度が所定の第一の閾値未満の距離情報に対応する画素領域の領域拡大によって得られる領域を前記補正領域として設定する請求項1または請求項2に記載された画像処理装置。
The input means further inputs the reliability of the distance information,
2. The setting unit sets, as the correction area, an area obtained by area expansion of a pixel area corresponding to distance information whose reliability is less than a predetermined first threshold from a boundary line indicated by the boundary information. An image processing apparatus according to claim 2.
前記設定手段は、前記境界情報が示す境界線を略中央とする所定幅の領域を暫定補正領域に設定し、前記透明度が所定の範囲に含まれない画素を前記暫定補正領域から除外した領域を前記補正領域として設定する請求項1または請求項2に記載された画像処理装置。   The setting means sets a region having a predetermined width whose center is a boundary line indicated by the boundary information as a temporary correction region, and sets a region in which pixels whose transparency is not included in the predetermined range are excluded from the temporary correction region. 3. The image processing apparatus according to claim 1, wherein the image processing apparatus is set as the correction area. 前記算出手段は、前記物体領域の画素の透明度を1、前記背景領域の画素の透明度を0として、前記補正領域の画素について0から1の間の透明度を算出する請求項1から請求項5の何れか一項に記載された画像処理装置。   The calculation means calculates the transparency between 0 and 1 for the pixels in the correction area, with the transparency of the pixels in the object area being 1 and the transparency of the pixels in the background area being 0. An image processing apparatus according to any one of the above. 前記補正手段は、前記補正領域の注目画素の近傍の前記前景領域の画素に対応する前記距離情報、前記注目画素の近傍の前記背景領域の画素に対応する前記距離情報、および、前記注目画素の透明度に基づき、前記補正後の距離情報を計算する請求項1から請求項6の何れか一項に記載された画像処理装置。   The correction means includes the distance information corresponding to the pixels in the foreground region in the vicinity of the target pixel in the correction region, the distance information corresponding to the pixels in the background region in the vicinity of the target pixel, and the 7. The image processing apparatus according to claim 1, wherein the corrected distance information is calculated based on transparency. 前記補正手段は、前記注目画素から最短距離にある前記前景領域の画素、および、前記注目画素から最短距離にある前記背景領域の画素を探索し、前記注目画素の透明度を重みとして、探索結果の画素に対応する前記距離情報を加算した結果を前記補正後の距離情報とする請求項7に記載された画像処理装置。   The correction means searches for a pixel in the foreground area that is the shortest distance from the target pixel and a pixel in the background area that is the shortest distance from the target pixel, and sets the transparency of the target pixel as a weight, 8. The image processing apparatus according to claim 7, wherein a result obtained by adding the distance information corresponding to a pixel is used as the corrected distance information. 前記補正手段は、前記注目画素の透明度が所定の第二の閾値以上の場合は前記注目画素の近傍の前記前景領域の画素を選択し、前記透明度が前記第二の閾値未満の場合は前記注目画素の近傍の前記背景領域の画素を選択し、前記選択した画素に対応する前記距離情報から前記補正後の距離情報を計算する請求項7に記載された画像処理装置。   The correction unit selects a pixel in the foreground region in the vicinity of the target pixel when the transparency of the target pixel is equal to or greater than a predetermined second threshold, and the target when the transparency is less than the second threshold. 8. The image processing apparatus according to claim 7, wherein a pixel in the background area in the vicinity of a pixel is selected, and the corrected distance information is calculated from the distance information corresponding to the selected pixel. 前記補正手段は、前記前景領域または前記背景領域の複数の画素を選択し、それら選択画素に対応する前記距離情報の平均値を前記補正後の距離情報とする請求項9に記載された画像処理装置。   10. The image processing according to claim 9, wherein the correction unit selects a plurality of pixels in the foreground area or the background area and uses an average value of the distance information corresponding to the selected pixels as the corrected distance information. apparatus. 前記補正手段は、前記前景領域または前記背景領域の複数の画素を選択し、それら選択画素と前記注目画素の間の距離を重みとして、前記選択画素に対応する前記距離情報を加重平均した結果を前記補正後の距離情報とする請求項9に記載された画像処理装置。   The correction means selects a plurality of pixels in the foreground area or the background area, and weights and averages the distance information corresponding to the selected pixel by using the distance between the selected pixel and the target pixel as a weight. 10. The image processing apparatus according to claim 9, wherein the corrected distance information is used. さらに、前記補正手段によって補正された距離情報を前記画像データに付加し、前記距離情報を付加した画像データを出力する出力手段を有する請求項1から請求項11の何れか一項に記載された画像処理装置。   The distance information corrected by the correction means is added to the image data, and output means for outputting the image data with the distance information added is described in any one of claims 1 to 11. Image processing device. 被写体を撮影した画像データ、並びに、前記被写体および前記被写体の背景の距離情報を入力し、
前記画像データの前景領域と背景領域との境界情報を生成し、
前記境界情報に基づき前記距離情報を補正する補正領域を設定し、
前記補正領域の画素の透明度を算出し、
前記補正領域の画素の透明度に基づき、当該画素に対応する距離情報を補正する画像処理方法。
Input image data of the subject and distance information of the subject and the background of the subject,
Generating boundary information between the foreground region and the background region of the image data;
Set a correction area for correcting the distance information based on the boundary information,
Calculating the transparency of the pixels in the correction area;
An image processing method for correcting distance information corresponding to a pixel based on transparency of the pixel in the correction area.
コンピュータを請求項1から請求項12の何れか一項に記載された画像処理装置の各手段として機能させるためのプログラム。   13. A program for causing a computer to function as each unit of the image processing apparatus according to claim 1. 請求項14に記載されたプログラムが記録されたコンピュータが読み取り可能な記録媒体。   15. A computer-readable recording medium on which the program according to claim 14 is recorded.
JP2014014744A 2014-01-29 2014-01-29 Image processing apparatus and method Active JP6332982B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014014744A JP6332982B2 (en) 2014-01-29 2014-01-29 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014014744A JP6332982B2 (en) 2014-01-29 2014-01-29 Image processing apparatus and method

Publications (3)

Publication Number Publication Date
JP2015141615A true JP2015141615A (en) 2015-08-03
JP2015141615A5 JP2015141615A5 (en) 2017-03-02
JP6332982B2 JP6332982B2 (en) 2018-05-30

Family

ID=53771904

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014014744A Active JP6332982B2 (en) 2014-01-29 2014-01-29 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP6332982B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019020877A (en) * 2017-07-13 2019-02-07 日本電信電話株式会社 Image area generating apparatus, method thereof and program
JP2020112928A (en) * 2019-01-09 2020-07-27 富士通株式会社 Background model generation device, background model generation method, and background model generation program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012503815A (en) * 2008-09-25 2012-02-09 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ 3D image data processing
JP2012141975A (en) * 2011-01-03 2012-07-26 Samsung Electronics Co Ltd Method and device for generating multi-view image for 3d display
WO2013145554A1 (en) * 2012-03-29 2013-10-03 パナソニック株式会社 Image processing apparatus and image processing method
JP2013223008A (en) * 2012-04-13 2013-10-28 Canon Inc Image processing device and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012503815A (en) * 2008-09-25 2012-02-09 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ 3D image data processing
JP2012141975A (en) * 2011-01-03 2012-07-26 Samsung Electronics Co Ltd Method and device for generating multi-view image for 3d display
WO2013145554A1 (en) * 2012-03-29 2013-10-03 パナソニック株式会社 Image processing apparatus and image processing method
JP2013223008A (en) * 2012-04-13 2013-10-28 Canon Inc Image processing device and method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019020877A (en) * 2017-07-13 2019-02-07 日本電信電話株式会社 Image area generating apparatus, method thereof and program
JP2020112928A (en) * 2019-01-09 2020-07-27 富士通株式会社 Background model generation device, background model generation method, and background model generation program
JP7275583B2 (en) 2019-01-09 2023-05-18 富士通株式会社 BACKGROUND MODEL GENERATING DEVICE, BACKGROUND MODEL GENERATING METHOD AND BACKGROUND MODEL GENERATING PROGRAM

Also Published As

Publication number Publication date
JP6332982B2 (en) 2018-05-30

Similar Documents

Publication Publication Date Title
US10997696B2 (en) Image processing method, apparatus and device
US9558543B2 (en) Image fusion method and image processing apparatus
US9749601B2 (en) Imaging device, image display method, and storage medium for displaying reconstruction image
JP5980294B2 (en) Data processing apparatus, imaging apparatus, and data processing method
TWI387935B (en) Image generation method, program therefor, and storage medium for storing the program
JP2015197745A (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP6308748B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP6326180B1 (en) Image processing device
US9619886B2 (en) Image processing apparatus, imaging apparatus, image processing method and program
US8810693B2 (en) Image processing apparatus and method thereof
JP2013031154A (en) Image processing device, image processing method, image capturing device, and program
JP6604908B2 (en) Image processing apparatus, control method thereof, and control program
JP6332982B2 (en) Image processing apparatus and method
JP2014116012A (en) Method and apparatus for color transfer between images
KR20220086888A (en) Novel view synthesis system for plenoptic images
JP6732440B2 (en) Image processing apparatus, image processing method, and program thereof
JP2018160024A (en) Image processing device, image processing method and program
JP2012173858A (en) Omnidirectional image generation method, image generation device and program
JP2015055988A (en) Image processor, image processing method, and program
JP2020088540A (en) Image generating apparatus, image generation method, and image generation program
US20160301917A1 (en) Image processing device, image pickup apparatus, image processing method, and storage medium
JP6415228B2 (en) Image synthesizing apparatus and image synthesizing apparatus control method
JP2016024490A (en) Image processing apparatus, image processing method, and program
JP2018180964A (en) Image processing apparatus and image processing method
JP2017184007A (en) Image processing apparatus, imaging apparatus, control method, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170130

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171227

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180112

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180309

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180424

R151 Written notification of patent or utility model registration

Ref document number: 6332982

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151