JP5153293B2 - Image processing apparatus and image processing program - Google Patents
Image processing apparatus and image processing program Download PDFInfo
- Publication number
- JP5153293B2 JP5153293B2 JP2007275672A JP2007275672A JP5153293B2 JP 5153293 B2 JP5153293 B2 JP 5153293B2 JP 2007275672 A JP2007275672 A JP 2007275672A JP 2007275672 A JP2007275672 A JP 2007275672A JP 5153293 B2 JP5153293 B2 JP 5153293B2
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- image
- signal
- focus detection
- information
- 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.)
- Expired - Fee Related
Links
- 238000012545 processing Methods 0.000 title claims description 48
- 238000003384 imaging method Methods 0.000 claims description 14
- 210000001747 pupil Anatomy 0.000 claims description 12
- 238000001514 detection method Methods 0.000 description 77
- 238000000034 method Methods 0.000 description 37
- 230000008569 process Effects 0.000 description 33
- 238000005259 measurement Methods 0.000 description 20
- 238000000926 separation method Methods 0.000 description 19
- 238000006243 chemical reaction Methods 0.000 description 15
- 238000004364 calculation method Methods 0.000 description 12
- 238000012937 correction Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 230000006835 compression Effects 0.000 description 4
- 238000007906 compression Methods 0.000 description 4
- 230000010365 information processing Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000007306 functionalization reaction Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Description
本発明は、画像処理装置及び画像処理プログラムに関する。 The present invention relates to an image processing apparatus and an image processing program.
従来、メモリ素子を有するメモリカードを記録媒体として、CCD、CMOS等の撮像素子で撮像した静止画像や動画像を記録及び再生する電子カメラ等の画像処理装置が市販されている。 2. Description of the Related Art Conventionally, an image processing apparatus such as an electronic camera that records and reproduces a still image or a moving image captured by an image sensor such as a CCD or CMOS using a memory card having a memory element as a recording medium is commercially available.
これらの電子カメラには、撮像素子から出力されたままの画素データで構成される未加工の画像データ(以下「RAWデータ」という。)を撮影画像として記録媒体に記録するものがある。 Some of these electronic cameras record unprocessed image data (hereinafter referred to as “RAW data”) composed of pixel data as it is output from the image sensor as a captured image on a recording medium.
このRAWデータは、そのままではパーソナルコンピュータ等の情報処理装置の表示部に表示できず、その表示には画素の補間処理などの画像処理が必要となる。そのため、RAWデータに撮影時の情報を画像パラメータとして付加し(特許文献1を参照)、情報処理装置にインストールされた画像処理プログラムによって表示可能となる。 The raw data cannot be displayed as it is on a display unit of an information processing apparatus such as a personal computer, and image processing such as pixel interpolation processing is required for the display. For this reason, information at the time of shooting is added to the RAW data as an image parameter (see Patent Document 1), and can be displayed by an image processing program installed in the information processing apparatus.
また、電子カメラ等の画像処理装置では、AE(オートエクスポージャ:自動露出)、AF(オートフォーカス:自動焦点)等の自動化及び多機能化が図られ、良好な撮影が容易に行えるようになっている。焦点検出方式にはいくつかの方法があり、例えば、特許文献2や特許文献3に開示されている。
Further, in an image processing apparatus such as an electronic camera, automation and multi-functionalization such as AE (auto exposure: automatic exposure) and AF (auto focus: auto focus) are achieved, and good photographing can be easily performed. ing. There are several methods for focus detection, such as those disclosed in
特許文献2に記載の撮像装置は、光電変換部群の一部が撮影レンズの瞳の特定領域を透過する光束を受光するように構成されている。そして、これらの特定の光電変換部の出力から得られた第一の像信号と第二の像信号の位相差に基づいて、撮影レンズの焦点状態を検出している。ここで、位相差とは2つの像信号の相対的な位置関係のことである。また、通常の画像を撮像する場合は、撮影レンズの特定領域を透過する光束を受光する光電変換部を除いた光電変換部群で画像を生成している。そして、撮像素子の測距用の画素を周辺の色画素から補間した後、信号処理及び画像圧縮処理を行い、JPEG形式やTIFF形式のデータを生成し記録している。
The imaging device described in
特許文献3にも、瞳分割方式の焦点検出を行う撮像装置が開示されている。この撮像装置では、隣接して1列に並んだ同色の色フィルタを有する画素のマイクロレンズ中心を通る直線上に並び、隣接画素同士でマイクロレンズ中心に対して逆向きにずれた画素で、撮影レンズの瞳の特定領域を透過する光束を受光する。そして、これら特定の光電変換部の出力から得られる第一の像信号と第二の像信号の位相差に基づいて撮影レンズの焦点状態を検出している。
特許文献2では、焦点検出用画素をG色のフィルタに相当する画素で形成し、画像信号を形成する場合には、焦点検出用画素のG色のフィルタ部分の映像信号を周辺画素を用いて補間している。
In
また、特許文献3では、焦点検出用画素をG色のフィルタ部分で形成し、画像信号を形成する場合には、焦点検出用画素のG色のフィルタで受光した映像信号として、画像信号を形成している。そのため、合焦近傍にあるときには、焦点検出用画素に光束を受光するが、合焦近傍にないときには焦点検出用画素に光束を受光しないという問題がある。そのため、合焦近傍にない焦点検出用画素のG色のフィルタ部分の映像信号を周辺画素を用いて補間を行っている。
Further, in
このように、RAWデータ記録時には、焦点検出画素はユーザーにとって傷であるため、補間後のRAWデータを記録することが望ましい。しかしながら、従来の技術では、傷補正後のRAWデータを記録するとRAWデータの記録時に測距の情報は残らないことになる。 Thus, at the time of RAW data recording, since the focus detection pixel is scratched by the user, it is desirable to record the RAW data after interpolation. However, according to the conventional technique, when the RAW data after flaw correction is recorded, the distance measurement information does not remain when the RAW data is recorded.
本発明は、上記の問題に鑑みてなされたものであり、RAWデータの傷補正を行うとともに、焦点検出用画素の距離情報を確保することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to perform flaw correction of RAW data and to secure distance information of focus detection pixels.
本発明の第1の側面は、画像処理装置に係り、撮影レンズの射出瞳を通過した光束を受光する第1の画素と前記撮影レンズの射出瞳の一部が遮光された光束を受光する第2の画素とが配列された撮像素子と、前記撮像素子の出力信号から前記第2の画素の画素信号を分離する分離手段と、前記第2の画素の位置情報に基づいて、前記撮像素子の出力信号のうち前記第2の画素の位置の画素信号を補間しRAWデータを生成する生成手段と、前記分離手段により分離された前記第2の画素の画素信号からオートフォーカス処理に用いる焦点情報を作成する焦点情報作成手段と、前記第2の画素の画素信号と当該第2の画素の位置情報とを、生成された前記RAWデータに関連付けてファイルとして記録する記録手段と、を備えることを特徴とする。 A first aspect of the present invention relates to an image processing apparatus, wherein a first pixel that receives a light beam that has passed through an exit pupil of a photographing lens and a light beam in which a part of the exit pupil of the photographing lens is shielded are received. An imaging device in which two pixels are arrayed, separation means for separating a pixel signal of the second pixel from an output signal of the imaging device, and position information of the second pixel based on positional information of the second pixel. Generation means for interpolating a pixel signal at the position of the second pixel in the output signal to generate RAW data, and focus information used for autofocus processing from the pixel signal of the second pixel separated by the separation means Focus information creating means for creating, and recording means for recording a pixel signal of the second pixel and position information of the second pixel as a file in association with the generated RAW data. Toss .
本発明の第2の側面は、画像処理装置に係り、撮影レンズの射出瞳を通過した光束を受光する第1の画素と前記撮影レンズの射出瞳の一部が遮光された光束を受光する第2の画素とが配列された撮像素子と、前記撮像素子の出力信号から前記第2の画素の画素信号を分離する分離手段と、前記撮像素子の出力信号のうち前記第2の画素の位置の画素信号を補間しRAWデータを生成する生成手段と、前記分離手段により分離され、複数の領域に分けられた前記第2の画素の画素信号に基づいて、前記複数の領域にそれぞれ対応する焦点情報を作成する焦点情報作成手段と、前記第2の画素の画素信号と当該第2の画素の位置情報とを、生成された前記RAWデータに関連付けてファイルとして記録する記録手段と、を備えることを特徴とする。 A second aspect of the present invention relates to an image processing apparatus, wherein a first pixel that receives a light beam that has passed through an exit pupil of a photographing lens and a light beam that is partially shielded from the exit pupil of the photographing lens. An image sensor in which two pixels are arrayed, separation means for separating the pixel signal of the second pixel from the output signal of the image sensor, and the position of the second pixel in the output signal of the image sensor Focusing information corresponding to each of the plurality of regions based on the pixel signal of the second pixel separated by the separation unit and divided into a plurality of regions by generating means for interpolating the pixel signals and generating RAW data And a recording means for recording the pixel signal of the second pixel and the position information of the second pixel as a file in association with the generated RAW data. Characterize
本発明の第3の側面は、画像処理プログラムに係り、上記の焦点情報作成手段により作成された焦点情報を処理し、その結果を表示部に表示させる工程をコンピュータに実行させることを特徴とする。 According to a third aspect of the present invention, there is provided an image processing program, wherein the computer executes a step of processing the focus information created by the focus information creating unit and displaying the result on a display unit. .
本発明によれば、RAWデータの傷補正を行うとともに、焦点検出用画素の測距情報又は距離情報を確保することできる。 According to the present invention, it is possible to perform flaw correction of RAW data and to secure distance measurement information or distance information of focus detection pixels.
以下、図面を参照して本発明の好適な実施形態を詳細に説明する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the drawings.
(第1の実施形態)
図1は、本発明の好適な第1の実施形態に係る画像処理装置のブロック図である。レンズ100を通って入射した被写体像は、撮像素子101で電気信号に光電変換される。ここで、撮像素子101には、図3に示すように画像データを形成するための撮像用画素(R、G、B)と位相差AFを行うための焦点検出用画素(a、b)とが配置されている。
(First embodiment)
FIG. 1 is a block diagram of an image processing apparatus according to a preferred first embodiment of the present invention. A subject image incident through the
A/D変換部103は、撮像素子101から出力された電気信号(出力信号)をデジタル信号に変換する。デジタル信号処理部104は、A/D変換部103から出力されたデジタル信号を、YUVデータ形式の画像データに変換する。A/D変換部103は、WB回路、γ補正回路及びマトリクス変換回路などで構成されうる。
The A /
CPU108は、画像処理装置の各部を制御する。例えば、CPU108は、CPU108内のROMに記録された焦点検出用画素の位置情報に基づいて、A/D変換部103から出力されたデジタル信号から焦点検出用画素(a、b)の画素信号を分離する分離手段として機能しうる。また、CPU108は、焦点検出用画素の位置情報に基づいてA/D変換部103から出力されたデジタル信号のうち焦点検出用画素の画素信号を補間しRAWデータを生成する生成手段としても機能しうる。このような補間処理は、焦点検出用画素の位置情報に基づいて、焦点検出用画素の位置を判断し、この部分の画素信号を周辺の画素より補間することにより行われる。例えば、図3のaを補間する場合には、周辺のR画素の画素信号を用いて、公知のバイキュービック法などを用いればよい。また、CPU108は、分離した焦点検出用画素の画素信号と焦点検出用画素の位置情報とを関連付けた測距情報を作成する測距情報作成手段としても機能しうる。さらに、CPU108は、分離された焦点検出用画素の画素信号を複数領域毎に分け焦点距離を演算し、演算した焦点距離と前記複数領域毎の位置情報とを関連付けた距離情報を作成する距離情報作成手段としても機能しうる。さらに、CPU108は、RAWデータと測距情報からRAWファイルを生成したりするファイル生成手段や、メモリI/F106を介して記録媒体などのメモリ107に測距情報、RAWファイルを記録する記録手段としても機能しうる。
The
なお、CPU108で機能する焦点検出用画素(a、b)の画素信号とを分離する分離手段をデジタル信号処理部104に持たせてもよい。また、焦点検出用画素の画素信号を補間しRAWデータを生成する生成手段、測距情報を作成する測距情報作成手段、距離情報を作成する距離情報作成手段などの機能をデジタル信号処理部104に持たせてもよい。
Note that the digital
位相差検出部105は、デジタル信号処理部104あるいはCPU108で分離した焦点検出用画素(a、b)の画素信号に基づいて周知の方法により位相差検出を行う。位相差検出部105で得られた位相差検出結果は、CPU108に送られる。CPU108は、位相差検出部105から送られた検出結果に基づいて、鏡筒制御部111に制御信号を出力する。
The phase
操作部112は、撮影モードを静止画撮影と動画撮影に切り替えるボタンやシャッタースイッチ等の設定スイッチなどを含む。CPU108は、操作部112で設定される撮影モードに応じて、タイミング制御部109に制御信号を送る。タイミングジェネレータ110は、タイミング制御部109からの制御信号に基づいて、画像データの読み出し駆動信号を生成する。
The
デジタル信号処理部104から出力されるYUVデータ形式の画像データは、EVF表示用としてメモリI/F106を介して、メモリ107に一時的に記憶される。LCDI/F113は、メモリ107に保存されたYUVデータ形式の画像データを、メモリI/F106を介して表示部としてのLCD114の表示フォーマットに変換する。LCD114は、LCDI/F113から出力される画像データに基づいてEVF表示を行う。
The image data in the YUV data format output from the digital
また、画像記録時はデジタル信号処理部104から出力されるYUVデータ形式の画像データを、メモリI/F106を介して圧縮記録部115においてJPEGなどの規格に従って圧縮処理し、メモリ116に記憶する。
Further, during image recording, image data in the YUV data format output from the digital
図2は、本発明の好適な第1の実施形態に係る画像処理装置の起動から撮影までのフローチャートである。 FIG. 2 is a flowchart from start-up to photographing of the image processing apparatus according to the preferred first embodiment of the present invention.
S100では、操作部112により電源がONされる。
In S100, the
S101では、CPU108は、操作部112のシャッターSW1の半押しの判定を行う。S101でシャッターSW1が押されたと判定されると(S101で「YES」)、S102に進む。
In S <b> 101, the
S102では、CPU108は、AF処理を行うよう位相差検出部105を制御する。AF処理としては、例えば、特許文献2に記載された技術を用いることが好ましい。特許文献2に記載のAF処理を図3及び図4を用いて説明する。図3は、CCDやCMOS等の撮像素子の画素配列である。この画素配列を構成する基本画素配列は、緑画素、赤画素、青画素のベイヤ配列で構成されている。各画素は、開口部を有し、この開口部を通過した光束が光電変換部で受光される。
In S102, the
図3では、緑画素をG、赤画素をR、青画素をBとしている。緑画素Gには緑色光束を通過させる色フィルターが、赤画素Rには赤色光束を通過させる色フィルターが、そして青画素Bには青色光束を通過させる色フィルターがそれぞれ配置されている。各画素の開口部の下方には光電変換部が配置されている。このように1つの画素は、1つの光電変換部と、その上に配置された色フィルターと、更にその上に配置されたマイクロレンズとで構成されている。また、斜めに一列に並ぶ緑画素のうち、少なくとも一列は焦点検出用画素列となっており、その他の画素は撮像用画素となっている。なお、焦点検出用画素列には色フィルターが配置されていない。隣接して一列に並ぶ焦点検出用画素の開口部の一部に遮光層を設けることで、光電変換部の射出瞳が撮影レンズの光軸に対して偏りを持つように構成されている。偏りの向きは隣り合う焦点検出用画素同士で逆向きとなっている。また、a、bは焦点検出用画素であり、a、bを通過した光束を受光して得られる信号がA像信号とB像信号となる。 In FIG. 3, the green pixel is G, the red pixel is R, and the blue pixel is B. The green pixel G is provided with a color filter that allows a green light beam to pass therethrough, the red pixel R is provided with a color filter that allows a red light beam to pass through, and the blue pixel B is provided with a color filter that allows a blue light beam to pass therethrough. A photoelectric conversion unit is disposed below the opening of each pixel. Thus, one pixel is composed of one photoelectric conversion unit, a color filter disposed thereon, and a microlens disposed further thereon. In addition, among the green pixels lined up diagonally, at least one row is a focus detection pixel row, and the other pixels are imaging pixels. A color filter is not arranged in the focus detection pixel column. By providing a light-shielding layer at a part of the openings of the focus detection pixels arranged in a row adjacent to each other, the exit pupil of the photoelectric conversion unit is configured to be biased with respect to the optical axis of the photographing lens. The direction of the bias is opposite between adjacent focus detection pixels. Further, a and b are focus detection pixels, and signals obtained by receiving the light beams that have passed through a and b are an A image signal and a B image signal.
このA像信号−B像信号を受光する焦点検出用画素は、図3に示すように同一ラインに並んでいる。A像信号−B像信号は、被写体の同一ラインから発せられた光による像信号である。そのため、焦点検出状態を検出する際に、A像信号−B像信号はほぼ一致した形状が得らる。焦点検出を行うには、このA像信号−B像信号に対して相関演算を行い、2つの像信号のずれ量から撮影レンズのデフォーカス量が算出される。デフォーカス量算出で算出されたデフォーカス量に基づいて、撮影レンズを駆動しピント合わせを行う。 The focus detection pixels that receive the A image signal-B image signal are arranged on the same line as shown in FIG. The A image signal-B image signal is an image signal based on light emitted from the same line of the subject. Therefore, when the focus detection state is detected, the A image signal-B image signal has a substantially matched shape. To perform focus detection, a correlation calculation is performed on the A image signal-B image signal, and the defocus amount of the photographing lens is calculated from the shift amount of the two image signals. Based on the defocus amount calculated in the defocus amount calculation, the photographing lens is driven to perform focusing.
ここで、デフォーカス量算出における相関演算処理について説明する。図4に示すようなA像信号、B像信号が得られたとすると、生成した2つの像信号の位相差は撮影レンズの結像状態(合焦状態、前ピン状態、後ピン状態)により変化する。撮影レンズが合焦状態において2つの像信号の位相差は無くなり、前ピン状態と後ピン状態では異なる方向の位相差が生じる。更にこの2つの像信号の位相差は撮影レンズのデフォーカス量と一定の関係がある。ここでデフォーカス量とは撮影レンズにより被写体像が結像している位置とマイクロレンズ上面との距離である。この2つの像信号の位相差から撮影レンズのデフォーカス量を求め、撮影レンズが合焦状態になるようなレンズ駆動量を算出することで焦点検出を行う。 Here, the correlation calculation process in the defocus amount calculation will be described. Assuming that an A image signal and a B image signal as shown in FIG. 4 are obtained, the phase difference between the two generated image signals varies depending on the imaging state (focused state, front pin state, rear pin state) of the photographic lens. To do. There is no phase difference between the two image signals when the photographic lens is in focus, and phase differences in different directions occur between the front pin state and the rear pin state. Further, the phase difference between the two image signals has a certain relationship with the defocus amount of the photographing lens. Here, the defocus amount is the distance between the position where the subject image is formed by the photographing lens and the top surface of the microlens. The defocus amount of the photographing lens is obtained from the phase difference between the two image signals, and the focus detection is performed by calculating the lens driving amount that brings the photographing lens into a focused state.
2つの像信号の位相差は、2つの像信号の相関を取ることで求められる。相関の取り方は“MINアルゴリズム”と呼ばれるもので、A像信号の出力データをA[1]〜A[n]とし、B像信号の出力データをB[1]〜B[n]とすると、相関量U0は数式1のように表される。
The phase difference between the two image signals can be obtained by correlating the two image signals. The correlation is called the “MIN algorithm”, where the output data of the A image signal is A [1] to A [n] and the output data of the B image signal is B [1] to B [n]. The correlation amount U0 is expressed as
ここでmin(a、b)はa、bの小さい方の値のことである。まずこのU0を計算する。次に図4に示すように、A像信号を信号電圧の1ビットシフトしたデータとB像信号のデータの相関量U1を計算する。このU1は数式2のように表される。
Here, min (a, b) is the smaller value of a and b. First, U0 is calculated. Next, as shown in FIG. 4, the correlation amount U1 between the data obtained by shifting the A image signal by 1 bit of the signal voltage and the data of the B image signal is calculated. This U1 is expressed as
このように1ビットずつシフトした相関量を次々に計算する。2つの像信号が一致していればこの相関量は最大値をとるので、その最大値をとるシフト量を求め、その前後のデータから相関量の真の最大値を補間して求め、そのシフト量を2つの像信号の位相差とする。この2つの像信号の位相差から撮影レンズのデフォーカス量を求め、撮影レンズが合焦状態になるようなレンズ駆動量を算出することで焦点検出を行う。AF処理後、被写体にピントが合った状態となる。
Thus, the correlation amount shifted by one bit is calculated one after another. If the two image signals match, this correlation amount takes the maximum value, so the shift amount that takes the maximum value is obtained, the true maximum value of the correlation amount is interpolated from the data before and after that, and the shift is obtained. Let the amount be the phase difference between the two image signals. The defocus amount of the photographing lens is obtained from the phase difference between the two image signals, and the focus detection is performed by calculating the lens driving amount that brings the photographing lens into a focused state. After AF processing, the subject is in focus.
S103では、CPU108は、操作部112のシャッターSW2が半押し状態から全押し状態になったと判定すると、S104に進む。S103でシャッターSW1及びシャッターSW2がOFFとなると、S101へ戻り、CPU108は、再びシャッターSW1がONになるのを待つ。S104では、CPU108は、図5を参照して後述する撮影処理を行う。
In S103, when the
図5は、図2のステップ104に示す撮影処理を示すフローチャートである。
FIG. 5 is a flowchart showing the photographing process shown in
S401では、CPU108は、タイミング制御部109及びタイミングジェネレータ110を制御し、焦点検出用画素のあるCCDやCMOS等の撮像素子からの画素信号を出力させる。
In step S401, the
S402では、A/D変換器103は、画素信号をA/D変換し、焦点検出用画素データを含んだ画像データを生成する。焦点検出用画素データを含んだ画像データを図6に示す。 In S402, the A / D converter 103 A / D converts the pixel signal to generate image data including focus detection pixel data. FIG. 6 shows image data including focus detection pixel data.
図6は、通常のベイヤ配列G、R、Bとの焦点検出用画素を複数もつラインで構成された画像データである。Gは緑画素、Rは赤画素、Bは青画素であり、これらでベイヤ配列が構成される。a1、a2、a3、a4、b1、b2、b3、b4は焦点検出用画素である。 FIG. 6 shows image data composed of lines having a plurality of focus detection pixels with normal Bayer arrays G, R, and B. G is a green pixel, R is a red pixel, and B is a blue pixel, and these constitute a Bayer array. Reference symbols a1, a2, a3, a4, b1, b2, b3, and b4 are focus detection pixels.
S403では、CPU108は、RAWデータ撮影であるか否かを判断する。RAWデータ撮影以外であれば(S403で「NO」)、S407に進む。S403でRAWデータ撮影であると判断された場合は(S403で「YES」)、S404に進む。
In S403, the
S404では、CPU108は、焦点検出用画素の分離処理(以下「焦点検出用画素分離処理」という。)を行う。焦点検出用画素分離処理については後述する。
In step S404, the
S405では、CPU108は、焦点検出用画素を含めて傷補正処理を行う。傷補正処理時には、EEPROM(電気的消去可能プログラマブルROM)に調整工程等によって予め格納された焦点検出領域の位置情報や、撮像素子の不良画素の位置情報に基づいて近傍の緑画素から傷補正を行う。傷補正後の画像データを図7に示す。図7においてGa1、Ga2、Ga3、Ga4、Gb1、Gb2、Gb3、Gb4は、その近傍の画素から傷補正した緑画素である。
In step S405, the
S406では、CPU108は、ファイル処理を行う。ファイル処理では、画像パラメータとして撮影時の情報を付加する。撮影時の情報には、ホワイトバランス、シャープネス、コントラストなどのデータが含まれる。画像処理プログラムは、RAWファイルを表示部に表示する時に必要な情報を全て含むものとする。
In S406, the
S407では、CPU108は、焦点検出用画素を傷として補正する。
In S407, the
S408では、デジタル信号処理部104は、画像の信号処理(ホワイトバランスやシャープネス等)を行い、例えばJPEG形式やTIFF形式等で圧縮処理を行う。
In step S408, the digital
S409では、CPU108は、記録処理を行う。S409では、RAWデータと測距情報を図8に示すように、現状のRAWフォーマットの互換を保ち、次の2つのどちらかの形式で記録する。まず、最初のファイルフォーマットを701に示すように、RAWファイルとは別に測距情報を別ファイルとして記録する。次のファイルフォーマットを700に示すように、RAWデータの後に測距情報を付加する。どちらのファイル形式で記録するかはユーザーにより任意に設定されうる。また、700では、RAWファイルのヘッダに、測距情報の有無を示す情報が付加されうる。また、701では、RAWファイルのヘッダに、対となる測距情報ファイルがあることを示す情報(例えば、測距情報ファイル名など)が付加されうる。ファイルフォーマット700は同一ファイル内にRAWデータと測距情報があるため、ユーザーにとってファイル管理がしやすいといった利点がある。ファイルフォーマット701は、パーソナルコンピュータ内に保存する時に、ユーザーが測距情報を使用しないと判断した場合、パーソナルコンピュータ内の記録媒体の使用量を抑えることが出来る。
In S409, the
次に、図5のS404に示した焦点検出用画素分離処理について説明する。図9は焦点検出用画素分離処理のフローチャートである。 Next, the focus detection pixel separation process shown in S404 of FIG. 5 will be described. FIG. 9 is a flowchart of focus detection pixel separation processing.
S801では、CPU108は、EEPROMに調整工程等によって予め格納された焦点検出領域の位置情報(センサ情報)を読み込む。
In step S <b> 801, the
S802では、CPU108は、S801で読み込んだ位置情報から焦点検出用画素を読み出す。
In S802, the
S803では、CPU108は、メモリ107へ焦点検出用画素の画素情報とその位置情報とを格納する。
In step S <b> 803, the
S804では、CPU108は、画像データの最終行(位置情報の最終行)まで読み込みが終了したか運否かを判定する。読み込みが未終了であれば(S804で「NO」)、S801に戻る。焦点検出用画素を全て読み終えたら(S804で「YES」)、焦点検出用画素分離処理を終了する。
In step S <b> 804, the
焦点検出用画素分離処理が終了すると、図10に示す測距情報が生成される。図10に示すように、この測距情報は、図6の焦点検出用画素の画素信号とその位置情報(センサ情報)とを関連付けたものである。本実施形態では、行番号が同じ焦点検出用画素毎に測距情報を生成しているが、焦点検出用画素の画素信号と位置情報とが関連付けられていれば、これに限定されない。 When the focus detection pixel separation process ends, the distance measurement information shown in FIG. 10 is generated. As shown in FIG. 10, the distance measurement information is obtained by associating the pixel signal of the focus detection pixel shown in FIG. 6 with its position information (sensor information). In the present embodiment, the distance measurement information is generated for each focus detection pixel having the same row number. However, the present invention is not limited to this as long as the pixel signal of the focus detection pixel is associated with the position information.
(第2の実施形態)
次に、本発明の好適な第2の実施形態を図11及び図12を用いて説明する。第2の実施形態は、焦点検出用画素分離処理が第1の実施形態と相違する。その他については第1の実施形態と同様であるため、それらの説明を省略する。
(Second Embodiment)
Next, a preferred second embodiment of the present invention will be described with reference to FIGS. The second embodiment is different from the first embodiment in focus detection pixel separation processing. Since others are the same as those of the first embodiment, their description is omitted.
S1001では、CPU108は、EEPROMに調整工程等によって予め格納された焦点検出領域の位置情報(センサ情報)を読み込む。
In step S <b> 1001, the
S1002では、CPU108は、S1001で読み込んだ位置情報からS1003の距離演算で使用する焦点検出用画素の画素情報(画素信号)を読み出す。
In S1002, the
S1003では、CPU108は、焦点検出用画素情報を複数画素(例えば、X(行)方向に8画素、Y(列)方向に6画素)の小ブロックに分ける。そして、第1の実施形態のAF処理のように、デフォーカス量と方向とを算出し、撮影レンズのレンズ繰り出し量を決定する。この小ブロックにおける被写体距離をD、撮影レンズの繰り出し量、焦点距離をそれぞれP、fとすると、近似的にD≒f2/Pの関係より、小ブロックに対応する撮影画像の被写体距離を求めることができる。なお、被写体距離の算出方法は別の算出方法を用いてもよい。
In step S1003, the
S1004では、CPU108は、小ブロックの演算結果と小ブロックのマップ上のアドレスをメモリ107へ格納する。
In step S <b> 1004, the
S1005では、CPU108は、画像データの最終行(位置情報の最終行)まで読み込みが終了したか否かを判定する。読み込みが未終了であれば(S1005で「NO」)、S1001に戻る。焦点検出用画素を全て読み終えたら(S1005で「YES」)、焦点検出用画素分離処理を終了する。
In step S <b> 1005, the
焦点検出用画素分離処理が終了すると、図12に示す測距情報が生成される。図12に示すように、この測距情報(マップ情報)は、撮像素子を複数画素で構成されるブロックに分割し、ブロック毎に被写体までの距離とブロックの位置情報(マップアドレス)とを関連付けたものである。図12は、図6の焦点検出用画素列からの測距情報により生成されている。本実施形態では、小ブロックを8×6画素としているが、更に小さいブロックや処理負荷軽減のために大きいブロックを単位としてもよい。 When the focus detection pixel separation process ends, the distance measurement information shown in FIG. 12 is generated. As shown in FIG. 12, this distance measurement information (map information) divides the image sensor into blocks each composed of a plurality of pixels, and associates the distance to the subject and block position information (map address) for each block. It is a thing. FIG. 12 is generated by distance measurement information from the focus detection pixel array of FIG. In the present embodiment, the small block is 8 × 6 pixels, but a smaller block or a larger block may be used as a unit to reduce the processing load.
(第3の実施形態)
本発明の好適な第3の実施形態は、第1の実施形態で生成されたRAWファイル又はRAWファイルと測距情報ファイルとを合わせたファイルを用いた画像処理プログラムであり、図13を用いて説明する。なお、本プログラムの各ステップS1201〜1214は、CPU(コンピュータ)108あるいはパーソナルコンピュータ等の情報処理装置により実行される。
(Third embodiment)
The third preferred embodiment of the present invention is an image processing program using a RAW file generated in the first embodiment or a file that is a combination of a RAW file and a ranging information file. explain. Each step S1201 to 1214 of this program is executed by an information processing apparatus such as a CPU (computer) 108 or a personal computer.
S1201では、画像ファイルが選択される。 In S1201, an image file is selected.
S1202では、RAWデータを画像パラメータにより画像処理して表示する。 In S1202, the RAW data is subjected to image processing using image parameters and displayed.
S1203では、画像編集が行われる否かを判定する。画像編集が行われる場合(S1203で「YES」)、S1204に進む。画像編集が行われない場合(S1203で「NO」)、S1212に進む。 In step S1203, it is determined whether image editing is performed. When image editing is performed (“YES” in S1203), the process proceeds to S1204. When image editing is not performed (“NO” in S1203), the process proceeds to S1212.
S1204では、編集内容判定を行う。画像編集の編集内容がマップ表示であればS1205に進み、画像編集の編集内容がフォーカス枠表示であればS1209に進む。 In step S1204, edit content determination is performed. If the edited content of image editing is a map display, the process proceeds to S1205. If the edited content of image editing is a focus frame display, the process proceeds to S1209.
S1205では、マップ表示のON/OFFを判定する。ONの場合は(S1205で「ON」)、S1206に進み、OFFの場合は(S1205で「OFF」)、S1208に進む。 In S1205, ON / OFF of the map display is determined. If it is ON (“ON” in S1205), the process proceeds to S1206. If it is OFF (“OFF” in S1205), the process proceeds to S1208.
S1206では、マップ情報作成処理を行う。マップ情報は、第2の実施形態の焦点検出用画素分離処理における被写体距離の算出方法と同様にして行われる。この場合、被写体距離の算出で使用される電子カメラ等の画像処理装置に固有の情報は、画像プログラムに含んでおくか、又は、RAWファイルの機種情報に保持しておいてもよい。 In S1206, map information creation processing is performed. The map information is performed in the same manner as the subject distance calculation method in the focus detection pixel separation process of the second embodiment. In this case, the information unique to the image processing apparatus such as an electronic camera used for the calculation of the subject distance may be included in the image program or may be held in the model information of the RAW file.
また、第2の実施形態で生成されたRAWファイル又はRAWファイル+測距情報ファイルを用いる場合は、S1206のマップ情報作成処理を行わない。 Further, when the RAW file or the RAW file + ranging information file generated in the second embodiment is used, the map information creation process of S1206 is not performed.
S1207では、マップ情報を表示部としてのLCD114に表示する。表示されるマップ情報を図14に示す。1301はS1206で算出した小ブロックのマップ情報の例を示す。各小ブロックに表示された値は、便宜上簡略化した被写体までの距離(単位はメートル)である。ただし、値が表示されていない小ブロックは距離無限大を意味するものとする。
In S1207, the map information is displayed on the
S1205でマップ表示がOFFと判断された場合には、S1208でマップ情報の表示をクリアする。この場合、画像表示は残したままにする。 If it is determined in S1205 that the map display is OFF, the display of the map information is cleared in S1208. In this case, the image display is left as it is.
S1209では、フォーカス枠表示のON/OFF判定を行う。フォーカス枠表示がONであれば、S1210に進む。フォーカス枠表示がOFFであれば、S1211に進む。 In step S1209, ON / OFF determination of focus frame display is performed. If the focus frame display is ON, the process proceeds to S1210. If the focus frame display is OFF, the process proceeds to S1211.
S1210では、フォーカス枠表示を行う。フォーカス枠表示は、測距情報により、第2の実施形態の焦点検出用画素分離処理における被写体距離の算出方法と同様に位相差を算出し、位相差のないブロック枠を画面に表示する。 In S1210, focus frame display is performed. In the focus frame display, the phase difference is calculated based on the distance measurement information in the same manner as the subject distance calculation method in the focus detection pixel separation process of the second embodiment, and a block frame having no phase difference is displayed on the screen.
フォーカス枠表示の例を図15に示す。1401がフォーカス枠であり、撮影時にピントが合っている。本例では、1枠しか表示されていないが、複数の枠が表示されてもよい。
An example of the focus frame display is shown in FIG.
S1211では、S1209でフォーカス枠表示がOFFと判定された場合に、フォーカス枠表示クリアを行う。この場合、画像表示は残したままにする。また、S1204の編集内容判定には、不図示ではあるが、S1205のマップ表示判定やS1209のフォーカス枠表示判定以外に画像編集機能全般が含まれる。このような画像編集機能としては、例えば、拡大/縮小、ホワイトバランス/シャープネス/コントラスト調整、印刷、画像データを記録メディア(ハードディスク、SDカードなど)に記録する機能などがある。また、距離マップやフォーカス枠を表示することで、シャープネスやコントラスト、ホワイトバランスなどの調整が行いやすく、細かい調整が可能となる。 In S1211, when it is determined in S1209 that the focus frame display is OFF, the focus frame display is cleared. In this case, the image display is left as it is. In addition, although not shown, the editing content determination in S1204 includes general image editing functions in addition to the map display determination in S1205 and the focus frame display determination in S1209. Examples of such an image editing function include enlargement / reduction, white balance / sharpness / contrast adjustment, printing, and a function of recording image data on a recording medium (hard disk, SD card, etc.). Also, by displaying the distance map and focus frame, it is easy to adjust sharpness, contrast, white balance, etc., and fine adjustment is possible.
S1212では、画像編集終了判定を行う。未終了であれば(S1212で「NO」)、S1203の画像編集判定へ戻り、処理を繰り返し行う。S1212で画像編集が終了したと判定された場合には(S1212で「YES」)、S1213に進む。 In step S1212, determination is made whether image editing has ended. If not completed (“NO” in S1212), the process returns to the image editing determination in S1203, and the process is repeated. If it is determined in S1212 that the image editing has been completed (“YES” in S1212), the process proceeds to S1213.
S1213では、表示されている画像データをクリアする。 In S1213, the displayed image data is cleared.
S1214では、画像処理プログラムの終了判定を行う。終了していれば(S1214で「YES」)、画像処理プログラムを終了する。未終了であれば(S1214で「NO」)、S1201の画像選択へ戻り繰り返し処理を行う。 In step S1214, it is determined whether the image processing program is finished. If completed ("YES" in S1214), the image processing program is terminated. If not completed ("NO" in S1214), the process returns to S1201 image selection and repeats the process.
以上、本発明を実施形態1から実施形態3に基づいて具体的に説明したが、本発明は、上記の実施形態に限定されるものではなく、その要旨を逸脱しない範囲内において、種々の変更が可能である。 The present invention has been specifically described above based on the first to third embodiments. However, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the present invention. Is possible.
101 撮像素子
107 メモリ
R、G、B 撮像用画素
a、b 焦点検出用画素
101
Claims (4)
前記撮像素子の出力信号から前記第2の画素の画素信号を分離する分離手段と、
前記第2の画素の位置情報に基づいて、前記撮像素子の出力信号のうち前記第2の画素の位置の画素信号を補間しRAWデータを生成する生成手段と、
前記分離手段により分離された前記第2の画素の画素信号からオートフォーカス処理に用いる焦点情報を作成する焦点情報作成手段と、
前記第2の画素の画素信号と当該第2の画素の位置情報とを、生成された前記RAWデータに関連付けてファイルとして記録する記録手段と、
を備えることを特徴とする画像処理装置。 An imaging device in which a first pixel that receives a light beam that has passed through an exit pupil of a photographing lens and a second pixel that receives a light beam in which a part of the exit pupil of the photographing lens is shielded;
Separating means for separating the pixel signal of the second pixel from the output signal of the image sensor;
Generating means for interpolating the pixel signal at the position of the second pixel among the output signals of the image sensor based on the position information of the second pixel to generate RAW data;
Focus information creating means for creating focus information used for autofocus processing from the pixel signal of the second pixel separated by the separating means;
Recording means for recording a pixel signal of the second pixel and position information of the second pixel as a file in association with the generated RAW data;
An image processing apparatus comprising:
前記撮像素子の出力信号から前記第2の画素の画素信号を分離する分離手段と、
前記撮像素子の出力信号のうち前記第2の画素の位置の画素信号を補間しRAWデータを生成する生成手段と、
前記分離手段により分離され、複数の領域に分けられた前記第2の画素の画素信号に基づいて、前記複数の領域にそれぞれ対応する焦点情報を作成する焦点情報作成手段と、
前記第2の画素の画素信号と当該第2の画素の位置情報とを、生成された前記RAWデータに関連付けてファイルとして記録する記録手段と、
を備えることを特徴とする画像処理装置。 An imaging device in which a first pixel that receives a light beam that has passed through an exit pupil of a photographing lens and a second pixel that receives a light beam in which a part of the exit pupil of the photographing lens is shielded;
Separating means for separating the pixel signal of the second pixel from the output signal of the image sensor;
Generating means for interpolating the pixel signal at the position of the second pixel among the output signals of the image sensor to generate RAW data;
Focus information creating means for creating focus information corresponding to each of the plurality of areas based on pixel signals of the second pixels separated by the separating means and divided into the plurality of areas;
Recording means for recording a pixel signal of the second pixel and position information of the second pixel as a file in association with the generated RAW data;
An image processing apparatus comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007275672A JP5153293B2 (en) | 2007-10-23 | 2007-10-23 | Image processing apparatus and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007275672A JP5153293B2 (en) | 2007-10-23 | 2007-10-23 | Image processing apparatus and image processing program |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012266736A Division JP5498561B2 (en) | 2012-12-05 | 2012-12-05 | Image processing apparatus and image processing method |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2009105681A JP2009105681A (en) | 2009-05-14 |
JP2009105681A5 JP2009105681A5 (en) | 2010-12-09 |
JP5153293B2 true JP5153293B2 (en) | 2013-02-27 |
Family
ID=40706951
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007275672A Expired - Fee Related JP5153293B2 (en) | 2007-10-23 | 2007-10-23 | Image processing apparatus and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5153293B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5576644B2 (en) * | 2009-12-10 | 2014-08-20 | キヤノン株式会社 | Imaging apparatus, control method thereof, and program |
JP6184869B2 (en) * | 2012-05-31 | 2017-08-23 | オリンパス株式会社 | IMAGING DEVICE, IMAGE PROCESSING DEVICE, RECORDING MEDIUM RECORDING IMAGE FILE, RECORDING METHOD, IMAGE REPRODUCING METHOD, AND PROGRAM |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3592147B2 (en) * | 1998-08-20 | 2004-11-24 | キヤノン株式会社 | Solid-state imaging device |
JP2004012493A (en) * | 2002-06-03 | 2004-01-15 | Canon Inc | Focus detector |
JP2006319524A (en) * | 2005-05-11 | 2006-11-24 | Olympus Corp | Image sensing device |
JP4984491B2 (en) * | 2005-10-31 | 2012-07-25 | 株式会社ニコン | Focus detection apparatus and optical system |
JP2007150592A (en) * | 2005-11-25 | 2007-06-14 | Nikon Corp | Solid state imaging apparatus having function for generating focus detecting signal |
JP4797606B2 (en) * | 2005-12-01 | 2011-10-19 | 株式会社ニコン | Imaging device |
JP5066893B2 (en) * | 2006-05-17 | 2012-11-07 | 株式会社ニコン | Correlation calculation method, correlation calculation device, focus detection device, and imaging device |
JP4867552B2 (en) * | 2006-09-28 | 2012-02-01 | 株式会社ニコン | Imaging device |
-
2007
- 2007-10-23 JP JP2007275672A patent/JP5153293B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2009105681A (en) | 2009-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5563283B2 (en) | Image processing device | |
US20160044233A1 (en) | Image capturing apparatus capable of storing focus detection data | |
KR100626685B1 (en) | Digital camera | |
KR101391042B1 (en) | Image processing device capable of generating wide-range image | |
KR101346426B1 (en) | Image processing device capable of generating wide-range image | |
JP5002412B2 (en) | Imaging device | |
JP5195660B2 (en) | Imaging apparatus, focusing method, and program | |
JP4708967B2 (en) | Imaging apparatus and imaging method | |
JP5043730B2 (en) | Imaging apparatus, control method therefor, image processing apparatus, and image processing method | |
JP4878978B2 (en) | Imaging apparatus and imaging method | |
JP4189820B2 (en) | Imaging apparatus and image recording method | |
JP4315341B2 (en) | Panning method and photographing apparatus | |
JP2007311962A (en) | Electronic camera and image display program | |
JP5153293B2 (en) | Image processing apparatus and image processing program | |
JP4046276B2 (en) | Digital camera | |
JP5397426B2 (en) | Imaging apparatus, focusing method, and program | |
JP2019029778A (en) | Imaging apparatus, image processing apparatus, image processing method | |
JP5498561B2 (en) | Image processing apparatus and image processing method | |
JP5142807B2 (en) | Imaging apparatus and control method thereof | |
JP4799247B2 (en) | Imaging apparatus and imaging method | |
JP5163333B2 (en) | CAMERA DEVICE, IMAGE DISPLAY METHOD, AND IMAGE DISPLAY PROGRAM | |
JP6547742B2 (en) | Imaging control apparatus, imaging apparatus and imaging control method | |
JP5648563B2 (en) | Image processing apparatus, image processing method, and program | |
JP4827778B2 (en) | Image processing apparatus, image processing method, program, and storage medium | |
JP4874923B2 (en) | Image recording apparatus and image recording method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101022 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20101022 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20111031 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120120 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120321 |
|
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: 20121106 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121204 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151214 Year of fee payment: 3 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5153293 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20151214 Year of fee payment: 3 |
|
LAPS | Cancellation because of no payment of annual fees |