JP2017163412A - Image processing system, its control method, imaging apparatus, and program - Google Patents

Image processing system, its control method, imaging apparatus, and program Download PDF

Info

Publication number
JP2017163412A
JP2017163412A JP2016047321A JP2016047321A JP2017163412A JP 2017163412 A JP2017163412 A JP 2017163412A JP 2016047321 A JP2016047321 A JP 2016047321A JP 2016047321 A JP2016047321 A JP 2016047321A JP 2017163412 A JP2017163412 A JP 2017163412A
Authority
JP
Japan
Prior art keywords
image
display
images
subject
image processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2016047321A
Other languages
Japanese (ja)
Other versions
JP6639276B2 (en
Inventor
文貴 中山
Fumitaka Nakayama
文貴 中山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2016047321A priority Critical patent/JP6639276B2/en
Publication of JP2017163412A publication Critical patent/JP2017163412A/en
Application granted granted Critical
Publication of JP6639276B2 publication Critical patent/JP6639276B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Exposure Control For Cameras (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To form an image focused on a subject by processing, according to the display capability of a display device, an image of the subject photographed at different focusing positions or diaphragm values.SOLUTION: An image processing system (digital camera 100) comprises an imaging section 102 that acquires a plurality of images relating to a subject photographed at different focusing positions and diaphragm values. A control section 106 forms a focus image focused on the entire subject by controlling an image processing section 103 through combining or selecting images corresponding to a display resolution and display screen size of a display section 109. When performing a process of combining a plurality of images, the control section 106 determines a combination ratio of each image. When a plurality of images of different diaphragm values are used, the control section 106 calculates a diaphragm value at which the range of distance of a main subject in the direction of depth lies within the depth of the subject, and selects an image photographed at the diaphragm value. The image processing section 103 creates image data for display. The communication section 108 transmits image data for display to the display section 109.SELECTED DRAWING: Figure 1

Description

本発明は、異なる合焦位置または絞り値で撮影された複数の画像から被写体全体に合焦した画像を生成する画像処理技術に関する。   The present invention relates to an image processing technique for generating an image focused on an entire subject from a plurality of images taken at different focus positions or aperture values.

デジタルカメラで近距離にある被写体を撮影する場合、被写界深度が浅くなると、被写体全体に合焦している画像を取得することが難しいという課題がある。そこで、被写体の合焦位置を変えて撮影した複数の画像を合成し、被写体全体に合焦している画像を生成する技術が特許文献1および特許文献2に開示されている。   When photographing a subject at a short distance with a digital camera, there is a problem that when the depth of field becomes shallow, it is difficult to acquire an image focused on the entire subject. Therefore, Patent Literature 1 and Patent Literature 2 disclose a technique in which a plurality of images captured by changing the focus position of a subject are combined to generate an image focused on the entire subject.

特開2014−17539号公報JP 2014-17539 A 特開2013−21407号公報JP 2013-21407 A 特開2008−15754号公報JP 2008-15754 A 特開2007−110638号公報JP 2007-110638 A

ところで、ユーザが上記技術を用いて生成された画像を視聴する環境は様々である。特定の表示装置の画面上で被写体全体に焦点が合っているように見える画像でも、別の表示装置の画面上では被写体の一部に焦点が合っていないという状況が起こりうる。一例として、デジタルカメラのEVF(電子ビューファインダ)やスマートフォン等の小型モニタでユーザが画像を視聴した場合、被写体全体に合焦しているように見える。しかし、ユーザがPC(パーソナルコンピュータ)のモニタや大画面テレビ等の大型モニタで画像を視聴した場合、被写体の一部が合焦していないことがある。   By the way, there are various environments in which a user views an image generated using the above technique. Even an image that appears to be in focus on the entire subject on the screen of a particular display device may cause a situation where some of the subject is not in focus on the screen of another display device. As an example, when a user views an image on a small monitor such as an EVF (electronic viewfinder) of a digital camera or a smartphone, it appears that the entire subject is in focus. However, when a user views an image on a large monitor such as a PC (personal computer) monitor or a large screen television, a part of the subject may not be in focus.

本発明の目的は、異なる合焦位置または絞り値で撮影された被写体の画像を、表示装置の表示能力に応じて処理して、被写体に焦点を合わせた画像を生成する画像処理装置およびその制御方法を提供することである。   An object of the present invention is to process an image of a subject photographed at different in-focus positions or aperture values according to the display capability of the display device, and generate an image focused on the subject, and control thereof Is to provide a method.

本発明の一実施形態に係る装置は、異なる合焦位置または絞り値で撮影された被写体に係る複数の画像を処理して前記被写体に焦点を合わせた合焦画像を生成する画像処理装置であって、前記複数の画像を取得する取得手段と、前記複数の画像から表示用の画像を生成する制御を行う制御手段と、前記制御手段の指示にしたがって前記表示用の画像を生成する生成手段と、前記生成手段により生成された前記表示用の画像を表示手段に出力する出力手段と、を有する。前記制御手段は、表示解像度または表示画面サイズが異なる前記表示手段ごとに前記複数の画像を合成した画像または前記複数の画像から選択した画像にしたがって前記生成手段により前記合焦画像を生成する制御を行う。   An apparatus according to an embodiment of the present invention is an image processing apparatus that processes a plurality of images related to a subject photographed at different focus positions or aperture values and generates a focused image focused on the subject. Acquisition means for acquiring the plurality of images, control means for performing control for generating a display image from the plurality of images, and generation means for generating the display image in accordance with instructions from the control means; Output means for outputting the display image generated by the generating means to the display means. The control means controls the generation means to generate the focused image according to an image obtained by combining the plurality of images or an image selected from the plurality of images for each of the display means having different display resolutions or display screen sizes. Do.

本発明によれば、異なる合焦位置または絞り値で撮影された被写体の画像を、表示装置の表示能力に応じて処理して、被写体に焦点を合わせた画像を生成する画像処理装置およびその制御方法を提供することができる。   According to the present invention, an image processing apparatus that processes images of a subject photographed at different in-focus positions or aperture values according to the display capability of the display device to generate an image focused on the subject, and control thereof A method can be provided.

本発明の第1実施形態に係る画像処理装置の構成図である。1 is a configuration diagram of an image processing apparatus according to a first embodiment of the present invention. 第1実施形態の処理を説明するフローチャートである。It is a flowchart explaining the process of 1st Embodiment. 第1実施形態における撮影被写体の構図を説明する図である。It is a figure explaining the composition of the photography subject in a 1st embodiment. 第1実施形態における各画像に対する合成比率を説明する図である。It is a figure explaining the synthetic | combination ratio with respect to each image in 1st Embodiment. 第1実施形態における合成比率の計算方法を説明する図である。It is a figure explaining the calculation method of the synthetic | combination ratio in 1st Embodiment. 第2実施形態の処理を説明するフローチャートである。It is a flowchart explaining the process of 2nd Embodiment. 第3実施形態に係るシステムの構成図である。It is a block diagram of the system which concerns on 3rd Embodiment. 第3実施形態の処理を説明するフローチャートである。It is a flowchart explaining the process of 3rd Embodiment. 第3実施形態における画像拡大を説明する図である。It is a figure explaining the image expansion in 3rd Embodiment. 解像度について具体例を説明する図である。It is a figure explaining a specific example about resolution. 主被写体距離情報の算出を説明する図である。It is a figure explaining calculation of main subject distance information.

以下、本発明の好適な実施形態について、図面を参照して説明する。なお、以下に説明する各実施形態では、画像処理装置をデジタルカメラに適用した例において、異なる合焦位置または絞り値で撮影した画像を用いて被写体全体に合焦した画像を生成する。生成された画像は、表示能力の異なる複数の表示装置に出力可能である。   Preferred embodiments of the present invention will be described below with reference to the drawings. In each embodiment described below, in an example in which the image processing apparatus is applied to a digital camera, an image focused on the entire subject is generated using images captured at different focus positions or aperture values. The generated image can be output to a plurality of display devices having different display capabilities.

[第1実施形態]
図1は、本発明の第1実施形態に係るデジタルカメラ100の機能構成を例示するブロック図である。各部は内部バス110を介して相互に通信する。
撮影光学系101は、被写体の光学像(被写体像)を撮像部102に結像する。撮像部102は、CCD(電荷結合素子)イメージセンサやCMOS(相補型金属酸化膜半導体)イメージセンサ等の撮像素子を備える。撮像素子は、撮影光学系101により結像された光学像を光電変換し、電気信号を出力する。撮像部102のA/D変換部は、得られたアナログ画像信号をデジタル画像データに変換処理し、RAM(ランダム・アクセス・メモリ)104に出力して記憶させる。RAM104は書き換え可能な揮発性メモリであり、デジタルカメラ100が備える各ブロックの動作において出力されたデータの一時的な記憶領域として用いられる。
[First Embodiment]
FIG. 1 is a block diagram illustrating a functional configuration of a digital camera 100 according to the first embodiment of the present invention. Each unit communicates with each other via the internal bus 110.
The photographing optical system 101 forms an optical image of the subject (subject image) on the imaging unit 102. The imaging unit 102 includes an imaging element such as a CCD (charge coupled device) image sensor or a CMOS (complementary metal oxide semiconductor) image sensor. The image sensor photoelectrically converts the optical image formed by the photographing optical system 101 and outputs an electrical signal. The A / D conversion unit of the imaging unit 102 converts the obtained analog image signal into digital image data, and outputs the digital image data to a RAM (Random Access Memory) 104 for storage. The RAM 104 is a rewritable volatile memory, and is used as a temporary storage area for data output in the operation of each block included in the digital camera 100.

制御部106は、例えばCPU(中央演算処理装置)を備える。制御部106は、デジタルカメラ100が備える各ブロックの動作プログラムをROM(リード・オンリ・メモリ)105から読み出し、RAM104に展開して実行する。これによりデジタルカメラ100が備える各ブロックの動作制御が行われる。ROM105は書き換え可能な不揮発性メモリであり、デジタルカメラ100が備える各ブロックの動作プログラムに加え、各ブロックの動作に必要なパラメータ等を記憶している。また、制御部106は撮影光学系101のフォーカスレンズの駆動制御を行い、フォーカスレンズ駆動量を指示することで、異なる合焦位置で被写体を撮影することが可能である。   The control unit 106 includes, for example, a CPU (Central Processing Unit). The control unit 106 reads out an operation program for each block included in the digital camera 100 from a ROM (Read Only Memory) 105, expands it in the RAM 104, and executes it. Thereby, the operation control of each block provided in the digital camera 100 is performed. The ROM 105 is a rewritable nonvolatile memory, and stores parameters necessary for the operation of each block in addition to the operation program for each block provided in the digital camera 100. Further, the control unit 106 can drive the focus lens of the photographing optical system 101 and instruct the focus lens drive amount to photograph the subject at different in-focus positions.

画像処理部103は、RAM104に記憶されている画像データに対して、ホワイトバランス調整、色補間、縮小/拡大、フィルタリング等の様々な画像処理を行う。また画像処理部103は、後述する画像の合成処理を行う。記録部107は、RAM104に記憶されている画像データ(画像処理部103で処理された画像データ)を、記録画像や合成画像として記録媒体に記録する処理を行う。   The image processing unit 103 performs various image processing such as white balance adjustment, color interpolation, reduction / enlargement, and filtering on the image data stored in the RAM 104. The image processing unit 103 performs image composition processing, which will be described later. The recording unit 107 performs processing for recording image data (image data processed by the image processing unit 103) stored in the RAM 104 on a recording medium as a recorded image or a composite image.

表示部109は、例えばPCモニタ、テレビジョン装置、スマートフォン等の表示媒体である。通信部108は、HDMI(登録商標), High-Definition Multimedia Interface等のケーブルや無線通信装置を備え、RAM104に記憶されている表示用の画像データを表示部109に送信する。表示部109は受信した画像データにしたがって画像表示を行う。また通信部108は、表示部109から表示画面の解像度やサイズ(インチ数等)の情報を取得して、制御部106へ出力するインターフェース部を備える。   The display unit 109 is a display medium such as a PC monitor, a television device, or a smartphone. The communication unit 108 includes a cable such as HDMI (registered trademark), High-Definition Multimedia Interface, and a wireless communication device, and transmits display image data stored in the RAM 104 to the display unit 109. The display unit 109 displays an image according to the received image data. The communication unit 108 includes an interface unit that acquires information about the resolution and size (number of inches, etc.) of the display screen from the display unit 109 and outputs the information to the control unit 106.

次に、図2から図5、図11を用いて本実施形態の動作について説明する。図2は本実施形態の処理を説明するフローチャートである。図3は、デジタルカメラ100によって撮影する被写体の構図を例示した模式図である。   Next, the operation of this embodiment will be described with reference to FIGS. 2 to 5 and FIG. FIG. 2 is a flowchart for explaining the processing of this embodiment. FIG. 3 is a schematic view illustrating the composition of a subject photographed by the digital camera 100.

図3(A)は、撮影対象の被写体300として、主被写体301と、背景被写体302、303を示す。図3(B)は、各被写体を奥行き方向に表示した例310を示す。被写体311と301、被写体312と302、被写体313と303がそれぞれ同じ被写体である。図3(B)には奥行き方向にてデジタルカメラ314から各被写体までの距離(被写体距離)を示している。   FIG. 3A shows a main subject 301 and background subjects 302 and 303 as the subject 300 to be photographed. FIG. 3B shows an example 310 in which each subject is displayed in the depth direction. The subjects 311 and 301, the subjects 312 and 302, and the subjects 313 and 303 are the same subject. FIG. 3B shows distances (subject distances) from the digital camera 314 to each subject in the depth direction.

図3(B)では、デジタルカメラ314の位置を基準とする被写体距離として、被写体311が最も近く、その次に被写体312が位置し、被写体313が最も遠くに位置している。複数の合焦位置315、316を小三角形の記号でそれぞれ示す。主被写体311は位置317と位置318との間に存在する。つまり、位置317におけるDmsがデジタルカメラ314から主被写体311の前部までの距離を表し、位置318におけるDmeがデジタルカメラ314から主被写体311の後部までの距離を表している。主被写体311に関する距離情報319(主被写体距離範囲)をDと表記すると、「D=Dme−Dms」である。 In FIG. 3B, the subject 311 is closest, the subject 312 is located next, and the subject 313 is located farthest as the subject distance based on the position of the digital camera 314. A plurality of in-focus positions 315 and 316 are indicated by small triangle symbols, respectively. The main subject 311 exists between the position 317 and the position 318. That is, D ms at the position 317 represents the distance from the digital camera 314 to the front of the main subject 311, and D me at the position 318 represents the distance from the digital camera 314 to the rear of the main subject 311. When distance information 319 (main subject distance range) regarding the main subject 311 is expressed as D m , “D m = D me −D ms ”.

図4は、表示装置に応じた合成比率を例示した図である。図4(A)は、高解像度モニタに画像を表示する際の合成比率400を示す。図4(B)は、低解像度モニタに画像を表示する際の合成比率410を示す。横軸はカメラから被写体までの距離(被写体距離)を表し、縦軸は合成比率を表す。   FIG. 4 is a diagram illustrating an example of the combination ratio according to the display device. FIG. 4A shows a composition ratio 400 when an image is displayed on a high-resolution monitor. FIG. 4B shows a composition ratio 410 when an image is displayed on a low resolution monitor. The horizontal axis represents the distance from the camera to the subject (subject distance), and the vertical axis represents the composition ratio.

図4(A)において、各画像に対する合成比率401を台形状のグラフでそれぞれ示している。例えば、グラフの上辺部の合成比率の値は1.0であり、その左右の斜辺部では合成比率の値が1.0未満である。各画像の合焦位置を小三角形の記号で示す。黒塗された小三角形で示す合焦位置(例えば402、405)は、主被写体に焦点が合った画像の合焦位置を表す。また白塗された小三角形で示す合焦位置(例えば403)は、主被写体以外の対象に焦点を合わせたときの画像の合焦位置を表す。各合焦位置における被写界深度404を矩形領域でそれぞれ示す。図4(A)は、主被写体距離範囲に亘る7つの合成比率を例示する。   In FIG. 4A, the composition ratio 401 for each image is shown by a trapezoidal graph. For example, the value of the composition ratio at the upper side of the graph is 1.0, and the value of the composition ratio is less than 1.0 at the left and right oblique sides. The focus position of each image is indicated by a small triangle symbol. In-focus positions indicated by black small triangles (for example, 402 and 405) represent in-focus positions of the image focused on the main subject. A focus position (for example, 403) indicated by a small white triangle represents the focus position of the image when focused on an object other than the main subject. The depth of field 404 at each focus position is indicated by a rectangular area. FIG. 4A illustrates seven composition ratios over the main subject distance range.

図4(B)において、各画像に対する合成比率411を台形状のグラフでそれぞれ示している。小三角形の記号の意味は図4(A)の場合と同じである。黒塗の小三角形で示す合焦位置(412、416、417)は主被写体に焦点を合わせた画像の合焦位置を表す。白塗の小三角形で示す合焦位置(413)は主被写体以外の対象に焦点を合わせた画像の合焦位置を表す。各合焦位置における被写界深度414を矩形領域でそれぞれ示す。図4(B)は、主被写体距離範囲に亘る3つの合成比率を例示する。   In FIG. 4B, the composition ratio 411 for each image is shown by a trapezoidal graph. The meaning of the small triangle symbol is the same as in FIG. In-focus positions (412, 416, 417) indicated by black small triangles represent in-focus positions of the image focused on the main subject. A focus position (413) indicated by a small white triangle represents the focus position of an image focused on an object other than the main subject. The depth of field 414 at each in-focus position is indicated by a rectangular area. FIG. 4B illustrates three composition ratios over the main subject distance range.

図5は、各合成比率の算出方法を示す図である。図5にて、横軸は被写体距離を表し、縦軸は合成比率を表す。合成比率のグラフ501において、Dで示す合焦位置502を小三角形の記号で示している。合焦位置502に対する、前方被写界深度503をDfsと表記し、後方被写界深度504をDfeと表記し、被写界深度505をDfと表記する。台形状のグラフ501の区間506、507、508はそれぞれ、左側斜辺部、上辺部、右側斜辺部の区間に相当する。合成比率の値が最も大きい区間507の距離をDと表記する。 FIG. 5 is a diagram illustrating a method for calculating each composition ratio. In FIG. 5, the horizontal axis represents the subject distance, and the vertical axis represents the composition ratio. In the graph 501 of the synthesis ratios, it is shown in-focus position 502 of the small triangle symbol indicated by D p. The front depth of field 503 for the in-focus position 502 is denoted as D fs , the rear depth of field 504 is denoted as D fe, and the depth of field 505 is denoted as Df. The sections 506, 507, and 508 of the trapezoidal graph 501 correspond to sections of the left oblique side, the upper side, and the right oblique side, respectively. The distance value of the composite ratio is largest section 507 is denoted by D a.

図11は主被写体距離の算出方法を説明する図である。図11は図3と同一の構図である。図11(A)は、後述する距離情報生成部が生成した距離情報1100を、グレースケールで示す。白から黒になるに連れて、カメラ位置を基準する距離が大きくなり、被写体が遠いことを示す。図11(B)は、距離情報1110において、後述する主被写体検出部が生成した主被写体検出領域1111を示す。図11(C)は、図11(A)の距離情報1100と図11(B)の距離情報1110との論理積を計算した結果を例示し、主被写体領域のみの距離情報1120を示している。図11(D)は、主被写体領域の距離情報をヒストグラム化したグラフ1130を示す。横軸は被写体距離を表し、縦軸は距離情報の頻度を表す。ヒストグラムの極小点近傍に囲まれたDmsからDmeまでの距離区間が主被写体距離範囲Dである。 FIG. 11 is a diagram for explaining a method of calculating the main subject distance. FIG. 11 is the same composition as FIG. FIG. 11A shows distance information 1100 generated by a distance information generation unit described later in gray scale. As the color changes from white to black, the distance based on the camera position increases, indicating that the subject is far away. FIG. 11B shows a main subject detection area 1111 generated by a main subject detection unit described later in the distance information 1110. FIG. 11C illustrates the result of calculating the logical product of the distance information 1100 in FIG. 11A and the distance information 1110 in FIG. 11B, and shows distance information 1120 only for the main subject region. . FIG. 11D shows a graph 1130 in which the distance information of the main subject region is converted into a histogram. The horizontal axis represents the subject distance, and the vertical axis represents the frequency of distance information. A distance section from D ms to D me surrounded by the minimum point of the histogram is the main subject distance range D m .

次に、図2のフローチャートに則って本実施形態の動作を説明する。以下の処理は制御部106のCPUがメモリから読み出して実行するプログラムにしたがって実現される。
S201で制御部106は、撮影光学系101の駆動制御を行い、可動レンズを移動させる。撮像部102は合焦位置の異なる複数の画像を取得し、記録部107は画像の記録処理を行う。なお、画像の取得方法としては、例えば単眼カメラにおいてフォーカスレンズの駆動制御を行い、合焦位置または絞り値を変更して複数の画像を取得する方法のみに限定されない。この他には、多眼カメラで同時に被写体を撮影する方法がある。合焦位置または絞り値の異なる複数の撮影光学系により結像される被写体の光学像から複数の画像を取得できる。またはライトフィールドカメラで撮影する方法がある。ライトフィールドカメラは、撮影光学系と撮像素子との間にマイクロレンズアレイが配置されている。撮像素子の複数の光電変換部に対して1つのマイクロレンズを対応させ、マイクロレンズを通過した光を複数の光電変換部に入射させることにより、光線の強度分布と入射方向の情報を取得できる。各光電変換部の出力信号は入射方向ごとに取得された情報を含み、当該情報を用いて距離情報が取得される。ライトフィールドデータの処理にて、マイクロレンズアレイのレンズ頂点面からの距離が異なる焦点面での像は、各マイクロレンズの光軸からの偏心量に対応した位置にある光電変換部の各出力を合成することで得られる。ライトフィールドデータに含まれる光線情報と方向情報を取得し、光線の並べ替えと計算処理を行うこと(再構成)により、任意の合焦位置での画像データを生成することができる。
Next, the operation of this embodiment will be described according to the flowchart of FIG. The following processing is realized according to a program that the CPU of the control unit 106 reads out from the memory and executes.
In step S201, the control unit 106 performs drive control of the photographing optical system 101 and moves the movable lens. The imaging unit 102 acquires a plurality of images with different in-focus positions, and the recording unit 107 performs image recording processing. Note that the image acquisition method is not limited to a method of acquiring a plurality of images by changing the focus position or the aperture value by performing drive control of the focus lens in a monocular camera, for example. In addition, there is a method of photographing a subject simultaneously with a multi-lens camera. A plurality of images can be acquired from an optical image of a subject formed by a plurality of photographing optical systems having different in-focus positions or aperture values. Or there is a method of shooting with a light field camera. In the light field camera, a microlens array is disposed between the photographing optical system and the image sensor. By associating one microlens with a plurality of photoelectric conversion units of the image sensor and allowing light that has passed through the microlens to enter the plurality of photoelectric conversion units, it is possible to obtain information on the intensity distribution and the incident direction of light rays. The output signal of each photoelectric conversion unit includes information acquired for each incident direction, and distance information is acquired using the information. In the processing of the light field data, images on focal planes with different distances from the lens apex surface of the micro lens array are obtained by outputting each output of the photoelectric conversion unit at a position corresponding to the amount of eccentricity from the optical axis of each micro lens. Obtained by synthesis. Image data at an arbitrary in-focus position can be generated by acquiring light ray information and direction information included in the light field data, and rearranging and calculating light rays (reconstruction).

S202で通信部108は、表示部109の画面の解像度やサイズ等の情報を取得して、RAM104に記憶する。S203で制御部106は、主被写体の距離情報であるDmsとDmeを取得する処理を行う。主被写体の距離情報は、図11で説明した方法により算出することが可能である。距離情報生成部と主被写体検出部については、公知技術を適用すればよい。例えば、距離情報生成処理については特許文献3にて、瞳分割タイプの撮像素子を用いる方法が開示されている。具体的には、撮像部102内の撮像素子は、複数のマイクロレンズと各マイクロレンズが対応する複数の光電変換部を備えている。各光電変換部は、撮影光学系101の異なる瞳領域から到来する光束が生ずる複数の被写体像にそれぞれ対応する画素信号を出力する。複数の被写体像に対して像信号の相関演算処理が実行される。取得される画像は視点の異なる画像であり、複数の画像間の視差量を算出する処理が行われる。撮像素子の画素ピッチ(撮像素子を構成する画素部の画素間距離)と、一対の測距瞳を通過する光束の重心の開き角の大きさによって決まる変換係数を用いて、結像面に対するデフォーカス量、すなわち距離情報を算出することができる。被写体の距離情報は、画角内の距離分布の情報であって、画角内の被写体の深さに対応し、少なくとも深さの相対関係を表す情報である。瞳分割画像の視差から距離を算出する例に限定されることなく、例えばコントラストAF(オートフォーカス)評価値等を用いて距離情報を取得してもよい。また、次元として距離に換算されていなくても、例えば瞳分割画像の視差量の分布情報(視差マップ、像ずれマップ)やデフォーカス量の分布情報(デフォーカスマップ)の形態であっても被写体の深さ方向の相対関係はわかるため、本発明が適用可能である。本実施形態ではかかる分布情報を総括して被写体の距離情報と呼ぶことにする。 In step S <b> 202, the communication unit 108 acquires information such as the screen resolution and size of the display unit 109 and stores the information in the RAM 104. In step S <b> 203, the control unit 106 performs processing for acquiring D ms and D me that are distance information of the main subject. The distance information of the main subject can be calculated by the method described in FIG. A known technique may be applied to the distance information generation unit and the main subject detection unit. For example, Patent Document 3 discloses a method using a pupil division type imaging device for distance information generation processing. Specifically, the imaging element in the imaging unit 102 includes a plurality of microlenses and a plurality of photoelectric conversion units corresponding to the microlenses. Each photoelectric conversion unit outputs pixel signals respectively corresponding to a plurality of subject images in which light beams coming from different pupil regions of the photographing optical system 101 are generated. Image signal correlation calculation processing is executed for a plurality of subject images. The acquired images are images with different viewpoints, and processing for calculating the amount of parallax between the plurality of images is performed. Using the conversion coefficient determined by the pixel pitch of the image sensor (inter-pixel distance of the pixel portion constituting the image sensor) and the opening angle of the center of gravity of the light beam passing through the pair of distance measuring pupils, A focus amount, that is, distance information can be calculated. The distance information of the subject is information on the distance distribution within the angle of view and corresponds to the depth of the subject within the angle of view and represents at least the relative relationship of the depth. The distance information may be acquired using, for example, a contrast AF (autofocus) evaluation value without being limited to the example of calculating the distance from the parallax of the pupil-divided image. Even if the distance is not converted as a dimension, the subject can be in the form of disparity amount distribution information (parallax map, image shift map) or defocus amount distribution information (defocus map) of a pupil-divided image, for example. Since the relative relationship in the depth direction is known, the present invention is applicable. In the present embodiment, such distribution information is collectively referred to as subject distance information.

一方、主被写体検出処理については特許文献4に開示された方法がある。この方法は撮影画像から色情報を取得し、それらのヒストグラムを所定の分布範囲に区分けし、その区域を一つの被写体として分類して被写体を検出する方法である。なお、本実施形態において主被写体の検出方法は特定の方法に限定されない。   On the other hand, there is a method disclosed in Patent Document 4 for the main subject detection process. In this method, color information is acquired from a photographed image, the histograms thereof are divided into predetermined distribution ranges, the areas are classified as one subject, and the subject is detected. In the present embodiment, the main subject detection method is not limited to a specific method.

S204で制御部106は、各合焦画像の合焦距離であるDを算出する。具体的には、撮影時の測距枠と同一座標にある距離情報が合焦距離Dとして算出される。なお、測距枠は複数の画素のブロックで形成される。このため、距離情報についても測距枠内に含まれる距離情報の平均値または最頻値を代表値として合焦距離Dが決定される。 Control unit 106 in S204 calculates the D p is a focal distance of the respective focusing image. Specifically, the distance information in the same coordinates and measurement frame at the time of photographing is calculated as the distance D p focus. The distance measurement frame is formed of a plurality of pixel blocks. For this reason, the focus distance Dp is determined using the average value or the mode value of the distance information included in the distance measurement frame as the representative value.

S205で主被写体全体に合焦しているか否かの判定処理である。これは、主被写体全体に合焦させる際、主被写体以外に合焦している画像を合成に使用しないようにするために行う判定処理である。制御部106は、各撮影画像の主被写体に合焦しているか否かを判定する。具体的には、S204で算出された各撮影画像の合焦距離Dが、S203で算出された主被写体距離情報DmsとDmeとの間である場合、現在の画像において主被写体に合焦していると判定される。S205で、主被写体に合焦していると判定された場合、S206に処理を進める。また主被写体に合焦していないと判定された場合には、後述する合成比率の値を0に設定して、S204に戻る。 In S205, whether or not the entire main subject is in focus is determined. This is a determination process that is performed so that an image focused on other than the main subject is not used for synthesis when the entire main subject is focused. The control unit 106 determines whether or not the main subject of each captured image is in focus. Specifically, when the in-focus distance D p of each captured image calculated in S204 is between the main subject distance information D ms and D me calculated in S203, the current subject is focused on the main subject. It is determined to be in focus. If it is determined in S205 that the main subject is in focus, the process proceeds to S206. On the other hand, if it is determined that the main subject is not in focus, the value of a composition ratio described later is set to 0, and the process returns to S204.

S206で制御部106は、各撮影画像(合焦画像)の被写界深度である前方被写界深度Dfsと後方被写界深度Dfeを算出する。被写界深度は下記式(1)および(2)を用いて算出される。

Figure 2017163412
ここで、δは許容錯乱円径、Fは絞り値、fは焦点距離であり、単位はすべて「mm」である。なお、δの値は撮像部102の画素ピッチによって決まる。 Control unit 106 in S206 calculates the forward depth of field D fs and rear depth of field D fe is the depth of field of the captured image (focus image). The depth of field is calculated using the following equations (1) and (2).
Figure 2017163412
Here, δ is an allowable circle of confusion, F is an aperture value, f is a focal length, and all units are “mm”. Note that the value of δ is determined by the pixel pitch of the imaging unit 102.

S207で制御部106は、合焦距離D、前方被写界深度Dfs、後方被写界深度Dfeを用いて、各画像に対する合成比率を算出する。図5に例示するように、合焦距離Dを中心とした所定距離の区間507に対する合成比率の値は1.0である。区間507から被写体距離が離れる区間506、508では合成比率の値が減少する。具体例として、下記式(3)を用いて合成比率の値が算出される。画像内の各画素位置に対応する距離をdと表記し、n番目の合焦画像に対する合成比率をW(n,d)と表記する。図5で合成比率の値が1.0となる距離区間をDとする。
if( d < Dfs) W(n,d) = 0
else if(d <(Dp-Da/2)) W(n,d)=k1 * d + B
else if(d < (Dp+Df/2) W(n,d)=1.0
else if(d<Dfe) W(n,d) =-k2 * d + C
else W(n,d)=0.0 ・・・(3)
if()内の不等式は条件式を示す。k1,k2は各区間506、508の傾き(係数)であり、B,Cはy切片である(合成比率の軸をy軸と定義する)。
In step S207, the control unit 106 calculates a composition ratio for each image using the in-focus distance D p , the front depth of field D fs , and the rear depth of field D fe . As illustrated in FIG. 5, the value of the composite ratio section 507 a predetermined distance around the focusing distance D p is 1.0. In the sections 506 and 508 where the subject distance is away from the section 507, the value of the composition ratio decreases. As a specific example, the value of the composition ratio is calculated using the following formula (3). The distance corresponding to each pixel position in the image is denoted by d, and the composition ratio for the nth focused image is denoted by W (n, d). The distance interval which the value of synthesis ratio is 1.0 in FIG. 5 and D a.
if (d <D fs ) W (n, d) = 0
else if (d <(D p -D a / 2)) W (n, d) = k1 * d + B
else if (d <(D p + D f / 2) W (n, d) = 1.0
else if (d <D fe ) W (n, d) = -k2 * d + C
else W (n, d) = 0.0 (3)
Inequalities in if () indicate conditional expressions. k1 and k2 are slopes (coefficients) of the respective sections 506 and 508, and B and C are y-intercepts (the composite ratio axis is defined as the y-axis).

S208で制御部106は、S202で取得した情報を用いて表示部109の表示解像度(または表示画面サイズ)について判断する。合成処理後の画像を表示する表示部109にて高解像度の表示が可能である(または表示画面サイズが大きい)と判断された場合、S209へ進み、そうでない場合(低解像度の表示または表示画面サイズが小さい場合)にはS210に移行する。表示部109の解像度の判断処理にて制御部106は、撮影画像の画素数、表示部109の解像度であるPPI(Pixel Per Inch)、出力画素数と表示画素数との比を用いる。なお、PPIは対角画素数を対角のインチ数で除算した比である。一般的に、PPIが高い場合に高解像度の表示部と言えるが、出力画素数が表示部の画素数と異なると、表示部の画素数に合うように拡縮処理を行うか、画像の一部を表示する処理が行われることになる。このため、その表示のさせ方も考慮する必要がある。例えば、出力画素数に対して表示画素数が小さい場合、「表示画素数/出力画素数」分の縮小処理が行われて画像が表示されるので、縮小処理に伴う表示解像力の低下が発生する。そこで、本実施形態では、表示部のPPIに出力画素数と表示画素数との比を乗算した値を解像度と定義する。その値が所定の閾値以上である場合に制御部106は高解像度と判断し、所定の閾値より小さい場合には低解像度と判断する。図10を参照して具体例を説明する。   In step S208, the control unit 106 determines the display resolution (or display screen size) of the display unit 109 using the information acquired in step S202. If it is determined that the display unit 109 that displays the combined image can display a high resolution (or the display screen size is large), the process proceeds to S209, and if not (a low resolution display or display screen) If the size is small, the process proceeds to S210. In the resolution determination process of the display unit 109, the control unit 106 uses the number of pixels of the captured image, PPI (Pixel Per Inch) which is the resolution of the display unit 109, and the ratio between the number of output pixels and the number of display pixels. Note that PPI is a ratio obtained by dividing the number of diagonal pixels by the number of diagonal inches. Generally, when the PPI is high, it can be said to be a high-resolution display unit. However, if the number of output pixels is different from the number of pixels in the display unit, enlargement / reduction processing is performed so as to match the number of pixels in the display unit, or part of the image Is displayed. For this reason, it is necessary to consider how to display it. For example, when the number of display pixels is smaller than the number of output pixels, a reduction process corresponding to “the number of display pixels / the number of output pixels” is performed and an image is displayed, so that a reduction in display resolution accompanying the reduction process occurs. . Therefore, in this embodiment, a value obtained by multiplying the PPI of the display unit by the ratio between the number of output pixels and the number of display pixels is defined as resolution. The control unit 106 determines that the resolution is high when the value is equal to or greater than a predetermined threshold, and determines that the resolution is low when the value is smaller than the predetermined threshold. A specific example will be described with reference to FIG.

図10は、様々な表示部の画面サイズと画素数の画像を、具体的な数字で示している。出力画像は図3に示す被写体300の画像と同一の構図の画像である。出力画像の画素数を水平方向にて4000画素であって垂直方向にて2000画素の、合計800万画素とする。各画像1000から1005の詳細は、下記表1のとおりである。   FIG. 10 shows images of screen sizes and pixel numbers of various display portions with specific numbers. The output image is an image having the same composition as the image of the subject 300 shown in FIG. The number of pixels in the output image is 4000 pixels in the horizontal direction and 2000 pixels in the vertical direction, for a total of 8 million pixels. Details of the images 1000 to 1005 are as shown in Table 1 below.

Figure 2017163412
Figure 2017163412

画像1000、1001は、出力画像(撮影画像)の解像度と表示部の解像度が同じであり、ピクセル等倍表示の画像である。画像1002、1003は、出力画像の解像度より表示部の解像度が低い全体縮小表示の画像である。さらに、画像1004、1005では、出力画像の解像度より表示部の解像度が低くても、ピクセル等倍表示が可能である。ただし、その際には画像の一部のみが表示されることになる。   The images 1000 and 1001 have the same resolution of the output image (captured image) and the resolution of the display unit, and are images with the same pixel display. Images 1002 and 1003 are whole reduced display images in which the resolution of the display unit is lower than the resolution of the output image. Further, the images 1004 and 1005 can be displayed in the same pixel size even when the resolution of the display unit is lower than the resolution of the output image. However, at that time, only a part of the image is displayed.

表示部が画像1000を表示する場合の表示解像度は186であり、出力画素数と表示画素数が同一である。表示解像度に対して、出力画素数と表示画素数との比を乗算した値として定義される解像度は、186PPIのままである。同様の考え方により、画像1001を表示する際の解像度は、745PPIである。一方、画像1002を表示する場合、出力解像度は93であり、表示部の画素数(表示解像度46.5)に合わせて1/2の縮小処理が行われる。よって、定義された解像度は、93×(1/2)=46.5PPIとなる。画像1003を表示する場合、定義された解像度は、373×(1/2)=186.5PPIとなる。一方で、画像1004、1005のように、出力画素数が表示部の画素数より大きいが、ピクセル等倍で表示部が表示している場合、縮小処理は伴わず、定義された解像度はそれぞれ、93PPI、373PPIとなる。   When the display unit displays the image 1000, the display resolution is 186, and the number of output pixels is the same as the number of display pixels. The resolution defined as a value obtained by multiplying the display resolution by the ratio of the number of output pixels and the number of display pixels remains 186 PPI. Based on the same concept, the resolution when displaying the image 1001 is 745 PPI. On the other hand, when the image 1002 is displayed, the output resolution is 93, and 1/2 reduction processing is performed in accordance with the number of pixels of the display unit (display resolution 46.5). Therefore, the defined resolution is 93 × (1/2) = 46.5 PPI. When the image 1003 is displayed, the defined resolution is 373 × (1/2) = 186.5 PPI. On the other hand, when the display unit displays the number of output pixels larger than the number of pixels of the display unit, such as images 1004 and 1005, but with the same pixel magnification, no reduction process is involved, and the defined resolutions are respectively 93 PPI and 373 PPI.

図2のS209で制御部106は、高解像度の表示部に画像を表示する場合の合成比率の制御を行う。高解像度の表示部では合焦の外れが目立ちやすいため、制御部106は被写体の合焦距離に極力近い領域のみを合成するように合成比率を変更する。具体的には、式(3)において、合成比率の値が1.0となる距離区間D(図5)を狭くし、各区間の傾きk1およびk2が急峻になるように合成比率が制御される(図4(A)参照)。 In step S209 of FIG. 2, the control unit 106 controls the composition ratio when an image is displayed on the high-resolution display unit. Since the out-of-focus state is easily noticeable in the high-resolution display unit, the control unit 106 changes the combining ratio so as to combine only the region as close as possible to the in-focus distance of the subject. Specifically, in Equation (3), the distance ratio D a (FIG. 5) where the value of the composition ratio is 1.0 is narrowed, and the composition ratio is controlled so that the slopes k1 and k2 of each section become steep. (See FIG. 4A).

またS210で制御部106は、低解像度の表示部に画像を表示する場合の合成比率の制御を行う。低解像度の表示部では合焦の外れが目立ちにくいため、制御部106は被写体の合焦距離に近い領域だけでなく合焦距離から離れた領域を合成するように合成比率を変更する。具体的には、式(3)において、合成比率の値が1.0となる距離区間Dを広くし、各区間の傾きk1およびk2が緩やかになるように合成比率が制御される(図4(B)参照)。 In step S210, the control unit 106 controls a composition ratio when an image is displayed on a low-resolution display unit. Since the out-of-focus state is less noticeable in the low-resolution display unit, the control unit 106 changes the combination ratio so as to combine not only the region close to the in-focus distance of the subject but also the region away from the in-focus distance. Specifically, in equation (3), the value of the combination ratio is large the distance interval D a to be 1.0, combining ratio so that the inclination k1 and k2 becomes gentle in each section is controlled (Fig. 4 (B)).

このような制御を行うと、図4(A)の合成比率400に示すように各画像の合成比率401の値が1.0となる区間は狭くなり、図4(B)の合成比率410に示すように各画像の合成比率411の値が1.0となる区間は広くなる。また、低解像度の表示部により画像を表示する際には、白塗の小三角形で示す位置415において、黒塗の小三角形で示す合焦位置416、417にそれぞれ対応するグラフの合成比率の値が共に0以上となるように設定される。つまり、合焦位置416に対応するグラフの右側斜辺部と合焦位置417に対応するグラフの左側斜辺部との交点の位置が、ほぼ位置415に一致し、当該位置で読み取れる合成比率の値は0より大きい(αと記す)。位置415に対応する撮像画像は、合成に使用しないように除外することができる。これが位置415を白塗の小三角形で示している理由である。なお、低解像度の表示部に出力する場合、主被写体領域を引き立たせるために背景領域を検出して、背景領域にぼけを付与する処理が行われる。背景をぼかす処理は制御部106の指示を受けて画像処理部103が行う。   When such control is performed, the interval where the value of the composition ratio 401 of each image is 1.0 is narrowed as shown in the composition ratio 400 of FIG. 4A, and the composition ratio 410 of FIG. As shown, the interval where the value of the composition ratio 411 of each image is 1.0 becomes wider. Further, when an image is displayed by the low-resolution display unit, the value of the composition ratio of the graph corresponding to the in-focus positions 416 and 417 indicated by the black small triangles at the position 415 indicated by the white small triangles, respectively. Are set to be 0 or more. That is, the position of the intersection of the right oblique side of the graph corresponding to the in-focus position 416 and the left oblique side of the graph corresponding to the in-focus position 417 substantially coincides with the position 415, and the value of the composite ratio that can be read at that position is Greater than 0 (denoted as α). The captured image corresponding to the position 415 can be excluded so as not to be used for composition. This is the reason why the position 415 is indicated by a small white triangle. Note that when outputting to a low-resolution display unit, processing for detecting the background region and adding blur to the background region is performed in order to enhance the main subject region. The processing for blurring the background is performed by the image processing unit 103 in response to an instruction from the control unit 106.

図2のS209またはS210の処理後にS211へ進む。S211で制御部106は、撮影された全ての合焦画像に対する合成比率の算出が終了したか否かを判断する。全ての画像に対する合成比率の算出が終了した場合、S212に処理を進め、算出処理が終了していない場合にはS204に処理を戻して、次の画像の合成比率算出処理を継続する。   After the process of S209 or S210 in FIG. In step S <b> 211, the control unit 106 determines whether the calculation of the composition ratio for all captured in-focus images has been completed. If the calculation of the composition ratio for all images has been completed, the process proceeds to S212. If the calculation process has not been completed, the process returns to S204 to continue the composition ratio calculation process for the next image.

S212において画像処理部103および制御部106は、決定した各合焦画像に対する合成比率を用いて画像の合成処理を行う。その際、合成比率の合計値を1以下に抑えるために、最終的な合成比率は、下記式(4)に基づいて正規化される。

Figure 2017163412
ここで、Nは撮影画像の総数である。 In step S212, the image processing unit 103 and the control unit 106 perform image synthesis processing using the determined synthesis ratio for each focused image. At that time, in order to suppress the total value of the synthesis ratio to 1 or less, the final synthesis ratio is normalized based on the following formula (4).
Figure 2017163412
Here, N is the total number of captured images.

S213で通信部108は、S212で合成処理によって生成された表示用画像のデータを表示部109に出力する処理を行い、一連の処理を終了する。
本実施形態では、被写体全体に合焦した画像を生成する際、表示装置の表示能力に応じて合成処理方法を変更して表示用画像を生成する。これにより、ユーザがどの視聴環境で画像を視聴しても被写体全体に焦点の合った合焦画像を生成することができる。
In S213, the communication unit 108 performs a process of outputting the display image data generated by the synthesis process in S212 to the display unit 109, and ends the series of processes.
In this embodiment, when an image focused on the entire subject is generated, a display processing image is generated by changing the composition processing method according to the display capability of the display device. Thereby, it is possible to generate a focused image that is focused on the entire subject regardless of the viewing environment in which the user views the image.

[第2実施形態]
次に本発明の第2実施形態を説明する。本実施形態では、絞り値(F値)を変化させた複数の画像を用いて、主被写体全体に合焦した画像を選択して、表示能力の異なる複数の表示装置に出力する形態を説明する。なお、本実施形態にて第1実施形態の場合と同様の構成については既に使用した符号を用いることでそれらの詳細な説明を省略し、主に相違点を説明する。このような説明の省略については後述の実施形態でも同じである。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. In the present embodiment, an embodiment will be described in which an image focused on the entire main subject is selected using a plurality of images with different aperture values (F values) and output to a plurality of display devices having different display capabilities. . In addition, about the structure similar to the case of 1st Embodiment in this embodiment, those detailed description is abbreviate | omitted by using the code | symbol already used, and a difference is mainly demonstrated. Omitting such description is the same in the embodiments described later.

図6のフローチャートに則って、本実施形態の動作を説明する。
S601で制御部106は、撮影光学系101の絞りを駆動制御し、F値の異なる複数の画像を取得して、画像信号を記録部107に記録する制御を行う。この場合、取得されるすべての画像は主被写体の任意の領域に合焦している画像であるものとする。S602で制御部106は、表示部109の表示解像度や表示画面サイズ等の情報を、通信部108から取得してRAM104に記憶する。
The operation of this embodiment will be described with reference to the flowchart of FIG.
In step S <b> 601, the control unit 106 performs drive control of the aperture of the photographing optical system 101, acquires a plurality of images having different F values, and performs control to record the image signal in the recording unit 107. In this case, it is assumed that all the acquired images are images focused on an arbitrary area of the main subject. In step S <b> 602, the control unit 106 acquires information such as the display resolution and display screen size of the display unit 109 from the communication unit 108 and stores the information in the RAM 104.

S603で制御部106は、S602で取得した情報を用いて表示解像度(または表示画面サイズ)について判断する。表示部109の表示解像度が高解像度である(または表示画面サイズが大きい)と判断された場合、S604へ進み、そうでない場合にはS607に移行する。S604で制御部106は、主被写体距離情報であるDmsとDmeを取得する。 In step S603, the control unit 106 determines the display resolution (or display screen size) using the information acquired in step S602. If it is determined that the display resolution of the display unit 109 is high (or the display screen size is large), the process proceeds to S604, and if not, the process proceeds to S607. In step S604, the control unit 106 acquires D ms and D me that are main subject distance information.

S605で制御部106は式(1)、(2)により、各画像の被写界深度である前方被写界深度Dfsと後方被写界深度Dfeを算出する。S606で制御部106は、主被写体距離情報Dms、Dmeと、前方被写界深度Dfs、後方被写界深度Dfeを比較し、F値の異なる複数の画像(F値画像)から、画像を選択する。具体的には、複数のF値画像のうち、n番目の画像に対する主被写体距離をDms(F)、Dme(F)と表記する。前方被写界深度Dfsが前方被写体距離Dms(F)より短く、後方被写界深度Dfeが後方被写体距離Dme(F)より長くなるF値画像を選択する処理が行われるようにする。つまり、主被写体が被写界深度内におさまるF値画像が選択される。 In step S <b> 605, the control unit 106 calculates the front depth of field D fs and the rear depth of field D fe that are the depth of field of each image according to equations (1) and (2). Control unit 106 in step S606, the main subject distance information D ms, and D me, forward depth of field D fs, to compare the backward depth of field D fe, from different images F value (F value image) , Select an image. Specifically, the main subject distance with respect to the nth image among a plurality of F value images is denoted as D ms (F) and D me (F). Processing for selecting an F-number image in which the front depth of field Dfs is shorter than the front subject distance Dms (F) and the rear depth of field Dfe is longer than the rear subject distance Dme (F) is performed. To do. That is, an F-number image in which the main subject is within the depth of field is selected.

S607で制御部106は、撮影した複数のF値画像の中から最もF値の大きい画像を選択する。F値が大きくなると、回折ぼけの影響や、露光時間が長くなることで蓄積ブレの影響を受ける可能性がある。そのため、S601での撮影時にF値を変化させる際、F値の上限を決めることで、これらの影響を回避することが可能である。   In step S <b> 607, the control unit 106 selects an image having the largest F value from a plurality of photographed F value images. When the F value is increased, there is a possibility that the influence of diffraction blur and the influence of accumulated blur due to the longer exposure time may occur. Therefore, when changing the F value during shooting in S601, it is possible to avoid these effects by determining the upper limit of the F value.

S606またはS607の後、S608に処理を進める。S608で制御部106は、S606またはS607で選択した画像を表示部109に表示させる制御を行う。その後に処理を終了する。
本実施形態では、被写体全体に合焦した画像を生成する際、表示装置の表示能力に応じて、F値の異なる複数の画像から選択した画像を表示装置へ出力する処理が行われる。
After S606 or S607, the process proceeds to S608. In step S608, the control unit 106 performs control to display the image selected in step S606 or S607 on the display unit 109. Thereafter, the process is terminated.
In the present embodiment, when an image focused on the entire subject is generated, a process of outputting an image selected from a plurality of images having different F values to the display device according to the display capability of the display device is performed.

[第3実施形態]
次に本発明の第3実施形態を説明する。第1および第2実施形態では、デジタルカメラ内で処理した画像を、表示装置に出力して表示させる形態を説明した。本実施形態では、表示装置(外部装置)が画像の合成および表示処理を行う形態について、図7から図9を用いて説明する。
[Third Embodiment]
Next, a third embodiment of the present invention will be described. In the first and second embodiments, a mode has been described in which an image processed in a digital camera is output and displayed on a display device. In the present embodiment, a mode in which a display device (external device) performs image composition and display processing will be described with reference to FIGS.

図7は、本実施形態に係る機能構成を示すブロック図である。デジタルカメラ700と、外部装置であるスマートフォン710を例示し、第1実施形態で説明した合焦位置の異なる複数の画像の合成をスマートフォン710が行う。なお、デジタルカメラ700の各構成部701から708はそれぞれ、図1の各構成部101から108と同様であるため説明を省略する。   FIG. 7 is a block diagram showing a functional configuration according to the present embodiment. The digital camera 700 and the smartphone 710 that is an external device are exemplified, and the smartphone 710 combines a plurality of images with different in-focus positions described in the first embodiment. Note that the components 701 to 708 of the digital camera 700 are the same as the components 101 to 108 in FIG.

スマートフォン710内の画像処理部713は、第1実施形態で説明した画像の合成処理を行い、合成後の画像信号をRAM714に記憶させる。制御部716は、例えばCPUを有し、スマートフォン710が備える各ブロックの動作プログラムをROM715から読み出し、RAM714に展開して実行する。記録部717は画像処理部713により処理された画像データ等を記録媒体に記録する処理を行う。   The image processing unit 713 in the smartphone 710 performs the image combining process described in the first embodiment, and stores the combined image signal in the RAM 714. The control unit 716 includes, for example, a CPU, reads out the operation program of each block included in the smartphone 710 from the ROM 715, expands it in the RAM 714, and executes it. The recording unit 717 performs processing for recording the image data and the like processed by the image processing unit 713 on a recording medium.

通信部718は、デジタルカメラ700と通信する。通信部708と通信部718は、HDMI(登録商標)等のケーブルや無線LAN(Local Area Network)等のデータインターフェース部である。例えば、通信部708は、RAM704に記憶されている画像信号を読み出して、スマートフォン710へ送信する。また通信部718は、スマートフォン710が備える表示部719の表示解像度や表示画面サイズ等の情報をデジタルカメラ700へ送信する。   A communication unit 718 communicates with the digital camera 700. The communication unit 708 and the communication unit 718 are data interface units such as cables such as HDMI (registered trademark) and wireless LAN (Local Area Network). For example, the communication unit 708 reads an image signal stored in the RAM 704 and transmits the image signal to the smartphone 710. In addition, the communication unit 718 transmits information such as the display resolution and display screen size of the display unit 719 included in the smartphone 710 to the digital camera 700.

表示部719は、RAM714から読み出された画像信号にしたがって画像を表示するモニタ部である。タッチパネルを用いたUI(ユーザインターフェース)部720は、ユーザの操作指示を受け付け、操作指示信号を制御部716に出力する。   The display unit 719 is a monitor unit that displays an image according to the image signal read from the RAM 714. A UI (user interface) unit 720 using a touch panel receives a user operation instruction and outputs an operation instruction signal to the control unit 716.

図8は本実施形態のフローチャートである。図9は、スマートフォン710の表示部719の画面例を示す。図9(A)に示す撮影被写体の画像900は図3と同一の構図であり、主被写体901、背景被写体902、903を示す。図9(B)の画像910は、図9(A)の画像900の一部(点線の矩形枠904内)を拡大した画像である。   FIG. 8 is a flowchart of this embodiment. FIG. 9 shows a screen example of the display unit 719 of the smartphone 710. A photographed subject image 900 shown in FIG. 9A has the same composition as FIG. 3 and shows a main subject 901 and background subjects 902 and 903. An image 910 in FIG. 9B is an enlarged image of a part of the image 900 in FIG. 9A (within the dotted rectangular frame 904).

図8のフローチャートに則って動作を説明する。
S801からS804の処理はそれぞれ、図2のS201、S203からS205の処理と同様である。S801で合焦位置の異なる複数の画像が取得されて記録部107が画像信号を記録する。S802では、主被写体距離情報DmsおよびDmeが取得される。S803で制御部706は、各合焦画像の合焦距離Dを算出し、S804では、各撮影画像にて主被写体に合焦しているか否かを判定する。
The operation will be described with reference to the flowchart of FIG.
The processing of S801 to S804 is the same as the processing of S201 and S203 to S205 of FIG. In S801, a plurality of images having different in-focus positions are acquired, and the recording unit 107 records an image signal. In S802, main subject distance information D ms and D me is acquired. Control unit 706 in S803 calculates the focus distance D p of the respective focusing image, determines whether or not focused on the main subject at the S804, the captured image.

S804で主被写体に合焦していると判断された場合、S805に処理を進め、主被写体に合焦していないと判断された場合にはS803に処理を戻す。S805で通信部708は、S804で主被写体に合焦していると判断された画像のデータのみ、スマートフォン710へ送信する。この送信は、合成に使用する可能性がある画像のみを転送することを目的としている。   If it is determined in S804 that the main subject is in focus, the process proceeds to S805, and if it is determined that the main subject is not in focus, the process returns to S803. In step S <b> 805, the communication unit 708 transmits only the image data determined to be focused on the main subject in step S <b> 804 to the smartphone 710. This transmission is intended to transfer only images that may be used for composition.

S806、S807の各処理は、図2のS206、S207の各処理と同様である。S806で制御部716は前方被写界深度Dfsと後方被写界深度Dfeを算出し、S807では、合焦距離D、前方被写界深度Dfs、後方被写界深度Dfeを用いて、各画像に対する合成比率を算出する。S808で制御部716は合成比率の制御を行う。ユーザがスマートフォン等の小型モニタで画像を視聴する場合には合焦の外れが目立ちにくい。このため、被写体の合焦距離に近い領域だけでなく、合焦距離から離れた領域を合成する処理が行われる。制御部716は合成比率が最大となる範囲が広くなるように合成比率を変更する。例えば、図4(B)に示した合成比率410となるように合成比率の制御が行われる。 Each process of S806 and S807 is the same as each process of S206 and S207 of FIG. Control unit 716 in S806 calculates the forward depth of field D fs and rear depth of field D fe, in S807, the focusing distance D p, the front depth of field D fs, the rear depth of field D fe Use to calculate the composition ratio for each image. In step S808, the control unit 716 controls the composition ratio. When a user views an image on a small monitor such as a smartphone, it is difficult for the focus to be out of focus. For this reason, processing for combining not only the area close to the in-focus distance of the subject but also the area away from the in-focus distance is performed. The control unit 716 changes the composition ratio so that the range in which the composition ratio is maximized becomes wide. For example, the composition ratio is controlled so that the composition ratio 410 shown in FIG.

S809で画像処理部713および制御部716は、決定した各合焦画像に対する合成比率を用いて画像の合成を行う。S810で表示部719は、合成された画像を表示する。S811で制御部716は、ユーザがUI部720の操作により拡大指示の操作を行ったか否かを判断する。拡大指示の操作が行われた場合、S812へ進み、拡大指示の操作が行われない場合にはS814に移行する。ユーザの操作指示方法の1つとして、タッチパネルのピンチアウト操作(拇指と人差し指との間隔を拡げる操作)がある。図9は画像の一部を拡大して表示する処理の説明図である。ピンチアウト操作によって、図9(A)の矩形枠904内の画像領域が拡大され、図9(B)の画像910の画角で表示される。   In step S809, the image processing unit 713 and the control unit 716 combine images using the determined combination ratio for each focused image. In step S810, the display unit 719 displays the combined image. In step S811, the control unit 716 determines whether the user has performed an enlargement instruction operation by operating the UI unit 720. If an enlargement instruction operation is performed, the process proceeds to S812. If an enlargement instruction operation is not performed, the process proceeds to S814. As one of the user operation instruction methods, there is a touch panel pinch-out operation (an operation for widening the interval between the thumb and index finger). FIG. 9 is an explanatory diagram of processing for enlarging and displaying a part of an image. By the pinch-out operation, the image area in the rectangular frame 904 in FIG. 9A is enlarged and displayed at the angle of view of the image 910 in FIG. 9B.

S812で制御部716は合成比率が最大となる範囲が狭くなるように合成比率を変更し、被写体の合焦距離に近い領域だけを合成する制御を行う。画像を拡大した場合、大型モニタでの視聴と同様に、合焦の外れが目立ちやすくなる。このため、例えば、図4(A)に示した合成比率400となるように合成比率の制御が行われる。   In step S812, the control unit 716 changes the composition ratio so that the range in which the composition ratio is maximum is narrowed, and performs control to combine only the region close to the in-focus distance of the subject. When the image is enlarged, the out-of-focus state is easily noticeable as in viewing on a large monitor. For this reason, for example, the composition ratio is controlled so that the composition ratio 400 shown in FIG.

S813で画像処理部713および制御部716は、出力画角のみでの合成処理を行う。撮影された画像全体に対して合成処理を行うのではなく、最終的な出力画角に相当する領域(図9(A)の矩形枠904の画像領域)のみ、画像が合成されるので、処理負荷を低減することができる。S814で制御部716は、画像処理部713によりS813で処理された画像のデータを表示部719に出力する制御を行う。表示部719は画像を表示し、処理を終了する。
本実施形態では、撮像装置と通信する表示装置において、表示装置の表示能力および出力画角に応じて合成比率が変更されて表示用画像が生成される。
In step S813, the image processing unit 713 and the control unit 716 perform synthesis processing using only the output field angle. Rather than performing the compositing process on the entire captured image, the image is composed only in the area corresponding to the final output field angle (the image area of the rectangular frame 904 in FIG. 9A). The load can be reduced. In step S <b> 814, the control unit 716 performs control to output the image data processed in step S <b> 813 by the image processing unit 713 to the display unit 719. The display unit 719 displays an image and ends the process.
In the present embodiment, in the display device that communicates with the imaging device, the combination ratio is changed according to the display capability and the output angle of view of the display device, and a display image is generated.

[その他の実施形態]
本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
[Other Embodiments]
The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

100・・・デジタルカメラ、101・・・撮影光学系、102・・・撮像部、103・・・画像処理部、106・・・制御部、108・・・通信部、109・・・表示部

DESCRIPTION OF SYMBOLS 100 ... Digital camera, 101 ... Imaging optical system, 102 ... Imaging part, 103 ... Image processing part, 106 ... Control part, 108 ... Communication part, 109 ... Display part

Claims (15)

異なる合焦位置または絞り値で撮影された被写体に係る複数の画像を処理して前記被写体に焦点を合わせた合焦画像を生成する画像処理装置であって、
前記複数の画像を取得する取得手段と、
前記複数の画像から表示用の画像を生成する制御を行う制御手段と、
前記制御手段の指示にしたがって前記表示用の画像を生成する生成手段と、
前記生成手段により生成された前記表示用の画像を表示手段に出力する出力手段と、を有し、
前記制御手段は、表示解像度または表示画面サイズが異なる前記表示手段ごとに前記複数の画像を合成した画像または前記複数の画像から選択した画像にしたがって前記生成手段により前記合焦画像を生成する制御を行うことを特徴とする画像処理装置。
An image processing apparatus that processes a plurality of images related to a subject photographed at different in-focus positions or aperture values to generate a focused image focused on the subject,
Obtaining means for obtaining the plurality of images;
Control means for performing control to generate an image for display from the plurality of images;
Generating means for generating the display image in accordance with an instruction of the control means;
Output means for outputting the display image generated by the generation means to the display means,
The control means controls the generation means to generate the focused image according to an image obtained by combining the plurality of images or an image selected from the plurality of images for each of the display means having different display resolutions or display screen sizes. An image processing apparatus that performs the processing.
前記制御手段は、前記表示手段の表示解像度または表示画面サイズの情報を取得して前記複数の画像に対するそれぞれの合成比率を決定することを特徴とする請求項1に記載の画像処理装置。   2. The image processing apparatus according to claim 1, wherein the control unit acquires information on a display resolution or a display screen size of the display unit and determines respective composition ratios for the plurality of images. 前記制御手段は、第1の表示手段に画像を表示する場合、前記複数の画像に対する合成比率が高い範囲を、第2の表示手段に画像を表示する場合よりも狭く設定することを特徴とする請求項2に記載の画像処理装置。   The control means, when displaying an image on the first display means, sets a range with a high composition ratio to the plurality of images narrower than when displaying an image on the second display means. The image processing apparatus according to claim 2. 前記第1の表示手段は、前記第2の表示手段よりも表示解像度が高いか、または表示画面サイズが大きいことを特徴とする請求項3に記載の画像処理装置。   The image processing apparatus according to claim 3, wherein the first display unit has a higher display resolution or a larger display screen size than the second display unit. 前記制御手段は、前記表示手段に画像を拡大して表示する場合、前記複数の画像に対する合成比率が高い範囲を、前記画像を拡大して表示しない場合よりも狭く設定することを特徴とする請求項2に記載の画像処理装置。   The control means, when displaying an enlarged image on the display means, sets a range having a high composition ratio for the plurality of images narrower than a case where the image is not enlarged and displayed. Item 3. The image processing apparatus according to Item 2. 前記生成手段は、前記表示手段に画像を拡大して表示する場合、拡大による出力画角の画像領域にて画像の合成を行うことを特徴とする請求項5に記載の画像処理装置。   The image processing apparatus according to claim 5, wherein when the image is enlarged and displayed on the display unit, the generation unit synthesizes the image in an image region having an output angle of view by enlargement. 前記生成手段は、前記第2の表示手段に画像を表示する場合、前記複数の画像における背景領域の画像をぼかす処理を行うことを特徴とする請求項4に記載の画像処理装置。   5. The image processing apparatus according to claim 4, wherein when the image is displayed on the second display unit, the generation unit performs a process of blurring an image of a background area in the plurality of images. 前記制御手段は、異なる絞り値で撮影された前記複数の画像から画像を選択する場合に前記被写体の距離情報を取得して当該被写体の奥行き方向の距離範囲が被写界深度内に収まる絞り値を算出し、算出された当該絞り値で撮影された画像を選択することを特徴とする請求項1に記載の画像処理装置。   The control means obtains distance information of the subject when selecting an image from the plurality of images photographed with different aperture values, and an aperture value in which the distance range in the depth direction of the subject falls within the depth of field The image processing apparatus according to claim 1, wherein an image captured at the calculated aperture value is selected. 前記制御手段は、第1の表示手段に画像を表示する場合、算出された前記絞り値で撮影された画像を選択し、第2の表示手段に画像を表示する場合、最も大きい絞り値で撮影された画像を選択することを特徴とする請求項8に記載の画像処理装置。   The control means selects an image shot with the calculated aperture value when displaying an image on the first display means, and takes an image with the largest aperture value when displaying an image on the second display means. The image processing apparatus according to claim 8, wherein the selected image is selected. 前記第1の表示手段は、前記第2の表示手段よりも表示解像度が高いか、または表示画面サイズが大きいことを特徴とする請求項9に記載の画像処理装置。   The image processing apparatus according to claim 9, wherein the first display unit has a higher display resolution or a larger display screen size than the second display unit. 請求項1から10のいずれか1項に記載の画像処理装置と、撮像部を備える撮像装置。   An imaging apparatus comprising: the image processing apparatus according to claim 1; and an imaging unit. 前記撮像部は、1つの撮影光学系の駆動制御により合焦位置もしくは絞り値を変更して撮影した前記複数の画像を取得するか、または合焦位置もしくは絞り値の異なる複数の撮影光学系によりそれぞれ結像される前記被写体の光学像から前記複数の画像を取得することを特徴とする請求項11に記載の撮像装置。   The imaging unit acquires the plurality of images captured by changing a focus position or an aperture value by driving control of one imaging optical system, or by a plurality of imaging optical systems having different focus positions or aperture values. The imaging apparatus according to claim 11, wherein the plurality of images are acquired from optical images of the subject that are respectively formed. 前記撮像部は、複数のマイクロレンズと、各マイクロレンズが対応する複数の光電変換部を有する撮像素子を備え、前記撮像素子により前記複数の画像を取得することを特徴とする請求項11に記載の撮像装置。   The image pickup unit includes an image pickup device including a plurality of microlenses and a plurality of photoelectric conversion units corresponding to the microlenses, and the image pickup device acquires the plurality of images. Imaging device. 異なる合焦位置または絞り値で撮影された被写体に係る複数の画像を取得する取得手段と、
前記複数の画像から表示用の画像を生成する制御を行う制御手段と、
前記制御手段の指示にしたがって前記表示用の画像を生成する生成手段と、
前記生成手段により生成された前記表示用の画像を表示手段に出力する出力手段と、を有し、前記被写体に焦点を合わせた合焦画像を生成する画像処理装置にて実行される制御方法であって、
前記表示手段の表示解像度または表示画面サイズの情報を前記制御手段が取得するステップと、
前記表示手段ごとに前記複数の画像を合成した画像または前記複数の画像から選択した画像にしたがって前記生成手段により前記合焦画像を生成する制御を前記制御手段が行うステップと、を有することを特徴とする画像処理装置の制御方法。
Acquisition means for acquiring a plurality of images relating to a subject photographed at different in-focus positions or aperture values;
Control means for performing control to generate an image for display from the plurality of images;
Generating means for generating the display image in accordance with an instruction of the control means;
Output means for outputting the display image generated by the generating means to the display means, and a control method executed by an image processing apparatus that generates a focused image focused on the subject. There,
The control means obtaining information of the display resolution or display screen size of the display means;
The control means performing control to generate the focused image by the generation means according to an image obtained by combining the plurality of images for each display means or an image selected from the plurality of images. A control method of the image processing apparatus.
請求項14に記載の各ステップを画像処理装置のコンピュータに実行させるプログラム。

A program for causing a computer of an image processing apparatus to execute each step according to claim 14.

JP2016047321A 2016-03-10 2016-03-10 Image processing apparatus and control method thereof, imaging apparatus, and program Expired - Fee Related JP6639276B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016047321A JP6639276B2 (en) 2016-03-10 2016-03-10 Image processing apparatus and control method thereof, imaging apparatus, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016047321A JP6639276B2 (en) 2016-03-10 2016-03-10 Image processing apparatus and control method thereof, imaging apparatus, and program

Publications (2)

Publication Number Publication Date
JP2017163412A true JP2017163412A (en) 2017-09-14
JP6639276B2 JP6639276B2 (en) 2020-02-05

Family

ID=59857218

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016047321A Expired - Fee Related JP6639276B2 (en) 2016-03-10 2016-03-10 Image processing apparatus and control method thereof, imaging apparatus, and program

Country Status (1)

Country Link
JP (1) JP6639276B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018179695A1 (en) * 2017-03-31 2018-10-04 ソニー株式会社 Control device, imaging device, control method and program
JP2021097350A (en) * 2019-12-18 2021-06-24 キヤノン株式会社 Image processing device, imaging device, image processing method, program, and recording medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015231058A (en) * 2014-06-03 2015-12-21 オリンパス株式会社 Imaging device, control method for imaging device and program
JP2016024489A (en) * 2014-07-16 2016-02-08 キヤノン株式会社 Image processing apparatus, imaging device, image processing method, and program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015231058A (en) * 2014-06-03 2015-12-21 オリンパス株式会社 Imaging device, control method for imaging device and program
JP2016024489A (en) * 2014-07-16 2016-02-08 キヤノン株式会社 Image processing apparatus, imaging device, image processing method, and program

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018179695A1 (en) * 2017-03-31 2018-10-04 ソニー株式会社 Control device, imaging device, control method and program
US10999488B2 (en) 2017-03-31 2021-05-04 Sony Corporation Control device, imaging device, and control method
JP2021097350A (en) * 2019-12-18 2021-06-24 キヤノン株式会社 Image processing device, imaging device, image processing method, program, and recording medium
JP7409604B2 (en) 2019-12-18 2024-01-09 キヤノン株式会社 Image processing device, imaging device, image processing method, program and recording medium

Also Published As

Publication number Publication date
JP6639276B2 (en) 2020-02-05

Similar Documents

Publication Publication Date Title
US9674408B2 (en) Image pickup apparatus that utilizes a refocusable range, image processing method, and recording medium
JP5180407B2 (en) Stereo imaging device and parallax image restoration method
JP6838994B2 (en) Imaging device, control method and program of imaging device
CN109255810B (en) Image processing apparatus and image processing method
US11095806B2 (en) Display control apparatus, display control method, and image capturing apparatus
JP6800797B2 (en) Image pickup device, image processing device, control method and program of image pickup device
US9535193B2 (en) Image processing apparatus, image processing method, and storage medium
JP5469258B2 (en) Imaging apparatus and imaging method
JP2013093754A (en) Imaging apparatus
JP2012049773A (en) Imaging apparatus and method, and program
JP6808333B2 (en) Display control device and method, and imaging device
JP6608194B2 (en) Image processing apparatus, control method therefor, and program
US20160275657A1 (en) Imaging apparatus, image processing apparatus and method of processing image
JP2018074361A (en) Imaging apparatus, imaging method, and program
JP6639276B2 (en) Image processing apparatus and control method thereof, imaging apparatus, and program
JP7198055B2 (en) Image processing device, its control method, and program
JP2012124650A (en) Imaging apparatus, and imaging method
JP2020136697A (en) Image processing apparatus, imaging apparatus, image processing method, and program
JP7421008B2 (en) Imaging device, imaging method, and program
JP7080688B2 (en) Image processing device, image pickup device, image processing method, program
US20240089597A1 (en) Image capturing apparatus for capturing and compositing images different in in-focus position, control method, and storage medium
US20220358667A1 (en) Image processing apparatus and method, and image capturing apparatus and control method thereof, and storage medium
JP2018054815A (en) Region discrimination device, control method therefor, and control program, and imaging apparatus
JP6900228B2 (en) Imaging device, imaging system, imaging device control method, and program
JP2017134154A (en) Focus control device, imaging device, and focus control program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191029

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191224

R151 Written notification of patent or utility model registration

Ref document number: 6639276

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees