[go: up one dir, main page]

JP2003189171A - Image processing apparatus and method, control program, and recording medium - Google Patents

Image processing apparatus and method, control program, and recording medium

Info

Publication number
JP2003189171A
JP2003189171A JP2002300410A JP2002300410A JP2003189171A JP 2003189171 A JP2003189171 A JP 2003189171A JP 2002300410 A JP2002300410 A JP 2002300410A JP 2002300410 A JP2002300410 A JP 2002300410A JP 2003189171 A JP2003189171 A JP 2003189171A
Authority
JP
Japan
Prior art keywords
image
image processing
shift amount
images
parallax
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.)
Withdrawn
Application number
JP2002300410A
Other languages
Japanese (ja)
Inventor
Akira Yamazaki
亮 山▲崎▼
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 JP2002300410A priority Critical patent/JP2003189171A/en
Publication of JP2003189171A publication Critical patent/JP2003189171A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)

Abstract

(57)【要約】 【課題】画像処理によりあたかも大口径のレンズによる
ボケ味をもつ画像を生成するとともに、より高解像な画
像を得ることができる画像方法を提供する。 【解決手段】入力された視差を有する複数の画像内の複
数の領域における画像ずれ量を算出し(S101)、算
出された画像ずれ量に応じて複数の領域の画像に対して
少なくとも異なる2つの画像処理(S104,S10
5)を切り替えて行う。
(57) [Summary] [PROBLEMS] To provide an image method capable of generating an image having a blurring effect by a large-diameter lens by image processing and obtaining a higher-resolution image. Kind Code: A1 An image shift amount in a plurality of regions in a plurality of images having input parallax is calculated (S101), and at least two image shift amounts different from each other in the plurality of regions according to the calculated image shift amount. Image processing (S104, S10
Perform 5) by switching.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、画像にボケを付加
しボケ味のある画像を生成する画像処理装置及び方法及
び制御プログラム及び記録媒体に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image processing apparatus and method, a control program, and a recording medium that add blur to an image and generate an image with blur.

【0002】[0002]

【従来の技術】一般に、カメラやデジタルカメラなどの
画質は撮像レンズの性能によるところが大きいとされて
いるが、一眼レフレックス方式のように高級機と呼ばれ
るカャ奄フ撮影レンズは、口径が大きいため明るい像を
得ることができる。
2. Description of the Related Art Generally, it is said that the image quality of a camera or a digital camera depends largely on the performance of an image pickup lens. However, a high-end camera lens such as a single lens reflex system has a large aperture. You can get a bright image.

【0003】そして、被写体輝度が同じ場合であって
も、絞りとシャッタ速度の組み合わせを種々選択するこ
とにより被写界深度を変えることができ、その結果、主
要被写体以外の被写体のボケ具合を自由に制御できる。
高級機により魅力ある写真が得られるのはこのような理
由によるところが大きい。
Even when the subject brightness is the same, the depth of field can be changed by selecting various combinations of the aperture and the shutter speed, and as a result, the degree of blurring of subjects other than the main subject can be freely set. Can be controlled.
It is for this reason that attractive photos can be obtained with high-end models.

【0004】しかしながら、大口径のレンズを有したカ
メラは、一般に撮像レンズが大型であるためにカメラ全
体が大型・重量化してしまうという欠点がある。これに
対し、レンズシャッタ方式などのカメラは小型・軽量で
あるという利点こそあるが、撮像レンズの口径が小さ
く、被写界深度が大きくなるために、大口径のレンズを
備えたカメラで撮影したようなボケ味のある画像を撮る
ことが困難である。
However, a camera having a large-diameter lens has a drawback that the entire camera is large and heavy because the image pickup lens is generally large. On the other hand, a lens shutter type camera has the advantage of being small and lightweight, but since the image pickup lens has a small aperture and a large depth of field, it was taken with a camera equipped with a large aperture lens. It is difficult to take such a blurred image.

【0005】そこで、特開平9−181966号公報で
は、視差を有する一対の撮像レンズを使って撮像された
画像から画像処理によりボケを付加する方法を開示して
いる。図19はこの従来例における画像処理方法の概念
を示す図である。
Therefore, Japanese Laid-Open Patent Publication No. 9-181966 discloses a method of adding blur by image processing from an image picked up by a pair of image pickup lenses having a parallax. FIG. 19 is a diagram showing the concept of the image processing method in this conventional example.

【0006】まず、視差を有する1対の画像A、Bを入
力する。次に、この画像A、Bをもとに公知の相関演算
などを用いて画像内における各被写体の画像ずれ量を算
出し、この画像ずれ量を基に各被写体の距離を算出す
る。そして、この距離情報をもとに各被写体のボケを算
出し、このボケを再現するような画像処理を画像Aまた
は画像Bに施す。なお、ボケを算出する際には、操作者
が撮影レンズの焦点距離、Fナンバー、ピント位置など
をあらかじめ入力し、距離情報を合わせてボケが算出さ
れる。以上のようにして、口径の小さいレンズで撮影し
た画像から、大口径のレンズによるボケ味を持つ画像を
生成することができる。
First, a pair of images A and B having parallax are input. Next, based on the images A and B, a known correlation calculation or the like is used to calculate the image shift amount of each subject in the image, and the distance of each subject is calculated based on the image shift amount. Then, the blur of each subject is calculated based on the distance information, and image processing for reproducing the blur is performed on the image A or the image B. When calculating the blur, the operator inputs the focal length of the photographing lens, the F number, the focus position, and the like in advance, and the blur is calculated by combining the distance information. As described above, it is possible to generate an image having a blur due to a large-diameter lens from an image taken with a small-diameter lens.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上記従
来例においては、2つの画像A、Bは画像ずれ量を算出
するためだけに使用され、ボケを付加する画像処理を経
て生成される画像は画像A、画像Bのどちらか一方だけ
である。例えば、デジタルカメラを例に挙げると、画像
Aもしくは画像Bの画素数がそれぞれ640×480画
素(約30万画素)だと仮定すると、2つの画像A、B
を得るためには最低でも60万画素の撮像素子、もしく
は、30万画素の撮像素子2つが必要となる。しかしな
がら、ボケを付加され生成される画像は30万画素であ
る。すなわち、画像処理によりボケを付加した任意の画
素数の画像を得るためには、少なくともその2倍の画素
数が必要となり、コスト、スペース共にかさむわりに高
解像な画像が得られないといった問題があった。
However, in the above-mentioned conventional example, the two images A and B are used only for calculating the image shift amount, and the image generated through the image processing for adding the blur is the image. Only one of A and image B is present. For example, taking a digital camera as an example, assuming that the number of pixels of the image A or the image B is 640 × 480 pixels (about 300,000 pixels), the two images A and B are
In order to obtain the above, at least an image pickup device of 600,000 pixels or two image pickup devices of 300,000 pixels are required. However, the image generated by adding blur is 300,000 pixels. That is, in order to obtain an image with an arbitrary number of pixels with blur added by image processing, at least twice the number of pixels is required, which causes a problem that a high-resolution image cannot be obtained due to an increase in cost and space. there were.

【0008】さらに、各被写体の画像ずれ量(距離)を
算出する際に、画像のコントラストが低い場合、相関演
算による画像ずれ量は算出不能となる場合が多い。しか
しながら、上記従来例においては、このように算出不能
となった場合の処理動作についても何ら考慮されておら
ず、例えば、本来ボケを付加したくない被写体が算出不
能となった場合、自動的にボケが付加され、出力される
画像は不自然で、且つ意図とも反しており低画質であ
る。
Further, when the image shift amount (distance) of each subject is calculated, if the image contrast is low, the image shift amount by the correlation calculation cannot be calculated in many cases. However, in the above-mentioned conventional example, no consideration is given to the processing operation in the case where the calculation cannot be performed in this way. Blurred images are output, and the output image is unnatural and unintended, and has low image quality.

【0009】従って、本発明は上述した課題に鑑みてな
されたものであり、その目的は、画像処理によりあたか
も大口径のレンズによるボケ味をもつ画像を生成すると
ともに、より高解像な画像を得ることができる画像処理
装置および方法及び制御プログラム及び記録媒体を提供
することである。
Therefore, the present invention has been made in view of the above-mentioned problems, and an object of the present invention is to generate an image having a blur effect as if by a lens having a large aperture by image processing and to obtain a higher resolution image. An object is to provide an image processing apparatus and method, a control program, and a recording medium that can be obtained.

【0010】また、本発明の他の目的は、画像ずれ量が
算出不能な場合にも適切な処理を行い画質を劣化させな
い画像処理装置及び方法及び制御プログラム及び記録媒
体を提供することである。
Another object of the present invention is to provide an image processing apparatus and method, a control program, and a recording medium which perform appropriate processing even when the image shift amount cannot be calculated and do not deteriorate the image quality.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に、入力された視差を有する複数の画像内の複数の領域
における画像ずれ量を算出する画像ずれ量算出手段と、
該画像ずれ量算出手段により算出された前記画像ずれ量
に応じて前記複数の領域の画像に対して少なくとも異な
る2つの画像処理を切り替えて行う画像処理手段とを有
する画像処理装置とするものである。
In order to achieve the above object, image shift amount calculation means for calculating the image shift amount in a plurality of regions in a plurality of images having input parallax,
The image processing apparatus includes an image processing unit that performs at least two different image processes for the images of the plurality of regions according to the image displacement amount calculated by the image displacement amount calculation unit. .

【0012】また、本発明は、入力された視差を有する
複数の画像内の複数の領域における画像ずれ量を算出
し、算出された前記画像ずれ量に応じて前記複数の領域
の画像に対して少なくとも異なる2つの画像処理を切り
替えて行う画像処理方法とするものである。
Further, according to the present invention, an image shift amount in a plurality of regions in a plurality of images having an input parallax is calculated, and an image shift amount for the plurality of regions is calculated according to the calculated image shift amount. This is an image processing method in which at least two different image processes are switched.

【0013】また、本発明は、上記の画像処理方法をコ
ンピュータに実行させる制御プログラムとするものであ
る。
The present invention also provides a control program for causing a computer to execute the above image processing method.

【0014】また、本発明は、上記の制御プログラムを
記録した媒体とするものである。
The present invention also provides a medium recording the above control program.

【0015】また、本発明は、入力された視差を有する
複数の画像内の複数の領域における画像ずれ量を算出す
る画像ずれ量算出手段と、該画像ずれ量算出手段により
算出された前記画像ずれ量に応じて前記複数の領域の画
像に対してボケを付加する画像処理を行うぼかし画像処
理手段と、前記画像ずれ量が算出不能である領域の画像
に対してはボケを付加する画像処理を禁止する制御手段
とを有する画像処理装置とするものである。
Further, according to the present invention, an image shift amount calculating means for calculating an image shift amount in a plurality of regions in a plurality of images having input parallax, and the image shift calculated by the image shift amount calculating means. Blurred image processing means for performing image processing for adding blur to the images of the plurality of regions according to the amount, and image processing for adding blur to the image of the region where the image shift amount cannot be calculated. The image processing apparatus has a prohibiting control unit.

【0016】また、本発明は、入力された視差を有する
複数の画像内の複数の領域における画像ずれ量を算出
し、算出された前記画像ずれ量に応じて前記複数の領域
の画像に対してボケを付加するぼかし画像処理を行う画
像処理方法であって、前記画像ずれ量が算出不能である
領域の画像に対してはボケを付加する画像処理を禁止す
る画像処理方法とするものである。
Further, according to the present invention, the image shift amount in a plurality of regions in the plurality of images having the input parallax is calculated, and the image of the plurality of regions is calculated according to the calculated image shift amount. An image processing method for performing a blurred image process for adding blur, which prohibits image processing for adding blur to an image of an area in which the image shift amount cannot be calculated.

【0017】また、本発明は、上記の画像処理方法をコ
ンピュータに実行させる制御プログラムとするものであ
る。
The present invention also provides a control program for causing a computer to execute the above image processing method.

【0018】また、本発明は、上記の制御プログラムを
記録した媒体とするものである。
The present invention also provides a medium recording the above control program.

【0019】また、本発明は、第1の画像と、該第1の
画像に対して視差を有する第2の画像を入力する入力手
段と、前記入力手段により入力された前記第1、第2の
画像の対応する第1の領域と該第1の領域とは異なる第
2の領域に対して異なる画像処理を施して、前記第1の
画像と第2の画像を合成処理する画像処理手段とを有す
る画像処理装置とするものである。
Further, according to the present invention, the first image, an input means for inputting a second image having a parallax with respect to the first image, and the first and second input by the input means. Image processing means for performing different image processing on a corresponding first area of the image and a second area different from the first area, and combining the first image and the second image. The image processing apparatus has the following.

【0020】また、本発明は、第1の画像と、該第1の
画像に対して視差を有する第2の画像を入力する入力手
段と、前記第1、第2の画像の前記視差による画像のず
れ量に基づいて少なくとも第1の画像に所定のボケを付
加すると共に、前記第1、第2の画像の前記視差による
画像のずれ量が所定検出レベル以下の場合には、前記所
定のボケの付加を行わない画像処理装置とするものであ
る。
Further, according to the present invention, the first image, an input means for inputting a second image having a parallax with respect to the first image, and an image obtained by the parallax of the first and second images. A predetermined blur is added to at least the first image based on the shift amount of the image, and when the shift amount of the image due to the parallax of the first and second images is equal to or less than a predetermined detection level, the predetermined blur is generated. The image processing apparatus does not add the.

【0021】また、本発明は、第1の画像と、該第1の
画像に対して視差を有する第2の画像を入力すると共
に、前記入力された第1、第2の画像の対応する第1の
領域と該第1の領域とは異なる第2の領域に対して異な
る画像処理を施して、前記第1の画像と第2の画像を合
成処理する画像処理方法とするものである。
Further, according to the present invention, a first image and a second image having a parallax with respect to the first image are input, and the corresponding first and second images corresponding to each other are input. An image processing method is provided in which different image processing is performed on a first area and a second area different from the first area, and the first image and the second image are combined.

【0022】また、本発明は、第1の画像と、該第1の
画像に対して視差を有する第2の画像を入力し、前記第
1、第2の画像の前記視差による画像のずれ量に基づい
て少なくとも第1の画像に所定のボケを付加すると共
に、前記第1、第2の画像の前記視差による画像のずれ
量が所定検出レベル以下の場合には、前記所定のボケの
付加を行わない画像処理方法とするものである。
Further, according to the present invention, a first image and a second image having a parallax with respect to the first image are input, and an image shift amount due to the parallax between the first and second images is input. Based on the above, at least a predetermined blur is added to the first image, and when the image shift amount due to the parallax of the first and second images is equal to or less than a predetermined detection level, the predetermined blur is added. The image processing method is not performed.

【0023】また、本発明は、上記それぞれの画像処理
方法をコンピュータに実行させるための制御プログラム
とするものである。
The present invention also provides a control program for causing a computer to execute each of the above image processing methods.

【0024】また、本発明は、上記制御プログラムを記
録した記録媒体とするものである。
The present invention also provides a recording medium on which the above control program is recorded.

【0025】[0025]

【発明の実施の形態】以下、本発明の好適な実施形態に
ついて、添付図面を参照して説明する。
Preferred embodiments of the present invention will be described below with reference to the accompanying drawings.

【0026】(第1の実施形態)図1は本発明の第1の
実施形態の画像処理方法の概念を示す図である。図中、
画像C、画像D、画像E…は視差を有する複数の画像で
ある。
(First Embodiment) FIG. 1 is a view showing the concept of an image processing method according to the first embodiment of the present invention. In the figure,
The image C, the image D, the image E, ... Are a plurality of images having parallax.

【0027】まずステップS101では、これらの複数
の画像を入力し、画像内の複数の領域における画像ずれ
量を公知の相関演算によって算出する。次に、ステップ
S102では、各領域において画像ずれ量が算出不能か
否かを判別する。そして、算出不能でなかった場合はス
テップS103へ進み、一方、算出不能であった場合は
ステップS106へ進む。次に、ステップS103で
は、この画像ずれ量をもとに主被写体と背景の分離を行
い、撮影画面内において主被写体と判別された領域では
ステップS104へ進み、背景と判別された領域の場合
はステップS105へ進む。ステップS104では、ス
テップS106の画像合成時に画像のずれによる画質の
低下が生じないように画像ずれ量を所定量に戻すずれ補
正画像処理(詳細は後述する)を行う。一方、ステップ
S105では、撮影光学系とは異なるボケを付加するぼ
かし画像処理を行う。そして、最後にステップS106
で、複数の画像を合成して、より高解像な1枚の画像を
作成する。以上が本実施形態における画像処理方法の大
まかな流れである。なお、図中点線で囲む107では、
少なくとも異なる2つの画像処理が行われていると表現
することができる。
First, in step S101, these plural images are input, and the image shift amounts in the plural regions in the image are calculated by a known correlation calculation. Next, in step S102, it is determined whether or not the image shift amount cannot be calculated in each area. Then, if the calculation is not possible, the process proceeds to step S103. On the other hand, if the calculation is not possible, the process proceeds to step S106. Next, in step S103, the main subject and the background are separated based on the image shift amount, the process proceeds to step S104 in the area determined as the main subject in the shooting screen, and in the case of the area determined as the background. It proceeds to step S105. In step S104, shift correction image processing (details will be described later) is performed to return the image shift amount to a predetermined amount so that the image quality is not deteriorated due to the shift of the images during the image synthesis in step S106. On the other hand, in step S105, blurred image processing for adding blurring different from that of the photographing optical system is performed. Finally, in step S106
Then, a plurality of images are combined to create one image with higher resolution. The above is the general flow of the image processing method in the present embodiment. In addition, in 107 surrounded by a dotted line in the figure,
It can be said that at least two different image processes are performed.

【0028】続いて、上記画像処理方法を実現する具体
例について説明する。
Next, a specific example for realizing the above image processing method will be described.

【0029】図2乃至図4は視差を有する複数の画像を
撮影可能な撮像装置の撮像部を示す図である。これらは
特開2001−78213号公報に開示される撮像装置
と同じ構成のもので、カラーフィルターの色別に設けら
れた光学系を有し、それぞれの画像を合成することでベ
イヤー配列の単板撮像素子で撮像された画像と同等の画
像を形成することができる。そして、独立の光学系を有
しているためそれぞれの画像は視差を有しており、被写
体の距離によってそれぞれの光学像の位置、すなわち画
像ずれ量は変化する。また、この画像ずれ量はある所定
の距離で、1/2画素となるように設計されており、少
ない画素数で高解像な画像を得られる画素ずらしという
手法を用いている。本実施形態では、この撮像部を用い
た撮像装置より得られる画像に対して画像処理を行う。
2 to 4 are views showing an image pickup section of an image pickup apparatus capable of picking up a plurality of images having parallax. These have the same configuration as the image pickup apparatus disclosed in Japanese Patent Laid-Open No. 2001-78213, have an optical system provided for each color of the color filter, and combine the respective images to obtain a single-panel image pickup with a Bayer array. An image equivalent to the image captured by the element can be formed. Each image has parallax because it has an independent optical system, and the position of each optical image, that is, the image shift amount, changes depending on the distance of the subject. Further, this image shift amount is designed to be 1/2 pixel at a certain predetermined distance, and a method called pixel shift is used which can obtain a high-resolution image with a small number of pixels. In the present embodiment, image processing is performed on an image obtained by an image pickup apparatus using this image pickup unit.

【0030】では、始めに撮像部の詳細な構成について
説明する。
First, the detailed structure of the image pickup section will be described.

【0031】図2は視差を有する複数の画像を撮影する
撮像部の側面図である。撮像部201は、入射面側から
撮像レンズ202、筐体203、撮像素子204を備え
て構成され、筐体203を撮像レンズ202と撮像素子
204で挟み込むような構造となっている。また、図3
に示されるように撮像レンズ202の入射面側には開口
部205a、205cを有する絞り205とカラーフィ
ルター206a、206cが印刷などの手段により形成
されている。
FIG. 2 is a side view of an image pickup section for picking up a plurality of images having parallax. The imaging unit 201 includes an imaging lens 202, a housing 203, and an imaging element 204 from the incident surface side, and has a structure in which the housing 203 is sandwiched between the imaging lens 202 and the imaging element 204. Also, FIG.
As shown in FIG. 3, a diaphragm 205 having openings 205a and 205c and color filters 206a and 206c are formed on the incident surface side of the imaging lens 202 by means of printing or the like.

【0032】図3、図4は撮像レンズ202を入射面も
しくは射出面側から見た図で、4つのレンズ部202
a、202b、202c、202dと、4つの開口部2
05aA205b、205c、205dを有している。
そして、その4つの開口部205a、205b、205
c、205dに対応して、4つのカラーフィルター20
6a、206b、206c、206dが形成されてい
る。したがって、撮像素子204上にも4つの光学像が
形成されることとなる。なお、レンズ部202a、20
2b、202c、202dには670nm以降の波長域
について低い透過率を持たせた赤外カットフィルター膜
が形成されている。そして、レンズ部202aと202
bの間隔、レンズ部202aと202cの間隔、レンズ
部202b,202cと202dの間隔はそれぞれ等し
く設定されている。
FIGS. 3 and 4 are views of the image pickup lens 202 as seen from the incident surface side or the exit surface side.
a, 202b, 202c, 202d and four openings 2
05aA 205b, 205c, 205d.
Then, the four openings 205a, 205b, 205
4 color filters 20 corresponding to c and 205d
6a, 206b, 206c, 206d are formed. Therefore, four optical images are also formed on the image sensor 204. The lens units 202a, 20a
2b, 202c, and 202d are formed with infrared cut filter films having low transmittance in the wavelength range of 670 nm and thereafter. Then, the lens units 202a and 202
The distance b, the distance between the lens portions 202a and 202c, and the distance between the lens portions 202b, 202c and 202d are set equal to each other.

【0033】図5は撮像素子204を入射面側から見た
図で、4つのレンズ部202a、202b、202c、
202dに対応して4つの撮像領域204a、204
b、204c、204dを有している。なお、撮像素子
204は4つの撮像領域204a、204b、204
c、204d以外の領域においても付加画素として画素
部を有しており、撮像時はこの4つの撮像領域を切出し
て使用する構成となっている。
FIG. 5 is a view of the image pickup element 204 as seen from the incident surface side. The four lens portions 202a, 202b, 202c,
Four imaging regions 204a, 204 corresponding to 202d
b, 204c, and 204d. It should be noted that the image sensor 204 has four imaging regions 204a, 204b, 204.
Pixels are also provided as additional pixels in areas other than c and 204d, and these four imaging areas are cut out and used during imaging.

【0034】ここで、カラーフィルター206aおよび
206dは主に緑色を透過する分光透過率特性を有し、
光学フィルター206bは主に赤色を透過する分光透過
率特性を有し、さらに、光学フィルター206cは主に
青色を透過する分光透過率特性を有している。すなわ
ち、これらは原色フィルターである。
Here, the color filters 206a and 206d have a spectral transmittance characteristic of mainly transmitting green color,
The optical filter 206b has a spectral transmittance characteristic of mainly transmitting red color, and the optical filter 206c has a spectral transmittance characteristic of mainly transmitting blue color. That is, these are primary color filters.

【0035】次に画素ずらしの構成、すなわち視差によ
る画像ずれについて説明する。図6は、図2の撮像素子
202を入射面から見た図である。図中、点Soは撮像
素子画素形成部の中心点で、点Sa、Sb、Sc、Sd
は撮像領域204a、204b、204c、204dの
それぞれの中心点を表している。
Next, a pixel shift configuration, that is, an image shift due to parallax will be described. FIG. 6 is a diagram of the image sensor 202 of FIG. 2 viewed from the incident surface. In the figure, a point So is a center point of the image sensor pixel formation portion, and points Sa, Sb, Sc, and Sd.
Represents the center point of each of the imaging regions 204a, 204b, 204c, and 204d.

【0036】一方、図7は図2に示す撮像部のうち撮影
レンズ202と撮像素子204の受光面をのみを太線で
表示した光学系の断面図である。図中、中心線Loは中
心点Soを通過し撮像素子204の受光面に直交する線
で、いまこの中心線Lo上にあり距離dだけ隔てられた
点光源Kについて考えてみる。点光源Kを発し撮像レン
ズ202のレンズ部202a、202cを通過する光線
のうち主光線をLa、Lcとし撮像素子204の受光面
との交点をKa、Kcとする。なお、レンズ部202
b、202dについては表示されないが、対称形である
ため同様に考えればよく、説明は省略する。そして、図
6において、点光源Kに関する各レンズ部202a、2
02b、202c、202dの主光線と撮像素子204
の交点がKa、Kb、Kc、Kdとして示されている。
したがって、距離dに位置する被写体を撮影した場合に
撮像素子204上に形成される4つの光学像を図6にお
いて207a、207b、207c、207dとする
と、これらの光学像は点Ka、Kb、Kc、Kdを中心
にそれぞれ形成されていることとなる。
On the other hand, FIG. 7 is a cross-sectional view of the optical system in which only the taking lens 202 and the light receiving surface of the image pickup element 204 are indicated by thick lines in the image pickup section shown in FIG. In the figure, the center line Lo is a line that passes through the center point So and is orthogonal to the light receiving surface of the image sensor 204, and consider the point light source K that is on the center line Lo and is separated by a distance d. Of the light rays emitted from the point light source K and passing through the lens portions 202a and 202c of the image pickup lens 202, the principal rays are La and Lc, and the intersections with the light receiving surface of the image pickup element 204 are Ka and Kc. The lens unit 202
Although b and 202d are not displayed, since they are symmetrical, they can be considered in the same way, and a description thereof will be omitted. Then, in FIG. 6, the lens portions 202a, 2 related to the point light source K
02b, 202c, 202d chief rays and image sensor 204
The intersections of are shown as Ka, Kb, Kc and Kd.
Therefore, if the four optical images formed on the image pickup element 204 when a subject located at the distance d is photographed are 207a, 207b, 207c, and 207d in FIG. 6, these optical images are points Ka, Kb, and Kc. , Kd, respectively.

【0037】このとき点Ka、Kb、Kc、Kdは点S
a、Sb、Sc、Sdから中心点Soに向かって1/4
画素ずれるようように設定されている。すなわち、それ
ぞれの撮像領域204a、204b、204c、204
dは互いに1/2画素ずれた光学像を受光していること
になり、画素ずらしに他ならない。そして、光学像20
7a、207b、207c、207dを点Sa、Sb、
Sc、Sdが重なるように合成すると、画素ずらしによ
る高解像な画像を得ることができる。さらに、前述した
ようなカラーフィルターを設けることにより、合成され
る画像はカラー画像に最適な公知のベイヤー配列画像と
なる。以上が本実施例における画素ずらしの構成であ
る。
At this time, points Ka, Kb, Kc, and Kd are points S.
1/4 from a, Sb, Sc, Sd toward the center point So
It is set so as to shift the pixels. That is, the respective imaging regions 204a, 204b, 204c, 204
Since d receives the optical images which are shifted by 1/2 pixel from each other, it is nothing but a pixel shift. Then, the optical image 20
7a, 207b, 207c, 207d to points Sa, Sb,
By combining so that Sc and Sd overlap, a high resolution image can be obtained by shifting the pixels. Furthermore, by providing the color filter as described above, the image to be combined becomes a known Bayer array image that is optimal for color images. The above is the configuration of pixel shifting in the present embodiment.

【0038】ところで、図7に示すように、点光源K
(被写体)の距離dが変化し点光源Kxに移動した場合
を考えると、レンズ部202a、202cの主光線は図
中点線のように変化し、主光線と撮像素子204の受光
面との交点Ka、Kcも点Kxa、Kxcの位置へと移
動する。すなわち、これは被写体の距離によっては光学
像の位置が変化する、すなわち、1/2画素ずらしが成
立する状態における撮像領域202a、202cで受光
される光学像に対し、このような場合の光学像はずれが
生じていることを示している。そして、本実施形態では
このずれ具合を画像ずれ量と呼んでいる。例えば、1/
2画素ずらしにおける画像ずれ量の絶対値は0.5[p
ixel]である。
By the way, as shown in FIG.
Considering the case where the distance d of the (object) changes and moves to the point light source Kx, the chief rays of the lens units 202a and 202c change as shown by the dotted line in the figure, and the intersection of the chief ray and the light receiving surface of the image sensor 204 is determined. Ka and Kc also move to the positions of points Kxa and Kxc. That is, the position of the optical image changes depending on the distance to the subject, that is, the optical image received in the imaging regions 202a and 202c in the state where the 1/2 pixel shift is established, in contrast to the optical image in such a case. This indicates that there is a gap. In the present embodiment, this degree of deviation is called the image deviation amount. For example, 1 /
The absolute value of the image shift amount when shifting two pixels is 0.5 [p
image].

【0039】では、次に本実施形態における被写体距離
と視差の関係について説明する。
Next, the relationship between subject distance and parallax in this embodiment will be described.

【0040】図7において、今説明したように点光源K
が撮像レンズ202側に移動すると点Ka、Kcの間隔
は広がる、すなわち画像ずれ量は大きくなる。一方、点
光源Kが撮像レンズ202から遠ざかる方向へ移動する
と、点Ka、Kcの間隔は狭まる、すなわち画像ずれ量
は小さくなる。そこで、この距離による画像ずれ量の変
化量と画素ピッチを便宜設定し、撮影画面内の複数の位
置における画像ずれ量を検出することで、容易に被写体
と背景の分離を行うことができる。
In FIG. 7, the point light source K as just described
Is moved toward the image pickup lens 202 side, the interval between the points Ka and Kc is widened, that is, the image shift amount is increased. On the other hand, when the point light source K moves away from the imaging lens 202, the distance between the points Ka and Kc becomes narrower, that is, the image shift amount becomes smaller. Therefore, by setting the change amount of the image shift amount and the pixel pitch depending on the distance for convenience and detecting the image shift amounts at a plurality of positions in the shooting screen, the subject and the background can be easily separated.

【0041】それでは、本実施形態における画像ずれ量
を実際に計算してみる。図7において、中心線Lo上の
任意の位置における点光源をKxとし、そのときの受光
面からの距離をdxとする。また、図のようにa、c、
xa、xcを定め、レンズ部202a、202cの間隔
をl、撮像レンズ202と撮像素子204の受光面間の
距離をfとする。このとき、”xa+xc”が距離dに
おける画像ずれ量を基準としたときの距離dxにおける
画像ずれ量を表し、これを算出する。そして、三角形の
相似条件から、以下の式(1)、(2)が成立する。 dx−f:l=f:a+c+xa+xc(1) d−f:l=f:a+c(2)
Now, let us actually calculate the image shift amount in this embodiment. In FIG. 7, a point light source at an arbitrary position on the center line Lo is Kx, and a distance from the light receiving surface at that time is dx. Also, as shown in the figure, a, c,
xa and xc are defined, the distance between the lens units 202a and 202c is 1, and the distance between the image pickup lens 202 and the light receiving surface of the image pickup element 204 is f. At this time, “xa + xc” represents the image shift amount at the distance dx when the image shift amount at the distance d is used as a reference, and this is calculated. Then, the following equations (1) and (2) are established from the similarity condition of the triangles. dx-f: l = f: a + c + xa + xc (1) df: l = f: a + c (2)

【0042】いま、撮像レンズ202のレンズ部202
aは緑色のカラーフィルター、レンズ部202cは赤色
のカラーフィルターであるため、波長による視差変化敏
感度の違いはあるが、その違いはごくわずかであるため
無視して考えると、aとc、xaとxcはそれぞれ等し
い。そこで、a、c、xa、xcを次のように定める。 a=c=P/2,xa=xc=X/2(3) 上記式(3)を式(1)、(2)に代入し、Xについて
解くと任意の距離dxにおける画像ずれ量X(すなわ
ち”xa+xc”の値)が算出され、以下の式(4)と
なる。 X=lf/(dx−f)−lf/(d−f)(4) そして、撮像素子204の画素ピッチをSpとし、上記
画像ずれ量XをSpで割ると、画素単位の画像ずれ量を
算出することができる。
Now, the lens section 202 of the image pickup lens 202
Since a is a green color filter and lens part 202c is a red color filter, there is a difference in parallax change sensitivity depending on wavelength, but the difference is negligible, so when ignored, a, c, and xa And xc are equal. Therefore, a, c, xa, and xc are defined as follows. a = c = P / 2, xa = xc = X / 2 (3) Substituting the above equation (3) into equations (1) and (2) and solving for X, the image shift amount X (at an arbitrary distance dx That is, the value of “xa + xc”) is calculated, and the following equation (4) is obtained. X = lf / (dx−f) −lf / (d−f) (4) Then, when the pixel pitch of the image sensor 204 is Sp and the image shift amount X is divided by Sp, the image shift amount in pixel units is obtained. It can be calculated.

【0043】それでは、上記(4)式をもとに、各パラ
メータの値を設定して画像ずれ量と距離の関係を求めて
みる。以下の式(5)が本実施形態に用いた各パラメー
タの値である。 f=1.45mm,Sp=3.9μm d=2380mm,l=1.4012mm(5) ここで、上記dは1/2画素ずらしが成立するときの距
離で、撮像レンズ202の画角と想定被写体の大きさか
ら決定した。
Then, based on the equation (4), the value of each parameter is set to find the relationship between the image shift amount and the distance. The following equation (5) is the value of each parameter used in this embodiment. f = 1.45 mm, Sp = 3.9 μm d = 2380 mm, l = 1.40112 mm (5) where d is the distance when 1/2 pixel shift is established, and is assumed to be the angle of view of the imaging lens 202. It was decided based on the size of the subject.

【0044】図8は式(4)、(5)をもとに画像ずれ
量と距離の関係を算出したグラフである。横軸は被写体
までの距離、縦軸はその距離における画像ずれ量を示
し、その単位は画素[pixel]である。そして、曲
線208が上記式(4)、(5)より算出された画像ず
れ量を表している。ここでは、距離dにおける画像ずれ
量を基準とした相対的な視差量を算出しているので、距
離2380[mm]付近で画像ずれ量は0となっている
が、実際この距離での絶対量としての画像ずれ量は1/
2画素ずらし効果により−0.5画素である。
FIG. 8 is a graph in which the relationship between the image shift amount and the distance is calculated based on the equations (4) and (5). The horizontal axis represents the distance to the subject, the vertical axis represents the image shift amount at that distance, and the unit is pixel [pixel]. A curve 208 represents the image shift amount calculated from the above equations (4) and (5). Here, since the relative parallax amount is calculated based on the image shift amount at the distance d, the image shift amount is 0 near the distance 2380 [mm], but the absolute amount at this distance is actually the absolute amount. The image shift amount as
It is −0.5 pixel due to the effect of shifting by 2 pixels.

【0045】そして、曲線208より、0〜1000m
mの範囲では画像ずれ量の変化は大きく、1000mm
以降では、画像ずれ量の変化は小さい。そこで、0〜1
000mmの範囲の点209に主被写体があり、100
0mm以降の点210に背景があると仮定すると、撮影
画面内の複数の画像ずれ量を各々検出し、その差X1を
判別することができれば、主被写体と背景の分離を容易
に行うことができる。
From the curve 208, 0 to 1000 m
In the range of m, the change of the image shift amount is large, 1000 mm
After that, the change in the image shift amount is small. So 0-1
There is a main subject at a point 209 in the range of 000 mm, and
Assuming that there is a background at a point 210 after 0 mm, it is possible to easily separate the main subject and the background if it is possible to detect a plurality of image shift amounts in the shooting screen and determine the difference X1. .

【0046】ところで、無限遠距離における画像ずれ量
は式(4)のdxを無限大にした場合の値となり、式
(5)のパラーメータを使用して算出すると、−0.2
19[pixel]となり、この程度の画像ずれ量であ
れば、画素ずらしによる画質の低下もほとんどない。
By the way, the image shift amount at an infinite distance becomes a value when dx of the equation (4) is infinite, and when calculated using the parameter of the equation (5), it is -0.2.
The image shift amount is 19 [pixels], and with such an image shift amount, there is almost no deterioration in image quality due to pixel shift.

