JP2009105621A - Program, image processing apparatus and camera - Google Patents
Program, image processing apparatus and camera Download PDFInfo
- Publication number
- JP2009105621A JP2009105621A JP2007275027A JP2007275027A JP2009105621A JP 2009105621 A JP2009105621 A JP 2009105621A JP 2007275027 A JP2007275027 A JP 2007275027A JP 2007275027 A JP2007275027 A JP 2007275027A JP 2009105621 A JP2009105621 A JP 2009105621A
- Authority
- JP
- Japan
- Prior art keywords
- image
- image height
- height
- aberration
- data
- 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
Links
Images
Landscapes
- Image Processing (AREA)
- Editing Of Facsimile Originals (AREA)
- Studio Devices (AREA)
Abstract
【課題】 像高に依存する収差を補正するときに、画欠けや画角の減少を抑制するための手段を提供する。
【解決手段】 プログラムは、データ読込部および演算部を有するコンピュータに対して、以下の各ステップを演算部にそれぞれ実行させる。入力ステップでは、撮影光学系を介して撮像された画像のデータを、該画像の撮像時における撮影光学系のデータとともにデータ読込部から演算部に読み込む。関数決定ステップでは、演算部が、像高に依存する収差を補正するための補正関数を決定する。像高決定ステップでは、演算部が、各々の値が異なる第1基準像高および第2基準像高をそれぞれ決定する。変倍率演算ステップでは、演算部が、補正関数に対して第1基準像高および第2基準像高を用いて、像高に依存する収差の収差量に応じた画像の変倍率を求める。画像補正ステップでは、演算部が、像高に依存する収差の補正を画像に対して行う。さらに、画像補正ステップでは、演算部が、上記の変倍率を用いて画像の変倍処理を実行する。
【選択図】 図1PROBLEM TO BE SOLVED: To provide a means for suppressing a missing image and a decrease in an angle of view when correcting an aberration depending on an image height.
A program causes a computer having a data reading unit and a calculation unit to cause the calculation unit to execute the following steps. In the input step, the data of the image captured through the imaging optical system is read from the data reading unit into the arithmetic unit together with the data of the imaging optical system at the time of capturing the image. In the function determination step, the calculation unit determines a correction function for correcting aberration depending on the image height. In the image height determination step, the calculation unit determines a first reference image height and a second reference image height that are different from each other. In the variable magnification calculation step, the calculation unit uses the first reference image height and the second reference image height for the correction function to obtain an image magnification corresponding to the aberration amount of the aberration depending on the image height. In the image correction step, the calculation unit corrects the aberration depending on the image height on the image. Further, in the image correction step, the calculation unit executes an image scaling process using the above scaling ratio.
[Selection] Figure 1
Description
本発明は、撮影光学系を介して撮像された画像に対して、像高に依存する収差の補正を実行するプログラムおよびその周辺技術に関する。 The present invention relates to a program for correcting aberration depending on image height for an image captured through a photographing optical system, and a peripheral technique thereof.
従来から、電子カメラ等で撮像されたディジタル画像に対し、光軸中心からの距離(像高)に依存する収差(歪曲収差や倍率色収差)の補正を行う画像処理装置が公知である。一例として、特許文献1には、画像の歪曲収差を補正する撮像装置の構成が開示されている。
ところで、歪曲収差や倍率色収差の収差量は像高によって変化し、これらの像高に依存する収差を補正した後の画像では外縁が直線にならない。そのため、像高に依存する収差を補正した画像に対して適切な変倍処理が行われないと、補正後の画像において画素の欠損(画欠け)が生じる場合がある。また、逆に補正前の画像を全て残したい場合に、画像の一部が補正後になくなって画角が減少することもある。なお、特許文献1では、上述の画欠けなどを抑制するための変倍率の決定方法については言及がなく、これらの問題についての改善が要請されていた。
Incidentally, the amount of distortion and lateral chromatic aberration vary depending on the image height, and the outer edge of the image after correcting the aberration depending on the image height is not a straight line. Therefore, if an appropriate scaling process is not performed on an image in which aberration depending on the image height is corrected, pixel loss (image loss) may occur in the corrected image. Conversely, when it is desired to leave all the images before correction, a part of the image may disappear after correction and the angle of view may decrease. In
本発明は上記従来技術の課題を解決するためのものである。本発明の目的は、像高に依存する収差を補正するときに、画欠けや画角の減少を抑制するための手段を提供することにある。 The present invention is to solve the above-mentioned problems of the prior art. SUMMARY OF THE INVENTION An object of the present invention is to provide means for suppressing image loss and field angle reduction when correcting aberrations depending on image height.
本発明の一の形態に係るプログラムは、データ読込部および演算部を有するコンピュータに対して、入力ステップ、関数決定ステップ、像高決定ステップ、変倍率演算ステップ、画像補正ステップを演算部にそれぞれ実行させる。入力ステップでは、撮影光学系を介して撮像された画像のデータを、該画像の撮像時における撮影光学系のデータとともにデータ読込部から演算部に読み込む。関数決定ステップでは、演算部が、像高に依存する収差を補正するための補正関数を決定する。像高決定ステップでは、演算部が、各々の値が異なる第1基準像高および第2基準像高をそれぞれ決定する。変倍率演算ステップでは、演算部が、補正関数に対して第1基準像高および第2基準像高を用いて、像高に依存する収差の収差量に応じた画像の変倍率を求める。画像補正ステップでは、演算部が、像高に依存する収差の補正を画像に対して行う。さらに、画像補正ステップでは、演算部が、上記の変倍率を用いて画像の変倍処理を実行する。 A program according to an embodiment of the present invention executes an input step, a function determination step, an image height determination step, a scaling factor calculation step, and an image correction step in a calculation unit for a computer having a data reading unit and a calculation unit. Let In the input step, the data of the image captured through the imaging optical system is read from the data reading unit into the arithmetic unit together with the data of the imaging optical system at the time of capturing the image. In the function determination step, the calculation unit determines a correction function for correcting aberration depending on the image height. In the image height determination step, the calculation unit determines a first reference image height and a second reference image height that are different from each other. In the variable magnification calculation step, the calculation unit uses the first reference image height and the second reference image height for the correction function to obtain an image magnification corresponding to the aberration amount of the aberration depending on the image height. In the image correction step, the calculation unit corrects the aberration depending on the image height on the image. Further, in the image correction step, the calculation unit executes an image scaling process using the above scaling ratio.
上記の一の形態において、収差量は、上記の関数における第1基準像高から第2基準像高までの最大値または上記の関数における第1基準像高から第2基準像高までの最小値であってもよい。 In the first aspect, the aberration amount is a maximum value from the first reference image height to the second reference image height in the function or a minimum value from the first reference image height to the second reference image height in the function. It may be.
上記の一の形態において、第1基準像高は、画像の縦方向の像高および画像の横方向の像高の少なくとも一方を用いて決定されてもよい。または、第1基準像高は、画像の縦方向の像高および画像の横方向の像高の少なくとも一方と、画像を撮像した撮像素子のサイズとに基づいて決定されてもよい。 In the first aspect, the first reference image height may be determined using at least one of the vertical image height and the horizontal image height of the image. Alternatively, the first reference image height may be determined based on at least one of the image height in the vertical direction of the image and the image height in the horizontal direction of the image, and the size of the image sensor that has captured the image.
上記の一の形態において、第2基準像高は、最高像高であってもよい。または、第2基準像高は、画像の縦方向の像高および画像の横方向の像高の少なくとも一方と、画像を撮像した撮像素子のサイズとに基づいて決定されてもよい。 In the one aspect described above, the second reference image height may be a maximum image height. Alternatively, the second reference image height may be determined based on at least one of the image height in the vertical direction of the image and the image height in the horizontal direction of the image, and the size of the image sensor that has captured the image.
上記の一の形態において、像高に依存する収差は、歪曲収差および倍率色収差のうちの少なくとも1以上を含んでいてもよい。 In the one aspect described above, the aberration depending on the image height may include at least one of distortion and lateral chromatic aberration.
上記の一の形態において、像高に依存する収差は、撮影光学系の特性を示すレンズデータと、画像撮像時における撮影光学系の焦点位置および焦点距離のデータとに応じて決定されてもよい。 In the one aspect described above, the aberration depending on the image height may be determined according to lens data indicating characteristics of the photographing optical system and data on a focal position and a focal length of the photographing optical system at the time of image capturing. .
上記の一の形態において、画像補正ステップにて、演算部は、画像の補間処理をさらに実行してもよい。このとき、演算部は、補間処理のアルゴリズムに応じて変倍率を修正してもよい。 In the one aspect described above, in the image correction step, the calculation unit may further execute an image interpolation process. At this time, the calculation unit may correct the scaling factor according to the algorithm of the interpolation process.
ここで、上記の一の形態のプログラムを記憶した記憶媒体や、上記の一の形態のプログラムを画像処理方法として表現したものや、上記の一の形態のプログラムを実行する画像処理装置や、上記の画像処理装置を備えたカメラなども、本発明の具体的態様として有効である。 Here, a storage medium storing the program of the above one form, an expression of the program of the above one form as an image processing method, an image processing apparatus that executes the program of the above one form, A camera equipped with the image processing apparatus is also effective as a specific aspect of the present invention.
本発明では、補正関数に対して第1基準像高および第2基準像高を用いて収差量に応じた画像の変倍率を求め、この変倍率を用いて画像の変倍処理を実行する。これにより、像高に依存する収差を補正した後の画欠けや画角の減少を抑制でき、好ましい画像を得ることができる。 In the present invention, the magnification ratio of the image corresponding to the amount of aberration is obtained using the first reference image height and the second reference image height for the correction function, and the image scaling process is executed using the magnification ratio. As a result, it is possible to suppress a lack of image and a decrease in the angle of view after correcting the aberration depending on the image height, and a preferable image can be obtained.
<実施形態における装置の構成の説明>
図1は、一実施形態である画像処理システムの構成例を示している。図1の画像処理システムは、レンズ交換が可能な一眼レフレックス型の電子カメラ1と、画像処理装置2とで構成されている。
<Description of Configuration of Apparatus in Embodiment>
FIG. 1 shows a configuration example of an image processing system according to an embodiment. The image processing system in FIG. 1 includes a single-lens reflex
まず、電子カメラ1の構成を説明する。電子カメラ1は、レンズユニット11と、カメラ本体12とを有している。上記のレンズユニット11は、電気接点を備えたマウント13,14を介してカメラ本体12に交換可能に装着される。そして、カメラ本体12とレンズユニット11との接続時には、マウント13,14の電気接点による電気的な接続が確立する。
First, the configuration of the
レンズユニット11には、レンズ側のマウント13、撮影光学系15、レンズマイコン16、絞り(不図示)が収容されている。簡単のため、図1のレンズユニット11では撮影光学系15を1枚のレンズで表す。また、レンズマイコン16は、不図示のエンコーダによって、撮影光学系15の焦点位置(合焦先の被写体までの距離)および焦点距離を取得する。そして、レンズマイコン16は、マウント13の電気接点を介してカメラ本体12に対してデータの出力を行う。
The
一方、カメラ本体12は、カメラ側のマウント14と、ミラーボックスユニット17と、撮像素子18と、AFE19と、画像処理部20と、メモリ21と、記録I/F22と、外部I/F23と、制御部24およびバス25とを有している。ここで、画像処理部20、メモリ21、記録I/F22、外部I/F23、制御部24はそれぞれバス25を介して相互に接続されている。また、マウント14の電気接点およびミラーボックスユニット17は、それぞれ制御部24と接続されている。
On the other hand, the
ミラーボックスユニット17の内部には、回動可能に軸支されたメインミラー17aが配置されている。このミラーボックスユニット17は、メインミラー17aの駆動によって、ファインダ光学系(不図示)に光束を導く観察状態と、撮像素子18に光束を導く退避状態との切り替えを行う。
Inside the
撮像素子18は、撮影光学系15を通過した光束を光電変換して、被写体像のアナログ画像信号を生成する。なお、撮像素子18の出力はAFE19に接続されている。
The
AFE19は、撮像素子18の出力に対してアナログ信号処理を施すアナログフロントエンド回路である。このAFE19は、相関二重サンプリングや、画像信号のゲインの調整や、画像信号のA/D変換を行う。なお、AFE19の出力は画像処理部20に接続されている。
The AFE 19 is an analog front end circuit that performs analog signal processing on the output of the
画像処理部20は、ディジタル画像信号に対して、各種の画像処理(色補間処理、階調変換処理、輪郭強調処理、ホワイトバランス調整など)や、画像の圧縮伸長処理を施す。また、メモリ21は、画像処理の前工程や後工程で画像のデータを一時的に記憶する。
The
記録I/F22には、記憶媒体4を着脱自在に装着できるコネクタを内蔵している。そして、記録I/F22は、コネクタに装着された記憶媒体4に対してデータの書き込み/読み込みを実行する。上記の記憶媒体4は、ハードディスクや、半導体メモリを内蔵したメモリカードなどで構成される。なお、図1では記憶媒体4の一例としてメモリカードを図示する。
The recording I /
外部I/F23は、無線または有線の通信回線3を介して、画像処理装置2とのデータ送受信を実行する。
The external I /
制御部24は、電子カメラ1の統括的な制御を行うプロセッサである。例えば、制御部24は、記録画像の撮像に関する各種の処理を実行する。なお、制御部24は、後述のプログラムの実行により、記録画像の収差補正処理や画像変倍補正を実行させることも可能である。
The control unit 24 is a processor that performs overall control of the
ここで、記録画像を撮像するときの電子カメラ1の動作を簡単に説明する。制御部24は、レリーズ釦(不図示)の押圧に応じて、メインミラー17aを退避状態にするとともに、撮像素子18を駆動させて被写体を撮像する。記録画像のデータは、AFE19および画像処理部20で所定の処理が施される。
Here, the operation of the
一方、記録画像の撮像時において、制御部24は、記録画像の撮影条件のデータ(レンズユニット11の種別、撮像時における撮影光学系15の焦点位置および焦点距離)をレンズマイコン16から受信する。そして、制御部24は、記録画像のデータと上記の撮影条件のデータとを対応付けして所定のフォーマットで画像ファイルを生成する。また、画像ファイルには、撮像素子18のサイズを示す情報や記録画像のサイズを示す情報も含まれるものとする。なお、上記の画像ファイルは、制御部24によって記録I/F22を介して記憶媒体4に記録される。
On the other hand, at the time of capturing a recorded image, the control unit 24 receives from the
次に、画像処理装置2の構成を説明する。画像処理装置2は、例えば、フォトレタッチ用のアプリケーションプログラムがインストールされたパーソナルコンピュータであって、電子カメラ1から取得した記録画像のデータに画像処理を施すことができる。
Next, the configuration of the
この画像処理装置2は、記録I/F31と、通信部32と、記憶部33と、CPU34とを有している。記録I/F31、通信部32、記憶部33はそれぞれCPU34と接続されている。また、画像処理装置2には、操作部35およびモニタ36が接続されている。
The
記録I/F31は、記憶媒体4を接続するコネクタを有している。そして、記録I/F31は、コネクタに接続された記憶媒体4から上記の画像ファイルを読み込む。また、通信部32は、通信回線3を介して接続された電子カメラ1とのデータ送受信を実行する。
The recording I /
記憶部33には、上記のアプリケーションプログラムと、レンズユニット11の種別ごとに生成されている収差情報のデータ群とが記憶されている。なお、記憶部33には画像処理後の記録画像のデータを記録することもできる。
The
ここで、上記の収差情報は、一例として、レンズユニット11の歪曲収差および倍率色収差のそれぞれを、撮影光学系15の焦点位置および焦点距離の関数で近似したときの関数情報で構成される。なお、各々の収差情報は、レンズユニット11の製造者によって撮影光学系15の設計データや実測データに基づいて予め生成される。
Here, as an example, the aberration information includes function information obtained by approximating the distortion aberration and the lateral chromatic aberration of the
CPU34は、上記のアプリケーションプログラムを実行し、記録画像のデータの収差補正処理や画像変倍補正に伴う各種の演算処理を行う。また、操作部35は、アプリケーションプログラムに関する各種の操作入力をユーザーから受け付ける。モニタ36には、CPU34の制御により、アプリケーションプログラムによる操作画面や、画像処理前後の画像を示す表示画面などが表示される。
The
<実施形態における収差補正処理の説明>
次に、図2を参照しつつ、本実施形態における収差補正処理の一例を説明する。なお、以下の例では、画像処理装置2のCPU34がアプリケーションプログラムを実行することで記録画像の収差補正処理を行う場合を説明する。
<Description of Aberration Correction Processing in Embodiment>
Next, an example of aberration correction processing in the present embodiment will be described with reference to FIG. In the following example, a case will be described in which the
ステップS101:画像処理装置2のCPU34は、補正対象の記録画像のデータを含む画像ファイルを電子カメラ1から取得する。S101において、電子カメラ1と画像処理装置2との間での画像ファイルの受け渡しは、通信回線3を介したデータ通信または記憶媒体4の授受によって実現される。
Step S101: The
ステップS102:CPU34は、画像ファイル(S101)に含まれる撮影条件のデータに基づいて、像高に依存する収差を補正するための補正関数を決定する。具体的には、まず、CPU34は、レンズユニット11の種別に対応する収差情報のデータを記憶部33から読み出す。そして、CPU34は、上記の収差情報と、撮像時の焦点位置および焦点距離とを用いて補正関数を決定する。
Step S102: The
ここで、理想像点の像高をY、実際の像点の像高をY0とすると、撮影光学系15が画像に与える歪曲量Dは下式(1)で表わされる。
Here, assuming that the image height of the ideal image point is Y and the image height of the actual image point is Y 0 , the distortion amount D applied to the image by the photographing
D=100×(Y−Y0)/Y0 [%] … (1)
上記の歪曲量Dは、レンズユニット11(撮影光学系15)の種別によって異なり、同じ撮影光学系15であっても、画像撮像時の焦点位置および焦点距離に応じて変化する。また、歪曲量Dの画像上での分布は、一般に、下式(2)のように像高比r(r=像高/最高像高)のみの関数で十分良い近似を得ることができる。
D = 100 × (Y−Y 0 ) / Y 0 [%] (1)
The above-described distortion amount D varies depending on the type of the lens unit 11 (shooting optical system 15), and changes according to the focal position and focal length at the time of image capturing even with the same shooting
D≡ar4+br3+cr2 … (2)
上記の式(2)の各係数a,b,cは、レンズユニット11の種別に対応する収差情報のデータと、撮像時の焦点位置および焦点距離とが決まればほぼ一意的に決定することが可能である。したがって、CPU34は、画像ファイルの撮影条件のデータによって補正関数に係る各係数を決定できることが分かる。
D≡ar 4 + br 3 + cr 2 (2)
The coefficients a, b, and c in the above equation (2) can be determined almost uniquely if the aberration information data corresponding to the type of the
但し、上記の例では歪曲収差の補正についてのみ言及しているが、倍率色収差についても同時に補正を行うことが可能である。例えば、像高比rでの緑(G)画素に対する赤(R)画素のズレ量を歪曲収差量と同様に求めたものをδDR(r)とするとき、R画素の歪曲量DR(r)は下式(4)のように定義できる。同様に、像高比rでのG画素に対する青(B)画素のズレ量を歪曲収差量と同様に求めたものをδDB(r)とするとき、B画素の歪曲量DB(r)は下式(5)のように定義できる。 However, although only the correction of distortion aberration is mentioned in the above example, it is possible to correct the lateral chromatic aberration at the same time. For example, when a deviation amount of a red (R) pixel with respect to a green (G) pixel at an image height ratio r is obtained in the same manner as a distortion aberration amount is δD R (r), the distortion amount D R ( r) can be defined as the following formula (4). Similarly, when the deviation amount of the blue (B) pixel with respect to the G pixel at the image height ratio r is obtained in the same manner as the distortion aberration amount is δD B (r), the distortion amount D B (r) of the B pixel. Can be defined as in equation (5) below.
DR(r)≡D(r)+δDR(r) … (4)
DB(r)≡D(r)+δDB(r) … (5)
上記のように倍率色収差は、歪曲収差の場合と同様の処理で補正できることが分かる。簡単のため、本実施形態の例では歪曲収差の補正を中心に説明するが、特に断りのないかぎり、CPU34は、歪曲補正として歪曲収差の補正と倍率色収差の補正とを同時に行うものとする。
D R (r) ≡D (r) + δD R (r) (4)
D B (r) ≡D (r) + δD B (r) (5)
As described above, it can be seen that the lateral chromatic aberration can be corrected by the same processing as in the case of distortion. For the sake of simplicity, the example of the present embodiment will be described centering on correction of distortion, but unless otherwise specified, the
ステップS103:CPU34は、像高に依存する収差(歪曲収差、倍率色収差)の収差量に応じて画像の変倍率を求める。
Step S103: The
図3は、記録画像に歪曲補正を施した状態を模式的に示している。なお、図3は、簡単のため、記録画像を上下左右に4分割したときの右上部分のみを示している。 FIG. 3 schematically shows a state in which the distortion correction is performed on the recorded image. For the sake of simplicity, FIG. 3 shows only the upper right portion when the recorded image is divided into upper, lower, left and right.
記録画像に対して歪曲補正を実行した場合には、補正後の画像の外縁は直線とはならない。したがって、例えば、歪曲補正を実行したときに何ら変倍処理を行わない場合には、画像が足りずに画素の欠損が生じたり、逆に必要な部分がカットされることとなる。そのため、歪曲補正と同時に画像の変倍処理を行う必要が生じる。 When distortion correction is performed on a recorded image, the outer edge of the corrected image is not a straight line. Therefore, for example, when no scaling process is performed when distortion correction is performed, a missing pixel occurs due to lack of an image, or conversely, a necessary portion is cut. Therefore, it is necessary to perform image scaling processing simultaneously with distortion correction.
例えば、通常の樽型や糸巻型の歪曲収差の補正の場合、図3に示す点A,B,Cで得られる歪曲量で変倍率を求めるとよい。具体的には、樽型の歪曲収差の補正において、補正後の画像で画素の欠損をなくすときには、画像の縦または横の中央部での歪曲量(図3の点Aまたは点Bでの歪曲量)を用いればよい。 For example, in the case of normal barrel-type or pincushion-type distortion aberration correction, the scaling factor may be obtained from the distortion amounts obtained at points A, B, and C shown in FIG. Specifically, in correcting barrel distortion, when eliminating the pixel defect in the corrected image, the distortion amount at the vertical or horizontal central portion of the image (the distortion at point A or point B in FIG. 3). Amount) may be used.
同様に、糸巻型の歪曲収差の補正において、補正後の画像で画素の欠損をなくすときには、画像の隅部での歪曲量(図3の点Cでの歪曲量)を用いればよい。 Similarly, in correcting a pincushion type distortion aberration, when eliminating a pixel defect in a corrected image, a distortion amount at the corner of the image (a distortion amount at a point C in FIG. 3) may be used.
しかし、陣笠型などを含めたときの一般的な歪曲補正の場合には、補正後の画像の外縁がより複雑な形状をなしうる。したがって、式(6)、式(7)によって変倍すると画素の欠損が生じうるため、より高精度の変倍率の決定が必要となる。 However, in the case of general distortion correction when the Jinkasa type is included, the outer edge of the corrected image can have a more complicated shape. Therefore, if the magnification is changed according to the equations (6) and (7), pixel loss may occur. Therefore, it is necessary to determine a scaling factor with higher accuracy.
(変倍率を決定するアルゴリズムの一例)
ここで、補正後の画像で画素の欠損をなくす場合について、CPU34による変倍率の決定方法のアルゴリズムを説明する。具体的には、図3において画像の伸縮量を変分Lで表すとき、CPU34は線分ACと線分BC上でのLの最小値を求め、この最小値をなす部分で画像の変倍率を決定すればよい。ただし、図3の例では、Lはx軸方向およびy軸方向に正の向きをとる。そして、補正後の画像のサイズが元の記録画像のサイズよりも小さくなる場合には、Lの値は負の値をとるものとする。
(Example of algorithm for determining the scaling factor)
Here, an algorithm of a scaling factor determination method by the
いま、線分AC間でのLの変化を考える。画像の横方向のサイズをXSIZEとし、画像の縦方向のサイズをYSIZEとしたとき、線分AC間でのLの値(LAC)は下式(8)で表すことができる。 Consider the change in L between line segments AC. When the horizontal size of the image is XSIZE and the vertical size of the image is YSIZE, the value of L (L AC ) between the line segments AC can be expressed by the following equation (8).
なお、上式においてRmaxは、記録画像を撮像した撮像素子18の最高像高を示している。
In the above equation, R max indicates the maximum image height of the
一方、線分BC間でのLの変化を考える。このとき、歪曲補正後の画像と元の記録画像との縦横比を一定にするという制限を加えると、線分BC間でのLの値(LBC)は下式(9)で表すことができる。 On the other hand, let us consider the change in L between the line segments BC. At this time, if the restriction that the aspect ratio between the image after distortion correction and the original recorded image is made constant is added, the value of L between the line segments BC (L BC ) can be expressed by the following equation (9). it can.
式(8)、式(9)からLの値が最小となる場合を求めるために、CPU34はさらに以下の演算を行う。まず、CPU34は、画像の横方向の像高と縦方向の像高(XSIZE/2RmaxとYSIZE/2Rmaxとの値)とを比較し、小さい方の値を選択して像高比rSとする。そして、CPU34は、下式(10)によって変倍率のパラメータであるDαの値を求める。なお、式(10)は、記録画像を撮像した撮像素子18の最高像高と、撮影光学系15のイメージサークルの半径とが一致する場合(最高像高での像高比rが1となる場合)に適用される。
In order to obtain the case where the value of L is minimized from the equations (8) and (9), the
また、記録画像を撮像した撮像素子18の最高像高が撮影光学系15のイメージサークルの半径よりも小さい場合には、CPU34は式(10)によらずに以下の要領でDαの値を求める。
Further, when the maximum image height of the
ここで、撮影光学系15のイメージサークルの半径をRlenzとし、撮像素子18の画素ピッチ(相互に隣接する2つの画素の中央間の距離)をlsen、撮像素子18の横方向画素数をXPIC、撮像素子18の縦方向画素数をYPICとする。このとき、CPU34は、下式(11)によってDαの値を求めることができる。
Here, the radius of the image circle of the photographic
なお、撮像素子18の最高像高が撮影光学系15のイメージサークルの半径よりも小さくなる場合としては、以下のような場合が考えられる。第1の例は、撮像素子18の大きさがそもそも撮影光学系15のイメージサークルの半径よりも小さい場合である(図4(a)参照)。第2の例は、撮像素子18の最高像高が撮影光学系15のイメージサークルの半径と一致するが、記録画像が撮像素子18の部分領域の画像に相当する場合(クロップ撮影の場合)である(図4(b)参照)。
As a case where the maximum image height of the
(変倍率を決定するアルゴリズムの別例)
次に、式(8)から式(11)を用いたアルゴリズムの別例として、元の記録画像の全範囲を歪曲補正後になくならないようにする場合(画角の減少をすべて防ぐ場合)を説明する。この場合には、CPU34は線分ACと線分BC上でのLの最大値を求め、この最大値をなす部分で画像の変倍率を決定すればよい。ただし、この別例の場合には、補正後の画像には画素の欠損が生じ、補正後の画像には黒い縁がつくことになる。
(Another example of algorithm for determining the scaling ratio)
Next, as another example of the algorithm using Expressions (8) to (11), a description will be given of a case where the entire range of the original recorded image is not lost after distortion correction (a case where all reductions in the angle of view are prevented). To do. In this case, the
具体的には、CPU34は、像高比rが1となる場合において、式(10)の代わりに下式(12)を適用してDαの値を求める。また、記録画像を撮像した撮像素子18の最高像高が撮影光学系15のイメージサークルの半径よりも小さい場合には、CPU34は、式(11)の代わりに下式(13)を適用してDαの値を求める。
Specifically, when the image height ratio r is 1, the
本実施形態の画像処理装置2では、CPU34はデフォルトの状態においてLの最小値からDαの値を決定する。なお、CPU34はユーザーの指示に応じて、Dαの値を決定するアルゴリズムを変更することができる。
In the
ステップS104:CPU34は、像高に依存する収差の補正と画像の変倍処理とを同時に実行する。具体的には、CPU34は、S103で求めたDαの値を用いて、下式(14)で歪曲補正および変倍処理を実行する。
Step S104: The
ここで、CPU34は、画素の欠損がないように変倍率を決定する場合において、補間処理のときに必要となるリングピクセルの分を予め考慮して変倍率を修正してもよい。このとき、CPU34は、各々の補間処理のアルゴリズム(補間時に参照する画素の範囲)に応じて変倍率を以下のように修正する。
Here, when determining the scaling factor so that there is no pixel loss, the
例えば、Cubic補間の場合、CPU34は下式(15)のようにDfacを定義する。
For example, in the case of cubic interpolation, the
また、Linear補間の場合、CPU34は下式(16)のようにDfacを定義する。
In the case of linear interpolation, the
そして、CPU34は、式(15)または式(16)で定義したDfacを用いて、上記の式(14)を下式(17)のように補正する。なお、変倍のときには画像の縦横比を一定に維持する必要から、上記のDfacの値は画像の縦方向または横方向のいずれか小さい方のみを適用すれば足りる。 And CPU34 correct | amends said Formula (14) like following Formula (17) using Dfac defined by Formula (15) or Formula (16). Incidentally, the need to maintain a constant aspect ratio of the image when zooming, values of the above D fac is sufficient to apply only the smaller of the vertical or horizontal direction of the image.
上記の処理を実行すると、補間に用いるリングピクセルが画像の外縁に確保されるため、補間処理のときに画像の外縁部の処理で条件分岐が不要となる。その結果、補間処理の処理速度が向上し、本実施形態における歪曲補正の所要時間をより短縮できるようになる。 When the above processing is executed, ring pixels used for interpolation are secured at the outer edge of the image, so that conditional branching is not necessary in the processing of the outer edge portion of the image during the interpolation processing. As a result, the processing speed of the interpolation process is improved, and the time required for distortion correction in this embodiment can be further shortened.
ステップS105:CPU34は、歪曲補正後の画像のデータ(S104)を記憶部33などに記録する。以上で、図2の説明を終了する。
Step S105: The
以下、本実施形態の作用効果を述べる。本実施形態の画像処理装置2では、画像の歪曲補正を行うときに、補正関数の所定区間内における画像の伸縮量の最大値または最小値を求め、この最大値(または最小値)をなす部分で画像の変倍率を決定する。
Hereinafter, the operational effects of this embodiment will be described. In the
したがって、本実施形態の画像処理装置2では、撮影光学系15の歪曲収差の振る舞い(樽型、糸巻型、陣笠型)に依存せずに、仕様に応じた正確な変倍率を求めることができる。
Therefore, in the
図5は、本実施形態での変倍処理の一例を示している。図5の例では、陣笠型の歪曲収差のある元画像を補正した場合の例である。ここで、補正後の画像で画素の欠損をなくすように変倍率を決定する場合、CPU34は、画素の欠損がなく、かつ画角の損失が最小限となる変倍率を求めることができる。すなわち、この場合には、歪曲補正後にユーザーが別途トリミングを行う必要のない画像となる。
FIG. 5 shows an example of the scaling process in this embodiment. In the example of FIG. 5, an original image having a Jinkasa type distortion is corrected. Here, when determining the scaling factor so as to eliminate the pixel loss in the corrected image, the
また、元の記録画像の全範囲を歪曲補正後になくならないようにする場合、CPU34は、補正後の画像につく余分な黒い縁を極力少なくすることが可能となる。なお、本実施形態の画像処理装置2は、樽型や糸巻型の場合にも上記と同様の効果を得ることができるのはいうまでもない。
Further, when the entire range of the original recorded image is not lost after the distortion correction, the
<実施形態の補足事項>
(1)上記実施形態において、電子カメラ1の制御部24にプログラムを実行させて、記録画像の収差補正と変倍処理とを電子カメラ1のみで実現するようにしてもよい。また、上記実施形態では、歪曲補正および画像の変倍をプログラムによってソフトウエア的に実現する例を説明したが、これらの構成をASICなどを用いてハードウエア的に実現しても勿論かまわない。
<Supplementary items of the embodiment>
(1) In the above embodiment, the control unit 24 of the
(2)上記実施形態のS102では、CPU34は撮影条件のデータに基づいて補正関数を決定する例を説明した。しかし、本発明では、CPU34は、操作部35からのユーザーの入力に応じて補正関数を定義するようにしてもよい。この場合には、レンズマイコン16を搭載していない旧式のレンズユニットや、他のメーカーのレンズユニットを用いた場合にも対応することが可能となる。
(2) In S <b> 102 of the above-described embodiment, the
(3)上記実施形態の例において、CPU34は、歪曲収差の補正と倍率色収差の補正とを独立して行うようにしてもよい。
(3) In the example of the above embodiment, the
(4)上記実施形態では、画像処理装置2の記憶部33に収差情報のデータを予め格納する構成を説明したが、例えば、撮影時にレンズユニット11のレンズマイコン16に収差情報のデータを出力させて、画像ファイル内に収差情報のデータを格納してもよい。なお、上記実施形態では、電子カメラ1が一眼レフレックス型の場合を説明したが、電子カメラ1はレンズ一体型(いわゆるコンパクトタイプ)の構成であってもよい。
(4) In the above embodiment, the configuration in which the aberration information data is stored in advance in the
なお、本発明における多くの特徴点および利点は詳細な説明から明らかになるであろう。それは、請求の範囲が、本請求項の精神と権利範囲を逸脱しない範囲で、実施形態における特徴および利点にまで及ぶことを意図するものである。さらに、当該技術分野において通常の技術を有する者は、あらゆる改良および変更を容易に思い付くことができるはずであり、本願における発明性のある実施形態の範囲をここに説明・表現された構成に限定する意図はない。したがって、本発明の範囲は、実施形態に開示された範囲に含まれる適当な改良物および均等物によることも可能である。 Many features and advantages of the present invention will become apparent from the detailed description. It is intended that the scope of the claims extend to the features and advantages of the embodiments without departing from the spirit and scope of the claims. Further, those having ordinary skill in the art should be able to easily come up with any improvements and modifications, and limit the scope of the inventive embodiments herein to the configurations described and represented herein. There is no intention to do. Therefore, the scope of the present invention can be based on appropriate improvements and equivalents included in the scope disclosed in the embodiments.
1…電子カメラ、2…画像処理装置、3…通信回線、4…記憶媒体、11…レンズユニット、12…カメラ本体、15…撮影光学系、16…レンズマイコン、18…撮像素子、22…記録I/F、23…外部I/F、24…制御部、31…記録I/F、32…通信部、33…記憶部、34…CPU
DESCRIPTION OF
Claims (11)
撮影光学系を介して撮像された画像のデータを、該画像の撮像時における前記撮影光学系のデータとともに前記データ読込部から前記演算部に読み込む入力ステップと、
像高に依存する収差を補正するための補正関数を決定する関数決定ステップと、
各々の値が異なる第1基準像高および第2基準像高をそれぞれ決定する像高決定ステップと、
前記補正関数に対して前記第1基準像高および前記第2基準像高を用いて、前記像高に依存する収差の収差量に応じた前記画像の変倍率を求める変倍率演算ステップと、
前記像高に依存する収差の補正を前記画像に対して行うとともに、前記変倍率を用いて前記画像の変倍処理を実行する画像補正ステップと、
を前記演算部に実行させることを特徴とするプログラム。 For a computer having a data reading unit and a calculation unit,
An input step of reading data of an image captured through the photographing optical system from the data reading unit into the arithmetic unit together with the data of the photographing optical system at the time of capturing the image;
A function determining step for determining a correction function for correcting aberration depending on image height;
An image height determining step for determining a first reference image height and a second reference image height, each of which has a different value;
A scaling factor calculating step for obtaining a scaling factor of the image according to an aberration amount of aberration depending on the image height using the first reference image height and the second reference image height with respect to the correction function;
Correcting the aberration depending on the image height on the image, and performing an image scaling process of the image using the scaling factor; and
Is executed by the calculation unit.
前記収差量は、前記関数における前記第1基準像高から前記第2基準像高までの最大値または前記関数における前記第1基準像高から前記第2基準像高までの最小値であることを特徴とするプログラム。 The program according to claim 1,
The aberration amount is a maximum value from the first reference image height to the second reference image height in the function or a minimum value from the first reference image height to the second reference image height in the function. A featured program.
前記第1基準像高は、前記画像の縦方向の像高および前記画像の横方向の像高の少なくとも一方を用いて決定されることを特徴とするプログラム。 In the program according to claim 1 or 2,
The first reference image height is determined using at least one of an image height in the vertical direction of the image and an image height in the horizontal direction of the image.
前記第1基準像高は、前記画像の縦方向の像高および前記画像の横方向の像高の少なくとも一方と、前記画像を撮像した撮像素子のサイズとに基づいて決定されることを特徴とするプログラム。 In the program according to claim 1 or 2,
The first reference image height is determined based on at least one of an image height in a vertical direction of the image and an image height in a horizontal direction of the image, and a size of an image pickup element that picks up the image. Program to do.
前記第2基準像高は、最高像高であることを特徴とするプログラム。 In the program according to claim 1 or 2,
The program characterized in that the second reference image height is a maximum image height.
前記第2基準像高は、前記画像の縦方向の像高および前記画像の横方向の像高の少なくとも一方と、前記画像を撮像した撮像素子のサイズとに基づいて決定されることを特徴とするプログラム。 In the program according to claim 1 or 2,
The second reference image height is determined based on at least one of an image height in a vertical direction of the image and an image height in a horizontal direction of the image, and a size of an image pickup element that picks up the image. Program to do.
前記像高に依存する収差は、歪曲収差および倍率色収差のうちの少なくとも1以上を含むことを特徴とするプログラム。 In the program according to any one of claims 1 to 6,
The aberration depending on the image height includes at least one of distortion and lateral chromatic aberration.
前記像高に依存する収差は、前記撮影光学系の特性を示すレンズデータと、前記画像撮像時における前記撮影光学系の焦点位置および焦点距離のデータとに応じて決定されることを特徴とするプログラム。 In the program according to any one of claims 1 to 7,
The aberration depending on the image height is determined in accordance with lens data indicating characteristics of the photographing optical system and data on a focal position and a focal length of the photographing optical system at the time of imaging. program.
前記画像補正ステップにて、前記画像の補間処理をさらに実行するとともに、前記補間処理のアルゴリズムに応じて前記変倍率を修正することを特徴とするプログラム。 In the program according to any one of claims 1 to 8,
In the image correction step, the image interpolation process is further executed, and the scaling factor is corrected according to the interpolation process algorithm.
像高に依存する収差を補正するための補正関数を決定する関数決定部と
各々の値が異なる第1基準像高および第2基準像高をそれぞれ決定する像高決定部と、 前記補正関数に対して前記第1基準像高および前記第2基準像高を用いて、前記像高に依存する収差の収差量に応じた前記画像の変倍率を求める変倍率演算部と、
前記像高に依存する収差の補正を前記画像に対して行うとともに、前記変倍率を用いて前記画像の変倍処理を実行する画像補正部と、
を備えることを特徴とする画像処理装置。 An input unit that reads data of an image captured through the photographing optical system together with data of the photographing optical system at the time of capturing the image;
A function determining unit that determines a correction function for correcting an aberration that depends on the image height, an image height determining unit that determines a first reference image height and a second reference image height that are different from each other, and the correction function On the other hand, using the first reference image height and the second reference image height, a scaling factor calculation unit for obtaining a scaling factor of the image according to an aberration amount of aberration depending on the image height;
Correcting the aberration depending on the image height for the image, and performing an image scaling process using the magnification,
An image processing apparatus comprising:
請求項10に記載の画像処理装置と、
を備えることを特徴とするカメラ。
An imaging unit that captures an image of a subject via an imaging optical system and generates image data;
An image processing apparatus according to claim 10;
A camera comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007275027A JP4983541B2 (en) | 2007-10-23 | 2007-10-23 | Program, image processing apparatus and camera |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007275027A JP4983541B2 (en) | 2007-10-23 | 2007-10-23 | Program, image processing apparatus and camera |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2009105621A true JP2009105621A (en) | 2009-05-14 |
| JP4983541B2 JP4983541B2 (en) | 2012-07-25 |
Family
ID=40706901
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007275027A Active JP4983541B2 (en) | 2007-10-23 | 2007-10-23 | Program, image processing apparatus and camera |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4983541B2 (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013219544A (en) * | 2012-04-09 | 2013-10-24 | Ricoh Co Ltd | Image processing apparatus, image processing method, and image processing program |
| JP2015212723A (en) * | 2014-05-01 | 2015-11-26 | キヤノン株式会社 | Zoom lens and imaging apparatus including the same |
| US9924111B2 (en) | 2015-11-18 | 2018-03-20 | Olympus Corporation | Image compositing apparatus |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0998340A (en) * | 1995-09-29 | 1997-04-08 | Sanyo Electric Co Ltd | Image pickup device |
-
2007
- 2007-10-23 JP JP2007275027A patent/JP4983541B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0998340A (en) * | 1995-09-29 | 1997-04-08 | Sanyo Electric Co Ltd | Image pickup device |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2013219544A (en) * | 2012-04-09 | 2013-10-24 | Ricoh Co Ltd | Image processing apparatus, image processing method, and image processing program |
| JP2015212723A (en) * | 2014-05-01 | 2015-11-26 | キヤノン株式会社 | Zoom lens and imaging apparatus including the same |
| US9924111B2 (en) | 2015-11-18 | 2018-03-20 | Olympus Corporation | Image compositing apparatus |
Also Published As
| Publication number | Publication date |
|---|---|
| JP4983541B2 (en) | 2012-07-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| KR102306272B1 (en) | Dual camera-based imaging method, mobile terminal and storage medium | |
| JP4912238B2 (en) | Imaging device and interchangeable lens device | |
| JP6999802B2 (en) | Methods and equipment for double camera-based imaging | |
| JP5272699B2 (en) | Image processing apparatus, imaging apparatus, program, and image processing method | |
| JP4513205B2 (en) | Electronic camera and recording medium for image processing program | |
| JP2016226059A (en) | Image processing apparatus, imaging apparatus, and image processing method | |
| US20180077336A1 (en) | Image capturing apparatus | |
| JP4185468B2 (en) | Exposure apparatus and method for correcting captured image | |
| JP6576114B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
| JP2000125175A (en) | Camera, image processing system and recording medium | |
| JP5173664B2 (en) | Image processing apparatus and image processing method | |
| JP6468868B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
| JP4983541B2 (en) | Program, image processing apparatus and camera | |
| JP4299561B2 (en) | Imaging device | |
| JP2003219357A (en) | Digital imaging apparatus and image forming system | |
| JP2004242125A (en) | Image processor | |
| JP5755311B2 (en) | Information processing apparatus, photographing apparatus, and control method for information processing apparatus | |
| JP4333478B2 (en) | Imaging apparatus and image processing program | |
| JP5070690B2 (en) | Chromatic aberration correction device | |
| JP5409050B2 (en) | Information processing apparatus, photographing apparatus, and control method for information processing apparatus | |
| JP7134666B2 (en) | Image processing device, image processing method, and program | |
| JP2002185971A (en) | Irregular color correcting device and electronic camera | |
| US12455499B2 (en) | Accessory, image pickup apparatus, image pickup system, accessory control method, and storage medium | |
| JP2009033498A (en) | Optical distortion correction apparatus, method and program thereof, and imaging apparatus | |
| JP6904560B2 (en) | Signal processing device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101007 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111122 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111129 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120130 |
|
| 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: 20120327 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120409 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4983541 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150511 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150511 Year of fee payment: 3 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |