JP7263493B2 - Electronic devices and notification methods - Google Patents

Electronic devices and notification methods Download PDF

Info

Publication number
JP7263493B2
JP7263493B2 JP2021192953A JP2021192953A JP7263493B2 JP 7263493 B2 JP7263493 B2 JP 7263493B2 JP 2021192953 A JP2021192953 A JP 2021192953A JP 2021192953 A JP2021192953 A JP 2021192953A JP 7263493 B2 JP7263493 B2 JP 7263493B2
Authority
JP
Japan
Prior art keywords
image
filter
effective area
lens
camera
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2021192953A
Other languages
Japanese (ja)
Other versions
JP2022031300A (en
Inventor
達夫 小坂谷
直 三島
彰久 森屋
潤 山口
智也 鶴山
貴之 佐々木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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
Priority claimed from JP2018174037A external-priority patent/JP7021036B2/en
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2021192953A priority Critical patent/JP7263493B2/en
Publication of JP2022031300A publication Critical patent/JP2022031300A/en
Application granted granted Critical
Publication of JP7263493B2 publication Critical patent/JP7263493B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Stereoscopic And Panoramic Photography (AREA)
  • Blocking Light For Cameras (AREA)
  • Studio Devices (AREA)

Description

本発明の実施形態は電子機器及び通知方法に関する。 Embodiments of the present invention relate to electronic devices and notification methods.

撮影画像とデプス情報を同時に取得する手法としてステレオカメラを用いる手法が知られている。しかし、2台のカメラが必要であることと、視差確保のためには2台のカメラの間隔を長くする必要があるため、この手法を実現する装置が大型化する。そのため、1台のカメラでデプス情報を求める手法が望まれている。その一例として、イメージセンサが撮像する複数の色成分毎の画像のぼけの形状差に基づいてデプス情報を求める技術が提案されている。画像に色成分毎のぼけを生じさせるために、異なる色成分を通過する少なくとも2つの領域からなるフィルタを用いて画像が撮影される。異なる色成分の透過特性を持つフィルタを利用し、デプス情報を求めるための機構をカラー開口と呼称する。 A method using a stereo camera is known as a method for simultaneously obtaining a captured image and depth information. However, since two cameras are required and the distance between the two cameras must be increased in order to ensure the parallax, the size of the apparatus that implements this method is increased. Therefore, a technique for obtaining depth information with a single camera is desired. As one example, a technology has been proposed that obtains depth information based on the difference in shape of blur in an image captured by an image sensor for each of a plurality of color components. An image is captured with a filter consisting of at least two regions that pass different color components to create a per-color component blur in the image. A mechanism for obtaining depth information by using filters having transmission characteristics of different color components is called a color aperture.

特開2016-102733号公報JP 2016-102733 A

画像の中央、周辺等のどの部分においても画像に色成分毎のぼけが生じるためには、異なる色成分の透過特性を持つフィルタはレンズ開口に配置することが好ましい。しかし、このためには、カメラレンズを特注する必要又は市販のカメラレンズを改造する必要がある。このため、1台のカメラでデプス情報を求めることは簡単ではなかった。 In order to generate blur for each color component in the image at any portion such as the center and periphery of the image, it is preferable to arrange filters having transmission characteristics of different color components at the lens aperture. However, this requires customizing a camera lens or modifying an off-the-shelf camera lens. Therefore, it was not easy to obtain depth information with a single camera.

本発明の目的は、1台のカメラでデプス情報を簡単に求めることができる電子機器及び通知方法を提供することである。 SUMMARY OF THE INVENTION An object of the present invention is to provide an electronic device and a notification method that can easily obtain depth information with a single camera.

実施形態による電子機器は、第1波長域を透過する第1領域と第2波長域を透過する第2領域とを有するフィルタを含むカメラによる撮影画像であって、前記第1領域を透過した第1波長域に基づく第1色成分画像と前記第2領域を透過した第2波長域に基づく第2色成分画像とを含む撮影画像を入力する入力手段と、前記撮影画像を前記第1色成分画像と前記第2色成分画像における色情報の偏りに基づくデプス情報の計算に対する有効領域が識別される状態で出力する処理手段と、を具備する電子機器である。前記処理手段は、複数の撮影パラメータの中の少なくとも1つの撮影パラメータである前記カメラのレンズの開口と前記フィルタとの距離に基づいて前記有効領域を取得または計算する。 An electronic device according to an embodiment is an image captured by a camera including a filter having a first region that transmits a first wavelength band and a second region that transmits a second wavelength band, the image transmitted through the first region. input means for inputting a photographed image including a first color component image based on one wavelength band and a second color component image based on a second wavelength band transmitted through the second region; An electronic device comprising: an image; and a processing means for outputting in a state in which an effective area for calculation of depth information based on bias of color information in the second color component image is identified. The processing means acquires or calculates the effective area based on a distance between the aperture of the lens of the camera and the filter, which is at least one shooting parameter among a plurality of shooting parameters.

フィルタをレンズの開口に追加した場合の被写体の距離による光線の変化の一例を示す図である。FIG. 10 is a diagram showing an example of changes in light rays depending on the distance to the subject when a filter is added to the aperture of the lens; フィルタの一例を示す図である。It is a figure which shows an example of a filter. フィルタの第1フィルタ領域および第2フィルタ領域の透過率特性の一例を示す図である。It is a figure which shows an example of the transmittance|permeability characteristic of the 1st filter area|region of a filter, and a 2nd filter area|region. フィルタをレンズ開口に配置した場合の光線の変化の一例を示す図である。It is a figure which shows an example of the change of a light ray when a filter is arrange|positioned in a lens opening. フィルタをレンズの先端より外側に配置した場合の光線の変化の一例を示す図である。FIG. 10 is a diagram showing an example of changes in light rays when a filter is arranged outside the tip of a lens; 第1実施形態による電子機器の外観の一例を示す図である。It is a figure which shows an example of the external appearance of the electronic device by 1st Embodiment. 第1実施形態による電子機器の電気的構成の一例を示すブロック図である。1 is a block diagram showing an example of an electrical configuration of an electronic device according to a first embodiment; FIG. イメージセンサの構造の一例を示す図である。It is a figure which shows an example of the structure of an image sensor. イメージセンサのカラーフィルタの一例を示す図である。FIG. 3 is a diagram showing an example of color filters of an image sensor; フィルタによる光線変化とぼけの形状の関係の一例を示す図である。It is a figure which shows an example of the relationship between the light ray change by a filter, and the shape of blur. 第1実施形態による電子機器の機能構成の一例を示すブロック図である。1 is a block diagram showing an example of a functional configuration of an electronic device according to a first embodiment; FIG. 第1実施形態における基準画像のぼけ関数の一例を示す図である。FIG. 4 is a diagram showing an example of a blurring function of a reference image in the first embodiment; FIG. 第1実施形態における対象画像のぼけ関数の一例を示す図である。FIG. 4 is a diagram showing an example of a blurring function of a target image in the first embodiment; FIG. 第1実施形態におけるぼけ補正フィルタの一例を示す図である。FIG. 4 is a diagram showing an example of a blur correction filter in the first embodiment; FIG. 第1実施形態における有効領域決定部の一例を示す図である。It is a figure which shows an example of the effective area determination part in 1st Embodiment. 第1実施形態における有効領域の決定の一例を示す図である。FIG. 4 is a diagram showing an example of determining an effective area in the first embodiment; FIG. 第1実施形態における有効領域テーブルの一例を示す図である。4 is a diagram showing an example of a valid area table in the first embodiment; FIG. 第1実施形態における有効領域を示すガイドラインの一例を示す図である。It is a figure which shows an example of the guideline which shows an effective area in 1st Embodiment. 第1実施形態における有効領域通知の一例を示すフローチャートである。7 is a flow chart showing an example of effective area notification in the first embodiment; 第2実施形態による電子機器の外観の一例を示す図である。It is a figure which shows an example of the external appearance of the electronic device by 2nd Embodiment. 第2実施形態による電子機器を含むシステムの一例を示す図である。FIG. 10 is a diagram illustrating an example of a system including electronic devices according to a second embodiment; FIG. 第2実施形態における電子機器を含むシステムによる有効領域通知の一例を示すフローチャートである。10 is a flow chart showing an example of effective area notification by a system including an electronic device according to the second embodiment;

以下、実施の形態について図面を参照して説明する。なお、開示はあくまで一例にすぎず、以下の実施形態に記載した内容により発明が限定されるものではない。当業者が容易に想到し得る変形は、当然に開示の範囲に含まれる。説明をより明確にするため、図面において、各部分のサイズ、形状等を実際の実施態様に対して変更して模式的に表す場合もある。複数の図面において、対応する要素には同じ参照数字を付して、詳細な説明を省略する場合もある。 Embodiments will be described below with reference to the drawings. The disclosure is merely an example, and the invention is not limited by the contents described in the following embodiments. Modifications that can be easily conceived by those skilled in the art are naturally included in the scope of the disclosure. In order to make the explanation clearer, in the drawings, the size, shape, etc. of each part may be changed from the actual embodiment and shown schematically. Corresponding elements in multiple drawings may be denoted by the same reference numerals and detailed descriptions thereof may be omitted.

[デプス情報の取得原理]
図1は、異なる波長域の透過特性を持つフィルタ10をレンズ12の開口に追加した場合の被写体の距離による光線の変化の一例を示す。図2は、フィルタ10の一例を示す図である。フィルタ10は、複数、例えば2つの第1フィルタ領域10aと第2フィルタ領域10bを含む。x方向が左右方向、y方向が上下方向であり、左右方向は被写体から見た場合の左右方向である。フィルタ10の中心は、レンズの光学中心16と一致している。第1フィルタ領域10aと第2フィルタ領域10bは互いに重ならないように配置される。図2に示す例では、第1フィルタ領域10aと第2フィルタ領域10bは、それぞれ、円形のフィルタ10が光学中心16を通る垂直方向の線分で左右に分割された半円の形状を有している。イメージセンサが赤(R)、緑(G)、青(B)の3色の色成分画像を撮影する場合、第1フィルタ領域10aはR、G、Bの中の第1の2色の組み合わせの光に対応する波長域を透過し、第2フィルタ領域10bは第1の2色の組み合わせとは異なる第2の2色の組み合わせの光に対応する波長域を透過する。
[Principle of acquisition of depth information]
FIG. 1 shows an example of changes in light rays depending on the distance to an object when a filter 10 having transmission characteristics of different wavelength bands is added to the aperture of a lens 12. FIG. FIG. 2 is a diagram showing an example of the filter 10. As shown in FIG. The filter 10 includes a plurality, for example two, first filter regions 10a and second filter regions 10b. The x direction is the horizontal direction, the y direction is the vertical direction, and the horizontal direction is the horizontal direction when viewed from the object. The center of filter 10 coincides with the optical center 16 of the lens. The first filter region 10a and the second filter region 10b are arranged so as not to overlap each other. In the example shown in FIG. 2, the first filter region 10a and the second filter region 10b each have a semicircular shape in which the circular filter 10 is divided into left and right by a vertical line segment passing through the optical center 16. ing. When the image sensor captures a color component image of three colors of red (R), green (G), and blue (B), the first filter area 10a is a combination of the first two colors among R, G, and B. and the second filter region 10b transmits a wavelength band corresponding to light of a second two-color combination different from the first two-color combination.

図3は、第1フィルタ領域10aおよび第2フィルタ領域10bの透過率特性の一例を示す。例えば、第1フィルタ領域10aは、赤と緑の光の波長域を透過するイエロー(Y)フィルタからなり、第2フィルタ領域10bは緑と青の光の波長域を透過するシアン(C)フィルタからなる。第1フィルタ(イエローフィルタ)領域10aの透過率特性18aは、R画像およびG画像に対応する波長域の光に対する透過率が高く、B画像に対応する波長域の光をほとんど透過しない。第2フィルタ(シアンフィルタ)領域10bの透過率特性18bは、B画像およびG画像に対応する波長域の光に対する透過率が高く、R画像に対応する波長域の光をほとんど透過しない。 FIG. 3 shows an example of transmittance characteristics of the first filter region 10a and the second filter region 10b. For example, the first filter region 10a is a yellow (Y) filter that transmits red and green light wavelength regions, and the second filter region 10b is a cyan (C) filter that transmits green and blue light wavelength regions. consists of The transmittance characteristic 18a of the first filter (yellow filter) region 10a has a high transmittance for light in the wavelength ranges corresponding to the R image and the G image, and hardly transmits light in the wavelength range corresponding to the B image. The transmittance characteristic 18b of the second filter (cyan filter) region 10b has a high transmittance for light in the wavelength ranges corresponding to the B image and the G image, and hardly transmits light in the wavelength range corresponding to the R image.

このため、図1に示すように、開口を通過する光線がR、G、Bの色成分画像毎に変化する。G画像の波長域の光は第1フィルタ(イエローフィルタ)領域10aと第2フィルタ(シアンフィルタ)領域10bの両方を通過するが、R画像の波長域の光は第1フィルタ(イエローフィルタ)領域10aのみを通過し、B画像の波長域の光は第2フィルタ(シアンフィルタ)領域10bのみを通過する。このため、撮像画像のR画像とB画像のぼけの形状が被写体までの距離dに応じて変化する。また、開口が2分割されているので、R画像とB画像のぼけの偏り方向が合焦面dfの前後で反転する。そのため、前ぼけと後ぼけが識別可能であり、ぼけの形状から被写体までの距離dに応じたデプス情報を求めることができる。 Therefore, as shown in FIG. 1, light rays passing through the aperture change for each of the R, G, and B color component images. Light in the wavelength region of the G image passes through both the first filter (yellow filter) region 10a and second filter (cyan filter) region 10b, whereas light in the wavelength region of the R image passes through the first filter (yellow filter) region. 10a only, and the light in the B image wavelength region passes only through the second filter (cyan filter) region 10b. Therefore, the shape of the blur of the R image and the B image of the captured image changes according to the distance d to the subject. Also, since the aperture is divided into two, the biased directions of the blurring of the R image and the B image are reversed before and after the in-focus plane df. Therefore, front blur and back blur can be distinguished, and depth information corresponding to the distance d to the subject can be obtained from the shape of the blur.

なお、フィルタ10はレンズ開口に配置する代わりに、イメージセンサ14に入射する光の光路上において、フィルタ10とイメージセンサ14との間にレンズ12を配置してもよいし、レンズ12とイメージセンサ14との間にフィルタ10を配置してもよい。さらに、レンズ12が複数のレンズからなる場合には、フィルタ10はいずれかのレンズ12の間に配置してもよい。また、Yフィルタ又はCフィルタの代わりに赤と青の光の波長域を透過するマゼンタ(M)フィルを用いても良い。また、フィルタ10の領域数は2に限らず、3以上でも良い。領域の形状は円の中心を通る直線で全体を分割する構成に限らず、モザイク状に複数の領域が配置される構成でもよい。 Instead of arranging the filter 10 at the lens aperture, the lens 12 may be arranged between the filter 10 and the image sensor 14 on the optical path of the light incident on the image sensor 14, or the lens 12 and the image sensor 14 may be arranged. A filter 10 may be placed between 14 . Furthermore, when the lens 12 consists of a plurality of lenses, the filter 10 may be arranged between any of the lenses 12 . Also, instead of the Y filter or C filter, a magenta (M) filter that transmits the wavelength regions of red and blue light may be used. Also, the number of regions of the filter 10 is not limited to two, and may be three or more. The shape of the regions is not limited to the configuration in which the whole is divided by a straight line passing through the center of the circle, and may be a configuration in which a plurality of regions are arranged in a mosaic pattern.

[デプス推定に不必要な色ずれ]
中央、周辺等の画像のどの部分においても画像に複数の色成分毎のぼけを生じさせるためには、フィルタはレンズ開口に配置することが好ましい。しかし、このためには、カメラレンズを特注する必要又は市販のカメラレンズを改造する必要がある。このため、レンズの外側にカラーファイルを配置することが考えられている。図4と図5は、フィルタをレンズ開口に配置した場合とレンズ先端より外側(被写体側)に配置した場合の光線の変化の違いの一例を示す。図4、図5はy軸のプラス側(上側)から見た図である。図4(a)、(b)に示すように、フィルタ10をレンズ12の開口に配置すると、被写体の中央部、周辺部からの光線も第1フィルタ領域10aと第2フィルタ領域10bの両方を均等に通過してイメージセンサ14に入射される。しかし、フィルタ10をレンズ12先端より被写体側、例えばレンズ先端のフィルタ取り付け用のネジにフィルタ10をねじ込んで固定する又はスマートフォンの広角レンズアタッチメントのようにレンズ12の前面にフィルタ10をクリップ等により固定する場合、図5(a)に示すように、被写体の中央部からの光線は第1フィルタ領域10aと第2フィルタ領域10bの両方を均等に通過してイメージセンサ14に入射される。しかし、図5(b)に示すように、被写体の周辺部からの光線は第1フィルタ領域10aと第2フィルタ領域10bのいずれか一方をより多く通過し、他方をより少なく通過してイメージセンサ14に入射される。このように、フィルタが左右に第1、第2フィルタ領域に分割されている場合、イメージセンサ14は被写体の左右両端部ではR画像とB画像を均等に撮影することができず、R画像とB画像とのバランスが崩れ、デプス推定に不必要な好ましくない色ずれが生じる。
[Unnecessary color shift for depth estimation]
In order to blur the image for each of a plurality of color components in any part of the image such as the center and the periphery, it is preferable to place the filter at the lens aperture. However, this requires customizing a camera lens or modifying an off-the-shelf camera lens. Therefore, it has been considered to arrange a color file outside the lens. FIGS. 4 and 5 show an example of the difference in change in light rays when the filter is placed at the lens aperture and when the filter is placed outside the lens tip (object side). 4 and 5 are views viewed from the plus side (upper side) of the y-axis. As shown in FIGS. 4A and 4B, when the filter 10 is placed at the aperture of the lens 12, light rays from the central and peripheral parts of the object pass through both the first filter area 10a and the second filter area 10b. The light passes evenly and enters the image sensor 14 . However, the filter 10 is fixed to the object side from the tip of the lens 12, for example, by screwing the filter 10 into a filter attachment screw at the tip of the lens, or the filter 10 is fixed to the front of the lens 12 with a clip or the like like a wide-angle lens attachment for a smartphone. In this case, as shown in FIG. 5(a), light rays from the center of the subject equally pass through both the first filter area 10a and the second filter area 10b and are incident on the image sensor 14. FIG. However, as shown in FIG. 5(b), light rays from the periphery of the object pass through either one of the first filter region 10a and the second filter region 10b more and pass through the other less and reach the image sensor. 14. In this way, when the filter is divided into left and right first and second filter areas, the image sensor 14 cannot evenly capture the R image and the B image at both the left and right ends of the subject. The balance with the B image is lost, and undesirable color shifts unnecessary for depth estimation occur.

ただし、フィルタ10をレンズ開口以外に配置した場合、デプス情報を全く測定できない訳ではなく、画面中央領域の被写体のデプス情報を求めることはできるが、周辺領域の被写体のデプス情報を精度良く求めることができない場合があるだけである。イメージセンサ14がR画像とB画像を均等に撮影できる被写体の領域は画像撮影時のカメラの光学特性に関する諸パラメータ(以下、撮影パラメータと称する)により決まるので、デプス情報の測定誤差が実用上問題ない程度に小さい領域、すなわちデプス情報の信頼度がある基準の信頼度より高い領域を特定することができる。また、常に画面全体のデプス情報を求める必要があるとは限らず、中央の領域に位置する被写体の部分のデプス情報が求められれば良いこともある。 However, when the filter 10 is placed outside the lens aperture, it is not impossible to measure the depth information at all. Although it is possible to obtain the depth information of the subject in the central area of the screen, it is necessary to accurately obtain the depth information of the subject in the peripheral area. There are only cases where it is not possible. Since the area of the subject in which the image sensor 14 can evenly capture the R image and the B image is determined by various parameters related to the optical characteristics of the camera at the time of image capturing (hereinafter referred to as "capturing parameters"), depth information measurement errors are a practical problem. It is possible to identify an area that is small enough to be nonexistent, that is, an area in which the reliability of depth information is higher than a certain reference reliability. Also, it is not always necessary to obtain depth information for the entire screen, and it may be sufficient to obtain depth information for the part of the subject located in the central area.

実施形態では、複数の色成分に距離に応じて異なるぼけを生じさせるフィルタ10をレンズ開口以外に配置し、デプス情報の信頼度をユーザに通知する。信頼度が低い場合は、カメラの構図を変えて撮影し直す等により、信頼度の高いデプス情報を求めることができる。これにより、カメラレンズを特注する必要又は市販のカメラレンズを改造する必要がなく、1台のカメラで簡単にデプス情報を求めることができる電子機器及び通知方法が提供される。 In the embodiment, a filter 10 that causes different blurring of a plurality of color components depending on the distance is arranged outside the lens aperture to notify the user of the reliability of the depth information. If the reliability is low, depth information with a high reliability can be obtained by changing the composition of the camera and taking a picture again. This provides an electronic device and notification method that can easily obtain depth information with a single camera without the need to custom order a camera lens or modify a commercially available camera lens.

[第1実施形態の外観]
図6は第1実施形態の電子機器の外観を示す。図6(a)は斜視図、図6(b)は断面構造を示す側面図である。第1実施形態の電子機器としてはスマートフォン40が利用できる。スマートフォン40は、画像を撮像し、撮像した画像を処理する機能を有する電子機器の一例である。なお、実施形態としては、スマートフォン40に限らず、カメラ、カメラ機能を有する携帯電話機やPDA(Personal Digital Assistant, Personal Data Assistant)といった携帯情報端末又はカメラ機能を有するパーソナルコンピュータ等も利用できる。
[Appearance of the first embodiment]
FIG. 6 shows the appearance of the electronic device of the first embodiment. FIG. 6(a) is a perspective view, and FIG. 6(b) is a side view showing a cross-sectional structure. A smart phone 40 can be used as the electronic device of the first embodiment. The smartphone 40 is an example of an electronic device that has a function of capturing an image and processing the captured image. The embodiment is not limited to the smart phone 40, but a mobile information terminal such as a camera, a mobile phone with a camera function, a PDA (Personal Digital Assistant, Personal Data Assistant), or a personal computer with a camera function can be used.

スマートフォン40のカメラレンズ42の前面を覆うようにクリップ式のアタッチメント44がスマートフォン40に装着される。アタッチメント44はカメラレンズ42の口径より大口径の第1鏡筒46を備えており、第1鏡筒46の内側に第2鏡筒48が挿入される。第2鏡筒48の先端にフィルタ52が配置される。フィルタ52は図2に示したフィルタ10と同様にイエローの第1フィルタ領域52aとシアンの第2フィルタ領域52bからなる。ユーザが第2鏡筒48に対して回転力を与えると、第2鏡筒48は第1鏡筒46に対して回転される。これにより、フィルタ52の向き(第1フィルタ領域52aと第2フィルタ領域52bによる領域分割線の向き)が調整可能である。ユーザが回転力を与えないと、第2鏡筒48は第1鏡筒46に対して静止している。なお、イモネジ(図示しない)等を第1鏡筒46に設け、フィルタ52の向きが調整された後は、第2鏡筒48の回転を抑止しても良い。 A clip-type attachment 44 is attached to the smartphone 40 so as to cover the front surface of the camera lens 42 of the smartphone 40 . The attachment 44 has a first lens barrel 46 having a diameter larger than that of the camera lens 42 , and a second lens barrel 48 is inserted inside the first lens barrel 46 . A filter 52 is arranged at the tip of the second lens barrel 48 . Similar to the filter 10 shown in FIG. 2, the filter 52 consists of a yellow first filter area 52a and a cyan second filter area 52b. When the user applies a rotational force to the second barrel 48 , the second barrel 48 is rotated with respect to the first barrel 46 . Thereby, the direction of the filter 52 (the direction of the dividing line between the first filter region 52a and the second filter region 52b) can be adjusted. The second barrel 48 remains stationary with respect to the first barrel 46 when the user does not apply a rotational force. A set screw (not shown) or the like may be provided on the first lens barrel 46 to prevent rotation of the second lens barrel 48 after the orientation of the filter 52 is adjusted.

デプス情報が求められる被写体の条件として、エッジが延びる方向(エッジ方向)がある。柱のように垂直の物体のエッジ方向は水平方向であり、机のように水平な物体のエッジ方向は垂直方向である。フィルタの領域分割方向と被写体のエッジ方向が平行ではない場合、デプス情報を求めることができる。図2に示すフィルタでは2つの領域が左右に並んでいるので、分割方向は縦方向である。そのため、図2に示すフィルタを用いてデプス情報を求めることができる被写体は水平エッジである垂直の物体である。ここでは、デプス情報を求めたい被写体のエッジ方向は水平方向であると仮定する。アタッチメント44はこのような被写体に適するようにフィルタの領域分割方向が被写体のエッジ方向と交差するように装着される。そのため、アタッチメント44の装着位置を決めるためのマーカ46aが第1鏡筒46の表面に記され、マーカ48aが第2鏡筒48の表面に記されている。マーカ46aがスマートフォン40のLED40aに合うようにアタッチメント44がスマートフォン40に装着され、マーカ48aとマーカ46aの位置が揃うように第2鏡筒48が第1鏡筒46に対して位置決めされる。この場合、エッジ方向が水平方向である被写体のデプス情報が求められる。被写体のエッジ方向が水平方向ではない場合は、この後、フィルタ52の領域分割線の方向がエッジ方向と交差するようにユーザによって第2鏡筒48が回転され、フィルタ52の向きが調整される。 One of the subject conditions for which depth information is required is the direction in which the edge extends (edge direction). The edge direction of a vertical object such as a pillar is horizontal, and the edge direction of a horizontal object such as a desk is vertical. If the region division direction of the filter and the edge direction of the subject are not parallel, depth information can be obtained. In the filter shown in FIG. 2, the two regions are arranged horizontally, so the direction of division is the vertical direction. Therefore, the object for which depth information can be obtained using the filter shown in FIG. 2 is a vertical object that is a horizontal edge. Here, it is assumed that the edge direction of the object for which depth information is to be obtained is the horizontal direction. The attachment 44 is mounted so that the direction of dividing the area of the filter intersects the edge direction of the object so as to be suitable for such an object. Therefore, a marker 46 a for determining the mounting position of the attachment 44 is marked on the surface of the first lens barrel 46 , and a marker 48 a is marked on the surface of the second lens barrel 48 . The attachment 44 is attached to the smartphone 40 so that the marker 46a is aligned with the LED 40a of the smartphone 40, and the second lens barrel 48 is positioned with respect to the first lens barrel 46 so that the marker 48a and the marker 46a are aligned. In this case, depth information of a subject whose edge direction is horizontal is obtained. If the edge direction of the subject is not horizontal, then the second lens barrel 48 is rotated by the user so that the direction of the area dividing line of the filter 52 intersects the edge direction, and the orientation of the filter 52 is adjusted. .

第2鏡筒48は第1鏡筒46の内側に設けたが、第1鏡筒46の外側に設けても良い。
また、被写体のエッジ方向がフィルタ52の領域分割線と平行である場合、スマートフォン40自体を回転して領域分割線の方向がエッジ方向と交差するように回転しても良い。この場合、フィルタ52は回転できなくても良いので、第2鏡筒48は不要で、第1鏡筒46にフィルタ52が設けられても良い。
Although the second lens barrel 48 is provided inside the first lens barrel 46 , it may be provided outside the first lens barrel 46 .
Further, when the edge direction of the subject is parallel to the area dividing line of the filter 52, the smartphone 40 itself may be rotated so that the direction of the area dividing line intersects the edge direction. In this case, since the filter 52 does not have to be rotatable, the second lens barrel 48 is unnecessary and the filter 52 may be provided in the first lens barrel 46 .

[第1実施形態の電気的構成]
図7は、スマートフォン40の電気的構成の一例を示すブロック図である。スマートフォン40は、フィルタ52、レンズ42を介して入射された被写体像を撮影するイメージセンサ54、CPU56、RAM58、ディスプレイ60、通信部62、不揮発性メモリ64、メモリカードスロット66及びオーディオ出力部68を備える。イメージセンサ54、CPU56、RAM58、ディスプレイ60、通信部62、不揮発性メモリ64、メモリカードスロット66及びオーディオ出力部68は、バスライン69を介して相互に接続される。
[Electrical configuration of the first embodiment]
FIG. 7 is a block diagram showing an example of an electrical configuration of smartphone 40. As shown in FIG. The smartphone 40 includes a filter 52, an image sensor 54 that captures a subject image incident through a lens 42, a CPU 56, a RAM 58, a display 60, a communication section 62, a nonvolatile memory 64, a memory card slot 66, and an audio output section 68. Prepare. The image sensor 54 , CPU 56 , RAM 58 , display 60 , communication section 62 , nonvolatile memory 64 , memory card slot 66 and audio output section 68 are interconnected via a bus line 69 .

CPU56は、スマートフォン40内の様々なコンポーネントの動作を制御するプロセッサである。CPU56は、ストレージデバイスである不揮発性メモリ64からRAM58にロードされる様々なプログラムを実行する。不揮発性メモリ64には種々のアプリケーションプログラム以外にOS(Operating System)64aも格納する。種々のアプリケーションプログラムの一例はデプス計算プログラム64b、有効領域通知プログラム64cである。不揮発性メモリ64には、イメージセンサ14によって撮影された画像や、その画像に対するプログラム64b、64cによる処理結果も格納され得る。 The CPU 56 is a processor that controls operations of various components within the smartphone 40 . CPU 56 executes various programs loaded into RAM 58 from non-volatile memory 64, which is a storage device. In addition to various application programs, the nonvolatile memory 64 also stores an OS (Operating System) 64a. Examples of various application programs are depth calculation program 64b and coverage area notification program 64c. The non-volatile memory 64 can also store images captured by the image sensor 14 and processing results of the images by the programs 64b and 64c.

通信部62は、有線通信または無線通信を実行するように構成されたインターフェース機器である。通信部62は、信号を有線または無線で送信する送信部と、信号を有線又は無線で受信する受信部とを含む。例えば、通信部62はインターネット92を介して外部のサーバ94にスマートフォン40を接続することができる。 The communication unit 62 is an interface device configured to perform wired communication or wireless communication. The communication unit 62 includes a transmitting unit that transmits signals by wire or wirelessly, and a receiving unit that receives signals by wire or wirelessly. For example, the communication unit 62 can connect the smartphone 40 to an external server 94 via the Internet 92 .

ディスプレイ60は、たとえばLCD(Liquid Crystal Display)である。ディスプレイ60は、CPU56等によって生成される表示信号に基づいて画面イメージを表示する。例えば、ディスプレイ60は撮像した画像やデプス情報を表示する機能や、信頼度そのものあるいは信頼度に応じた情報をテキスト、アイコン、マーク等として表示することによりユーザに信頼度を通知する機能を有する。ディスプレイ60はタッチスクリーンディスプレイであってもよい。その場合、たとえば、LCDの上面にタッチパネルが配置される。タッチパネルは、LCDの画面上で入力を行うための静電容量式のポインティングデバイスである。指が接触される画面上の接触位置および接触位置の動き等がタッチパネルによって検出される。 The display 60 is, for example, an LCD (Liquid Crystal Display). A display 60 displays a screen image based on a display signal generated by the CPU 56 or the like. For example, the display 60 has a function of displaying captured images and depth information, and a function of notifying the user of the reliability by displaying the reliability itself or information corresponding to the reliability as text, icons, marks, or the like. Display 60 may be a touch screen display. In that case, for example, a touch panel is arranged on the upper surface of the LCD. A touch panel is a capacitive pointing device for inputting on an LCD screen. The touch panel detects a contact position on the screen where the finger contacts, movement of the contact position, and the like.

オーディオ出力部68はスピーカ、イヤホンジャック等であり、信頼度そのものあるいは信頼度に応じた情報を音声としてユーザに通知する。
メモリカードスロット66には、SD(登録商標)メモリカードやSDHC(登録商標)メモリカードのような各種の可搬記憶媒体であるメモリカードが挿入され得る。メモリカードスロット66に記憶媒体が挿入された場合、その記憶媒体に対するデータの書き込みおよび読み出しが実行され得る。データは、例えば画像データや距離データである。
An audio output unit 68 is a speaker, an earphone jack, or the like, and notifies the user of the reliability itself or information corresponding to the reliability by voice.
Memory cards, which are various portable storage media such as SD (registered trademark) memory cards and SDHC (registered trademark) memory cards, can be inserted into the memory card slot 66 . When a storage medium is inserted into memory card slot 66, data can be written to and read from the storage medium. The data are image data and distance data, for example.

アプリケーションプログラムはスマートフォン40に内蔵されていなくても良い。例えば、デプス計算プログラム64bがスマートフォン40ではなく、サーバ94に備えられていても良い。この場合、イメージセンサ54で撮像した画像が通信部62によりサーバ94に送信され、サーバ94に備わるデプス計算プログラムによりデプス情報が求められ、デプス情報がスマートフォン40に返送されれば良い。また、デプス計算プログラム64bと有効領域通知プログラム64cがスマートフォン40ではなく、ともにサーバ94に備えられていても良い。この場合、イメージセンサ54で撮像した画像がサーバ94に通信部62により送信され、サーバ94に備わるデプス計算プログラムによりデプス情報が求められるとともに、サーバ94に備わる有効領域通知プログラムにより有効領域が決定され、デプス情報、有効領域の通知情報がスマートフォン40に返送されれば良い。 The application program does not have to be built into the smart phone 40 . For example, the depth calculation program 64b may be provided in the server 94 instead of the smart phone 40 . In this case, an image captured by the image sensor 54 may be transmitted to the server 94 by the communication unit 62 , depth information may be obtained by a depth calculation program provided in the server 94 , and the depth information may be returned to the smartphone 40 . Moreover, both the depth calculation program 64b and the effective area notification program 64c may be provided in the server 94 instead of the smart phone 40 . In this case, the image captured by the image sensor 54 is transmitted to the server 94 by the communication unit 62, the depth information is obtained by the depth calculation program provided in the server 94, and the effective area is determined by the effective area notification program provided in the server 94. , depth information, and effective area notification information are returned to the smartphone 40 .

[イメージセンサ]
イメージセンサ54、例えばCCD型のイメージセンサは、2次元マトリクス状に配列された受光素子としてのフォトダイオードと、フォトダイオードが入射光を光電変換することにより発生された信号電荷を転送するCCDとからなる。図8は、フォトダイオードの部分の断面構造の一例を示す。p型シリコン基板70の表面領域に多数のn型半導体領域72が形成され、p型基板42とn型半導体領域72とのpn接合により多数のフォトダイオードが形成される。ここでは、2つのフォトダイオードが1つの画素を構成する。そのため、各フォトダイオードはサブ画素とも称される。各フォトダイオードの間には、クロストーク抑制用の遮光膜74が形成される。p型シリコン基板70の上にトランジスタや各種配線等が設けられる多層の配線層76が形成される。
[Image sensor]
The image sensor 54, for example, a CCD-type image sensor comprises photodiodes as light receiving elements arranged in a two-dimensional matrix and a CCD for transferring signal charges generated by photoelectric conversion of incident light by the photodiodes. Become. FIG. 8 shows an example of the cross-sectional structure of the photodiode portion. A large number of n-type semiconductor regions 72 are formed in the surface region of the p-type silicon substrate 70, and pn junctions between the p-type substrate 42 and the n-type semiconductor regions 72 form a large number of photodiodes. Here, two photodiodes constitute one pixel. Each photodiode is therefore also referred to as a sub-pixel. A light shielding film 74 for suppressing crosstalk is formed between each photodiode. A multi-layered wiring layer 76 is formed on the p-type silicon substrate 70, in which transistors and various wirings are provided.

配線層76の上にカラーフィルタ80が形成される。カラーフィルタ80は、画素毎に例えば赤(R)、緑(G)または青(B)の光を透過する多数のフィルタ要素の2次元アレイ状に配列からなる。このため、各画素はR、G、Bのいずれかの色成分の画像情報しか発生しない。画素で発生されない他の2色の色成分の画像情報は、周囲の画素の色成分画像情報から補間により求められる。周期的な繰り返しパターンの撮影においては、補間の際にモアレや偽色が発生することがある。これを防止するために、図示していないが、石英等からなり、繰り返しパターンを多少ぼかす光学的ローパスフィルタがレンズ42とイメージセンサ54との間に配置されてもよい。光学的ローパスフィルタを設ける代わりに、画像信号の信号処理で同様な効果を得るようにしてもよい。 A color filter 80 is formed on the wiring layer 76 . The color filter 80 is composed of a two-dimensional array of a large number of filter elements that transmit red (R), green (G), or blue (B) light, for example, for each pixel. Therefore, each pixel generates only image information of one of R, G, and B color components. The image information of the other two color components not generated by the pixel is obtained by interpolation from the color component image information of surrounding pixels. Moiré and false colors may occur during interpolation when capturing a periodically repeated pattern. In order to prevent this, although not shown, an optical low-pass filter made of quartz or the like that slightly blurs the repetitive pattern may be placed between the lens 42 and the image sensor 54 . Instead of providing an optical low-pass filter, a similar effect may be obtained by signal processing of the image signal.

カラーフィルタ80の上にマイクロレンズアレイ82が形成される。マイクロレンズアレイ82は1画素に対応する1対のマイクロレンズ82a、82bの2次元アレイ状の配列からなる。図8は、表面入射型のイメージセンサ54を示したが、裏面入射型でもよい。1画素を構成する2つのフォトダイオードは、一対のマイクロレンズ82a、82bを介してレンズ42の射出瞳(Exit pupil)の異なる領域を通過した光を受光するように構成され、所謂瞳分割が実現されている。 A microlens array 82 is formed on the color filter 80 . The microlens array 82 consists of a two-dimensional array arrangement of a pair of microlenses 82a and 82b corresponding to one pixel. Although FIG. 8 shows a front-illuminated image sensor 54, it may be a back-illuminated image sensor. Two photodiodes constituting one pixel are configured to receive light passing through different regions of the exit pupil of the lens 42 via a pair of microlenses 82a and 82b, thus realizing so-called pupil division. It is

図9(a)は、各画素を構成するフォトダイオード84a、84bとマイクロレンズ82a、82bとの関係の一例を示す平面図である。図9(a)に示すように、第1のサブ画素としてのフォトダイオード84aにはフィルタ52の第1フィルタ領域10aを通過した光が入射される。第2のサブ画素としてのフォトダイオード84bにはフィルタ52の第2フィルタ領域10bを通過した光が入射される。 FIG. 9A is a plan view showing an example of the relationship between photodiodes 84a and 84b and microlenses 82a and 82b that constitute each pixel. As shown in FIG. 9A, light that has passed through the first filter region 10a of the filter 52 is incident on the photodiode 84a as the first sub-pixel. Light passing through the second filter region 10b of the filter 52 is incident on the photodiode 84b as the second sub-pixel.

図9(b)はカラーフィルタ80の一例を示す。カラーフィルタ80は、例えばベイヤー配列の原色カラーフィルタである。これにより、イメージセンサ54は、赤色の光をセンスするR画素、緑色の光をセンスするG画素及び青色の光をセンスするB画素を備える。なお、カラーフィルタ80は、補色フィルタでもよい。さらに、カラー画像を撮影する必要が無くデプス情報だけを求めればよい場合は、イメージセンサ54はカラーセンサである必要は無く、モノクロセンサでもよく、カラーフィルタ80は無くてもよい。 FIG. 9B shows an example of the color filter 80. FIG. The color filter 80 is, for example, a Bayer arrangement primary color filter. Thus, the image sensor 54 includes R pixels that sense red light, G pixels that sense green light, and B pixels that sense blue light. Note that the color filter 80 may be a complementary color filter. Furthermore, if it is not necessary to capture a color image and only depth information is to be obtained, the image sensor 54 need not be a color sensor, but may be a monochrome sensor, and the color filter 80 may be omitted.

なお、イメージセンサ14としては、CCD型のセンサに限らず、CMOS(Complementary Metal Oxide Semiconductor)型のセンサを用いても良い。
[フィルタによるぼけ形状]
図10を参照して、フィルタ52による光線変化とぼけの形状について説明する。フィルタ52はイエローの第1フィルタ領域52aとシアンの第2フィルタ領域52bからなる。被写体88が合焦距離dfよりも奥にある場合(d>df)、イメージセンサ54によって撮像された画像にはぼけが発生する。この画像上のぼけの形状を示すぼけ関数(PSF:Point Spread Function)は、R画像、G画像およびB画像でそれぞれ異なっている。R画像のぼけ関数101Rは左側に偏ったぼけの形状を示し、G画像のぼけ関数101Gは偏りのないぼけの形状を示し、B画像のぼけ関数101Bは右側に偏ったぼけの形状を示している。
The image sensor 14 is not limited to a CCD type sensor, and a CMOS (Complementary Metal Oxide Semiconductor) type sensor may be used.
[Bokeh shape by filter]
The shape of the light beam change and the blur due to the filter 52 will be described with reference to FIG. 10 . The filter 52 consists of a yellow first filter area 52a and a cyan second filter area 52b. When the object 88 is located further than the focal distance df (d>df), the image picked up by the image sensor 54 is blurred. A blur function (PSF: Point Spread Function) indicating the shape of the blur on the image is different for each of the R image, the G image, and the B image. The blur function 101R for the R image shows the shape of the blur skewed to the left, the blur function 101G for the G image shows the shape of the unbiased blur, and the blur function 101B for the B image shows the shape of the blur skewed to the right. there is

被写体88が合焦距離dfにある場合(d=df)、イメージセンサ54によって撮像された画像にはほとんどぼけが発生しない。この画像上のぼけの形状を示すぼけ関数は、R画像、G画像およびB画像でほぼ同じである。すなわち、R画像のぼけ関数102R、G画像のぼけ関数102G、およびB画像のぼけ関数102Bは、偏りのないぼけの形状を示している。 When the object 88 is at the focal distance df (d=df), the image captured by the image sensor 54 is hardly blurred. Blur functions indicating the shape of blur on this image are substantially the same for the R, G and B images. That is, the R-image blur function 102R, the G-image blur function 102G, and the B-image blur function 102B show unbiased blur shapes.

被写体88が合焦距離dfよりも手前にある場合(d<df)、イメージセンサ54によって撮像された画像にはぼけが発生する。この画像上のぼけの形状を示すぼけ関数は、R画像、G画像及びB画像でそれぞれ異なっている。R画像のぼけ関数103Rは右側に偏ったぼけの形状を示し、G画像のぼけ関数103Gは偏りのないぼけの形状を示し、B画像のぼけ関数103Bは左側に偏ったぼけの形状を示している。 When the subject 88 is in front of the focal distance df (d<df), the image captured by the image sensor 54 is blurred. A blur function indicating the shape of blur on this image is different for each of the R image, the G image, and the B image. The blur function 103R for the R image shows the shape of the blur skewed to the right, the blur function 103G for the G image shows the shape of the unbiased blur, and the blur function 103B for the B image shows the shape of the blur skewed to the left. there is

本実施形態では、このような特性を利用して、画像の画素毎に被写体までのデプス情報を算出する。
[実施形態の機能構成]
図11はスマートフォン40の機能構成の一例を示すブロック図である。カラーフィルタ10からイメージセンサ54までの矢印は光の経路を示す。イメージセンサ54から先の矢印は電気信号の経路を示す。
In the present embodiment, using such characteristics, depth information to the subject is calculated for each pixel of the image.
[Functional Configuration of Embodiment]
FIG. 11 is a block diagram showing an example of the functional configuration of the smart phone 40. As shown in FIG. An arrow from the color filter 10 to the image sensor 54 indicates the path of light. Arrows pointing from the image sensor 54 indicate the paths of the electrical signals.

フィルタ52の第1フィルタ(Y)領域52aを通過した赤色の光がレンズ42を介してイメージセンサ54のR画素(第1センサと称する)54aに入射され、フィルタ52の第1フィルタ(Y)領域52aを通過した緑色の光がレンズ42を介してイメージセンサ54のG画素(第2センサと称する)54bに入射される。フィルタ52の第2フィルタ(C)領域52bを通過した緑色の光がレンズ42を介してイメージセンサ54の第2センサ54bに入射され、フィルタ52の第2フィルタ(C)領域52bを通過した青色の光がレンズ42を介してイメージセンサ54のB画素(第3センサと称する)54cに入射される。 The red light that has passed through the first filter (Y) region 52a of the filter 52 is incident on the R pixel (referred to as the first sensor) 54a of the image sensor 54 via the lens 42, and passes through the first filter (Y) of the filter 52. Green light that has passed through the area 52 a is incident on the G pixels (referred to as the second sensor) 54 b of the image sensor 54 via the lens 42 . The green light that has passed through the second filter (C) region 52b of the filter 52 is incident on the second sensor 54b of the image sensor 54 via the lens 42, and the blue light that has passed through the second filter (C) region 52b of the filter 52. of light enters a B pixel (referred to as a third sensor) 54c of the image sensor 54 through the lens 42. As shown in FIG.

第1センサ54a、第2センサ54b及び第3センサ54cの出力信号が画像入力部102に入力される。画像入力部102は、ぼけ関数(Point spread function、PSF)が偏りのないぼけの形状を示すG画像を基準画像として取得し、ぼけ関数が偏ったぼけの形状を示すR画像およびB画像の一方または両方を対象画像として取得する。対象画像と基準画像は、同一のカメラにより同時刻に撮像された画像である。 Output signals from the first sensor 54 a , the second sensor 54 b and the third sensor 54 c are input to the image input unit 102 . The image input unit 102 acquires, as a reference image, the G image whose point spread function (PSF) indicates a shape of unbiased blur, and one of the R and B images whose point spread function (PSF) indicates a shape of blur whose blur function is biased. Or acquire both as target images. The target image and the reference image are images captured at the same time by the same camera.

画像入力部102の出力信号がディスプレイ60に供給されるとともに、デプス計算部104と有効領域決定部106に供給される。デプス計算部104と有効領域決定部106の出力もディスプレイ60に供給される。
[デプス計算]
デプス計算部104は、ぼけ補正フィルタを用いて画像に写る被写体までのデプス情報を画素毎に算出する。なお、画素毎にデプス情報を算出する代わりに、複数の画素の集合の画素ブロック単位でデプス情報を算出しても良い。ぼけ補正フィルタとは、対象画像に対して演算されると、演算後の対象画像と基準画像との相関が演算前の対象画像と基準画像との相関より高くなるようなフィルタである。補正画像と基準画像との相関を計算する手法については後述する。ぼけ補正フィルタと演算されると、対象画像のボケの形状が基準画像のぼけの形状に近づく。
An output signal of the image input unit 102 is supplied to the display 60 and also supplied to the depth calculation unit 104 and the effective area determination unit 106 . The outputs of depth calculator 104 and valid area determiner 106 are also provided to display 60 .
[Depth calculation]
A depth calculation unit 104 calculates depth information up to a subject in an image for each pixel using a blur correction filter. Note that instead of calculating depth information for each pixel, depth information may be calculated for each pixel block, which is a set of a plurality of pixels. A blur correction filter is a filter that, when operated on a target image, makes the correlation between the target image and the reference image after the operation higher than the correlation between the target image and the reference image before the operation. A method of calculating the correlation between the corrected image and the reference image will be described later. When calculated with the blur correction filter, the shape of the blur of the target image approaches the shape of the blur of the reference image.

実施形態では、画像に写る被写体までの距離を複数の距離に想定して作成した複数の距離毎の複数のぼけ補正フィルタを用意しておく。対象画像のぼけ形状を補正した補正画像を生成し、複数のぼけ補正フィルタの中から、補正画像と基準画像との相関が最も高くなるぼけ補正フィルタを探す。相関が最も高くなるぼけ補正フィルタに対応する距離が被写体までのデプス情報として決定される。しかし、あらかじめ用意した複数のぼけ補正フィルタの中から1つのぼけ補正フィルタを選ぶ代わりに、上記の条件を満たすぼけ補正フィルタを演算により求めても良い。 In the embodiment, a plurality of blur correction filters are prepared for each of a plurality of distances, which are created assuming a plurality of distances to the subject in the image. A corrected image obtained by correcting the blur shape of the target image is generated, and a blur correction filter having the highest correlation between the corrected image and the reference image is searched from among a plurality of blur correction filters. The distance corresponding to the blur correction filter with the highest correlation is determined as the depth information to the subject. However, instead of selecting one blur correction filter from a plurality of blur correction filters prepared in advance, a blur correction filter that satisfies the above conditions may be calculated.

デプス計算部104は、さらに算出したデプスから、画像の各画素を距離に応じて着色した距離画像を出力してもよい。
撮像画像のぼけ関数は、フィルタ52の形状(領域分割の態様)と、被写体の位置とピント位置との距離によって決定する。図12は、実施形態に係る基準画像のぼけ関数の一例を示す図である。図12に示すように、第2センサ54bに対応する緑色の光の波長領域が透過する開口形状は点対称形である円形状であるため、ぼけ関数で示されるぼけの形状は、ピント位置の前後で変化はなく、被写体とピント位置との間の距離の大きさによってぼけの幅が変化する。このようなぼけの形状を示すぼけ関数は、被写体の位置とピント位置との間の距離の大きさによってぼけの幅が変化するガウス関数として表現できる。なお、ぼけ関数は、被写体の位置とピント位置との距離によってぼけの幅が変化するピルボックス関数として表現してもよい。
The depth calculation unit 104 may further output a distance image in which each pixel of the image is colored according to the distance from the calculated depth.
The blurring function of the captured image is determined by the shape of the filter 52 (mode of area division) and the distance between the position of the subject and the focus position. FIG. 12 is a diagram illustrating an example of a blurring function of a reference image according to the embodiment; As shown in FIG. 12, the shape of the aperture through which the wavelength region of green light corresponding to the second sensor 54b is transmitted is a point-symmetric circular shape. There is no change before and after, and the width of the blur changes depending on the size of the distance between the subject and the focus position. A blur function indicating the shape of such blur can be expressed as a Gaussian function in which the width of blur changes depending on the distance between the position of the object and the focus position. Note that the blur function may be expressed as a pillbox function in which the width of blur changes depending on the distance between the position of the object and the focus position.

一方、図13は、実施形態に係る対象画像のぼけ関数の一例を示す図である。なお、各図の中心は(x、y)=(0,0)である。図13に示すように、対象画像(たとえばR画像)のぼけ関数は、被写体がピント位置よりも遠方にあるd>dfの場合、x>0においてぼけの幅が減衰するガウス関数として表現できる。また、対象画像(たとえばR画像)のぼけ関数は、被写体がピント位置よりも近方にあるd<dfの場合、x<0においてぼけの幅が減衰するガウス関数として表現できる。他方の対象画像(たとえばB画像)のぼけ関数は、被写体がピント位置よりも遠方にあるd>dfの場合、x<0においてぼけの幅が減衰するガウス関数として表現できる。また、B画像のぼけ関数は、被写体がピント位置よりも近方にあるd<dfの場合、x>0においてぼけの幅が減衰するガウス関数として表現できる。 On the other hand, FIG. 13 is a diagram showing an example of the blurring function of the target image according to the embodiment. Note that the center of each figure is (x, y)=(0, 0). As shown in FIG. 13, the blur function of the target image (for example, the R image) can be expressed as a Gaussian function that attenuates the width of blur at x>0 when d>df where the subject is farther than the focus position. Also, the blur function of the target image (for example, the R image) can be expressed as a Gaussian function that attenuates the width of the blur at x<0 when d<df where the subject is closer than the focus position. The blur function of the other target image (for example, B image) can be expressed as a Gaussian function in which the width of blur attenuates at x<0 when d>df where the subject is farther than the focus position. Also, the blur function of the B image can be expressed as a Gaussian function in which the width of the blur attenuates at x>0 when d<df where the subject is closer than the focus position.

基準画像のぼけ関数と対象画像のぼけ関数とを解析することにより、対象画像のぼけ形状を基準画像のぼけ形状へ補正するための複数のぼけ補正フィルタを求めることができる。
図14は、実施形態に係るぼけ補正フィルタの一例を示す図である。ぼけ補正フィルタは、第1フィルタ領域52aと第2フィルタ領域52bの境界の線分(垂直方向)の中心点を通り、この線分に直交する直線上(水平方向)に分布する。その分布は、想定する距離毎にピーク点(直線上の位置、高さ)とピーク点からの広がり方とが異なる図示のような山状の分布となる。対象画像のぼけ形状は、ぼけ補正フィルタを用いて、任意の距離を想定した様々なぼけ形状に補正することができる。つまり、任意の距離を想定した補正画像を生成することができる。
By analyzing the blur function of the reference image and the blur function of the target image, it is possible to obtain a plurality of blur correction filters for correcting the blur shape of the target image to the blur shape of the reference image.
FIG. 14 is a diagram illustrating an example of a blur correction filter according to the embodiment; The blur correction filters are distributed on a straight line (horizontal direction) passing through the center point of the line segment (vertical direction) on the boundary between the first filter region 52a and the second filter region 52b and orthogonal to this line segment. The distribution becomes a mountain-like distribution as shown in the figure, in which the peak points (positions and heights on the straight line) and how they spread from the peak points differ for each assumed distance. The blur shape of the target image can be corrected to various blur shapes assuming an arbitrary distance using a blur correction filter. That is, it is possible to generate a corrected image assuming an arbitrary distance.

デプス計算部104は、生成した補正画像と基準画像とのぼけ形状が最も近似または一致する距離を撮像画像の各画素で求める。ぼけ形状の一致度は、各画素を中心とする任意サイズの矩形領域における補正画像と基準画像との相関を計算すれば良い。ぼけ形状の一致度の計算は、既存の類似度評価手法を用いれば良い。デプス計算部104は、補正画像と基準画像とで相関が最も高くなる補正フィルタが対応する距離を求め、各画素に写る被写体までのデプス情報を算出する。たとえば、既存の類似度評価手法は、SSD(Sum of Squared Difference)、SAD(Sum of Absolute Difference)、NCC(Normalized Cross-Correlation)、ZNCC(Zero-mean Normalized Cross-Correlation)、Color Alignment Measure等を利用すれば良い。本実施形態では、自然画像の色成分が局所的には線形な関係を持つ特性を有することを利用したColor Alignment Measureを利用する。Color Alignment Measureでは、撮像画像の対象画素を中心とする局所境域の色分布の分散から、相関関係を表す指標が算出される。 The depth calculation unit 104 obtains, for each pixel of the captured image, the distance at which the blur shapes of the generated corrected image and the reference image are most similar or match. The degree of matching of the blur shape can be obtained by calculating the correlation between the corrected image and the reference image in a rectangular area of arbitrary size centered on each pixel. An existing similarity evaluation method may be used to calculate the degree of matching between blur shapes. The depth calculation unit 104 obtains the distance corresponding to the correction filter with the highest correlation between the corrected image and the reference image, and calculates the depth information up to the subject captured in each pixel. For example, existing similarity evaluation methods include SSD (Sum of Squared Difference), SAD (Sum of Absolute Difference), NCC (Normalized Cross-Correlation), ZNCC (Zero-mean Normalized Cross-Correlation), Color Alignment Measure, etc. You should use it. In this embodiment, Color Alignment Measure is used, which utilizes the fact that the color components of a natural image locally have a linear relationship. In Color Alignment Measure, an index representing the correlation is calculated from the variance of the color distribution of the local border around the target pixel of the captured image.

[デプス情報の信頼度通知]
実施形態は、デプス計算部104により計算されたデプス情報の信頼度を求め、信頼度に応じた情報をユーザに通知する機能を有する。信頼度に応じた情報通知の一例として、信頼度が基準信頼度より高い画素からなる有効領域を求め、有効領域をユーザに通知することがある。この通知に関する図11に示す有効領域決定部106のいくつかの例を図15(a)、(b)、(c)に示す。
[Depth Information Reliability Notification]
The embodiment has a function of determining the reliability of the depth information calculated by the depth calculation unit 104 and notifying the user of information according to the reliability. As an example of information notification according to reliability, a valid area made up of pixels with higher reliability than a reference reliability is obtained, and the valid area is notified to the user. Some examples of the effective area determination unit 106 shown in FIG. 11 regarding this notification are shown in FIGS. 15(a), (b) and (c).

図15(a)に示す有効領域決定部106aは有効領域計算部112と撮影パラメータ入力部114を備える。有効領域は撮影パラメータにより決まるので、有効領域計算部112は撮影パラメータ入力部114から入力される撮影パラメータに応じて有効領域を計算する。 The effective area determination unit 106a shown in FIG. 15A includes an effective area calculation unit 112 and an imaging parameter input unit 114. FIG. Since the effective area is determined by the imaging parameters, the effective area calculation section 112 calculates the effective area according to the imaging parameters input from the imaging parameter input section 114 .

撮影パラメータは、レンズの明るさ(F値)、焦点距離、フィルタとレンズ開口との距離及びイメージセンサのサイズ等を含む。撮影パラメータ入力部114はディスプレイ60でパラメータ入力・選択画面を表示させ、ディスプレイ60に設けられたタッチパネルを用いてユーザが各撮影パラメータを入力できるように構成されていても良い。なお、レンズの明るさ、焦点距離及びイメージセンサのサイズはスマートフォン40に固有の値であるので、有効領域通知プログラム64cをスマートフォン40にインストールする際に自動的に入力されるように構成しても良い。また、レンズ42が光学ズーム機能を備えている場合は、焦点距離は可変であるので、ズーム機構から焦点距離情報が入力されるように構成しても良い。フィルタとレンズ開口との距離はアタッチメント44に固有の値であるので、アタッチメント44毎に入力する必要がある。しかし、撮影パラメータ入力部114がアタッチメント44の種類毎にこの距離を格納しているテーブルを備え、ユーザが距離そのものではなくアタッチメント44の種類を入力するように構成しても良い。 The shooting parameters include lens brightness (F number), focal length, distance between filter and lens aperture, size of image sensor, and the like. The imaging parameter input unit 114 may display a parameter input/selection screen on the display 60 and allow the user to input each imaging parameter using a touch panel provided on the display 60 . Since the brightness of the lens, the focal length, and the size of the image sensor are values specific to the smartphone 40, they may be automatically input when the effective area notification program 64c is installed on the smartphone 40. good. Further, when the lens 42 has an optical zoom function, the focal length is variable, so the focal length information may be input from the zoom mechanism. Since the distance between the filter and the lens aperture is a unique value for each attachment 44, it must be entered for each attachment 44. FIG. However, the photographing parameter input unit 114 may be provided with a table storing this distance for each type of attachment 44, and the user may input the type of attachment 44 instead of the distance itself.

図2に示すようなフィルタ10と同様な縦分割の構成のフィルタ52が用いられる場合、有効領域は画面中央を中心とした一定の幅の縦長領域であるので、有効領域計算部112は撮影パラメータに基づき有効領域の左右の端の座標(例えば、画面の左右方向の中心からの画素数)を計算する。 When a filter 52 having a vertically divided configuration similar to that of the filter 10 shown in FIG. The coordinates of the left and right edges of the effective area (for example, the number of pixels from the center in the left and right direction of the screen) are calculated based on .

有効領域の計算の一例を説明する。画面の全画素について画素値が既知である被写体、例えば真っ白な背景を図2に示すようなフィルタ52を用いて撮影すると、撮影画像は、図16(a)に示すように左右方向の中央付近は白、右端になるにつれて青みがかかり、左端になるにつれて赤みを帯びるようになる。図16(a)の破線部における撮影画像の画素値(輝度)の断面プロファイルを図16(b)に示す。撮影パラメータが分かれば、断面プロファイルは光学シミュレーションプログラムにより計算できる。そのため、有効領域計算部112は、撮影パラメータ入力部114から入力された撮影パラメータに基づいて光学シミュレーションにより図16(b)に示すような断面プロファイルを計算する。そして、有効領域計算部112はR画素値とB画素値が所定輝度以上である有効領域の左右の端部の位置座標を計算する。所定輝度は基準信頼度に関連する。なお、有効領域を決める基準信頼度はデプス情報の測定誤差の許容値(デプス要求レベルと称する)に応じて異ならせても良い。すなわち、デプス要求レベルが高い場合は、所定輝度は高くなり有効領域は狭くなり、デプス要求レベルが低い場合は、所定輝度は低くなり、有効領域は広くなる。デプス要求レベルも撮影パラメータ入力部114から入力される。決定された有効領域に関する情報はディスプレイ60で表示される又はオーディオ出力部68を介して音声として出力される。 An example of effective area calculation will be described. When a subject whose pixel values are known for all pixels on the screen, for example, a pure white background is photographed using the filter 52 as shown in FIG. is white, becomes bluish toward the right end, and becomes reddish toward the left end. FIG. 16(b) shows the cross-sectional profile of the pixel values (luminance) of the captured image in the dashed line portion of FIG. 16(a). Knowing the imaging parameters, the cross-sectional profile can be calculated by an optical simulation program. Therefore, the effective area calculator 112 calculates a cross-sectional profile as shown in FIG. Then, the effective area calculation unit 112 calculates the position coordinates of the left and right ends of the effective area where the R pixel value and the B pixel value are equal to or higher than a predetermined luminance. The predetermined brightness is related to the reference reliability. Note that the reference reliability for determining the effective area may be varied according to the allowable value of the measurement error of the depth information (referred to as the required depth level). That is, when the required depth level is high, the predetermined luminance is high and the effective area is narrowed, and when the required depth level is low, the predetermined luminance is low and the effective area is widened. The requested depth level is also input from the imaging parameter input unit 114 . Information about the determined effective area is displayed on the display 60 or output as sound via the audio output section 68 .

図15(b)に示す有効領域決定部106bは撮影パラメータ入力部114と有効領域取得部116と有効領域メモリ118を備える。図15(a)に示す有効領域計算部112により種々の撮影パラメータとデプス要求レベルについて光学シミュレーションにより図16(b)に示すような断面プロファイルが予め計算され、種々の撮影パラメータとデプス要求レベルについての有効領域を示す有効領域テーブルが有効領域メモリ118に格納される。なお、デプス要求レベルは必須ではなく、テーブルとして予め有効領域を保持する場合は、撮影パラメータのみに応じた予め計算された有効領域を示す情報を保持し、有効領域をデプス要求レベルに応じて可変としなくても良い。なお、光学シミュレーションプログラムによる計算をせずに、画面の全画素について画素値が既知である被写体、例えば真っ白な背景を撮影した撮影画像を解析して、R画素値とB画素値が所定輝度以上である有効領域の左右の端部の位置座標を求めて、これらをメモリ118に格納しても良い。 The effective area determination unit 106b shown in FIG. 15B includes an imaging parameter input unit 114, an effective area acquisition unit 116, and an effective area memory 118. FIG. A cross-sectional profile as shown in FIG. A valid area table indicating the valid area of is stored in the valid area memory 118 . Note that the required depth level is not essential, and when the effective area is held in advance as a table, information indicating the pre-calculated effective area corresponding to only the imaging parameters is held, and the effective area is variable according to the required depth level. You don't have to. It should be noted that without performing calculations using an optical simulation program, an object whose pixel values are known for all pixels on the screen, for example, a photographed image of a pure white background is analyzed, and the R pixel value and the B pixel value are equal to or greater than a predetermined luminance. The position coordinates of the left and right ends of the effective area may be obtained and stored in the memory 118 .

有効領域メモリ118内の有効領域テーブルの一例を図17に示す。有効領域取得部116は撮影パラメータ入力部114から入力される撮影パラメータ及びデプス要求レベルに対応する有効範囲の情報を有効領域メモリ118から読み出す。レンズが光学ズーム機能を備える場合、焦点距離は可変であるが、ある程度の焦点距離範囲について有効領域は同じであるので、焦点距離の可変範囲内のいくつかの焦点距離範囲毎に有効領域を求めてテーブルに登録すれば良い。有効領域メモリ118から読み出された有効領域に関する情報はディスプレイ60で表示される又はオーディオ出力部68を介して音声として出力される。
有効領域は、機械学習によって統計的に求めることもできる。正しいデプス情報が分かっているシーン及び/又は画素パターンに対し、ある撮影パラメータにおいてデプスを推定すれば、推定誤差を求めることができる。十分な数のシーン及び/又は画素パターンに対して推定誤差を求めれば、撮影パラメータとシーン及び/又は画像パターンの間の推定誤差の統計量が得られる。そのため、撮影パラメータとシーン及び/又は画像パターンが特定されると、図15(a)の有効領域計算部112は推定誤差の統計量を得ることができる。
例えば統計量として分散を利用する場合、推定誤差の分散が大きい領域は、信頼度が低い領域だと判定することができる。統計量と信頼度の間の関係を表現する統計モデルは、正しいデプス情報が既知の学習データを準備すれば、ニューラルネットワークなどの機械学習によって獲得することができる。獲得した統計モデルは、撮影パラメータ入力部114にて保持しておき、有効領域の計算時に有効領域計算部112に入力する。これにより、有効領域計算部112は、撮影パラメータとシーン及び/又は画像パターンと機械学習による統計モデルに基づいて信頼度を求め、信頼度が基準信頼度より高い有効領域を求めることができる。
An example of the valid area table in the valid area memory 118 is shown in FIG. The effective area acquisition unit 116 reads from the effective area memory 118 the effective area information corresponding to the imaging parameters and the requested depth level input from the imaging parameter input unit 114 . If the lens has an optical zoom function, the focal length is variable, but the effective area is the same for a certain focal length range. and register it in the table. Information about the effective area read out from the effective area memory 118 is displayed on the display 60 or output as sound via the audio output section 68 .
The effective area can also be statistically determined by machine learning. For a scene and/or pixel pattern for which correct depth information is known, the estimation error can be obtained by estimating the depth with certain shooting parameters. Obtaining the estimated error for a sufficient number of scenes and/or pixel patterns provides statistics of the estimated error between the imaging parameters and the scene and/or image patterns. Therefore, once the shooting parameters and the scene and/or image pattern are specified, the effective area calculator 112 in FIG. 15A can obtain the statistics of the estimation error.
For example, when variance is used as a statistic, it can be determined that a region with a large variance of estimation errors is a region with low reliability. A statistical model that expresses the relationship between statistics and reliability can be obtained by machine learning such as a neural network if training data with known correct depth information are prepared. The obtained statistical model is held in the imaging parameter input unit 114 and input to the effective area calculation unit 112 when calculating the effective area. As a result, the effective area calculation unit 112 can obtain the reliability based on the shooting parameters, the scene and/or the image pattern, and the statistical model based on machine learning, and obtain the effective area with the reliability higher than the reference reliability.

図15(a)に示す有効領域計算部112と図15(b)に示す有効領域メモリ118は実施形態のスマートフォン40内に備える必要はなく、サーバ94に設けても良い。図15(c)はこの場合の有効領域決定部106cの一例を示す。有効領域決定部106cは撮影パラメータ入力部114と有効領域取得部120を備える。撮影パラメータ入力部114から有効領域取得部120に入力された撮影パラメータが通信部62を介してサーバ94に送信される。サーバ94で有効領域が計算され又は有効領域メモリから読み出され、有効領域に関する情報が通信部62に返送され、有効領域取得部120は有効領域に関する情報を取得する。通信部62により受信した有効領域に関する情報はディスプレイ60で表示される又はオーディオ出力部68を介して音声として出力される。 The effective area calculation unit 112 shown in FIG. 15A and the effective area memory 118 shown in FIG. FIG. 15(c) shows an example of the valid area determining section 106c in this case. The effective area determination unit 106 c includes an imaging parameter input unit 114 and an effective area acquisition unit 120 . The imaging parameters input from the imaging parameter input section 114 to the effective area acquisition section 120 are transmitted to the server 94 via the communication section 62 . The valid area is calculated by the server 94 or read from the valid area memory, the information about the valid area is returned to the communication section 62, and the valid area obtaining section 120 obtains the information about the valid area. Information about the effective area received by the communication unit 62 is displayed on the display 60 or output as sound via the audio output unit 68 .

図18はディスプレイ60で表示される有効領域に関する情報の一例を示す。画像入力部102で取得した画像がディスプレイ60で表示される。この画像上に有効領域の左右端を示す一対のガイドライン124が表示される。ユーザはガイドライン124が表示される画像を見て、デプスを求める測定対象が有効領域内に位置するか否かを確認することができる。測定対象が有効領域外に位置する場合、構図を変える等により測定対象が有効領域内に位置するようにすることができる。このため、レンズ開口以外に位置するフィルタにより色ずれが発生しても、測定対象のデプス情報の測定誤差を許容値以下にすることができる。なお、フィルタ10の配置方向(第1フィルタ領域と第2フィルタ領域の境界線の方向)を垂直方向としたので、有効領域は画面中央を中心とした一定の幅の縦長領域であるが、フィルタ10の配置方向に応じて有効領域は異なる。例えば、フィルタ10の配置方向を水平方向としたので、有効領域は画面中央を中心とした一定の幅の横長領域となる。 FIG. 18 shows an example of information on the effective area displayed on the display 60. As shown in FIG. An image acquired by the image input unit 102 is displayed on the display 60 . A pair of guide lines 124 indicating the left and right ends of the effective area are displayed on this image. The user can see the image on which the guideline 124 is displayed and confirm whether or not the measurement target for which the depth is to be determined is located within the effective area. When the object to be measured is positioned outside the effective area, the object to be measured can be positioned within the effective area by changing the composition or the like. Therefore, even if a color shift occurs due to a filter located outside the lens aperture, the measurement error of the depth information of the measurement target can be kept below the allowable value. Note that since the direction in which the filter 10 is arranged (the direction of the boundary line between the first filter area and the second filter area) is vertical, the effective area is a vertically elongated area with a certain width centered on the center of the screen. The effective area differs according to the arrangement direction of 10 . For example, since the filter 10 is arranged in the horizontal direction, the effective area is a horizontally long area with a constant width centered on the center of the screen.

図18の変形例として、ガイドライン124を表示する代わりに、有効領域のみをクリッピングした画像を表示しても良い。すなわち、図18の右側のガイドラインの右側及び左側のガイドラインの左側の画像の代わりに、一定の輝度、例えば黒の背景を表示しても良い。さらに、有効領域と非有効領域とで色、明度又はコントラストを変えて画像を表示しても良い。なお、画像の色、明度又はコントラストを変えて画像を表示する場合、有効領域と非有効領域とで二値的に変えることに限らず、信頼度に応じて連続的に変更しても良い。信頼度そのものは、図16を参照して説明したように、撮影画像の画素値(輝度)の断面プロファイルに基づいて求めることができる。例えば、R画素値とB画素値の差が大きい断面位置は色ずれがあり信頼度が低く、R画素値とB画素値の差が小さい断面位置は色ずれが無く信頼度が高いと判断できる。さらに、撮影画像の各画素を信頼度に応じて着色した信頼度マップを表示、保存しても良いし、画素毎の信頼度(数値)を画素に対応するテーブルの形で表示、保存しても良い。信頼度マップや信頼度テーブルは撮影画像とともに表示しても良い。
また、有効領域はディスプレイ60に映像として表示することによりユーザに提示してもよいし、あらかじめ有効領域やガイドライン124の位置が定まっていればディスプレイ60上に有効領域以外の映像がユーザに見えないように有効領域以外にシールを貼るなど物理的な手段で有効領域をユーザに提示してもよい。
As a modification of FIG. 18, instead of displaying the guideline 124, an image obtained by clipping only the effective area may be displayed. That is, instead of the images on the right side of the right guideline and on the left side of the left guideline in FIG. 18, a constant luminance, for example, a black background may be displayed. Furthermore, the image may be displayed by changing the color, brightness or contrast between the effective area and the non-effective area. When an image is displayed by changing the color, brightness, or contrast of the image, the effective area and the non-effective area are not limited to being binary-changed, and may be changed continuously according to the reliability. The reliability itself can be obtained based on the cross-sectional profile of the pixel values (brightness) of the captured image, as described with reference to FIG. For example, it can be determined that a cross-sectional position where the difference between the R pixel value and the B pixel value is large has a color shift and the reliability is low, and a cross-sectional position where the difference between the R pixel value and the B pixel value is small has no color shift and the reliability is high. . Furthermore, a reliability map in which each pixel of the captured image is colored according to the reliability may be displayed and saved, or the reliability (numerical value) of each pixel may be displayed and saved in the form of a table corresponding to the pixel. Also good. The reliability map and reliability table may be displayed together with the captured image.
The effective area may be presented to the user by displaying it as an image on the display 60, or if the effective area and the position of the guideline 124 are determined in advance, the user cannot see the image other than the effective area on the display 60. The effective area may be presented to the user by physical means such as putting a sticker on the area other than the effective area.

図19は、第1実施形態による信頼度に応じた情報の通知の一例を示すフローチャートである。ブロック152で、ユーザはデプス計算プログラム64bと有効領域通知プログラム64cを起動する。ブロック154で、ユーザはアタッチメント44をスマートフォン40のレンズ42の前面に装着する。デプス情報を求める測定対象が図18に示すように、エッジ方向が鉛直方向の物体の場合、ユーザは、第1鏡筒46のマーカ46aがスマートフォン40のLED40aに合うようにアタッチメント44の向きを決め、第2鏡筒48のマーカ48aがマーカ46aと揃うように第2鏡筒48の向きを決める。なお、測定対象のエッジ方向が水平方向の場合は、ユーザは、第1鏡筒46のマーカ46aがスマートフォン40のLED40aに合うようにアタッチメント44の向きを決めた後、第2鏡筒48のマーカ48aがマーカ46aと90度ずれるように第2鏡筒48の向きを決める。 FIG. 19 is a flowchart showing an example of notification of information according to reliability according to the first embodiment. At block 152, the user launches the depth calculation program 64b and the coverage area notification program 64c. At block 154 , the user attaches attachment 44 to the front of lens 42 of smartphone 40 . As shown in FIG. 18, when the object to be measured for which depth information is to be obtained is an object whose edge direction is vertical, the user determines the orientation of the attachment 44 so that the marker 46a of the first lens barrel 46 matches the LED 40a of the smartphone 40. , the orientation of the second lens barrel 48 is determined so that the marker 48a of the second lens barrel 48 is aligned with the marker 46a. When the edge direction of the object to be measured is horizontal, the user determines the orientation of the attachment 44 so that the marker 46 a of the first lens barrel 46 matches the LED 40 a of the smartphone 40 , and then the marker of the second lens barrel 48 . The orientation of the second barrel 48 is determined so that the marker 48a is 90 degrees off the marker 46a.

ブロック156で、ユーザは、カメラアプリケーションプログラム(図示しないが、不揮発性メモリ64内に格納されている)を起動する。カメラアプリケーションプログラムが起動されると、ブロック158で、ディスプレイ60はイメージセンサ54から出力されるスルー画像を表示する。 At block 156, the user launches a camera application program (not shown but stored in non-volatile memory 64). When the camera application program is started, at block 158 the display 60 displays a through image output from the image sensor 54 .

ブロック162で、ユーザは、タッチパッドを用いて撮影パラメータ(アタッチメント44の種類)を入力する。なお、撮影パラメータの入力はブロック158の実行後ではなく、ブロック164の実行までに行えば良い。例えば、ブロック152でデプス計算プログラム64bと有効領域通知プログラム64cが起動されると、設定画面が表示され、その段階で撮影パラメータが入力されても良い。なお、スマートフォン40固有の撮影パラメータであるレンズの明るさ、焦点距離及びイメージセンサのサイズはスマートフォン40に固有の値であり、ユーザの入力は不要としたが、これらもユーザが入力しても良い。 At block 162, the user enters imaging parameters (type of attachment 44) using the touchpad. It should be noted that the imaging parameters may be input before execution of block 164 rather than after execution of block 158 . For example, when the depth calculation program 64b and the effective area notification program 64c are activated in block 152, a setting screen may be displayed and the imaging parameters may be input at that stage. Note that the lens brightness, focal length, and image sensor size, which are photographing parameters specific to the smartphone 40, are values specific to the smartphone 40 and need not be input by the user, but these may also be input by the user. .

ブロック164で、有効領域決定部106は撮影パラメータに(場合によってはデプス要求レベルにも)基づいて有効領域を計算する(図15(a)の場合)、有効領域メモリ118から読み出す(図15(b)の場合)又は通信部62を介してサーバ94から取得する(図15(c)の場合)。ブロック166で、有効領域決定部106から有効情報の左右の端部の座標情報がディスプレイ60に供給され、図18に示すようにスルー画像上に有効領域の左右端を示す一対のガイドライン124が表示される。 At block 164, the effective area determination unit 106 calculates the effective area based on the imaging parameters (and possibly also the depth requirement level) (in the case of FIG. 15(a)) and reads it from the effective area memory 118 (FIG. 15 ( b)) or acquired from the server 94 via the communication unit 62 (in the case of FIG. 15(c)). At block 166, the coordinate information of the left and right ends of the effective information is supplied from the effective area determination unit 106 to the display 60, and a pair of guide lines 124 indicating the left and right ends of the effective area are displayed on the through image as shown in FIG. be done.

ブロック168で、有効領域決定部106は、画像解析して、スルー画像において背景と物体を識別する。背景はコントラストの無い一定の輝度値の領域であり、物体はコントラストがあり輝度値の差がある領域である。有効領域決定部106は、物体を認識すると、物体をデプス測定対象とする。また、画像認識技術や物体検出技術によって物体らしい領域を抽出してもよい。なお、デプス測定対象は画像解析を用いて自動的に認識することに限らず、ユーザがタッチパネル上で選択してもよい。 At block 168, the active area determiner 106 performs image analysis to identify background and objects in the through image. The background is a region of constant brightness value without contrast, and the object is a region with contrast and a difference in brightness value. Upon recognizing the object, the effective area determination unit 106 takes the object as a depth measurement target. Alternatively, an object-like region may be extracted by image recognition technology or object detection technology. Note that the depth measurement target is not limited to being automatically recognized using image analysis, and may be selected by the user on the touch panel.

ブロック172で、有効領域決定部106は、デプス測定対象が有効領域内に位置するか否かを判定する。デプス測定対象が有効領域内に位置しない場合(ブロック172のノーの判定)、ブロック174で、有効領域決定部106は、デプス測定対象を有効領域内に位置させるような撮影ガイダンスをユーザへ通知する。ガイダンスの例は、「より右」、「より左」等の構図を変えるようなテキストをディスプレイ60で表示することや、「より右」、「より左」等の構図を変えるような音声ガイドをオーディオ出力部68から出力することを含む。 At block 172, the effective area determination unit 106 determines whether or not the depth measurement target is located within the effective area. If the depth measurement target is not located within the effective area (NO determination in block 172), in block 174, the effective area determining unit 106 notifies the user of imaging guidance for positioning the depth measurement target within the effective area. . Examples of guidance include displaying on the display 60 a text that changes the composition, such as "more right" and "more left," and voice guidance that changes the composition, such as "more right" and "more left." Including outputting from the audio output section 68 .

ブロック168の画像解析の際、コントラストから被写体のエッジ方向も認識するようにし、ブロック172で、被写体のエッジ方向が水平方向である、すなわち被写体のエッジ方向とフィルタ52の領域分割線の方向とが交差すると判断した場合、ブロック174のガイダンスはフィルタ52の向きを90度回転させるような内容でも良い。
このようなガイドをユーザに通知することにより、ユーザはデプス測定対象を有効領域内に確実に位置させることができる、デプス測定対象が有効領域内に位置した後、ユーザはシャッタ操作を行う。そのため、ブロック176で、シャッタが押されたか否か判定される。シャッタが押されない場合、ブロック164からの処理が繰り返される。シャッタが押された場合、デプス測定対象が有効領域内に位置すると判断でき、ブロック178でデプス情報が画素毎に計算され、デプス情報が表示又は保存される。デプス情報は、画像の各画素を距離に応じて着色した距離画像として表示、保存しても良いし、画素毎のデプス情報(数値)を画素に対応するテーブルの形で表示、保存しても良い。
During the image analysis in block 168, the edge direction of the subject is also recognized from the contrast, and in block 172, the edge direction of the subject is horizontal. If so, the guidance in block 174 may be to rotate the orientation of the filter 52 by 90 degrees.
By notifying the user of such a guide, the user can reliably position the depth measurement object within the effective area. After the depth measurement object is positioned within the effective area, the user operates the shutter. Therefore, at block 176 it is determined whether the shutter has been pressed. If the shutter is not pressed, the process from block 164 is repeated. If the shutter is pressed, it can be determined that the depth measurement object is located within the active area, and depth information is calculated for each pixel at block 178 and the depth information is displayed or saved. The depth information may be displayed and saved as a distance image in which each pixel of the image is colored according to the distance, or the depth information (numerical value) for each pixel may be displayed and saved in the form of a table corresponding to the pixel. good.

さらに、距離画像に対応する撮影画像も保存することがあるが、撮影画像は色ずれが生じる場合があり、そのまま表示すると見苦しいことがある。色ずれの範囲は有効領域と対応しているので、有効領域を決めるための撮影パラメータに基づいて色ずれを補償して、色ずれの無い撮影画像とすることもできる。画素毎の信頼度が求められている場合は、信頼度に色ずれを補償することもできる。そのため、距離画像に対応する撮影画像を保存する場合は、色ずれを補償してから保存しても良い。 In addition, a photographed image corresponding to the distance image may also be stored, but the photographed image may have color shift, and may be unsightly if displayed as it is. Since the color shift range corresponds to the effective area, it is possible to compensate for the color shift based on the photographing parameters for determining the effective area and obtain a photographed image free of color shift. If a pixel-by-pixel reliability is desired, the reliability can also be compensated for color drift. Therefore, when storing a photographed image corresponding to a distance image, it may be stored after compensating for color deviation.

なお、デプス情報の計算はシャッタ操作に関わらず、有効領域の取得と並行してブロック164等でスルー画像の各フレームに対して行っても良い。この場合、ブロック168のデプス測定対象は画像解析によりコントラストに基づき認識するのではなく、デプス情報に基づいて認識しても良い。これは、デプス情報はある有限の距離までしか求めることができず、無限遠の物体のデプス情報は求めることができないからである。 The depth information may be calculated for each frame of the through image in block 164 or the like in parallel with acquisition of the effective area regardless of the shutter operation. In this case, the depth measurement object of block 168 may be recognized based on depth information rather than contrast by image analysis. This is because depth information can only be obtained up to a certain finite distance, and depth information of an object at infinite distance cannot be obtained.

第1実施形態によれば、複数の色成分に距離に応じて異なるぼけを生じさせるフィルタ52をスマートフォン40のレンズ42の前面に装着する。フィルタ52は少なくとも2つのフィルタ領域を有する。フィルタ52の設置方法やカメラ光学系の撮影パラメータによっては、レンズ開口の端部において、複数の色成分の光が均等に通過せず、いずれかの色成分の光が他の色成分の光よりも多く通過し、デプス推定に不必要な好ましくない色ずれ(色情報の偏り)が生じ、画面全体においてデプス情報を精度良く求めることができない場合がある。第1実施形態では、デプス情報を精度良く求めることができる有効領域がユーザに通知される。また、測定対象が有効領域内に位置しない場合、測定対象を有効領域内に位置させるためのガイダンスも通知される。このため、測定対象のデプス情報を精度良く求めることができるように撮影が行われることが期待される。第1実施形態によれば、カメラレンズを特注する必要又は市販のカメラレンズを改造する必要がなく、1台のカメラで簡単にデプス情報を求めることができる電子機器及び通知方法が提供される。 According to the first embodiment, the filter 52 that blurs a plurality of color components differently depending on the distance is attached to the front surface of the lens 42 of the smartphone 40 . Filter 52 has at least two filter regions. Depending on the installation method of the filter 52 and the photographing parameters of the camera optical system, the light of a plurality of color components does not pass uniformly at the end of the lens opening, and the light of one color component is more than the light of the other color components. In some cases, the depth information passes through many times, causing undesirable color shift (bias of color information) that is unnecessary for depth estimation, and depth information cannot be obtained with high accuracy for the entire screen. In the first embodiment, the user is notified of an effective region in which depth information can be obtained with high accuracy. Further, when the measurement target is not located within the effective area, guidance for positioning the measurement target within the effective area is also notified. For this reason, it is expected that the imaging will be performed so that the depth information of the object to be measured can be obtained with high accuracy. According to the first embodiment, there is provided an electronic device and a notification method that can easily obtain depth information with a single camera without the need to custom order a camera lens or modify a commercially available camera lens.

以下、他の実施形態を説明する。以下の説明で、第1実施形態と対応する構成要素は同一の参照数字を付して詳細な説明は省略する。
[第2実施形態]
図20は第2実施形態の電子機器の外観を示す。図20(a)は斜視図、図20(b)は断面構造を示す側面図である。第2実施形態の電子機器としてはカメラ202が利用できる。
Other embodiments will be described below. In the following description, constituent elements corresponding to those of the first embodiment are denoted by the same reference numerals, and detailed descriptions thereof are omitted.
[Second embodiment]
FIG. 20 shows the appearance of the electronic device of the second embodiment. FIG. 20(a) is a perspective view, and FIG. 20(b) is a side view showing a cross-sectional structure. A camera 202 can be used as the electronic device of the second embodiment.

カメラ202のレンズ204の先端のフィルタ取り付け用のネジに第1鏡筒206がねじこまれている。あるいは、第1鏡筒206はレンズ204の先端にバヨネット式の固定手段で取り付けられても良い。第1鏡筒206の内側に第2鏡筒208が挿入される。第2鏡筒208の先端にフィルタ212が配置される。フィルタ212は第1実施形態のフィルタ52と同様にイエローの第1フィルタ領域212aとシアンの第2フィルタ領域212bからなる。ユーザが第2鏡筒208に対して回転力を与えると、第2鏡筒208は第1鏡筒206に対して回転される。これにより、フィルタ212の向き(第1フィルタ領域212aと第2フィルタ領域212bによる領域分割線の向き)が調整可能である。ユーザが回転力を与えないと、第2鏡筒208は第1鏡筒206に対して静止している。なお、イモネジ(図示しない)等を第1鏡筒206に設け、フィルタ212の向きが調整された後は、第2鏡筒208の回転を抑止しても良い。 A first lens barrel 206 is screwed into a screw for attaching a filter at the tip of the lens 204 of the camera 202 . Alternatively, the first lens barrel 206 may be attached to the tip of the lens 204 by bayonet-type fixing means. A second lens barrel 208 is inserted inside the first lens barrel 206 . A filter 212 is arranged at the tip of the second lens barrel 208 . Similar to the filter 52 of the first embodiment, the filter 212 consists of a yellow first filter area 212a and a cyan second filter area 212b. When the user applies a rotational force to the second barrel 208 , the second barrel 208 is rotated with respect to the first barrel 206 . Thereby, the orientation of the filter 212 (the orientation of the area dividing line by the first filter area 212a and the second filter area 212b) can be adjusted. The second barrel 208 remains stationary with respect to the first barrel 206 when the user does not apply a rotational force. A set screw (not shown) or the like may be provided on the first lens barrel 206 to prevent rotation of the second lens barrel 208 after the orientation of the filter 212 is adjusted.

第2鏡筒208は第1鏡筒206の内側に設けたが、第1鏡筒206の外側に設けても良い。
また、被写体のエッジ方向がフィルタ212の領域分割線と異なる方向の場合、カメラ202自体を回転して領域分割線の方向がエッジ方向と揃うように回転しても良い。この場合、フィルタ212は回転できなくても良いので、第2鏡筒208は不要で、第1鏡筒206にフィルタ212が設けられても良い。
Although the second lens barrel 208 is provided inside the first lens barrel 206 , it may be provided outside the first lens barrel 206 .
Also, if the edge direction of the object is different from the direction of the area dividing line of the filter 212, the camera 202 itself may be rotated so that the direction of the area dividing line is aligned with the edge direction. In this case, since the filter 212 does not have to be rotatable, the second lens barrel 208 is unnecessary and the filter 212 may be provided on the first lens barrel 206 .

カメラ202の電気的構成は第1実施形態のスマートフォン40の電気的構成の一例とほぼ同じであるが、デプス計算プログラム64bと有効領域通知プログラム64cがインストールされていない点が図7と異なる。デプス計算プログラムと有効領域通知プログラムは第2の機器に備えられる。 The electrical configuration of the camera 202 is almost the same as an example of the electrical configuration of the smartphone 40 of the first embodiment, but differs from FIG. 7 in that the depth calculation program 64b and effective area notification program 64c are not installed. The depth calculation program and coverage area notification program are provided on the second device.

第2の機器はサーバ94でも良いし、カメラ202の所有者の所有するパーソナルコンピュータでも良い。図21は、デプス計算プログラムと有効領域通知プログラムを備えるパーソナルコンピュータ230とカメラ202との連携の一例を示す。カメラ202の撮影画像(静止画像)はメモリカードスロット220内のメモリカード222に保存される。カメラ202のメモリカードスロット220から取り出されたメモリカード222がパーソナルコンピュータ230のメモリカードスロット232に挿入される。パーソナルコンピュータ230はメモリカードスロット232内のメモリカード222から画像を読み出す。これにより、カメラ202のイメージセンサ214で撮像した画像がパーソナルコンピュータ230に送られる。なお、カメラ202が通信機能を備えている場合は、メモリカード222を介する必要はなく、カメラ202のイメージセンサ214で撮像した画像がパーソナルコンピュータ230に通信される。 The second device may be server 94 or a personal computer owned by the owner of camera 202 . FIG. 21 shows an example of cooperation between a personal computer 230 having a depth calculation program and an effective area notification program and the camera 202 . Images (still images) captured by the camera 202 are stored in the memory card 222 in the memory card slot 220 . A memory card 222 removed from the memory card slot 220 of the camera 202 is inserted into a memory card slot 232 of the personal computer 230 . The personal computer 230 reads images from the memory card 222 in the memory card slot 232 . Accordingly, an image captured by the image sensor 214 of the camera 202 is sent to the personal computer 230 . If the camera 202 has a communication function, the image captured by the image sensor 214 of the camera 202 is communicated to the personal computer 230 without using the memory card 222 .

パーソナルコンピュータ230は、第1実施形態のスマートフォン40と同様にデプス計算、有効領域通知処理を行う。
図22は、第21実施形態による信頼度に応じた情報の通知の一例を示すフローチャートである。図22のフローチャートは、カメラ202の撮影画像が保存されたメモリカード222がパーソナルコンピュータ230のメモリカードスロット232に挿入された状態で開始されるとする。
The personal computer 230 performs depth calculation and effective area notification processing in the same manner as the smart phone 40 of the first embodiment.
FIG. 22 is a flow chart showing an example of notification of information according to reliability according to the twenty-first embodiment. The flowchart of FIG. 22 is started with the memory card 222 storing the captured images of the camera 202 inserted into the memory card slot 232 of the personal computer 230 .

ブロック302で、ユーザはパーソナルコンピュータ230でデプス計算プログラムと有効領域通知プログラムを起動する。ブロック304で、パーソナルコンピュータ230はメモリカード222から画像を読み出す。
ブロック306で、ユーザは撮影パラメータとデプス要求レベルを入力する。なお、デプス要求レベルの入力を必要としない場合もある。さらに、カメラ202が撮影パラメータを画像とともに記録する機能を有する場合は、画像とともに撮影パラメータがパーソナルコンピュータ230に読み込まれるので、ユーザの入力は不要である。
At block 302 , the user launches the depth calculation program and coverage area notification program on personal computer 230 . At block 304 , personal computer 230 reads an image from memory card 222 .
At block 306, the user enters imaging parameters and depth requirement levels. In some cases, it is not necessary to input the depth request level. Furthermore, if the camera 202 has a function of recording the shooting parameters along with the image, the shooting parameters are read into the personal computer 230 along with the image, so no user input is required.

ブロック308で、パーソナルコンピュータ230は画像を表示する。数フレームの画像の一覧を表示しても良いし、1フレームずつ切り替えて表示しても良い。ブロック312でユーザはデプス計算する画像フレームを選択する。
ブロック314で、パーソナルコンピュータ230は、有効領域通知プログラムにより有効領域を決定する。パーソナルコンピュータ230は、第1実施形態と同様に、撮影パラメータに基づいて有効領域を計算しても良いし、パーソナルコンピュータ230が備える有効領域メモリから撮影パラメータに基づいて有効領域情報を読み出しても良いし、通信部を介してさらに他の機器、例えばサーバ94から有効領域情報を取得しても良い。
At block 308, the personal computer 230 displays the image. A list of images of several frames may be displayed, or the images may be displayed by switching one frame at a time. At block 312, the user selects an image frame for depth calculation.
At block 314, the personal computer 230 determines the effective area with the effective area notification program. As in the first embodiment, the personal computer 230 may calculate the effective area based on the imaging parameters, or may read effective area information from the effective area memory provided in the personal computer 230 based on the imaging parameters. However, the effective area information may be obtained from another device such as the server 94 via the communication unit.

ブロック316で、パーソナルコンピュータ230は、第1実施形態と同様に、図18に示すように、選択されたフレーム画像をディスプレイ236で表示するとともに、有効領域の左右端を示す一対のガイドライン124を表示する。
ブロック318で、パーソナルコンピュータ230は、画像解析によりコントラストの無い一定の輝度値の領域である背景とコントラストがあり輝度値の差がある領域である物体を識別し、物体をデプス測定対象として認識する。なお、デプス測定対象は画像解析によりコントラストに基づき認識するのではなく、ユーザがタッチパネル上で選択してもよい。
At block 316, the personal computer 230 displays the selected frame image on the display 236 and a pair of guidelines 124 indicating the left and right edges of the effective area, as shown in FIG. 18, as in the first embodiment. do.
In block 318, the personal computer 230 identifies the background, which is an area with a constant luminance value without contrast, and the object, which is an area with contrast and a difference in luminance value, through image analysis, and recognizes the object as a depth measurement target. . Note that the depth measurement target may be selected by the user on the touch panel instead of being recognized based on contrast by image analysis.

ブロック322で、パーソナルコンピュータ230は、デプス測定対象が有効領域内に位置するか否かを判定する。デプス測定対象が有効領域内に位置しない場合(ブロック312のノーの判定)、ブロック324で、当該フレームはデプス情報を測定できない旨のアラートを通知する。アラートは再撮影を促すものでも良い。アラートはディスプレイ236で表示しても良いし、図示しないオーディオ出力部から音声として出力しても良い。さらに、アラートをフレーム画像に対応付けて保存しても良い。こうすることにより、ブロック212でデプス情報を計算するフレームを選ぶ場合、測定対象が有効領域外に位置することを一度判定したフレームを再度選択する無駄を省くことができる。また、デプス測定対象が有効領域のどちら側の領域外に位置するかもアラート情報として画像とともに保存しておくと、撮影し直す際、アラートが保存されているフレームをカメラ202で表示しアラートも出力することにより、構図を決める際のガイドとすることもできる。 At block 322, personal computer 230 determines whether the depth measurement target is located within the effective area. If the depth measurement target is not located within the valid area (NO determination at block 312), block 324 provides an alert that depth information cannot be measured for the frame. The alert may be one that prompts re-shooting. The alert may be displayed on the display 236, or may be output as a voice from an audio output section (not shown). Furthermore, the alert may be stored in association with the frame image. By doing so, when selecting frames for which depth information is to be calculated in block 212, it is possible to eliminate wasteful selection of frames once it has been determined that the measurement target is located outside the effective area. In addition, if information on which side of the effective area the depth measurement target is located outside of the effective area is stored together with the image as alert information, the frame in which the alert is stored is displayed by the camera 202 and the alert is also output when re-capturing. By doing so, it can also be used as a guide when deciding the composition.

その後、ブロック326で、パーソナルコンピュータ230は、別のフレームが選択されたか否かを判定する。別のフレームが選択されない場合は、動作を終了する。別のフレームが選択された場合、パーソナルコンピュータ230は、ブロック208以降のブロックの処理を再度実行する。 Thereafter, at block 326, personal computer 230 determines whether another frame has been selected. If another frame is not selected, the operation ends. If another frame is selected, personal computer 230 executes the processing of blocks after block 208 again.

デプス測定対象が有効領域内に位置する場合(ブロック312のイエスの判定)、ブロック328で、パーソナルコンピュータ230は、デプス計算プログラムにより、デプス情報を画素毎に計算し、デプス情報を表示又は保存する。第1実施形態と同様に、デプス情報は、画像の各画素を距離に応じて着色した距離画像でも良いし、画素毎のデプス情報(数値)を画素に対応するテーブルの形でも良い。 If the depth measurement object is located within the effective area (determination of YES at block 312), at block 328 the personal computer 230 calculates depth information for each pixel according to the depth calculation program and displays or stores the depth information. . As in the first embodiment, the depth information may be a distance image in which each pixel of the image is colored according to the distance, or may be in the form of a table in which the depth information (numerical value) for each pixel corresponds to the pixel.

第2実施形態によれば、第1実施形態の効果に加えて、電子機器であるカメラ202にはデプス計算プログラムと有効領域通知プログラムをインストールする必要が無い効果がある。これらのプログラムは、カメラの画像が転送される第2の電子機器、例えばサーバやパーソナルコンピュータに備えられれば良く、個々のカメラで処理するよりも高速でデプス計算、有効領域通知をすることができる。 According to the second embodiment, in addition to the effects of the first embodiment, there is an effect that it is not necessary to install the depth calculation program and the effective area notification program in the camera 202 which is an electronic device. These programs need only be installed in a second electronic device, such as a server or a personal computer, to which camera images are transferred, and can perform depth calculation and effective area notification at a higher speed than processing by individual cameras. .

[応用例]
次に、デプス情報を求める電子機器の応用例を説明する。
実施形態の電子機器は、カメラで撮影している空間への侵入物を検出して、警報を発する監視システムに応用することができる。監視システムでは、例えば、店舗、駐車場等における人や車の流れ等が把握され、特定エリアへの人物の侵入が監視される。また、自動ドアの前に人物が移動してくることが検出されると、ドアが開けられるようにしても良い。
[Application example]
Next, an application example of an electronic device that obtains depth information will be described.
The electronic device of the embodiment can be applied to a monitoring system that detects an intruder in a space captured by a camera and issues an alarm. In a monitoring system, for example, the flow of people and cars in a store, a parking lot, etc. is grasped, and the intrusion of a person into a specific area is monitored. Further, when it is detected that a person moves in front of the automatic door, the door may be opened.

実施形態の電子機器は、移動体制御システムにも応用することができる。このシステムでは、移動体、例えば、移動ロボット(Automated Guided Vehicle)や掃除ロボット、コミュニケーションロボットなど自律的に移動するロボット、自動車を含む車両、ドローンや飛行機などの飛翔体及び船舶等の進行方向の被写体が撮像され、加速、減速、停止、衝突回避、方向転換、及びエアバック等の安全装置の作動等が制御される。このシステムは、自動車の前方を撮像するいわゆるフロントカメラや、バック時に後方を撮像するいわゆるリアカメラも含む。さらに、静止しているロボットアームの先端等にカメラが設置され、ロボットアームの物体把持が制御されるようにしても良い。 The electronic device of the embodiment can also be applied to a mobile body control system. In this system, moving objects such as autonomously moving robots such as mobile robots (Automated Guided Vehicles), cleaning robots, and communication robots, vehicles including automobiles, flying objects such as drones and airplanes, and moving objects such as ships is imaged, and acceleration, deceleration, stopping, collision avoidance, turning, and operation of safety devices such as airbags are controlled. This system also includes a so-called front camera that images the front of the automobile and a so-called rear camera that images the rear when backing up. Furthermore, a camera may be installed at the tip of a stationary robot arm or the like to control the gripping of an object by the robot arm.

ドローンに応用される場合、上空からのひび割れや電線破断等の点検時に、カメラで点検対象が撮影され、点検対象との距離が検出され、あるいは点検対象が基準距離よりも手前にあるか、それとも奥にあるかが判定される。この検出結果または判定結果に基づいて、点検対象との距離が一定になるようにドローンの推力が制御される。これにより、ドローンを点検対象に並行して飛行させることができる。 When applied to drones, when inspecting cracks, broken wires, etc. from the sky, the inspection target is photographed with a camera and the distance to the inspection target is detected. It is determined whether it is inside. Based on this detection result or determination result, the thrust of the drone is controlled so that the distance to the inspection target is constant. This allows the drone to fly parallel to the inspection target.

また、ドローンの飛行時に、カメラで地面方向が撮影され、地面からのドローンまでの高さが検出され、あるいは地面からの高さが基準距離よりも手前にあるか、それとも奥にあるかが判定される。この検出結果または判定結果に基づいて、地面からの高さが指定された高さになるようにドローンの推力を制御される。これにより、ドローンを指定された高さで飛行させることができる。 Also, when the drone is flying, the camera captures the direction of the ground, detects the height from the ground to the drone, or determines whether the height from the ground is in front of or behind the reference distance. be done. Based on this detection result or determination result, the thrust of the drone is controlled so that the height from the ground becomes the specified height. This allows the drone to fly at a specified height.

なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組み合せてもよい。 It should be noted that the present invention is not limited to the above-described embodiments as they are, and can be embodied by modifying constituent elements without departing from the scope of the present invention at the implementation stage. Also, various inventions can be formed by appropriate combinations of the plurality of constituent elements disclosed in the above embodiments. For example, some components may be omitted from all components shown in the embodiments. Furthermore, constituent elements of different embodiments may be combined as appropriate.

42…レンズ、52…フィルタ、54…イメージセンサ、60…ディスプレイ、62…通信部、64b…デプス計算プログラム、64c…有効領域通知プログラム。 42... Lens, 52... Filter, 54... Image sensor, 60... Display, 62... Communication unit, 64b... Depth calculation program, 64c... Effective area notification program.

Claims (14)

第1波長域を透過する第1領域と第2波長域を透過する第2領域とを有するフィルタを含むカメラによる撮影画像であって、前記第1領域を透過した前記第1波長域に基づく第1色成分画像と前記第2領域を透過した前記第2波長域に基づく第2色成分画像とを含む撮影画像を入力する入力手段と、
前記撮影画像を、前記第1色成分画像と前記第2色成分画像における色情報の偏りに基づくデプス情報の計算に対する有効領域が識別される状態で出力する処理手段と、を具備し、
前記処理手段は、複数の撮影パラメータの中の少なくとも1つの撮影パラメータである前記カメラのレンズの開口と前記フィルタとの距離に基づいて前記有効領域を取得または計算する、電子機器。
An image captured by a camera including a filter having a first region that transmits a first wavelength band and a second region that transmits a second wavelength band, wherein the second wavelength band is transmitted through the first region. input means for inputting a photographed image including a one-color component image and a second color component image based on the second wavelength band transmitted through the second region;
a processing means for outputting the photographed image in a state in which an effective area for depth information calculation based on bias of color information in the first color component image and the second color component image is identified,
The electronic device, wherein the processing means acquires or calculates the effective area based on a distance between an aperture of a lens of the camera and the filter, which is at least one shooting parameter among a plurality of shooting parameters.
前記デプス情報は、前記第1色成分画像のぼけの形状と前記第2色成分画像のぼけの形状に基づき求められる請求項1記載の電子機器。 2. The electronic device according to claim 1, wherein said depth information is obtained based on a shape of blur of said first color component image and a shape of blur of said second color component image. 前記処理手段は、前記複数の撮影パラメータの中の少なくとも1つの撮影パラメータである前記カメラのレンズの開口と前記フィルタとの距離を含む有効領域取得要求を外部機器に送信し、前記少なくとも1つの撮影パラメータに応じた前記有効領域を前記外部機器から受信する請求項1記載の電子機器。 The processing means transmits to an external device an effective area acquisition request including a distance between the aperture of the lens of the camera and the filter, which is at least one of the plurality of imaging parameters, and performs the at least one imaging. 2. The electronic device according to claim 1, wherein said effective area according to a parameter is received from said external device. 前記複数の撮影パラメータの中の少なくとも1つの撮影パラメータである前記カメラのレンズの開口と前記フィルタとの距離に基づいて前記カメラの光学的特性分布をシミュレーションした結果から求められた前記有効領域を記憶するメモリをさらに具備する請求項1記載の電子機器。 storing the effective area obtained from the result of simulating the optical characteristic distribution of the camera based on the distance between the aperture of the lens of the camera and the filter, which is at least one of the plurality of shooting parameters; 2. The electronic device according to claim 1, further comprising a memory for 前記複数の撮影パラメータは、更に前記カメラのセンササイズ、前記レンズの焦点距離又は前記レンズの明るさを含む請求項1乃至4のいずれか一項記載の電子機器。 5. The electronic device according to any one of claims 1 to 4, wherein said plurality of shooting parameters further include a sensor size of said camera, a focal length of said lens, or a brightness of said lens. 前記フィルタは、前記カメラのレンズの先端または先端よりも被写体側に配置、または前記レンズの後端または後端よりもイメージセンサ側に配置される請求項1乃至請求項5のいずれか一項記載の電子機器。 6. The filter according to any one of claims 1 to 5, wherein the filter is arranged at the front end of the lens of the camera or closer to the subject than the front end, or arranged at the rear end of the lens or closer to the image sensor than the rear end. electronics. 前記処理手段は、前記撮影画像の中のデプス情報を求める物体が指定されると、前記物体のエッジ成分の方向を検出し、検出した前記エッジ成分の方向に応じた情報を出力する請求項6記載の電子機器。 7. When an object for which depth information is to be obtained in the photographed image is specified, the processing means detects the direction of the edge component of the object and outputs information corresponding to the direction of the detected edge component. Electronics as described. 前記処理手段は、前記撮影画像の中のデプス情報を求める測定対象が前記有効領域内に位置するように撮影するためのガイダンスを音声、テキスト、映像の少なくともいずれかによって出力する請求項1記載の電子機器。 2. The processing means according to claim 1, wherein said processing means outputs guidance for photographing such that an object to be measured for which depth information is to be obtained in said photographed image is positioned within said effective area by at least one of voice, text, and video. Electronics. 表示部で表示されている前記撮影画像の中のデプス情報を求める測定対象をユーザ操作、前記有効領域内のデプス情報の分布、前記撮影画像からの物体認識のいずれかにより特定する特定手段をさらに具備する請求項1記載の電子機器。 further specifying means for specifying an object to be measured for obtaining depth information in the photographed image displayed on the display unit by user operation, distribution of depth information within the effective area, or object recognition from the photographed image; The electronic device of claim 1, comprising: 前記処理手段は、前記撮影画像の中のデプス情報を求める測定対象が前記有効領域内にないことを判定すると、再撮影をすることを推奨するガイダンスを出力する請求項1記載の電子機器。 2. The electronic device according to claim 1, wherein said processing means outputs guidance recommending re-imaging when determining that a measurement target for which depth information is to be obtained in said photographed image is not within said effective area. 前記処理手段は、表示部で表示される前記撮影画像上に前記有効領域を示すガイドラインを色、明度、コントラストの少なくともいずれかによって表現する請求項1記載の電子機器。 2. The electronic device according to claim 1, wherein said processing means expresses a guideline indicating said effective area on said photographed image displayed on said display unit by at least one of color, brightness and contrast. 前記処理手段により出力された前記撮影画像を表示する表示部をさらに具備し、
前記処理手段は、前記有効領域に応じて前記撮影画像の色ずれを補償し、補償後の撮影画像を前記表示部で表示させる請求項1記載の電子機器。
further comprising a display unit for displaying the captured image output by the processing means;
2. The electronic device according to claim 1, wherein said processing means compensates for color shift of said photographed image according to said effective area, and causes said display unit to display the photographed image after compensation.
前記処理手段により出力された前記撮影画像を表示する表示部をさらに具備し、
前記処理手段は、前記撮影画像とともに前記有効領域および前記有効領域を求めるために利用したデプス推定に関する信頼度の少なくともいずれかを前記表示部で表示させる請求項1記載の電子機器。
further comprising a display unit for displaying the captured image output by the processing means;
2. The electronic device according to claim 1, wherein the processing means causes the display unit to display at least one of the effective area and the reliability of depth estimation used to obtain the effective area together with the captured image.
第1波長域を透過する第1領域と第2波長域を透過する第2領域とを有するフィルタを含むカメラによる撮影画像であって、前記第1領域を透過した第1波長域に基づく第1色成分画像と前記第2領域を透過した第2波長域に基づく第2色成分画像とを含む撮影画像を入力することと、
前記撮影画像を、複数の撮影パラメータの中の少なくとも1つの撮影パラメータである前記カメラのレンズの開口と前記フィルタとの距離に基づいて、前記第1色成分画像と前記第2色成分画像における色情報の偏りに基づくデプス情報の計算に対する有効領域が識別される状態で出力すること、
を具備する通知方法。
An image taken by a camera including a filter having a first region that transmits a first wavelength band and a second region that transmits a second wavelength band, the first image based on the first wavelength band transmitted through the first region inputting a photographed image including a color component image and a second color component image based on a second wavelength band transmitted through the second region;
color in the first color component image and the second color component image based on the distance between the aperture of the lens of the camera and the filter, which is at least one shooting parameter among a plurality of shooting parameters; Outputting in a state in which an effective area for calculation of depth information based on information bias is identified;
A notification method comprising:
JP2021192953A 2018-09-18 2021-11-29 Electronic devices and notification methods Active JP7263493B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021192953A JP7263493B2 (en) 2018-09-18 2021-11-29 Electronic devices and notification methods

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018174037A JP7021036B2 (en) 2018-09-18 2018-09-18 Electronic devices and notification methods
JP2021192953A JP7263493B2 (en) 2018-09-18 2021-11-29 Electronic devices and notification methods

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2018174037A Division JP7021036B2 (en) 2018-09-18 2018-09-18 Electronic devices and notification methods

Publications (2)

Publication Number Publication Date
JP2022031300A JP2022031300A (en) 2022-02-18
JP7263493B2 true JP7263493B2 (en) 2023-04-24

Family

ID=87884719

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021192953A Active JP7263493B2 (en) 2018-09-18 2021-11-29 Electronic devices and notification methods

Country Status (1)

Country Link
JP (1) JP7263493B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016102733A (en) 2014-11-28 2016-06-02 株式会社東芝 Lens and image capturing device
JP2018077190A (en) 2016-11-11 2018-05-17 株式会社東芝 Imaging apparatus and automatic control system
JP2018084571A (en) 2016-11-11 2018-05-31 株式会社東芝 Processing device, imaging device, and automatic control system
JP7021036B2 (en) 2018-09-18 2022-02-16 株式会社東芝 Electronic devices and notification methods

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016102733A (en) 2014-11-28 2016-06-02 株式会社東芝 Lens and image capturing device
JP2018077190A (en) 2016-11-11 2018-05-17 株式会社東芝 Imaging apparatus and automatic control system
JP2018084571A (en) 2016-11-11 2018-05-31 株式会社東芝 Processing device, imaging device, and automatic control system
JP7021036B2 (en) 2018-09-18 2022-02-16 株式会社東芝 Electronic devices and notification methods

Also Published As

Publication number Publication date
JP2022031300A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
CN107079087B (en) Imaging device and object recognition method
JP6860433B2 (en) Processing equipment, processing systems, methods and programs
JP2018077190A (en) Imaging apparatus and automatic control system
JP6699898B2 (en) Processing device, imaging device, and automatic control system
KR20180101466A (en) Depth information acquisition method and apparatus, and image acquisition device
CN107005627B (en) Image pickup apparatus, image pickup method, and recording medium
US9819853B2 (en) Imaging device and focusing control method
US20180270413A1 (en) Processing apparatus and processing system
JP7021036B2 (en) Electronic devices and notification methods
US20130169837A1 (en) Device having image reconstructing function, method, and recording medium
EP3223508B1 (en) Imaging device, imaging method, and image processing program
KR20230009412A (en) Electronic Devices and Imaging Devices
US10694130B2 (en) Imaging element and imaging device
CN107005626B (en) Image pickup apparatus and control method thereof
GB2537886A (en) An image acquisition technique
TW201722145A (en) 3D video surveillance system capable of automatic camera dispatching function, and surveillance method for using the same
US20230033956A1 (en) Estimating depth based on iris size
JP7263493B2 (en) Electronic devices and notification methods
JP5514062B2 (en) Electronic device, imaging screen display method with information, and program
US20170257581A1 (en) Imaging device, imaging method, and image processing program
KR102173315B1 (en) Multi-camera calibration method for generating around view monitoring
CN113395438A (en) Image correction method and related device for eyeball tracking technology
WO2015141185A1 (en) Imaging control device, imaging control method, and storage medium
EP3349201B1 (en) Parking assist method and vehicle parking assist system
US20170155821A1 (en) Imaging device and imaging method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211129

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220922

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221004

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221118

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230412

R151 Written notification of patent or utility model registration

Ref document number: 7263493

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151