【0047】なお、上記画像ずれ量の変化は、レンズ部
202a、202cに着目して説明したが、各レンズ部
の間隔は等しく設定されているので、レンズ部202a
と202b、レンズ部202bと202d、レンズ部2
02cと202dにおいても同様に画像ずれ量は変化す
る。さらには、対角方向のレンズ部202aと202
d、202bと202cについても敏感度は√2倍にな
るが、画素ピッチも√2倍となるため、画像ずれ量の変
化は図8と同様である。
The change in the image shift amount has been described by focusing on the lens portions 202a and 202c. However, since the intervals between the lens portions are set equal, the lens portion 202a is set.
And 202b, lens sections 202b and 202d, lens section 2
The image shift amount similarly changes in 02c and 202d. Further, the diagonal lens portions 202a and 202a
The sensitivity for d, 202b, and 202c is also √2 times, but the pixel pitch is also √2 times, so the change in the image shift amount is the same as in FIG.

【0048】では、次に上記のような撮像部より得られ
る画像を用いた画像処理方法について説明する。図1に
おいて、画像処理のおおまかな流れは説明したので、こ
こでは、より具体的な処理方法について説明する。
Next, an image processing method using an image obtained by the image pickup section as described above will be described. Since the rough flow of the image processing has been described with reference to FIG. 1, a more specific processing method will be described here.

【0049】図9は、前述した撮像部より得られた4枚
の視差画像を示しており、画像211a、211b、2
11c、211dが図6に示す撮像素子204上の光学
像207a、207b、207c、207dにそれぞれ
対応している。すなわち、画像211a、211dが緑
色カラーフィルター、画像211bが青色カラーフィル
ター、画像211cが赤色カラーフィルターによる画像
となる。なお、実際の画像は撮像レンズ202より天地
左右反転した画像が得られるが、ここでは、説明を理解
しやすくするために正立画像としている。そして、ここ
では緑色カラーフィルターによる一対の画像211a、
211dを使用して視差量を算出する。これは、異なる
波長同士で演算を行うより精度が高くなるのはもちろん
のこと、RGBの中で緑色がもっとも空間解像度が高
く、演算の精度を向上させることができるからである。
また、本実施形態の画像処理においては、加工処理を施
していない非圧縮の生画像データ(撮像素子204の量
子化画像信号)を使用する。こうすることで、圧縮され
たカラー画像データから逆算して画像ずれ量を算出する
場合と比較して、画像ずれ量算出の精度を上げることが
できるとともに、処理時間も短縮できる。
FIG. 9 shows four parallax images obtained by the above-mentioned image pickup section, and images 211a, 211b, and 2 are shown.
Reference numerals 11c and 211d correspond to the optical images 207a, 207b, 207c, and 207d on the image sensor 204 shown in FIG. 6, respectively. That is, the images 211a and 211d are green color filters, the image 211b is a blue color filter, and the image 211c is a red color filter. It should be noted that although an actual image is obtained by inverting the image horizontally from the imaging lens 202, the image is an erect image here for the sake of easy understanding. And here, a pair of images 211a by the green color filter,
The amount of parallax is calculated using 211d. This is because the accuracy is higher than that when the calculation is performed using different wavelengths, and the green color has the highest spatial resolution among RGB, and the calculation accuracy can be improved.
Further, in the image processing of this embodiment, uncompressed raw image data (quantized image signal of the image sensor 204) that has not been processed is used. By doing so, the accuracy of the image shift amount calculation can be improved and the processing time can be shortened as compared with the case where the image shift amount is calculated by performing back calculation from the compressed color image data.

【0050】図10は図1のフローチャートを詳細に示
したフローチャートである。これらのフローチャートを
用いて詳細な流れを説明する。図中、点線で囲む311
は図1の107に対応している。したがって、311で
は、第1の画像処理312(図1のステップS104に
対応する)と、第2の画像処理313(図1のステップ
S105に対応する)の少なくとも異なる2つの画像処
理を行っている。
FIG. 10 is a detailed flowchart of the flowchart of FIG. The detailed flow will be described using these flowcharts. 311 surrounded by a dotted line in the figure
Corresponds to 107 in FIG. Therefore, at 311, at least two different image processes, that is, the first image process 312 (corresponding to step S104 in FIG. 1) and the second image process 313 (corresponding to step S105 in FIG. 1) are performed. .

【0051】まず、ステップS301において、撮像部
201で撮影された視差を有する4つの画像を入力し、
画像を画素単位の複数の領域に分割する。図11はこの
領域分割を説明するための図で、図示するように緑色カ
ラーフィルターによる画像211a、211dを領域に
分割する。ここで、1つの領域における画素数は、小さ
ければ小さいほど主被写体を分離した際に、背景との境
界線を滑らかにすることができる。しかしながら、あま
り小さすぎると後述する画像ずれ量算出における相関演
算が成立しなくなるため、1つの領域における画素数は
5×5[pixel]以上の矩形状が望ましい。本実施
形態においては、10×10[pixel]の正方形状
とした。
First, in step S301, four images having parallax taken by the image pickup unit 201 are input,
The image is divided into a plurality of regions in pixel units. FIG. 11 is a diagram for explaining this area division. As shown in the figure, the images 211a and 211d by the green color filter are divided into areas. Here, the smaller the number of pixels in one area, the smoother the boundary line with the background when the main subject is separated. However, if it is too small, the correlation calculation in the image shift amount calculation to be described later will not be established. In the present embodiment, it has a square shape of 10 × 10 [pixel].

【0052】次に、ステップS302では、公知の相関
演算を用いて各領域における画像ずれ量を算出する。例
えば、図11において画像211aの領域212aに着
目すると、この領域212a対応した画像211dの領
域212dの画像データを用いて1つの画像ずれ量が算
出される。ここで、画像211a、212bは、図6の
光学像207a、207dに対応しており、図4のレン
ズ部202a、202dによって形成される。したがっ
て、距離による光学像の移動方向は矢印213で示す方
向で、画像ずれ量の変化もこの矢印方向に変化する。そ
して、前述したように各レンズ部の間隔は等しく設定さ
れているので、画像ずれ量の変化が生じる矢印213は
ちょうど斜め45度に傾いていることとなる。この矢印
213方向における画像ずれ量を検出するには垂直方向
と水平方向の視差量を算出し、その合成ベクトルから算
出することもできるが、本実施形態では算出演算の負荷
を低減するために、矢印213方向の画像ずれ量を相関
演算により直接算出する。
Next, in step S302, the image shift amount in each area is calculated by using a known correlation calculation. For example, focusing on the area 212a of the image 211a in FIG. 11, one image shift amount is calculated using the image data of the area 212d of the image 211d corresponding to this area 212a. Here, the images 211a and 212b correspond to the optical images 207a and 207d of FIG. 6, and are formed by the lens units 202a and 202d of FIG. Therefore, the moving direction of the optical image depending on the distance is the direction indicated by the arrow 213, and the change in the image shift amount also changes in the arrow direction. Then, as described above, the intervals between the lens portions are set to be equal to each other, so that the arrow 213 in which the change in the image shift amount occurs is exactly inclined at 45 degrees. In order to detect the image shift amount in the direction of the arrow 213, the parallax amount in the vertical direction and the horizontal direction can be calculated and calculated from the combined vector, but in the present embodiment, in order to reduce the calculation load, The image shift amount in the direction of arrow 213 is directly calculated by the correlation calculation.

【0053】次に、ステップS303では、算出された
全領域における画像ずれ量をもとに画像ずれ量分布を作
成する。ここでは、画像ずれ量を2つに区分する。図8
より主被写体が1000[mm]以内に存在すると仮定
すると、そのときの視差量は約0.3[pixel]以
上である。したがって、ここでは画像ずれ量が0.3
[pixel]以上か未満かで判別する。
Next, in step S303, an image shift amount distribution is created based on the calculated image shift amount in the entire area. Here, the image shift amount is divided into two. Figure 8
Assuming that the main subject exists within 1000 [mm], the parallax amount at that time is about 0.3 [pixel] or more. Therefore, the image shift amount is 0.3 here.
It is determined whether it is greater than or less than [pixel].

【0054】図12は領域に分割された画像211a若
しくは211dにおいて、視覚的に画像ずれ量の分布を
示す図である。この分布図において黒色で塗り潰された
領域が画像ずれ量0.3[pixle]以上を、白色の
領域が画像ずれ量0.3[pixle]未満を示してい
る。この図から画像211a若しくは211dにおいて
主被写体のみを分離できていることが分かる。なお、図
中灰色で塗り潰されている領域は画像ずれ量算出エラー
が発生した領域で、背景の空などローコントラストな部
分で生じやすい。
FIG. 12 is a diagram visually showing the distribution of image shift amounts in the image 211a or 211d divided into regions. In this distribution chart, the area filled with black indicates an image shift amount of 0.3 [pixel] or more, and the white region indicates an image shift amount of less than 0.3 [pixel]. From this figure, it can be seen that only the main subject can be separated in the image 211a or 211d. It should be noted that the area filled with gray in the figure is an area where an image shift amount calculation error has occurred, and is likely to occur in a low contrast portion such as the background sky.

【0055】次に、ステップS304では、図12にお
いて黒色で塗り潰された領域、すなわち主被写体におけ
る代表的な画像ずれ量を1つ算出する。具体的には、黒
色で塗り潰された複数領域の画像ずれ量から平均値を算
出し、この値を主被写体における代表画像ずれ量として
記憶しておく。
Next, in step S304, one representative image shift amount in the area filled with black in FIG. 12, that is, the main subject is calculated. Specifically, an average value is calculated from the image shift amounts of a plurality of regions filled with black, and this value is stored as the representative image shift amount of the main subject.

【0056】次に、ステップS305では、各領域にお
いて画像ずれ量が算出されたか否か、すなわち算出エラ
ーか否かを判別する。そして、算出エラーである領域
(図12において灰色の領域)の場合、ステップS31
0へ進む。一方、算出エラーでない領域の場合ステップ
S306へ進む。
Next, in step S305, it is determined whether or not the image shift amount has been calculated in each area, that is, whether or not there is a calculation error. Then, in the case of an area that is a calculation error (gray area in FIG. 12), step S31
Go to 0. On the other hand, if the region is not a calculation error, the process proceeds to step S306.

【0057】次にステップS306では、算出エラーが
生じていない領域において、各領域が主被写体であるか
否かを判別する。主被写体であると判別された領域(図
12において黒色の領域)の場合、ステップS307以
降のずれ補正画像処理へ進み、主被写体でないと判別さ
れた領域(図12において白色の領域)、すなわち背景
と判別された領域の場合ステップS308のぼかしフィ
ルター処理へ進む。
Next, in step S306, it is determined whether or not each area is the main subject in the area where no calculation error has occurred. In the case of the area determined to be the main subject (black area in FIG. 12), the process proceeds to the shift correction image processing in step S307 and subsequent steps, and the area determined to be not the main subject (white area in FIG. 12), that is, the background. In the case of the region determined to be, the process proceeds to the blurring filter process of step S308.

【0058】ステップS307、309では、主被写体
において画像ずれによる画像合成時の画質低下を低減す
るように画像ずれを所定量に戻すずれ補正画像処理を行
う。
In steps S307 and 309, shift correction image processing for returning the image shift to a predetermined amount is performed so as to reduce the image quality deterioration at the time of image combination in the main subject due to the image shift.

【0059】まず、ステップS307では、画像合成時
の色ズレなどの画質低下要因がほぼ無くなるような画像
ずれ戻し量を算出する。先ほど、ステップS304で主
被写体の代表画像ずれ量を算出したので、この代表画像
ずれ量をXavgとすると画像ずれ戻し量Xcmpは以
下の式(6)によって算出される。 Xcmp={Xavg−(−0.5)}/2(6) ここで、上記(6)式の0.5は画素ずらし時の画像ず
れ量を基準とするためである。また、この画像ずれ戻し
量Xcmpは四捨五入して画素単位の整数としておく。
こうすることで、後の処理を容易にすることが可能とな
る。
First, in step S307, an image misregistration return amount is calculated so that a factor of image quality deterioration such as color misregistration during image combination is almost eliminated. Since the representative image shift amount of the main subject has been calculated in step S304, the image shift return amount Xcmp is calculated by the following equation (6) when the representative image shift amount is Xavg. Xcmp = {Xavg − (− 0.5)} / 2 (6) Here, 0.5 in the above formula (6) is because the image shift amount at the time of pixel shift is used as a reference. In addition, this image misalignment return amount Xcmp is rounded off to be an integer in pixel units.
By doing so, it becomes possible to facilitate the subsequent processing.

【0060】次に、ステップS309では、ステップS
308で算出された画像ずれ戻し量をもとに、画像デー
タの置き替えを行う。図13はこれを説明するための図
で、図6に示す撮像素子204のうち中心点Soと撮像
領域204aの中心点Sa付近を拡大している。いま、
1つの領域214に着目して考えてみる。式(6)によ
り画像ずれ戻し量として1.0[pixle]という値
が算出されたとする。主被写体は近距離側に存在するの
で、撮像領域204a上に形成される光学像は中心点S
oに対して外側に移動している。したがって、領域21
4より中心点に向かって1画素内側の図中点線で示す領
域における画像データを領域214の画像データとして
置き換えれば、画像のずれを戻すことができる。なお、
その他の撮像領域204b、204c、204dにおい
ても同様に中心点Soに向かって1画素内側の画像デー
タと置き換えることで、画像のずれを戻すことができ
る。そして、主被写体と判別された全領域において上記
ずれ戻し処理を施す。
Then, in step S309, step S
The image data is replaced based on the image shift return amount calculated in 308. FIG. 13 is a diagram for explaining this, in which the central point So of the image sensor 204 shown in FIG. 6 and the vicinity of the central point Sa of the imaging region 204a are enlarged. Now
Consider the one area 214. It is assumed that a value of 1.0 [pixel] is calculated as the image misalignment return amount by Expression (6). Since the main subject exists on the short distance side, the optical image formed on the imaging area 204a has a center point S
It is moving outward with respect to o. Therefore, the area 21
By replacing the image data in the area indicated by the dotted line in the drawing, which is one pixel inward from the center point 4 with respect to 4 as the image data of the area 214, the image shift can be restored. In addition,
Similarly, in the other imaging areas 204b, 204c, and 204d, the displacement of the image can be restored by replacing the image data with one pixel inside toward the center point So. Then, the misalignment return process is performed on the entire area determined to be the main subject.

【0061】このように、ステップS307で画像戻し
量を画素単位の整数として算出しておけば、ステップS
309における画像データの置き換えにおいて、領域を
シフトさせるだけでよい。なお、画像戻し量を小数点以
下を含む値で算出し、実際画素が存在しない位置での画
像データを周囲の画像データから補間演算を用いて算出
し、置き換えを行うようにしてもよい。そうすること
で、画素ずらしの効果も最大限に発揮できる。しかしな
がら、本実施形態では、画像ずれ戻し量を整数化した場
合に生じる適正画像ずれ量からの補正残り量の最大値は
0.5[pixel]であり、この程度であれば色ズレ
として画像にほとんど影響がないことと、処理の高速化
を考慮して上記のような構成とした。
In this way, if the image return amount is calculated as an integer in pixel units in step S307, step S307
In replacing the image data in 309, it is only necessary to shift the area. Alternatively, the image return amount may be calculated by a value including the decimal point, and the image data at the position where the actual pixel does not exist may be calculated from the surrounding image data by using the interpolation calculation, and the replacement may be performed. By doing so, the effect of pixel shifting can be maximized. However, in the present embodiment, the maximum value of the correction remaining amount from the proper image displacement amount that occurs when the image displacement return amount is an integer is 0.5 [pixel]. The configuration is as described above considering that there is almost no effect and that the processing speed is increased.

【0062】以上がステップS307、S309におけ
るずれ補正画像処理である。
The above is the shift correction image processing in steps S307 and S309.

【0063】一方、ステップS308では、撮影画面中
主被写体以外と判別された領域、すなわち背景部分に対
してぼかしフィルター処理を施す。図14はぼかしフィ
ルター処理で使用される9×9のフィルターマトッリク
スを示し、このマトリックスを画像の各画素に畳み込む
ことによってボケを付加する。(a)で示すマトリック
スは大きいボケ、(b)で示すマトリックスは小さいボ
ケをそれぞれ示している。なお、これらのマトッリクス
は撮像レンズの点像分布関数(Point Sprea
d Funciton)をもとにあらかじめ算出されて
いる。そして、例えば撮像光学系のFナンバーがF5.
6であると仮定すると、(a)がF2.8相当、(b)
がF4.0相当に設定されており、いずれも撮像光学系
で実現できないボケ味を付加できるよう考慮されてい
る。
On the other hand, in step S308, the blurring filter process is applied to the area determined to be other than the main subject in the photographing screen, that is, the background portion. FIG. 14 shows a 9 × 9 filter matrix used in the blur filtering process, and blur is added by convolving this matrix with each pixel of the image. The matrix shown in (a) shows a large blur, and the matrix shown in (b) shows a small blur. Note that these matrixes are the point spread function (Point Spread) of the imaging lens.
d Function). Then, for example, the F number of the image pickup optical system is F5.
6 is assumed, (a) is equivalent to F2.8, (b)
Is set to be equivalent to F4.0, and both are considered so as to add a blur that cannot be realized by the imaging optical system.

【0064】そして、主被写体以外と判別されたの領域
のうちi行j列目の画素の画像データをI(i,j)と
し、図14のマトリックスの行方向をk、列方向をlと
し、図中に示すような−4〜4までの行列番号をもちい
てk行l列目のマトリックスの値をFil(k,l)と
すれば、ボケ付加後の画像データI(I,J)は以下の
式(7)によって表される。
Then, the image data of the pixel in the i-th row and the j-th column in the area determined to be other than the main subject is I (i, j), and the row direction of the matrix in FIG. 14 is k and the column direction is l. , And the value of the matrix at the k-th row and the 1-th column is Fil (k, l) using the matrix numbers from -4 to 4 as shown in the figure, the image data I (I, J) after blurring is added. Is expressed by the following equation (7).

【0065】[0065]

【数1】 [Equation 1]

【0066】このような計算を、図12において白色で
示す領域の全画素に対して繰り返し行うことにより背景
画像を効果的にぼかすことができる。さらに、画像21
1bフみならず、その他の画像211b、211c、2
11dにおいても同様な処理を行う。
The background image can be effectively blurred by repeating such calculation for all the pixels in the area shown in white in FIG. In addition, image 21
No other image 211b, 211c, 2
Similar processing is performed in 11d.

【0067】なお、ここではフィルターマトリックスを
2種類用意してあるので、撮影者の好みに応じて切り替
えることができる。また、上記一例では背景に対して1
種類のフィルターでぼかしフィルター処理を行ったが、
図12の画像ずれ量分布図における背景をその画像ずれ
量に応じて細分化し、その画像ずれ量から推定される距
離に応じた多数のフィルターマトッリクスでぼかしフィ
ルター処理を加えることもできる。そのときには、前記
式(5)の各パラメータを変更し、ある程度はなれた位
置においても距離による画像ずれ量の変化量を大きくし
ておけば、背景を画像ずれ量に応じて容易に細分化する
ことができる。さらには、画像ずれ量に応じて逐一フィ
ルターマトリックスを算出するようにしてもよい。しか
しながら、本実施形態では処理の高速化を考慮して背景
には1種類のぼかしのみを施す構成とした。したがっ
て、ポートレート写真などの主被写体と背景の距離が大
きい画像に対してより効果が発揮できる。
Since two filter matrices are prepared here, they can be switched according to the photographer's preference. Also, in the above example, the background is 1
I did blur filtering with different types of filters,
It is also possible to subdivide the background in the image shift amount distribution chart of FIG. 12 according to the image shift amount and add blurring filter processing with a large number of filter matrixes according to the distance estimated from the image shift amount. In that case, if each parameter of the equation (5) is changed and the change amount of the image shift amount due to the distance is made large even at a position which is somewhat apart, the background can be easily subdivided according to the image shift amount. You can Furthermore, the filter matrix may be calculated one by one according to the image shift amount. However, in this embodiment, only one type of blur is applied to the background in consideration of speeding up the processing. Therefore, the effect can be more exerted on an image such as a portrait photograph in which the distance between the main subject and the background is large.

【0068】最後にステップS310では、画像211
a、211b、211c、211dを用いて合成画像を
作成する。ここでは、画素ずらしによるベイヤー配列相
当の画像を作成する。図15は一般的なベイヤー配列に
おけるカラーフィルター配列の一部を示す図で、図中R
が赤色、Gが緑色、Bが青色のカラーフィルターをそれ
ぞれ示している。そして、RGGBと4画素一組の繰り
返し構造となっている。本実施形態では、画素ずらしに
よるベイヤー配列なので、画像211aを基準に考える
と、画像211aの各画素間に画像211b、211
c、211dの画像データを埋め込むことでベイヤー配
列の画像ができる。したがって、画像211a、211
b、211c、211dの画像データを並び替えるだけ
で、ベイヤー配列の合成画像を作成することができる。
Finally, in step S310, the image 211
A composite image is created using a, 211b, 211c, and 211d. Here, an image corresponding to the Bayer array is created by shifting the pixels. FIG. 15 is a diagram showing a part of a color filter array in a general Bayer array, in which R
Indicates a red color filter, G indicates a green color filter, and B indicates a blue color filter. Further, it has a repeating structure of RGGB and a set of 4 pixels. In the present embodiment, since the Bayer array is based on pixel shifting, considering the image 211a as a reference, the images 211b and 211 are arranged between the pixels of the image 211a.
By embedding the image data of c and 211d, a Bayer array image can be formed. Therefore, the images 211a, 211
By rearranging the image data of b, 211c, and 211d, a Bayer array composite image can be created.

【0069】以上が本実施形態における画像処理方法で
ある。
The above is the image processing method in this embodiment.

【0070】なお、図10のフローチャートにおいて、
画像ずれ量算出不能である領域においては、何の画像処
理も行わずにステップS310の画像合成処理へ進ん
だ。しかしながら、このような算出不能である領域は低
コントラストである場合がほとんどで、このような領域
の画像に対しては、特別な処理を行わなくても画質上問
題ない。例えば、主被写体の一部の領域が算出不能であ
ると仮定する。主被写体においては、画像合成時の色ズ
レを防ぐためにずれ補正画像処理を行うわけだが、低コ
ントラストであるためこの処理を行わなくても色ズレは
ほとんど目立たない。また、背景の一部の領域が算出不
能である場合についても、この領域は低コントラストで
あるため、ぼかし処理をする必要がない。なぜならば、
その他の背景にはぼかし画像処理をおこなうわけで、ぼ
かしとは画像を低コントラスト化するということに等し
いからである。逆に、このような算出不能な領域を何ら
かの手段で主被写体と背景に分離した場合、もし分離が
間違うと正反対の画像処理を行うこととなり、画像とし
ての価値もなくなるほど不自然で低画質な画像となって
しまう。
In the flowchart of FIG. 10,
In the area where the image shift amount cannot be calculated, no image processing is performed, and the process proceeds to the image combining processing in step S310. However, such a region that cannot be calculated has a low contrast in most cases, and there is no problem in image quality even if special processing is not performed on an image in such a region. For example, assume that some areas of the main subject cannot be calculated. With respect to the main subject, shift correction image processing is performed in order to prevent color shift during image combination, but since the contrast is low, color shift is hardly noticeable without this processing. Further, even when a partial area of the background cannot be calculated, this area has a low contrast, and thus it is not necessary to perform the blurring process. because,
This is because blurring image processing is performed on other backgrounds, and blurring is equivalent to reducing the contrast of an image. On the other hand, if such an uncalculatable area is separated into the main subject and the background by some means, if the separation is wrong, the opposite image processing will be performed, and the image will be unnatural and low in image quality. It becomes an image.

【0071】以上のような観点から、本実施形態では画
像ずれ量が算出不能である領域については、処理を行わ
ないようにした。こうすることで、処理のアルゴリズム
を簡略化でき、高速化を図ることができる。また、特に
モバイル機器などに搭載されるような画素数が少なく、
単純な撮像光学系で構成され、比較的低解像な撮像部を
備えた機器においては、算出不能により画像処理を行わ
なかった部分と画像処理を行った部分との差異はほとん
ど目立たない。したがって、本実施形態はこのような撮
像部を備えた機器により好適であると言える。なお、公
知のグルーピング化などの処理を用いて、主被写体と背
景を完全に分離し、算出不能領域においても何らかの画
像処理を行うようにしてもよい。
From the above viewpoints, in the present embodiment, the processing is not performed for the area where the image shift amount cannot be calculated. By doing so, the processing algorithm can be simplified and the speed can be increased. In addition, the number of pixels installed in mobile devices is small,
In a device including a simple image pickup optical system and including an image pickup unit having a relatively low resolution, a difference between a portion where image processing is not performed and a portion where image processing is performed due to calculation failure is hardly noticeable. Therefore, it can be said that the present embodiment is more suitable for a device including such an imaging unit. Note that the main subject and the background may be completely separated by using known processing such as grouping, and some image processing may be performed even in the uncalculatable area.

【0072】以上が第1の実施形態における画像処理方
法である。このように、視差を有する画像をもとに画像
ずれ量を算出し、主被写体にはずれ補正画像処理を行う
ことで高画質な画像を生成し、背景にはぼかし画像処理
を行うことで効果的なボケを付加でき、高画質であると
ともに自然なボケ味のある画像を得ることができる。さ
らには、画像ずれ量が算出不能な領域が画像内にあって
も画質を著しく低下させることもない。
The above is the image processing method according to the first embodiment. In this way, it is effective to calculate the image shift amount based on the image having parallax, perform the shift correction image processing on the main subject to generate a high quality image, and perform the blurred image processing on the background. It is possible to add clear blurring and obtain an image with high image quality and natural blurring. Furthermore, even if there is a region in the image in which the image shift amount cannot be calculated, the image quality is not significantly deteriorated.

【0073】(第2の実施形態)第2の実施形態は第1
の実施形態における撮像部と画像処理部を一体的に備え
た画像処理装置に関するものである。なお、第1の実施
形態と同様の符号を付してある部分は、第1の実施形態
と同様である。
(Second Embodiment) The second embodiment is the first
The present invention relates to an image processing device that integrally includes an imaging unit and an image processing unit. In addition, the portions denoted by the same reference numerals as those in the first embodiment are the same as those in the first embodiment.

【0074】図16は本実施形態の画像処理装置の斜視
図で、画像処理装置としてデジタルカメラを用いてい
る。図中、215は撮影釦で撮影者がこの釦を押下する
ことにより撮影動作が実行される。216は光学ファイ
ンダ、217はストロボ、218は平行平板ガラスによ
り保護された撮影部で、内部には第1の実施形態で説明
した撮像部201が設けられている。なお、撮像部の構
成は第1の実施形態と同様であるため説明は省略する。
また、219は各種撮影モードの設定を行う撮影モード
設定部材である。一方、220は外部記憶媒体挿入部
で、蓋221により開閉自在となっている。そして、こ
の外部記憶媒体挿入部220に外部記憶媒体222を挿
入することで、撮影された画像が保存可能な構成となっ
ている。
FIG. 16 is a perspective view of the image processing apparatus of this embodiment, which uses a digital camera as the image processing apparatus. In the figure, reference numeral 215 denotes a photographing button, and the photographing operation is executed by the photographer pressing this button. Reference numeral 216 is an optical viewfinder, 217 is a strobe, and 218 is a photographing section protected by parallel plate glass, and the image pickup section 201 described in the first embodiment is provided inside. Note that the configuration of the image pickup unit is the same as that of the first embodiment, and therefore description thereof will be omitted.
A shooting mode setting member 219 sets various shooting modes. On the other hand, 220 is an external storage medium insertion portion, which can be opened and closed by a lid 221. Then, by inserting the external storage medium 222 into the external storage medium insertion section 220, the photographed image can be stored.

【0075】図17は、図16の画像処理装置における
電気系のブロック図である。画像処理装置は、撮像レン
ズ202、撮像素子204からなる撮像部を備え、撮像
素子204はTG(タイミング発生)部402のクロッ
ク信号を受け、A/D変換部401へアナログ画像信号
を送る。また、A/D変換部401ではアナログ画像信
号をデジタル画像信号に変換し、このデジタル画像信号
がデジタル信号処理部403に送られる。さらに、デジ
タル信号処理部403は、中央制御部404、IF(イ
ンターフェース)部405と接続され、ここでは、AE
(Auto Exposure)、AWB(Auto
White Balance)、ガンマ補正、画像圧縮
などの公知の画像処理が行われる。
FIG. 17 is a block diagram of an electric system in the image processing apparatus of FIG. The image processing apparatus includes an image pickup unit including an image pickup lens 202 and an image pickup element 204. The image pickup element 204 receives a clock signal from a TG (timing generation) unit 402 and sends an analog image signal to the A / D conversion unit 401. Further, the A / D conversion unit 401 converts the analog image signal into a digital image signal, and this digital image signal is sent to the digital signal processing unit 403. Further, the digital signal processing unit 403 is connected to the central control unit 404 and the IF (interface) unit 405, and here, AE
(Auto Exposure), AWB (Auto
Well-known image processing such as white balance), gamma correction, and image compression is performed.

【0076】IF部405は、外部記憶媒体などと接続
可能で、図16の外部記憶媒体222と接続すること
で、撮影された画像データを格納することができる。
The IF unit 405 can be connected to an external storage medium or the like, and can be connected to the external storage medium 222 of FIG. 16 to store photographed image data.

【0077】中央制御部404は、各種演算を行うCP
U(中央演算処理部)406、各種動作プログラムが格
納されたROM407、一時的にデジタル画像信号を保
持するRAM408が設けられている。また、中央制御
部404は、TG部402、デジタル信号処理部403
の各種制御も行う。さらに、中央制御部404には、図
16の撮影釦215、撮影モード設定部材219に対応
した、撮影スイッチ409、撮影モード設定スイッチ4
10が接続されている。そして、本実施形態において
は、この撮影モード設定スイッチ410を接点411に
接続することで、図14(a)のフィルターマトリック
スによる第1の実施形態の画像処理(図10のフローチ
ャート)が実行され、接点412に接続することで図1
4(b)のフィルターマトリックスによる第1の実施形
態の画像処理(図10のフローチャート)が実行される
ようになっている。ここで、このような処理が実行され
る撮影モードを以後デジタルポートレートモードと呼ぶ
こととする。そして、他の接点に接続されている場合
は、オート撮影、マクロ、夜景などの撮影モードが選
択、実行される。
The central control unit 404 is a CP for performing various calculations.
A U (central processing unit) 406, a ROM 407 that stores various operation programs, and a RAM 408 that temporarily holds a digital image signal are provided. The central control unit 404 also includes a TG unit 402 and a digital signal processing unit 403.
Also performs various controls. Further, the central control unit 404 includes a photographing switch 409 and a photographing mode setting switch 4 corresponding to the photographing button 215 and the photographing mode setting member 219 of FIG.
10 are connected. Then, in the present embodiment, by connecting the photographing mode setting switch 410 to the contact 411, the image processing of the first embodiment (the flowchart of FIG. 10) by the filter matrix of FIG. 14A is executed, By connecting to the contact 412, FIG.
The image processing of the first embodiment (the flowchart of FIG. 10) is executed by the filter matrix of 4 (b). Here, the shooting mode in which such processing is executed will be hereinafter referred to as a digital portrait mode. When it is connected to another contact, a shooting mode such as auto shooting, macro, or night view is selected and executed.

【0078】以上がデジタルカメラを例とした第2の実
施形態における画像処理装置の構成である。では、次に
図18のフローチャートを用いて本実施形態の画像処理
に関する実際の動作について説明する。
The above is the configuration of the image processing apparatus in the second embodiment using a digital camera as an example. Next, the actual operation relating to the image processing of this embodiment will be described with reference to the flowchart of FIG.

【0079】図18は本実施形態の画像処理に関するデ
ジタルカメラの動作を示すフローチャートである。この
フローチャートはプログラムとして中央制御部404の
ROM407に格納されている。
FIG. 18 is a flow chart showing the operation of the digital camera relating to the image processing of this embodiment. This flowchart is stored in the ROM 407 of the central control unit 404 as a program.

【0080】まず、ステップS501では、撮像釦21
5の押下によりデジタル信号処理部403においてA
E、AWBなどの露出演算が実行され、この演算値をも
とにTG部402のクロック信号を発生することで、撮
像素子204における電荷蓄積が行われ、アナログ画像
信号が読み出される。そして、ステップS502へ進
む。
First, in step S501, the image pickup button 21
Pressing 5 causes A in the digital signal processing unit 403.
Exposure calculations such as E and AWB are performed, and a clock signal for the TG unit 402 is generated based on the calculated values, whereby charge is accumulated in the image sensor 204 and an analog image signal is read. Then, the process proceeds to step S502.

【0081】次に、ステップS502では、A/D変換
部401においてアナログ画像信号を量子化されたデジ
タル画像信号に変換する。
Next, in step S502, the analog image signal is converted into a quantized digital image signal in the A / D converter 401.

【0082】次に、ステップS503では、撮影モード
設定スイッチ410がデジタルポートレートモードに設
定されているか否かを判別する。そして、デジタルポー
トレートモードが選択されている場合、図14(a)若
しくは(b)のうち対応するフィルターマトリックスを
選択し、ステップS504へ進む。一方、選択されてい
ない場合、ステップS504を飛び越してステップS5
05へ進む。
Next, in step S503, it is determined whether or not the photographing mode setting switch 410 is set to the digital portrait mode. Then, when the digital portrait mode is selected, the corresponding filter matrix in FIG. 14A or 14B is selected, and the process proceeds to step S504. On the other hand, if not selected, step S504 is skipped and step S5 is executed.
Go to 05.

【0083】ステップS504のデジタルポートレート
画像処理においては、第1の実施形態の図10における
フローチャートが実行される。すなわち、画像の主被写
体と背景の分離が行われ、主被写体にはずれ補正画像処
理、背景にはぼかし画像処理が行われる。
In the digital portrait image processing in step S504, the flowchart in FIG. 10 of the first embodiment is executed. That is, the main subject and the background of the image are separated, the shift correction image processing is performed on the main subject, and the blurred image processing is performed on the background.

【0084】次に、ステップS505のデジタル信号処
理では、デジタル信号処理部403にて色処理、ガンマ
補正など公知の画像処理を行い、画像圧縮処理を経て最
終的に保存する画像を生成する。
Next, in the digital signal processing of step S505, known image processing such as color processing and gamma correction is performed in the digital signal processing unit 403, and an image to be finally stored is generated through image compression processing.

【0085】最後に、ステップS506の画像データ書
き込みでは、IF部405を介して外部記憶媒体に保存
用の画像を格納する。
Finally, in the image data writing in step S506, the image for saving is stored in the external storage medium via the IF unit 405.

【0086】以上が、デジタルカメラにおける処理動作
である。なお、上記説明において、ステップS504の
デジタルポートレート画像処理は、ステップS505の
デジタル信号処理部403におけるデジタル信号処理を
おこなう前のデジタル画像信号、すなわちA/D変換直
後の生のデジタル画像信号を用いるようにした。これ
は、第1の実施形態でも説明したように生のデジタル画
像信号を用いた方が高精度に画像ずれ量を検出できるか
らである。なお、上記順序を逆にしてもよい。さらに
は、ステップS505のデジタル信号処理を施したデジ
タル画像信号から生のデジタル画像信号を逆算して算出
してもよいが、本実施形態においては、画像圧縮処理を
不可逆処理としているため上記のような順序としてい
る。
The above is the processing operation in the digital camera. In the above description, the digital portrait image processing in step S504 uses the digital image signal before the digital signal processing in the digital signal processing unit 403 in step S505, that is, the raw digital image signal immediately after A / D conversion. I did it. This is because the image shift amount can be detected with higher accuracy by using the raw digital image signal as described in the first embodiment. The order may be reversed. Furthermore, the raw digital image signal may be calculated by back-calculating the digital image signal that has been subjected to the digital signal processing in step S505, but in the present embodiment, the image compression processing is irreversible processing. It is in order.

【0087】以上のように、第1の実施形態で説明した
画像処理方法をデジタルカメラに適用した例について説
明してきた。
The example in which the image processing method described in the first embodiment is applied to the digital camera has been described above.

【0088】なお、本実施形態においては、デジタルポ
ートレート画像処理をデジタルカャ遠熾狽ナ行うように
した。しかし、処理速度を向上させるために、デジタル
ポートレートモードが選択された際にはデジタルカメラ
内部ではこの画像処理を行わず、通常のデジタル画像処
理だけを行い、画像の付加情報としてデジタルポートレ
ートモードが選択されたことを格納しておき、画像をP
Cなど高速なCPUを持つ機器のアプリケーション上で
画像処理するようにしても良い。しかしながら、本実施
形態では、図16のデジタルカメラ背面に備えられた液
晶(不図示)で撮影済みの画像を確認するために内部で
処理を行うようにした。
In this embodiment, the digital portrait image processing is performed by the digital camera. However, in order to improve the processing speed, when the digital portrait mode is selected, this image processing is not performed inside the digital camera, only normal digital image processing is performed, and the digital portrait mode is added as additional information of the image. Is stored and the image is
Image processing may be performed on an application of a device having a high-speed CPU such as C. However, in the present embodiment, the liquid crystal (not shown) provided on the rear surface of the digital camera of FIG. 16 internally performs processing for confirming the captured image.

【0089】なお、本発明はデジタルカメラだけにとら
われず、デジタルビデオカメラ、スキャナーなどその他
の画像処理装置にも応用可能である。
The present invention is not limited to digital cameras, but can be applied to other image processing devices such as digital video cameras and scanners.

【0090】また、以上の各実施形態において、ボケを
付加する画像の領域は、複数の画像を合成するようにし
ても、1枚の画像だけを使用するようにしても、本発明
は適用できるものである。
Further, in each of the above-described embodiments, the present invention can be applied regardless of whether a plurality of images are combined or only one image is used as an image region to which blurring is added. It is a thing.

【0091】(他の実施形態)また、各実施形態の目的
は、前述した実施形態の機能を実現するソフトウェアの
プログラムコードを記録した記憶媒体(または記録媒
体)を、システムあるいは装置に供給し、そのシステム
あるいは装置のコンピュータ(またはCPUやMPU)
が記憶媒体に格納されたプログラムコードを読み出し実
行することによっても、達成されることは言うまでもな
い。この場合、記憶媒体から読み出されたプログラムコ
ード自体が前述した実施形態の機能を実現することにな
り、そのプログラムコードを記憶した記憶媒体は本発明
を構成することになる。また、コンピュータが読み出し
たプログラムコードを実行することにより、前述した実
施形態の機能が実現されるだけでなく、そのプログラム
コードの指示に基づき、コンピュータ上で稼働している
オペレーティングシステム(OS)などが実際の処理の
一部または全部を行い、その処理によって前述した実施
形態の機能が実現される場合も含まれることは言うまで
もない。
(Other Embodiments) The purpose of each embodiment is to supply a storage medium (or recording medium) recording a program code of software for realizing the functions of the above-described embodiments to a system or apparatus, Computer of the system or device (or CPU or MPU)
Needless to say, can also be achieved by reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiment are realized, but also an operating system (OS) running on the computer is executed based on the instruction of the program code. It goes without saying that a case where some or all of the actual processing is performed and the functions of the above-described embodiments are realized by the processing is also included.

【0092】さらに、記憶媒体から読み出されたプログ
ラムコードが、コンピュータに挿入された機能拡張カー
ドやコンピュータに接続された機能拡張ユニットに備わ
るメモリに書込まれた後、そのプログラムコードの指示
に基づき、その機能拡張カードや機能拡張ユニットに備
わるCPUなどが実際の処理の一部または全部を行い、
その処理によって前述した実施形態の機能が実現される
場合も含まれることは言うまでもない。
Further, after the program code read from the storage medium is written in the memory provided in the function expansion card inserted into the computer or the function expansion unit connected to the computer, based on the instruction of the program code, , The CPU provided in the function expansion card or the function expansion unit performs some or all of the actual processing,
It goes without saying that the processing includes the case where the functions of the above-described embodiments are realized.

【0093】本発明を上記記憶媒体に適用する場合、そ
の記憶媒体には、先に説明した(図1及び図10及び図
18に示す)フローチャートに対応するプログラムコー
ドが格納されることになる。
When the present invention is applied to the above storage medium, the storage medium stores the program code corresponding to the above-described flowcharts (shown in FIGS. 1, 10, and 18).

【0094】[0094]

【発明の効果】以上説明したように、本発明によれば、
口径の小さい撮像レンズを有する撮像部により撮影され
た複数の視差を有する画像から、大口径の撮像レンズで
撮影したかのようなボケ味を持つ画像を得ることができ
る。
As described above, according to the present invention,
From an image having a plurality of parallax images captured by an imaging unit having an imaging lens having a small aperture, it is possible to obtain an image having a blur as if the image was captured by an imaging lens having a large aperture.

【0095】また、複数の視差を有する画像に画素ずら
しを適用することで、より高精細な画像を生成できる。
Further, by applying pixel shift to an image having a plurality of parallaxes, a higher definition image can be generated.

【0096】さらに、視差が算出不能な領域において
は、特別な画像処理を行わないように構成したので、画
質を損なうこともない。
Further, in the area where the parallax cannot be calculated, the special image processing is not performed, so that the image quality is not deteriorated.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の実施形態に係わる画像処理方法の概念
を示す図である。
FIG. 1 is a diagram showing a concept of an image processing method according to an embodiment of the present invention.

【図2】視差を有する複数の画像を撮影する撮像部の側
面図である。
FIG. 2 is a side view of an imaging unit that captures a plurality of images having parallax.

【図3】撮像レンズを入射面側から見た図である。FIG. 3 is a diagram of the imaging lens viewed from the incident surface side.

【図4】撮像レンズを射出面側から見た図である。FIG. 4 is a diagram of the imaging lens viewed from the exit surface side.

【図5】撮像素子を入射面側から見た図である。FIG. 5 is a diagram of the image pickup element viewed from the incident surface side.

【図6】撮像素子を入射面側から見た図で、画素ずらし
を説明するための図である。
FIG. 6 is a diagram of the image pickup element viewed from the incident surface side, and is a diagram for explaining pixel shifting.

【図7】撮像部における光学系の断面図で、画像ずれ量
の変化を説明するための図である。
FIG. 7 is a cross-sectional view of an optical system in the image pickup unit, which is a diagram for explaining a change in image shift amount.

【図8】本発明の実施形態における画像ずれ量と距離の
関係を示すグラフである。
FIG. 8 is a graph showing a relationship between an image shift amount and a distance in the embodiment of the present invention.

【図9】撮像部より得られた4枚の視差を有する画像を
示す図である。
[Fig. 9] Fig. 9 is a diagram illustrating four images having parallax obtained by an imaging unit.

【図10】図1をより詳細に示す画像処理方法のフロー
チャートである。
FIG. 10 is a flowchart of an image processing method showing FIG. 1 in more detail.

【図11】撮像部より得られた4枚の視差を有する画像
で、領域分割を説明するための図である。
[Fig. 11] Fig. 11 is a diagram for describing area division in an image having four parallaxes obtained from an imaging unit.

【図12】領域に分割された画像において、視覚的に画
像ずれ量の分布を示す図である。
FIG. 12 is a diagram visually showing the distribution of image shift amounts in an image divided into regions.

【図13】撮像素子の中央付近を拡大した部分拡大図
で、画像データの置き換えを説明するための図である。
FIG. 13 is a partially enlarged view in which the vicinity of the center of the image sensor is enlarged, and is a diagram for explaining replacement of image data.

【図14】ぼかしフィルター処理で使用される2種類の
フィルターマトリックスを示す図である。
FIG. 14 is a diagram showing two types of filter matrices used in blurring filter processing.

【図15】ベイヤー配列におけるカラーフィルター配列
の一部を示す図である。
FIG. 15 is a diagram showing a part of a color filter array in a Bayer array.

【図16】第2の実施形態における画像処理装置(デジ
タルカメラ)の斜視図である。
FIG. 16 is a perspective view of an image processing apparatus (digital camera) according to a second embodiment.

【図17】画像処理装置(デジタルカメラ)における電
気系のブロック図である。
FIG. 17 is a block diagram of an electric system in the image processing apparatus (digital camera).

【図18】画像処理装置(デジタルカメラ)の動作を示
すフローチャートである。
FIG. 18 is a flowchart showing the operation of the image processing apparatus (digital camera).

【図19】従来例における画像処理の概念を示す図であ
る。
FIG. 19 is a diagram showing a concept of image processing in a conventional example.

【符号の説明】[Explanation of symbols]

201 撮像部 202 撮像レンズ 204 撮像素子 205 絞り 206 カラーフィルター 207 光学像 215 撮影釦 219 撮影モード選択部材 222 外部記憶媒体 201 Imaging unit 202 Imaging lens 204 image sensor 205 aperture 206 color filter 207 Optical image 215 Shoot button 219 Shooting mode selection member 222 External storage medium

Claims (24)

【特許請求の範囲】[Claims] 【請求項1】 入力された視差を有する複数の画像内の
複数の領域における画像ずれ量を算出する画像ずれ量算
出手段と、該画像ずれ量算出手段により算出された前記
画像ずれ量に応じて前記複数の領域の画像に対して少な
くとも異なる2つの画像処理を切り替えて行う画像処理
手段とを有することを特徴とする画像処理装置。
1. An image shift amount calculation means for calculating an image shift amount in a plurality of regions in a plurality of images having an input parallax, and an image shift amount calculated by the image shift amount calculation means. An image processing device, comprising: an image processing unit that performs at least two different image processes for the images of the plurality of areas.
【請求項2】 前記2つの画像処理とは、前記画像ずれ
量が所定量になるように画像を補正する第1の画像処理
と、前記画像のボケ具合とは異なるボケを付加する第2
の画像処理であることを特徴とする請求項1に記載の画
像処理装置。
2. The two image processes include a first image process for correcting an image so that the image shift amount becomes a predetermined amount, and a second image process for adding a blur different from a blur condition of the image.
The image processing apparatus according to claim 1, wherein the image processing is the image processing according to claim 1.
【請求項3】 入力された視差を有する複数の画像内の
複数の領域における画像ずれ量を算出し、算出された前
記画像ずれ量に応じて前記複数の領域の画像に対して少
なくとも異なる2つの画像処理を切り替えて行うことを
特徴とする画像処理方法。
3. An image shift amount in a plurality of regions in a plurality of images having an input parallax is calculated, and at least two different images are calculated for the images in the plurality of regions according to the calculated image shift amount. An image processing method characterized by performing image processing by switching.
【請求項4】 前記2つの画像処理とは、前記画像ずれ
量が所定量になるように画像を補正する第1の画像処理
と、前記画像のボケ具合とは異なるボケを付加する第2
の画像処理であることを特徴とする請求項3に記載の画
像処理方法。
4. The two image processes are a first image process for correcting an image so that the image shift amount is a predetermined amount, and a second image process for adding a blur that is different from a blur condition of the image.
The image processing method according to claim 3, wherein the image processing is the image processing according to claim 3.
【請求項5】 請求項3または4に記載の画像処理方法
をコンピュータに実行させるための制御プログラム。
5. A control program for causing a computer to execute the image processing method according to claim 3 or 4.
【請求項6】 請求項5に記載の制御プログラムを記録
したことを特徴とする記録媒体。
6. A recording medium on which the control program according to claim 5 is recorded.
【請求項7】 入力された視差を有する複数の画像内の
複数の領域における画像ずれ量を算出する画像ずれ量算
出手段と、該画像ずれ量算出手段により算出された前記
画像ずれ量に応じて前記複数の領域の画像に対してボケ
を付加する画像処理を行うぼかし画像処理手段と、前記
画像ずれ量が算出不能である領域の画像に対してはボケ
を付加する画像処理を禁止する制御手段とを有すること
を特徴とする画像処理装置。
7. An image shift amount calculating means for calculating an image shift amount in a plurality of regions in a plurality of images having an input parallax, and an image shift amount calculated by the image shift amount calculating means according to the image shift amount. Blurred image processing means for performing image processing for adding blur to images in the plurality of areas, and control means for prohibiting image processing for adding blur to images in areas where the image shift amount cannot be calculated. An image processing apparatus comprising:
【請求項8】 入力された視差を有する複数の画像内の
複数の領域における画像ずれ量を算出し、算出された前
記画像ずれ量に応じて前記複数の領域の画像に対してボ
ケを付加するぼかし画像処理を行う画像処理方法であっ
て、前記画像ずれ量が算出不能である領域の画像に対し
てはボケを付加する画像処理を禁止することを特徴とす
る画像処理方法。
8. An image shift amount in a plurality of regions in a plurality of images having an input parallax is calculated, and blurring is added to the images in the plurality of regions according to the calculated image shift amount. An image processing method for performing blurred image processing, characterized in that image processing of adding blur is prohibited for an image of an area in which the image shift amount cannot be calculated.
【請求項9】 請求項8に記載の画像処理方法をコンピ
ュータに実行させるための制御プログラム。
9. A control program for causing a computer to execute the image processing method according to claim 8.
【請求項10】 請求項9に記載の制御プログラムを記
録したことを特徴とする記録媒体。
10. A recording medium on which the control program according to claim 9 is recorded.
【請求項11】 第1の画像と、該第1の画像に対して
視差を有する第2の画像を入力する入力手段と、前記入
力手段により入力された前記第1、第2の画像の対応す
る第1の領域と該第1の領域とは異なる第2の領域に対
して異なる画像処理を施して、前記第1の画像と第2の
画像を合成処理する画像処理手段とを有することを特徴
とする画像処理装置。
11. A correspondence between the first image, an input means for inputting a second image having a parallax with respect to the first image, and the first and second images input by the input means. A first area and a second area different from the first area, different image processing is performed, and image processing means for combining the first image and the second image is provided. A characteristic image processing device.
【請求項12】 前記画像処理手段は、前記第1、第2
の画像の前記第1の領域における前記視差による画像の
ずれを補正して前記第1の画像と第2の画像を合成処理
することを特徴とする請求項11に記載の画像処理装
置。
12. The image processing means includes the first and second image processing means.
12. The image processing apparatus according to claim 11, wherein the image shift due to the parallax in the first region of the image is corrected to perform the synthesizing process of the first image and the second image.
【請求項13】 前記画像処理手段は、前記第1、第2
の画像を合成処理する際に、前記第2の領域に対して所
定のボケを付加することを特徴とする請求項11または
12に記載の画像処理装置。
13. The image processing means includes the first and second image processing means.
The image processing apparatus according to claim 11 or 12, wherein a predetermined blur is added to the second area when the image of the image is combined.
【請求項14】 前記画像処理手段は、前記第2の領域
における前記第1、第2の画像の前記視差による画像の
ずれ量が所定検出レベル以下の場合には、前記所定のボ
ケの付加を行わないことを特徴とする請求項13に記載
の画像処理装置。
14. The image processing means adds the predetermined blur when the image shift amount due to the parallax of the first and second images in the second region is equal to or lower than a predetermined detection level. The image processing device according to claim 13, wherein the image processing device is not performed.
【請求項15】 前記画像処理手段は、前記第1、第2
の画像の前記視差による画像のずれ量に基づいて前記第
1の領域と前記第2の領域を決定することを特徴とする
請求項11〜14のいずれかの請求項に記載の画像処理
装置。
15. The image processing means includes the first and second image processing means.
15. The image processing apparatus according to claim 11, wherein the first region and the second region are determined based on an image shift amount of the image due to the parallax.
【請求項16】 前記画像処理装置は、撮像装置である
ことを特徴とする請求項11〜15のいずれかの請求項
に記載の画像処理装置。
16. The image processing apparatus according to claim 11, wherein the image processing apparatus is an image pickup apparatus.
【請求項17】 前記画像処理装置は、カメラであるこ
とを特徴とする請求項11〜15のいずれかの請求項に
記載の画像処理装置。
17. The image processing apparatus according to claim 11, wherein the image processing apparatus is a camera.
【請求項18】 第1の画像と、該第1の画像に対して
視差を有する第2の画像を入力する入力手段と、前記第
1、第2の画像の前記視差による画像のずれ量に基づい
て少なくとも第1の画像に所定のボケを付加すると共
に、前記第1、第2の画像の前記視差による画像のずれ
量が所定検出レベル以下の場合には、前記所定のボケの
付加を行わないことを特徴とする画像処理装置。
18. A displacement amount between a first image, an input unit for inputting a second image having a parallax with respect to the first image, and an image shift amount due to the parallax between the first and second images. Based on the above, at least a predetermined blur is added to the first image, and when the image shift amount due to the parallax between the first and second images is equal to or less than a predetermined detection level, the predetermined blur is added. An image processing device characterized by the absence thereof.
【請求項19】 前記画像処理装置は、撮像装置である
ことを特徴とする請求項18に記載の画像処理装置。
19. The image processing apparatus according to claim 18, wherein the image processing apparatus is an image pickup apparatus.
【請求項20】 前記画像処理装置は、カメラであるこ
とを特徴とする請求項18に記載の画像処理装置。
20. The image processing apparatus according to claim 18, wherein the image processing apparatus is a camera.
【請求項21】 第1の画像と、該第1の画像に対して
視差を有する第2の画像を入力すると共に、前記入力さ
れた第1、第2の画像の対応する第1の領域と該第1の
領域とは異なる第2の領域に対して異なる画像処理を施
して、前記第1の画像と第2の画像を合成処理すること
を特徴とする画像処理方法。
21. A first image and a second image having parallax with respect to the first image are input, and corresponding first regions of the input first and second images are provided. An image processing method, wherein different image processing is applied to a second area different from the first area, and the first image and the second image are combined.
【請求項22】 第1の画像と、該第1の画像に対して
視差を有する第2の画像を入力し、前記第1、第2の画
像の前記視差による画像のずれ量に基づいて少なくとも
第1の画像に所定のボケを付加すると共に、前記第1、
第2の画像の前記視差による画像のずれ量が所定検出レ
ベル以下の場合には、前記所定のボケの付加を行わない
ことを特徴とする画像処理方法。
22. A first image and a second image having a parallax with respect to the first image are input, and at least based on a shift amount of the images due to the parallax between the first and second images. A predetermined blur is added to the first image, and the first,
An image processing method, wherein the predetermined blur is not added when the amount of displacement of the second image due to the parallax is equal to or lower than a predetermined detection level.
【請求項23】 請求項21または22に記載の画像処
理方法をコンピュータに実行させるための制御プログラ
ム。
23. A control program for causing a computer to execute the image processing method according to claim 21 or 22.
【請求項24】 請求項23に記載の制御プログラムを
記録したことを特徴とする記録媒体。
24. A recording medium on which the control program according to claim 23 is recorded.
JP2002300410A 2001-10-12 2002-10-15 Image processing apparatus and method, control program, and recording medium Withdrawn JP2003189171A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002300410A JP2003189171A (en) 2001-10-12 2002-10-15 Image processing apparatus and method, control program, and recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001-315671 2001-10-12
JP2001315671 2001-10-12
JP2002300410A JP2003189171A (en) 2001-10-12 2002-10-15 Image processing apparatus and method, control program, and recording medium

Publications (1)

Publication Number Publication Date
JP2003189171A true JP2003189171A (en) 2003-07-04

Family

ID=27615387

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002300410A Withdrawn JP2003189171A (en) 2001-10-12 2002-10-15 Image processing apparatus and method, control program, and recording medium

Country Status (1)

Country Link
JP (1) JP2003189171A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007124398A (en) * 2005-10-28 2007-05-17 Nikon Corp Imaging device
JP2008015754A (en) * 2006-07-05 2008-01-24 Nikon Corp Imaging apparatus, image processing apparatus, and image processing method
JP2010130570A (en) * 2008-11-28 2010-06-10 Samsung Digital Imaging Co Ltd Imaging apparatus and imaging method
JP2011044801A (en) * 2009-08-19 2011-03-03 Toshiba Corp Image processor
JP2012253748A (en) * 2011-05-09 2012-12-20 Canon Inc Image processor and image processing method
US8531539B2 (en) 2008-02-19 2013-09-10 Casio Computer Co., Ltd. Image capturing device, method for image capturing, and computer readable recording medium
JP2014057181A (en) * 2012-09-12 2014-03-27 Canon Inc Image processor, imaging apparatus, image processing method and image processing program
JP2014068088A (en) * 2012-09-25 2014-04-17 Sharp Corp Imaging apparatus and imaging apparatus control method
JP2015144416A (en) * 2013-12-25 2015-08-06 キヤノン株式会社 IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2016010160A (en) * 2014-06-23 2016-01-18 株式会社リコー Parallax estimation for multi-viewpoint image system

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007124398A (en) * 2005-10-28 2007-05-17 Nikon Corp Imaging device
JP2008015754A (en) * 2006-07-05 2008-01-24 Nikon Corp Imaging apparatus, image processing apparatus, and image processing method
US8531539B2 (en) 2008-02-19 2013-09-10 Casio Computer Co., Ltd. Image capturing device, method for image capturing, and computer readable recording medium
JP2010130570A (en) * 2008-11-28 2010-06-10 Samsung Digital Imaging Co Ltd Imaging apparatus and imaging method
US8497932B2 (en) 2008-11-28 2013-07-30 Samsung Electronics Co., Ltd. Photographing apparatus and method having at least two photographing devices and exposure synchronization
US8339483B2 (en) 2009-08-19 2012-12-25 Kabushiki Kaisha Toshiba Image processing device, solid-state imaging device, and camera module
CN101998040A (en) * 2009-08-19 2011-03-30 株式会社东芝 Image processing device, solid-state imaging device, and camera module
JP2011044801A (en) * 2009-08-19 2011-03-03 Toshiba Corp Image processor
JP2012253748A (en) * 2011-05-09 2012-12-20 Canon Inc Image processor and image processing method
JP2014057181A (en) * 2012-09-12 2014-03-27 Canon Inc Image processor, imaging apparatus, image processing method and image processing program
JP2014068088A (en) * 2012-09-25 2014-04-17 Sharp Corp Imaging apparatus and imaging apparatus control method
JP2015144416A (en) * 2013-12-25 2015-08-06 キヤノン株式会社 IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2016010160A (en) * 2014-06-23 2016-01-18 株式会社リコー Parallax estimation for multi-viewpoint image system

Similar Documents

Publication Publication Date Title
US7286168B2 (en) Image processing apparatus and method for adding blur to an image
CN110542977B (en) Notification method and system
US7920172B2 (en) Method of controlling an action, such as a sharpness modification, using a colour digital image
EP2360911B1 (en) Apparatus and method for generating images
US9258545B2 (en) Stereoscopic imaging apparatus
US9369693B2 (en) Stereoscopic imaging device and shading correction method
US20130278730A1 (en) Single-eye stereoscopic imaging device, correction method thereof, and recording medium thereof
US20080122946A1 (en) Apparatus and method of recovering high pixel image
CN101098399A (en) Device and method for restoring high-resolution images
CN103167239A (en) Image processing device, image processing method, imaging device, and display device
CN105323423A (en) Image processing method, image processing apparatus, and image pickup apparatus
JP2003189171A (en) Image processing apparatus and method, control program, and recording medium
JP5525109B2 (en) Imaging device
JP2005143032A (en) Photographing apparatus
JPH07288826A (en) Film picture reproduction device
JP4646459B2 (en) Solid-state imaging device
JP2008092440A (en) Camera and image processing program
JP2019220830A (en) Imaging apparatus and control method therefor, program and storage medium
JP4143140B2 (en) Image processing apparatus, printer, and photographing system
JP3643203B2 (en) Digital camera
JPH10210360A (en) Digital camera
JP3631576B2 (en) Digital camera
JPH10210355A (en) Digital camera
JP3641537B2 (en) Digital camera
JPH10210358A (en) Digital camera

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060110