JP5228929B2 - Image processing apparatus, imaging apparatus, and image processing program - Google Patents

Image processing apparatus, imaging apparatus, and image processing program Download PDF

Info

Publication number
JP5228929B2
JP5228929B2 JP2009005886A JP2009005886A JP5228929B2 JP 5228929 B2 JP5228929 B2 JP 5228929B2 JP 2009005886 A JP2009005886 A JP 2009005886A JP 2009005886 A JP2009005886 A JP 2009005886A JP 5228929 B2 JP5228929 B2 JP 5228929B2
Authority
JP
Japan
Prior art keywords
pixel
pixel value
image processing
image
processing apparatus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009005886A
Other languages
Japanese (ja)
Other versions
JP2010166236A (en
Inventor
暁彦 宇津木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP2009005886A priority Critical patent/JP5228929B2/en
Publication of JP2010166236A publication Critical patent/JP2010166236A/en
Application granted granted Critical
Publication of JP5228929B2 publication Critical patent/JP5228929B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Automatic Focus Adjustment (AREA)
  • Image Processing (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)

Description

本発明は、画像処理装置、撮像装置及び画像処理プログラムに関する。   The present invention relates to an image processing device, an imaging device, and an image processing program.

従来、撮像素子における欠陥画素や焦点検出用画素の位置における画素値を補正する様々な画像処理の技術が提案されている。そして、提案されている画像処理技術の中には、補正が必要な画素位置における画像の細かな構造を、再現するための工夫が施されているものもある。   Conventionally, various image processing techniques for correcting pixel values at positions of defective pixels and focus detection pixels in an image sensor have been proposed. Some of the proposed image processing techniques are devised to reproduce the fine structure of an image at a pixel position that needs to be corrected.

例えば、特許文献1では、焦点検出用画素の周辺の撮像画素のうち、配置密度の高い撮像画素の画素値に基づいて配置密度の低い撮像画素の画素値を補正し、補正した配置密度の低い撮像画素の画素値に基づいて、焦点検出用画素の位置における画素値を算出する技術が開示されている。   For example, in Patent Document 1, the pixel value of an imaging pixel with a low arrangement density is corrected based on the pixel value of an imaging pixel with a high arrangement density among the imaging pixels around the focus detection pixel, and the corrected arrangement density is low. A technique for calculating the pixel value at the position of the focus detection pixel based on the pixel value of the imaging pixel is disclosed.

しかしながら、従来技術の画像処理の方法では、例えば、特許文献1のような複雑な演算処理をそのままの形で電子カメラ等に実装すると回路規模が増大してしまうという問題がある。   However, the conventional image processing method has a problem in that, for example, if a complicated arithmetic processing as in Patent Document 1 is mounted on an electronic camera or the like as it is, the circuit scale increases.

上記従来技術が有する問題に鑑み、本発明の目的は、画像データにおける画素値の補正処理を、回路規模を増大させることなく行うことができる技術を提供することにある。   In view of the above-described problems of the conventional technique, an object of the present invention is to provide a technique that can perform pixel value correction processing in image data without increasing the circuit scale.

上記課題を解決するために、本発明の画像処理装置は、原画像データのビット精度よりも低いビット精度の第1の画像データを算出し、第1の画像データの処理対象画素の周辺の画素の画素値を用いて、処理対象画素の第1の画素値を算出する第1の画素値算出部と、原画像データの処理対象画素の周辺の画素の画素値を用いて、処理対象画素の第2の画素値を算出する第2の画素値算出部と、第1の画素値と第2の画素値とから求めた補正値を、第1の画素値に付加するビット誤差抑制部と、を備える。   In order to solve the above problems, an image processing apparatus according to the present invention calculates first image data having a bit accuracy lower than the bit accuracy of original image data, and pixels around a processing target pixel of the first image data. The first pixel value calculation unit that calculates the first pixel value of the processing target pixel using the pixel value of the pixel, and the pixel values of the pixels around the processing target pixel of the original image data, A second pixel value calculation unit that calculates a second pixel value; a bit error suppression unit that adds a correction value obtained from the first pixel value and the second pixel value to the first pixel value; Is provided.

また、本発明において、補正値は、所定範囲内の補正値である。   In the present invention, the correction value is a correction value within a predetermined range.

また、本発明において、所定範囲は、第1の画像データのビット精度に基づいて設定される。   In the present invention, the predetermined range is set based on the bit accuracy of the first image data.

また、本発明において、ビット誤差抑制部は、処理対象画素における第2の画素値と第1の画素値との差を所定範囲内にクリップした値を補正値とする。   In the present invention, the bit error suppression unit uses a value obtained by clipping the difference between the second pixel value and the first pixel value in the processing target pixel within a predetermined range as a correction value.

また、本発明において、ビット誤差抑制部は、処理対象画素における前記第2の画素値と前記第1の画素値との差を求め、前記差が所定範囲内ではない場合には前記補正値を0に設定し、前記差が所定範囲内の場合には前記差を前記補正値とする。   In the present invention, the bit error suppression unit obtains a difference between the second pixel value and the first pixel value in the processing target pixel, and when the difference is not within a predetermined range, the bit error suppression unit calculates the correction value. When the difference is within a predetermined range, the difference is set as the correction value.

また、本発明において、第1の画素値算出部は、第1の画像データを原画像データに対してガンマ変換することによって算出する。   In the present invention, the first pixel value calculation unit calculates the first image data by performing gamma conversion on the original image data.

また、本発明において、第1の画像データに基づいて、処理対象画素の周辺における画素値分布に関する方向を判定する画像方向判定部をさらに備え、第1の画素値算出部及び第2の画素値算出部は、画像方向判定部による方向を参照して、処理対象画素における第1の画素値及び第2の画素値を算出する。   In the present invention, the image processing apparatus further includes an image direction determination unit that determines a direction related to a pixel value distribution around the pixel to be processed based on the first image data, and includes a first pixel value calculation unit and a second pixel value. The calculation unit calculates the first pixel value and the second pixel value in the processing target pixel with reference to the direction by the image direction determination unit.

また、本発明において、処理対象画素は、異常な画素値を出力する撮像画素、又は焦点検出用画素である。   In the present invention, the processing target pixel is an imaging pixel that outputs an abnormal pixel value or a focus detection pixel.

また、本発明において、撮像素子によって撮像された原画像データを受け付ける入力部と、処理対象画素の位置情報を記憶する位置情報記憶部と、をさらに備える。   The present invention further includes an input unit that receives original image data captured by the image sensor and a position information storage unit that stores position information of the processing target pixel.

本発明の撮像装置は、撮像素子と、本発明の画像処理装置と、を備える。   The imaging device of the present invention includes an imaging element and the image processing device of the present invention.

本発明の画像処理プログラムは、本発明の画像処理装置の処理をコンピュータで実現する。   The image processing program of the present invention realizes the processing of the image processing apparatus of the present invention by a computer.

本発明によると、画像データにおける画素値の補正処理を、回路規模を増大させることなく行うことができる。   According to the present invention, pixel value correction processing in image data can be performed without increasing the circuit scale.

本発明の一の実施形態に係る電子カメラ10の構成を示すブロック図1 is a block diagram showing a configuration of an electronic camera 10 according to an embodiment of the present invention. 撮像素子2の一部のセルの配列を示す図The figure which shows the arrangement | sequence of the one part cell of the image pick-up element 2 電子カメラ10の記憶部9と画像処理部12との間における画像データのフローを示す図The figure which shows the flow of the image data between the memory | storage part 9 and the image process part 12 of the electronic camera 10. 電子カメラ10での画像処理のフローチャートFlow chart of image processing in electronic camera 10

以下、図面を用いて本発明の実施形態について説明する。
≪一の実施形態≫
図1は、本発明の一の実施形態に係る電子カメラ10の構成図である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
<< One Embodiment >>
FIG. 1 is a configuration diagram of an electronic camera 10 according to an embodiment of the present invention.

電子カメラ10は、撮像レンズ1、撮像素子2、A/D変換部3、バッファメモリ4、CPU5、カードインタフェース(カードI/F)6、操作部材8、記憶部9、表示部11及び画像処理部12から構成される。バッファメモリ4、CPU5、カードI/F6、操作部材8、記憶部9、表示部11及び画像処理部12は、バス13を介して情報伝達可能に接続されている。なお、図1は電子カメラ10の主要部分のみを示す。例えば、図1において、CPU5の指令に従って、撮像素子2及びA/D変換部3に撮影指示のタイミングパルスを発するタイミングジェネレータ等は省略されている。   The electronic camera 10 includes an imaging lens 1, an imaging device 2, an A / D conversion unit 3, a buffer memory 4, a CPU 5, a card interface (card I / F) 6, an operation member 8, a storage unit 9, a display unit 11, and image processing. The unit 12 is configured. The buffer memory 4, the CPU 5, the card I / F 6, the operation member 8, the storage unit 9, the display unit 11, and the image processing unit 12 are connected via a bus 13 so that information can be transmitted. FIG. 1 shows only the main part of the electronic camera 10. For example, in FIG. 1, a timing generator that emits timing pulses for shooting instructions to the image sensor 2 and the A / D converter 3 in accordance with a command from the CPU 5 is omitted.

撮像レンズ1は、複数の光学レンズにより構成され、被写体像を撮像素子2の受光面に結像する。   The imaging lens 1 is composed of a plurality of optical lenses, and forms a subject image on the light receiving surface of the imaging element 2.

撮像素子2は、その受光面上に配置された複数の撮像画素の各々に、R(赤)、G(緑)又はB(青)のいずれかのカラーフィルタがベイヤ配列型に設けられたCCDやCMOSの半導体イメージセンサ等であり、適宜選択して用いることができる。さらに、本実施形態の撮像素子2は、受光面上の一部の領域に、水平走査方向に一次元的に配置された複数の焦点検出画素(AF画素)(処理対象画素)を有する。それらのAF画素は、白色のフィルタが設けられ、且つ撮像レンズ1の光学系の瞳の左側又は右側を通過する光束を受光する。即ち、AF画素の各々は、白色光の輝度に応じた左側又は右側の瞳分割された検出信号を出力する。図2は、撮像素子2によって撮像された画像データのうち、AF画素が配置された領域を中心とした画像データの一部を示す。それぞれのセルが1つの画素を表す。各セルの先頭の記号R、G及びBは、各カラーフィルタを有する撮像画素を示す。一方、記号X及びYは、左側又は右側からの光束に感度を有するAF画素を示し、それらが交互に水平走査方向に一次元的に配列されている。これらの記号に続く2桁の番号は画素の位置を示す。   The image pickup device 2 is a CCD in which any one of a plurality of image pickup pixels arranged on the light receiving surface is provided with a color filter of R (red), G (green), or B (blue) in a Bayer array type. Or a semiconductor image sensor of CMOS, etc., which can be appropriately selected and used. Furthermore, the imaging device 2 of the present embodiment has a plurality of focus detection pixels (AF pixels) (processing target pixels) arranged one-dimensionally in the horizontal scanning direction in a partial region on the light receiving surface. These AF pixels are provided with a white filter and receive a light beam passing through the left or right side of the pupil of the optical system of the imaging lens 1. That is, each AF pixel outputs a detection signal obtained by dividing the left or right pupil according to the luminance of white light. FIG. 2 shows a part of image data centered on an area where AF pixels are arranged, among image data captured by the image sensor 2. Each cell represents one pixel. Symbols R, G, and B at the head of each cell indicate an imaging pixel having each color filter. On the other hand, symbols X and Y indicate AF pixels that are sensitive to light beams from the left side or the right side, and they are alternately arranged one-dimensionally in the horizontal scanning direction. The two-digit number following these symbols indicates the pixel position.

この撮像素子2は、CPU5の指令を受けてタイミングジェネレータ(不図示)が発するタイミングパルスに基づいて動作し、前方に設けられた撮像レンズ1によって結像される被写体像を取得する。撮像素子2から出力された画像信号は、A/D変換部3にてデジタル信号に変換される。デジタルの画像信号は、フレームメモリ(不図示)に一時的に記録された後、バッファメモリ4に記録される。なお、本実施形態におけるA/D変換部3は、撮像素子2の各画素の画素値を14ビット精度のデジタル信号に変換して出力するものとする。また、バッファメモリ4には、半導体メモリのうち、任意の不揮発性メモリを適宜選択して用いることができる。   The image sensor 2 operates based on a timing pulse generated by a timing generator (not shown) in response to a command from the CPU 5 and acquires a subject image formed by the imaging lens 1 provided in front. The image signal output from the image sensor 2 is converted into a digital signal by the A / D converter 3. The digital image signal is temporarily recorded in a frame memory (not shown) and then recorded in the buffer memory 4. Note that the A / D converter 3 in the present embodiment converts the pixel value of each pixel of the image sensor 2 into a 14-bit digital signal and outputs the digital signal. As the buffer memory 4, any non-volatile memory among semiconductor memories can be appropriately selected and used.

CPU5は、ユーザが操作部材8の電源釦を押すことによって、電子カメラ10の電源が入れられると、記憶部9に記憶されている制御プログラムや画像処理プログラムを読み込んで、電子カメラ10を初期化する。CPU5は、操作部材8を介してユーザからの指示の信号を受け制御プログラムに基づいて、タイミングジェネレータ(不図示)に被写体像の撮像指令を出力したり、画像処理部12に撮像した画像の画像処理をさせたり、カードメモリ7への記録や表示部11への表示を行ったり等の制御を行う。CPU5には、一般的なコンピュータのCPUが使用することができる。   When the electronic camera 10 is turned on by the user pressing the power button on the operation member 8, the CPU 5 reads the control program and the image processing program stored in the storage unit 9 and initializes the electronic camera 10. To do. The CPU 5 receives an instruction signal from the user via the operation member 8, outputs a subject image imaging command to a timing generator (not shown) based on a control program, or the image captured by the image processing unit 12. Control is performed such as processing, recording in the card memory 7, and display on the display unit 11. The CPU 5 can be a general computer CPU.

カードI/F6には、カードメモリ7が着脱可能に装着される。バッファメモリ4に記録される画像は、CPU5の指示に基づいて画像処理部12で画像処理された後、JPEG形式やYUV形式等のファイルとしてカードメモリ7に記録される。   A card memory 7 is detachably attached to the card I / F 6. The image recorded in the buffer memory 4 is subjected to image processing by the image processing unit 12 based on an instruction from the CPU 5 and then recorded in the card memory 7 as a file in JPEG format or YUV format.

操作部材8は、ユーザによる部材操作の内容に応じた操作信号をCPU5に出力する。操作部材8には、例えば、電源釦、撮影モード等のモード設定釦及びレリーズ釦等の操作部材を有する。なお、操作部材8は、後述する表示部11の画面に表示されるタッチパネル式の釦であっても良い。   The operation member 8 outputs an operation signal corresponding to the content of the member operation by the user to the CPU 5. The operation member 8 includes operation members such as a power button, a mode setting button such as a shooting mode, and a release button. The operation member 8 may be a touch panel type button displayed on the screen of the display unit 11 to be described later.

記憶部9は、電子カメラ10が撮像した画像データや、CPU5が電子カメラ10を制御するための制御プログラム等の各種プログラム等を記憶する。さらに、記憶部9は、撮像素子2のAF画素の位置情報や画像処理部12の画像処理で用いる補正係数等のデータを記憶する。記憶部9に記憶されるプログラムやデータは、バス13を介して、CPU5から適宜参照することができる。記憶部9は、一般的なハードディスク装置や光磁気ディスク装置、又は半導体メモリ等の記憶装置を適宜選択して用いることができる。   The storage unit 9 stores image data captured by the electronic camera 10 and various programs such as a control program for the CPU 5 to control the electronic camera 10. Further, the storage unit 9 stores data such as position information of AF pixels of the image sensor 2 and correction coefficients used in image processing of the image processing unit 12. Programs and data stored in the storage unit 9 can be appropriately referred to from the CPU 5 via the bus 13. As the storage unit 9, a general hard disk device, a magneto-optical disk device, or a storage device such as a semiconductor memory can be appropriately selected and used.

表示部11は、スルー画や撮像した画像又はモード設定画面等を表示する。表示部11には、液晶モニタ等を適宜選択して用いることができる。   The display unit 11 displays a through image, a captured image, a mode setting screen, or the like. A liquid crystal monitor or the like can be appropriately selected and used for the display unit 11.

画像処理部12は、CPU5の画像処理に指示に基づいて、輪郭強調処理やホワイトバランス補正等の画像処理とともに、AF画素の画素位置における画素値を周辺の撮像画素の画素値を用いた補間計算を行うディジタルフロントエンド回路である。   The image processing unit 12 performs interpolation calculation using the pixel values at the pixel positions of the AF pixels using the pixel values of the surrounding imaging pixels, along with image processing such as contour emphasis processing and white balance correction, based on an instruction for image processing of the CPU 5. Is a digital front-end circuit for performing

次に、本実施形態に係る電子カメラ10について、図3のCPU5に基づいた記憶部9と画像処理部12とにおける画像データのフローを示す図とともに、図4の画像処理のフローチャートを参照しながら説明する。   Next, regarding the electronic camera 10 according to the present embodiment, referring to the flowchart of the image processing in FIG. 4 together with a diagram showing the flow of image data in the storage unit 9 and the image processing unit 12 based on the CPU 5 in FIG. explain.

ユーザにより操作部材8の電源釦が押されると、CPU5は、電子カメラ10の記憶部9に記憶されている制御プログラムを読み込み、電子カメラ10を初期化する。CPU5は、ユーザからの被写体像の撮像指示が出されるまで待機する。ユーザによって操作部材8のレリーズ釦が押されると、CPU5は、撮像指示が出されたと判断して、ステップS10〜ステップS21の処理を行う。なお、本実施形態において、撮像画素の各々に設置されるカラーフィルタがベイヤ配列のパターンであることから、記号XのAF画素の位置には緑色(G)の画素値が補間され、記号YのAF画素の画素位置には青色(B)の画素値が補間される。   When the user presses the power button of the operation member 8, the CPU 5 reads the control program stored in the storage unit 9 of the electronic camera 10 and initializes the electronic camera 10. The CPU 5 stands by until an instruction to capture a subject image is issued from the user. When the release button of the operation member 8 is pressed by the user, the CPU 5 determines that an imaging instruction has been issued, and performs the processes of steps S10 to S21. In this embodiment, since the color filter installed in each of the imaging pixels is a Bayer array pattern, a green (G) pixel value is interpolated at the position of the AF pixel of the symbol X, and the symbol Y A blue (B) pixel value is interpolated at the pixel position of the AF pixel.

ステップS10:CPU5は、タイミングジェネレータ(不図示)に対して撮像指令を出す。タイミングジェネレータ(不図示)は、タイミングパルスを撮像素子2に発し、撮像素子2は撮像レンズ1によって結像された被写体像を撮像する。撮像された画像データは、A/D変換部3によって14ビット精度のデジタルの画像データ(原画像データ)に変換され、バッファメモリ4に記録される。CPU5は、バッファメモリ4に対して、画像データを画像処理部12へ転送する指令を出す。バッファメモリ4は、バス13を介して、画像データを画像処理部12へ転送する。   Step S10: The CPU 5 issues an imaging command to a timing generator (not shown). A timing generator (not shown) emits a timing pulse to the image sensor 2, and the image sensor 2 captures a subject image formed by the imaging lens 1. The captured image data is converted into digital image data (original image data) with 14-bit precision by the A / D conversion unit 3 and recorded in the buffer memory 4. The CPU 5 issues a command for transferring the image data to the image processing unit 12 to the buffer memory 4. The buffer memory 4 transfers the image data to the image processing unit 12 via the bus 13.

ステップS11:画像処理部12の低ビット画像生成部101は、転送されてきた14ビット精度の画像データの各画素値に対して、64の値で割るとともに小数点を切り捨てることにより、8ビット精度にビット精度を低下させた画像データを生成する。生成された8ビット精度の画像データは、画像方向判定部104及び第1の画素値算出部105に転送される。なお、本実施形態では、64で割った際に、小数点以下を切り捨てるが、四捨五入しても良いし、切り上げても良い。また、以下の説明において、14ビット精度の画像データの画素値を表すパラメータには14の添え字を、8ビット精度の画像データの画素値を表すパラメータには8の添え字をそれぞれ付すこととする。   Step S11: The low bit image generation unit 101 of the image processing unit 12 divides each pixel value of the transferred 14-bit precision image data by 64 values and truncates the decimal point, thereby reducing the 8-bit precision. Image data with reduced bit accuracy is generated. The generated 8-bit precision image data is transferred to the image direction determination unit 104 and the first pixel value calculation unit 105. In the present embodiment, when the value is divided by 64, the decimal part is rounded down, but may be rounded off or rounded up. Further, in the following description, 14 subscripts are attached to parameters representing pixel values of 14-bit precision image data, and 8 subscripts are attached to parameters representing pixel values of 8-bit precision image data. To do.

ステップS12:画像処理部12のAF画素位置設定部102は、ステップS10の低ビット画像生成部101による処理と同時に、記憶部9の位置情報記憶部103からAF画素位置情報を読み込む。ここで、位置情報記憶部102には、AF画素列の垂直走査方向の座標YVと水平走査方向の始点及び終点の座標XH1及びXH2が記憶されている。   Step S12: The AF pixel position setting unit 102 of the image processing unit 12 reads AF pixel position information from the position information storage unit 103 of the storage unit 9 simultaneously with the processing by the low bit image generation unit 101 of step S10. Here, the position information storage unit 102 stores the coordinates YV in the vertical scanning direction and the coordinates XH1 and XH2 of the start and end points in the horizontal scanning direction of the AF pixel row.

ステップS13:画像処理部12の画像方向判定部104は、各AF画素での撮像画素値を補間するために、各AF画素の周辺の撮像画素の画素値を用いて、3方向(本実施形態では、垂直走査方向、水平走査方向に対して斜め45度及び135度の方向)における画素値の変化率である方向変動V1〜V3の値を、AF画素の周辺の同色画素の差分の絶対値を積算して求める。具体的には、画像方向判定部104は、AF画素が左側の瞳分割された光を検出するAF画素Xの場合には次式(1)〜(3)を用い、右側の瞳分割された光を検出するAF画素Yの場合には次式(4)〜(6)を用いてそれぞれ求めて判定する。この理由は、AF画素XとAF画素Yとでその周辺のR、G及びBの配列のパターンが少し異なるからである。なお、各AF画素の座標を(x,y)とし、その位置でのR、G及びBの各成分をR(x,y)、G(x,y)及びB(x,y)とする。
・AF画素Xの場合の垂直走査方向の方向変動V1=
2×(|G(x−1,y−1)−G(x−1,y+1)|+|G(x+1,y−1)−G(x+1,y+1)|)+|R(x−2,y−1)−R(x−2,y+1)|+|R(x,y−1)−R(x,y+1)|+|B(x−1,y−2)−B(x−1,y+2)|+|B(x+1,y−2)−B(x+1,y+2)| …(1)
・AF画素Xの場合の水平走査方向に対して斜め45度の方向変動V2=
2×(|G(x+2,y−2)−G(x+1,y−1)|+|G(x−1,y+1)−G(x−2,y+2)|)+|R(x,y−1)−R(x−2,y+1)|+|R(x+2,y−1)−R(x,y+1)|+|B(x+1,y−2)−B(x−3,y+2)|+|B(x+3,y−2)−B(x−1,y+2)| …(2)
・AF画素Xの場合の水平走査方向に対して斜め135度の方向変動V3=
2×(|G(x−2,y−2)−G(x−1,y−1)|+|G(x+1,y+1)−G(x+2,y+2)|)+|R(x−2,y−1)−R(x,y+1)|+|R(x,y−1)−R(x+2,y+1)|+|B(x−3,y−2)−B(x+1,y+2)|+|B(x−1,y−2)−B(x+3,y+2)| …(3)
・AF画素Yの場合の垂直走査方向の方向変動V1=
2×(|G(x,y−1)−G(x,y+1)|+|G(x−2,y−1)−G(x−2,y+1)|)+|R(x−1,y−1)−R(x−1,y+1)|+|R(x+1,y−1)−R(x+1,y+1)|+|B(x−2,y−2)−B(x−2,y+2)|+|B(x,y−2)−B(x,y+2)| …(4)
・AF画素Yの場合の水平走査方向に対して斜め45度の方向変動V2=
2×(|G(x+1,y−2)−G(x,y−1)|+|G(x,y+1)−G(x−1,y+2)|)+|R(x−1,y−1)−R(x−3,y+1)|+|R(x+1,y−1)−R(x−1,y+1)|+|B(x+2,y−2)−B(x−2,y+2)|+|B(x+4,y−2)−B(x,y+2)| …(5)
・AF画素Yの場合の水平走査方向に対して斜め135度の方向変動V3=
2×(|G(x−1,y−2)−G(x,y−1)|+|G(x,y+1)−G(x+1,y+2)|)+|R(x−1,y−1)−R(x+1,y+1)|+|R(x+1,y−1)−R(x+3,y+1)|+|B(x−2,y−2)−B(x+2,y+2)|+|B(x,y−2)−B(x+4,y+2)| …(6)
画像方向判定部104は、各AF画素において方向変動V1〜V3のうち最も小さい値の方向を画像方向情報として、第1の画素値算出部105及び第2の画素値算出部107に出力する
ステップS14:画像処理部12の第1の画素値算出部105は、8ビット精度の画像データとともに、ステップS12で求めた画像方向判定部104による各AF画素Xにおける画像方向情報に基づいて、各AF画素XにおけるG成分で8ビット精度の第1の画素値G1を求める。そのために、第1の画素値算出部105は、各AF画素Xの近傍におけるR、G及びBの平均値を、画像方向判定部104の画像方向情報に基づいて次式(7)〜(9)のいずれかを用いて算出する。
・最小の方向変動が垂直走査方向の場合
ave(x,y)=(R(x,y−1)+R(x,y+1))/2 …(7)
ave(x,y)=(G(x−1,y−1)+G(x−1,y+1)+G(x+1,y−1)+G(x+1,y+1))/4
ave(x,y)=(B(x−1,y−2)+B(x−1,y+2)+B(x+1,y−2)+B(x+1,y+2))/4
・最小の方向変動が斜め45度の場合
ave(x,y)=(R(x,y−1)+R(x,y+1)+R(x−2,y−1)+R(x+2,y+1))/4 …(8)
ave(x,y)=(G(x−1,y−1)+G(x+1,y+1))/2
ave(x,y)=(B(x−1,y−2)+B(x−3,y−2)+B(x+1,y+2)+B(x+3,y+2))/4
・最小の方向変動が斜め135度の場合
ave(x,y)=(R(x,y−1)+R(x,y+1)+R(x+2,y−1)+R(x−2,y+1))/4 …(9)
ave(x,y)=(G(x+1,y−1)+G(x−1,y+1))/2
ave(x,y)=(B(x+1,y−2)+B(x+3,y−2)+B(x−1,y+2)+B(x−3,y+2))/4
第1の画素値算出部105は、算出されたRave、Gave及びBaveを用いるとともに、記憶部9の補正係数記憶部106から補正係数KR、KG及びKBの値を読み込んで、各AF画素Xにおける平均の白色成分Wave(x,y)を、次式(10)を用いて算出する。
ave(x,y)=KR×Rave(x,y)+KG×Gave(x,y)+KB×Bave(x,y) …(10)
ここで、補正係数記憶部106に記憶されている補正係数KR、KG及びKBの値は、白色光の輝度に応じた左側と右側との瞳分割されたAF画素の分光感度の和(例えば、AF画素X45とAF画素Y46との画素値の和)が、KR×R画素の分光感度+KG×G画素の分光感度+KB×B画素の分光感度で表される近似式に最も良く成り立つように、開発段階で決められる値である。本実施形態では、0.5〜1.2の1前後の値となる。
Step S13: The image direction determination unit 104 of the image processing unit 12 uses the pixel values of the imaging pixels around each AF pixel in order to interpolate the imaging pixel values at each AF pixel, and performs three directions (this embodiment). Then, the values of the direction fluctuations V1 to V3, which are the change rates of the pixel values in the vertical scanning direction and the 45 ° oblique direction with respect to the horizontal scanning direction), are used as the absolute value of the difference between the same color pixels around the AF pixel. Is calculated. Specifically, the image direction determination unit 104 uses the following equations (1) to (3) when the AF pixel is an AF pixel X that detects light divided into the left pupil, and the right pupil is divided. In the case of the AF pixel Y that detects light, the determination is made using the following equations (4) to (6). This is because the AF pixel X and the AF pixel Y have slightly different R, G, and B arrangement patterns around them. The coordinates of each AF pixel are (x, y), and the R, G, and B components at that position are R 8 (x, y), G 8 (x, y), and B 8 (x, y). ).
The direction change V1 in the vertical scanning direction in the case of the AF pixel X =
2 × (| G 8 (x−1, y−1) −G 8 (x−1, y + 1) | + | G 8 (x + 1, y−1) −G 8 (x + 1, y + 1) |) + | R 8 (x−2, y−1) −R 8 (x−2, y + 1) | + | R 8 (x, y−1) −R 8 (x, y + 1) | + | B 8 (x−1, y−2) −B 8 (x−1, y + 2) | + | B 8 (x + 1, y−2) −B 8 (x + 1, y + 2) | (1)
The direction variation V2 = 45 degrees oblique to the horizontal scanning direction in the case of the AF pixel X =
2 × (| G 8 (x + 2, y−2) −G 8 (x + 1, y−1) | + | G 8 (x−1, y + 1) −G 8 (x−2, y + 2) |) + | R 8 (x, y-1) -R 8 (x-2, y + 1) | + | R 8 (x + 2, y-1) -R 8 (x, y + 1) | + | B 8 (x + 1, y-2) −B 8 (x−3, y + 2) | + | B 8 (x + 3, y−2) −B 8 (x−1, y + 2) | (2)
A direction variation V3 = 135 degrees oblique to the horizontal scanning direction in the case of the AF pixel X =
2 × (| G 8 (x−2, y−2) −G 8 (x−1, y−1) | + | G 8 (x + 1, y + 1) −G 8 (x + 2, y + 2) |) + | R 8 (x−2, y−1) −R 8 (x, y + 1) | + | R 8 (x, y−1) −R 8 (x + 2, y + 1) | + | B 8 (x−3, y− 2) −B 8 (x + 1, y + 2) | + | B 8 (x−1, y−2) −B 8 (x + 3, y + 2) | (3)
Direction change V1 in the vertical scanning direction in the case of AF pixel Y =
2 × (| G 8 (x, y−1) −G 8 (x, y + 1) | + | G 8 (x−2, y−1) −G 8 (x−2, y + 1) |) + | R 8 (x-1, y- 1) -R 8 (x-1, y + 1) | + | R 8 (x + 1, y-1) -R 8 (x + 1, y + 1) | + | B 8 (x-2, y-2) -B 8 (x -2, y + 2) | + | B 8 (x, y-2) -B 8 (x, y + 2) | ... (4)
The direction variation V2 = 45 degrees oblique to the horizontal scanning direction in the case of the AF pixel Y =
2 × (| G 8 (x + 1, y−2) −G 8 (x, y−1) | + | G 8 (x, y + 1) −G 8 (x−1, y + 2) |) + | R 8 ( x−1, y−1) −R 8 (x−3, y + 1) | + | R 8 (x + 1, y−1) −R 8 (x−1, y + 1) | + | B 8 (x + 2, y−) 2) -B 8 (x−2, y + 2) | + | B 8 (x + 4, y−2) −B 8 (x, y + 2) | (5)
A direction change V3 = 135 degrees oblique to the horizontal scanning direction in the case of the AF pixel Y =
2 × (| G 8 (x−1, y−2) −G 8 (x, y−1) | + | G 8 (x, y + 1) −G 8 (x + 1, y + 2) |) + | R 8 ( x−1, y−1) −R 8 (x + 1, y + 1) | + | R 8 (x + 1, y−1) −R 8 (x + 3, y + 1) | + | B 8 (x−2, y−2) −B 8 (x + 2, y + 2) | + | B 8 (x, y−2) −B 8 (x + 4, y + 2) | (6)
The image direction determination unit 104 outputs the direction of the smallest value among the direction variations V1 to V3 in each AF pixel as image direction information to the first pixel value calculation unit 105 and the second pixel value calculation unit 107. S14: The first pixel value calculation unit 105 of the image processing unit 12 performs each AF based on the image direction information at each AF pixel X by the image direction determination unit 104 obtained in step S12 together with the 8-bit precision image data. A first pixel value G1 having an 8-bit accuracy with the G component in the pixel X is obtained. Therefore, the first pixel value calculation unit 105 calculates the average values of R, G, and B in the vicinity of each AF pixel X based on the image direction information of the image direction determination unit 104 by the following formulas (7) to (9). ) To calculate.
When the minimum direction change is the vertical scanning direction, R ave (x, y) = (R 8 (x, y−1) + R 8 (x, y + 1)) / 2 (7)
G ave (x, y) = (G 8 (x−1, y−1) + G 8 (x−1, y + 1) + G 8 (x + 1, y−1) + G 8 (x + 1, y + 1)) / 4
B ave (x, y) = (B 8 (x−1, y−2) + B 8 (x−1, y + 2) + B 8 (x + 1, y−2) + B 8 (x + 1, y + 2)) / 4
When the minimum direction change is 45 degrees diagonally, R ave (x, y) = (R 8 (x, y−1) + R 8 (x, y + 1) + R 8 (x−2, y−1) + R 8 ( x + 2, y + 1)) / 4 (8)
G ave (x, y) = (G 8 (x−1, y−1) + G 8 (x + 1, y + 1)) / 2
B ave (x, y) = (B 8 (x−1, y−2) + B 8 (x−3, y−2) + B 8 (x + 1, y + 2) + B 8 (x + 3, y + 2)) / 4
When the minimum direction change is 135 degrees diagonally, R ave (x, y) = (R 8 (x, y−1) + R 8 (x, y + 1) + R 8 (x + 2, y−1) + R 8 (x−) 2, y + 1)) / 4 (9)
G ave (x, y) = (G 8 (x + 1, y−1) + G 8 (x−1, y + 1)) / 2
B ave (x, y) = (B 8 (x + 1, y−2) + B 8 (x + 3, y−2) + B 8 (x−1, y + 2) + B 8 (x−3, y + 2)) / 4
The first pixel value calculation unit 105 uses the calculated R ave , G ave, and B ave and reads the values of the correction coefficients KR, KG, and KB from the correction coefficient storage unit 106 of the storage unit 9, and An average white component W ave (x, y) in the pixel X is calculated using the following equation (10).
W ave (x, y) = KR × R ave (x, y) + KG × G ave (x, y) + KB × B ave (x, y) (10)
Here, the values of the correction coefficients KR, KG, and KB stored in the correction coefficient storage unit 106 are the sum of the spectral sensitivities of the left and right pupil-divided AF pixels according to the brightness of the white light (for example, The sum of the pixel values of the AF pixel X45 and the AF pixel Y46) best satisfies the approximate expression expressed by the spectral sensitivity of the KR × R pixel + the spectral sensitivity of the KG × G pixel + the spectral sensitivity of the KB × B pixel. This value is determined at the development stage. In the present embodiment, the value is around 1 of 0.5 to 1.2.

一方、第1の画素値算出部105は、同時に、各AF画素X及び各AF画素Yの画素値を用いて、各AF画素Xの位置における白色成分W(x,y)を、次式(11)を用いて求める。
(x,y)=X(x,y)+(Y(x−1,y)+Y(x+1,y))/2 …(11)
以上において求めた値から、第1の画素値算出部105は、各AF画素XにおけるG成分で8ビット精度の第1の画素値G1(x,y)を、
G1(x,y)=Gave(x,y)+W(x,y)/Wave(x,y) …(12)
の式(12)を用いて算出する。
On the other hand, the first pixel value calculation unit 105 simultaneously uses the pixel values of each AF pixel X and each AF pixel Y to calculate the white component W 8 (x, y) at the position of each AF pixel X as follows: Obtained using (11).
W 8 (x, y) = X 8 (x, y) + (Y 8 (x−1, y) + Y 8 (x + 1, y)) / 2 (11)
From the values obtained above, the first pixel value calculation unit 105 calculates the first pixel value G1 (x, y) with 8-bit accuracy with the G component in each AF pixel X,
G1 (x, y) = G ave (x, y) + W 8 (x, y) / W ave (x, y) (12)
It calculates using the formula (12).

ステップS15:第1の画素値算出部105は、ステップS14の場合と同様にして、各AF画素YにおけるB成分で8ビット精度の第1の画素値B1を求める。そのために、第1の画素値算出部105は、各AF画素Yの近傍におけるR、G及びBの平均値を、画像方向判定部104の画像方向情報に基づいて次式(13)〜(15)のいずれかを用いて算出する。
・最小の方向変動が垂直走査方向の場合
ave(x,y)=(R(x−1,y−1)+R(x−1,y+1)+R(x+1,y−1)+R(x+1,y+1))/4 …(13)
ave(x,y)=(G(x,y−1)+G(x,y+1))/2
ave(x,y)=(B(x,y−2)+B(x,y+2))/2
・最小の方向変動が斜め45度の場合
ave(x,y)=(R(x−1,y−1)+R(x+1,y+1))/2 …(14)
ave(x,y)=(G(x,y−1)+G(x−2,y−1)+G(x,y+1)+G(x+2,y+1))/4
ave(x,y)=(B(x−2,y−2)+B(x+2,y+2))/2
・最小の方向変動が斜め135度の場合
ave(x,y)=(R(x+1,y−1)+R(x−1,y+1))/2 …(15)
ave(x,y)=(G(x,y−1)+G(x+2,y−1)+G(x,y+1)+G(x−2,y+1))/4
ave(x,y)=(B(x+2,y−2)+B(x−2,y+2))/2
第1の画素値算出部105は、算出されたRave、Gave及びBaveを用いて、平均の白色成分Wave(x,y)を、ステップS14と同様に式(7)を用いて算出する。
Step S15: The first pixel value calculation unit 105 obtains a first pixel value B1 having an 8-bit accuracy with the B component in each AF pixel Y in the same manner as in step S14. For this purpose, the first pixel value calculation unit 105 calculates the average values of R, G, and B in the vicinity of each AF pixel Y based on the image direction information of the image direction determination unit 104 by the following formulas (13) to (15). ) To calculate.
When the minimum direction change is the vertical scanning direction, R ave (x, y) = (R 8 (x−1, y−1) + R 8 (x−1, y + 1) + R 8 (x + 1, y−1) + R 8 (x + 1, y + 1)) / 4 (13)
G ave (x, y) = (G 8 (x, y−1) + G 8 (x, y + 1)) / 2
B ave (x, y) = (B 8 (x, y−2) + B 8 (x, y + 2)) / 2
When the minimum direction change is 45 degrees diagonally, R ave (x, y) = (R 8 (x−1, y−1) + R 8 (x + 1, y + 1)) / 2 (14)
G ave (x, y) = (G 8 (x, y−1) + G 8 (x−2, y−1) + G 8 (x, y + 1) + G 8 (x + 2, y + 1)) / 4
B ave (x, y) = (B 8 (x−2, y−2) + B 8 (x + 2, y + 2)) / 2
When the minimum direction change is 135 degrees diagonally R ave (x, y) = (R 8 (x + 1, y−1) + R 8 (x−1, y + 1)) / 2 (15)
G ave (x, y) = (G 8 (x, y−1) + G 8 (x + 2, y−1) + G 8 (x, y + 1) + G 8 (x−2, y + 1)) / 4
B ave (x, y) = (B 8 (x + 2, y−2) + B 8 (x−2, y + 2)) / 2
The first pixel value calculation unit 105 uses the calculated R ave , G ave, and B ave to calculate the average white component W ave (x, y) using Equation (7) as in step S14. calculate.

一方、第1の画素値算出部105は、同時に、各AF画素X及び各AF画素Yの画素値を用いて、各AF画素Yにおける白色成分W(x,y)を、次式(16)を用いて求める。
(x,y)=Y(x,y)+(X(x−1,y)+X(x+1,y))/2 …(16)
以上において求めた値から、第1の画素値算出部105は、各AF画素YにおけるB成分で8ビット精度の第1の画素値B1(x,y)を、
B1(x,y)=Bave(x,y)+W(x,y)/Wave(x,y) …(17)
の式(17)を用いて算出する。第1の画素値算出部105は、ステップS14の結果と合わせて、ビット誤差抑制部108へ8ビット精度の第1の画素値G1及びB1を転送する。
On the other hand, the first pixel value calculation unit 105 simultaneously calculates the white component W 8 (x, y) in each AF pixel Y using the pixel values of each AF pixel X and each AF pixel Y by the following formula (16 ).
W 8 (x, y) = Y 8 (x, y) + (X 8 (x−1, y) + X 8 (x + 1, y)) / 2 (16)
From the values obtained above, the first pixel value calculation unit 105 calculates the first pixel value B1 (x, y) with 8-bit accuracy with the B component in each AF pixel Y,
B1 (x, y) = B ave (x, y) + W 8 (x, y) / W ave (x, y) (17)
This is calculated using equation (17). The first pixel value calculation unit 105 transfers the first pixel values G1 and B1 with 8-bit accuracy to the bit error suppression unit 108 together with the result of step S14.

ステップS16:画像処理部12の第2の画素値算出部107は、元の14ビット精度の画像データとともに、ステップS13で求めた画像方向判定部104の画像方向情報に基づいて、各AF画素XにおけるG成分で14ビット精度の第2の画素値G2を、次式(18)〜(20)のいずれかを用いて算出する。
・最小の方向変動が垂直走査方向の場合
G2(x,y)=(G14(x−1,y−1)+G14(x−1,y+1)+G14(x+1,y−1)+G14(x+1,y+1))/4 …(18)
・最小の方向変動が斜め45度の場合
G2(x,y)=(G14(x−1,y−1)+G14(x+1,y+1))/2 …(19)
・最小の方向変動が斜め135度の場合
G2(x,y)=(G14(x+1,y−1)+G14(x−1,y+1))/2 …(20)
ステップS17:第2の画素値算出部107は、ステップS16と同様に、元の14ビット精度の画像データとともに、ステップS13で求めた画像方向判定部104の画像方向情報に基づいて、各AF画素YにおけるB成分で14ビット精度の第2の画素値B2を、次式(21)〜(23)のいずれかを用いて算出する。第2の画素値算出部107は、ステップS16の結果と合わせて、ビット誤差抑制部108へ14ビット精度の第2の画素値G2及びB2を転送する。
・最小の方向変動が垂直走査方向の場合
B2(x,y)=(B14(x,y−2)+B14(x,y+2))/2 …(21)
・最小の方向変動が斜め45度の場合
B2(x,y)=(B14(x−2,y−2)+B14(x+2,y+2))/2 …(22)
・最小の方向変動が斜め135度の場合
B2(x,y)=(B14(x+2,y−2)+B14(x−2,y+2))/2 …(23)
ステップS18:画像処理部12のビット誤差抑制部108は、まず各AF画素XにおけるG成分の画素値を、第1の画素値G1と第2の画素値G2とを用いて求める。具体的には、各AF画素Xの第1の画素値G1(x,y)を64倍して、14ビット精度の画素値G1′(x,y)を算出する。ビット誤差抑制部108は、
ΔG14(x,y)=G2(x,y)−G1′(x,y) …(24)
の式(24)を用いて、第2の画素値G2と64倍して14ビット精度の画素値にした第1の画素値G1′との差を求める。ビット誤差抑制部108は、ΔG14(x,y)を0〜63の範囲にクリップする。即ち、ΔG14(x,y)が0以下なら0に、63以上なら63に、及び0〜63の範囲以内ならそのままの値にする。ビット誤差抑制部108は、各AF画素Xの画素位置におけるG成分で14ビット精度の画素値G(x,y)を、次式(25)のように求める。
(x,y)=G1′(x,y)+ΔG14(x,y) …(25)
ステップS19:ビット誤差抑制部108は、次に各AF画素Yにおける画素値を、第1の画素値B1と第2の画素値B2とを用いて求める。ステップS18と同様にして、各AF画素Yの第1の画素値B1(x,y)を64倍して、14ビット精度の画素値B1′(x,y)を算出する。ビット誤差抑制部108は、
ΔB14(x,y)=B2(x,y)−B1′(x,y) …(26)
の式(26)を用いて、第2の画素値B2と64倍して14ビット精度の画素値にした第1の画素値B1′との差を求める。ビット誤差抑制部108は、ΔB14(x,y)を0〜63の範囲にクリップして、各AF画素Yの補正されたB成分で14ビット精度の画素値B(x,y)を、次式(27)のように求める。
(x,y)=B1′(x,y)+ΔB14(x,y) …(27)
ビット誤差抑制部108は、ステップS18の結果と合わせて、代入部109へ各AF画素における14ビット精度の画素値G及びBを転送する。
Step S16: The second pixel value calculation unit 107 of the image processing unit 12 sets each AF pixel X based on the image direction information of the image direction determination unit 104 obtained in step S13 together with the original 14-bit precision image data. A second pixel value G2 having a 14-bit accuracy with the G component at is calculated using one of the following equations (18) to (20).
When the minimum direction change is the vertical scanning direction, G2 (x, y) = (G 14 (x-1, y-1) + G 14 (x-1, y + 1) + G 14 (x + 1, y-1) + G 14 (X + 1, y + 1)) / 4 (18)
When the minimum direction change is 45 degrees, G2 (x, y) = (G 14 (x−1, y−1) + G 14 (x + 1, y + 1)) / 2 (19)
When the minimum direction change is oblique 135 degrees G2 (x, y) = (G 14 (x + 1, y−1) + G 14 (x−1, y + 1)) / 2 (20)
Step S17: Similar to step S16, the second pixel value calculation unit 107 sets each AF pixel based on the image direction information of the image direction determination unit 104 obtained in step S13 together with the original 14-bit precision image data. A second pixel value B2 of 14-bit accuracy with a B component in Y is calculated using one of the following equations (21) to (23). The second pixel value calculation unit 107 transfers the second pixel values G2 and B2 with 14-bit accuracy to the bit error suppression unit 108 together with the result of step S16.
When the minimum direction change is the vertical scanning direction B2 (x, y) = (B 14 (x, y−2) + B 14 (x, y + 2)) / 2 (21)
When the minimum direction change is 45 degrees diagonally B2 (x, y) = (B 14 (x−2, y−2) + B 14 (x + 2, y + 2)) / 2 (22)
When the minimum direction change is oblique 135 degrees B2 (x, y) = (B 14 (x + 2, y−2) + B 14 (x−2, y + 2)) / 2 (23)
Step S18: First, the bit error suppression unit 108 of the image processing unit 12 obtains the pixel value of the G component in each AF pixel X using the first pixel value G1 and the second pixel value G2. Specifically, the first pixel value G1 (x, y) of each AF pixel X is multiplied by 64 to calculate a 14-bit precision pixel value G1 ′ (x, y). The bit error suppression unit 108
ΔG 14 (x, y) = G 2 (x, y) −G 1 ′ (x, y) (24)
Using the equation (24), the difference between the second pixel value G2 and the first pixel value G1 ′ obtained by multiplying the second pixel value G2 by 64 and obtaining a pixel value with 14-bit accuracy is obtained. The bit error suppression unit 108 clips ΔG 14 (x, y) in the range of 0 to 63. That is, if ΔG 14 (x, y) is 0 or less, it is 0, if it is 63 or more, it is 63, and if it is within the range of 0 to 63, it is left as it is. The bit error suppression unit 108 obtains a 14-bit accurate pixel value G X (x, y) as a G component at the pixel position of each AF pixel X as in the following equation (25).
G X (x, y) = G 1 ′ (x, y) + ΔG 14 (x, y) (25)
Step S19: Next, the bit error suppression unit 108 obtains the pixel value in each AF pixel Y by using the first pixel value B1 and the second pixel value B2. Similarly to step S18, the first pixel value B1 (x, y) of each AF pixel Y is multiplied by 64 to calculate a 14-bit precision pixel value B1 ′ (x, y). The bit error suppression unit 108
ΔB 14 (x, y) = B 2 (x, y) −B 1 ′ (x, y) (26)
Using the equation (26), the difference between the second pixel value B2 and the first pixel value B1 ′ obtained by multiplying the second pixel value B2 by 64 and obtaining a pixel value with 14-bit accuracy is obtained. The bit error suppression unit 108 clips ΔB 14 (x, y) in the range of 0 to 63, and uses the corrected B component of each AF pixel Y to obtain a pixel value B Y (x, y) with 14-bit accuracy. The following equation (27) is obtained.
B Y (x, y) = B1 ′ (x, y) + ΔB 14 (x, y) (27)
Bit error suppression unit 108, together with the results of step S18, and transfers the pixel values G X and B Y of 14 bit precision of each AF pixel to cash join the club 109.

ステップS20:画像処理部12の代入部109は、ステップS18及びステップS19で求めた各AF画素における14ビット精度の画素値G及びBを、元の14ビット精度の画像データで、各AF画素の位置での画素値として代入して、完全なベイヤ配列の画像に補正された14ビット精度の画像データを生成する。 Step S20: The cash join the club 109 of the image processing unit 12, a pixel value G X and B Y of 14 bit precision of each AF pixel determined in step S18 and step S19, the image data of the original 14-bit precision, the AF By substituting as a pixel value at the pixel position, image data with 14-bit accuracy corrected to a complete Bayer array image is generated.

ステップS21:画像処理部12の他の画像処理部110は、ステップS20で補正された14ビット精度の画像データに対して、他の補間処理、輪郭強調処理やホワイトバランス補正等の画像処理を行うとともに、JPEG形式やYUV形式等のファイルにして、バス13とカードI/F6とを介して、カードメモリ7や記憶部9に記録して、一連の作業を終了する。   Step S21: The other image processing unit 110 of the image processing unit 12 performs other interpolation processing, contour enhancement processing, white balance correction, and other image processing on the 14-bit precision image data corrected in step S20. At the same time, a file in JPEG format, YUV format or the like is recorded in the card memory 7 or the storage unit 9 via the bus 13 and the card I / F 6 to complete a series of operations.

このように本実施形態では、電子カメラ10で撮像された画像データを、低ビット画像生成部101によって、8ビット精度の画像データを生成し、その8ビット精度の画像データに基づいて、補正すべきAF画素における8ビット精度の画素値を算出するとともに、ビット誤差抑制部108において、元の14ビット精度の画像データから算出した画素値との差分に基づいて、8ビット精度の画素値から元の14ビット精度に戻す際に生じるビット誤差を抑制することによって、電子カメラ10の回路規模を抑制することができる。   As described above, in the present embodiment, the low-bit image generation unit 101 generates 8-bit precision image data from the image data captured by the electronic camera 10 and corrects the image data based on the 8-bit precision image data. In addition to calculating the 8-bit precision pixel value in the power AF pixel, the bit error suppression unit 108 calculates the original pixel value from the 8-bit precision pixel value based on the difference from the pixel value calculated from the original 14-bit precision image data. The circuit scale of the electronic camera 10 can be suppressed by suppressing the bit error that occurs when the 14-bit accuracy is restored.

また、第1の画素値算出部105が、まず、8ビット精度の画像データを用いて、AF画素の周囲の撮像画素の画素値をから、各AF画素におけるG成分又はB成分の画素値を求めているが、細い線構造の被写体の光学像がちょうどAF画素の位置に結像した場合、周囲の画素から求めたG成分とB成分の画素値は、線構造をきちんと解像できない。その問題を解決するため、周囲の撮像画素の画素値を用いて求めた周囲のW成分と、AF画素の画素値を用いて求めたW成分とを用いて、周囲の光量に対するAF画素位置の光量の比率を求め、それを周囲の撮像画素から求めたG成分及びB成分の画素値の平均値にかけることにより(式(12)及び式(17))、AF画素位置の光量が周囲とは異なる場合であっても、その位置のG成分及びB成分の光量を精度良く算出することができる。   Further, the first pixel value calculation unit 105 first uses the image data of 8-bit accuracy to determine the pixel value of the imaging pixel around the AF pixel, and the pixel value of the G component or B component in each AF pixel. However, when the optical image of a subject having a thin line structure is formed at the position of the AF pixel, the G component and B component pixel values obtained from the surrounding pixels cannot accurately resolve the line structure. In order to solve the problem, the surrounding W component obtained using the pixel value of the surrounding imaging pixel and the W component obtained using the pixel value of the AF pixel are used to determine the AF pixel position with respect to the surrounding light amount. By calculating the ratio of the amount of light and multiplying it by the average value of the pixel values of the G and B components obtained from the surrounding imaging pixels (Equation (12) and Equation (17)), the amount of light at the AF pixel position is Even if they are different, it is possible to accurately calculate the light amounts of the G component and B component at that position.

また、第2の画素値算出部107は、14ビット精度の画像データを処理して14ビット精度で各AF画素の位置でのG成分又はB成分の画素値を算出するので、従来の画像処理を行うならば、第1の画素値算出部105での処理も14ビット精度で行う必要がある。しかしながら、そのような複雑な演算を全て14ビット精度で行う回路を生産するためにはコストがかかってしまう。そこで、本実施形態では、8ビット精度で行う第1の画素値算出部105による処理を導入することにより、コストを大幅に抑制することが可能となる。   In addition, the second pixel value calculation unit 107 processes the image data with 14-bit accuracy and calculates the pixel value of the G component or the B component at the position of each AF pixel with 14-bit accuracy. If it is to be performed, the processing in the first pixel value calculation unit 105 must also be performed with 14-bit accuracy. However, it is costly to produce a circuit that performs all such complex operations with 14-bit accuracy. Therefore, in this embodiment, the cost can be significantly reduced by introducing the processing by the first pixel value calculation unit 105 performed with 8-bit accuracy.

ただし、低ビット化するときに64で割って小数を切り捨てたことに起因するビット誤差により、第1の画素値B1に64をかけて14ビットの精度に戻した画素値は、適正値よりも0〜63程度小さくなる。そして、画像が平坦な領域ではこの程度のビット誤差でも目立つ場合がある。そこで、本発明ではその不具合を抑制するために、第2の画素値算出部107とビット誤差抑制部108とを追加した。つまり、第2の画素値算出部107は、14ビット精度で演算を行うが、周囲の2画素の平均を求めるだけの単純な演算なので回路規模は小さくて済む。細い線構造がちょうどAF画素位置にある場合には、第2の画素値G2及びB2は正しくないが、画像が平坦な領域では正しい値となる。また、ビット誤差抑制部108は、14ビット精度の第1の画素値G1′及びB1′を0〜63の範囲で第2の画素値G2及びB2に近づくように補正した値を、各AF画素の画素値として出力する。この処理によると、画像が平坦な領域では、第2の画素値に近い値が画素値として出力されるので正しい結果が得られる。一方、細い線構造がAF画素の位置にある場合では、その構造のコントラストが63以内の範囲で失われた値が画素値として算出されるが、この程度の微小なコントラストの消失(全階調の256分の1)はほとんど問題にならない。   However, due to the bit error caused by dividing the decimal by dividing by 64 when the bit is reduced, the pixel value obtained by multiplying the first pixel value B1 by 64 and returning to the 14-bit accuracy is less than the appropriate value. It becomes small about 0-63. In a flat image area, even a bit error of this level may be noticeable. Therefore, in the present invention, a second pixel value calculation unit 107 and a bit error suppression unit 108 are added to suppress the problem. That is, the second pixel value calculation unit 107 performs the calculation with 14-bit accuracy, but the circuit scale is small because it is a simple calculation that simply obtains the average of two surrounding pixels. When the thin line structure is just at the AF pixel position, the second pixel values G2 and B2 are not correct, but are correct in a region where the image is flat. Further, the bit error suppression unit 108 corrects the first pixel values G1 ′ and B1 ′ with 14-bit accuracy so as to approach the second pixel values G2 and B2 in the range of 0 to 63, for each AF pixel. Are output as pixel values. According to this processing, in a region where the image is flat, a value close to the second pixel value is output as the pixel value, so that a correct result can be obtained. On the other hand, when the thin line structure is at the position of the AF pixel, a value that is lost when the contrast of the structure is within 63 is calculated as the pixel value. 1/256) is hardly a problem.

なお、画像方向判定部104が求めた画像方向情報に応じて画素値を算出することにより、公知のように画素値を精度良く計算できるが、本実施形態では第2の画素値算出部107の処理において、第1の画素値算出部105で参照した画像方向情報を共通して参照することにより、画像方向情報を有効に活用している。
≪他の実施形態≫
本発明の他の実施形態に係る電子カメラは、一の実施形態に係る電子カメラ10と同じである。したがって、本実施形態における電子カメラとして、図1に示す一の実施形態と同じ電子カメラ10を用い、各構成要素についての詳細な説明は省略する。
Note that, by calculating the pixel value according to the image direction information obtained by the image direction determination unit 104, the pixel value can be calculated with high accuracy as is well known, but in the present embodiment, the second pixel value calculation unit 107 In the processing, the image direction information referred to by the first pixel value calculation unit 105 is referred to in common, thereby effectively utilizing the image direction information.
<< Other Embodiments >>
An electronic camera according to another embodiment of the present invention is the same as the electronic camera 10 according to one embodiment. Therefore, the same electronic camera 10 as that of the first embodiment shown in FIG. 1 is used as the electronic camera in the present embodiment, and a detailed description of each component is omitted.

また、本実施形態に係る電子カメラ10の画像処理の手順についても、図3のCPU5に基づいた記憶部9と画像処理部12とにおける画像データのフロー、及び図4に示すステップS10〜ステップS21のフローチャートと基本的に同じである。ただし、本実施形態における電子カメラ10が、一の実施形態の場合と異なる点は、以下の通りである。   Also for the image processing procedure of the electronic camera 10 according to the present embodiment, the flow of image data in the storage unit 9 and the image processing unit 12 based on the CPU 5 in FIG. 3 and steps S10 to S21 shown in FIG. This is basically the same as the flowchart of FIG. However, the electronic camera 10 in the present embodiment is different from the case of the first embodiment as follows.

1)本実施形態のステップS11における、画像処理部12の低ビット画像生成部101が、14ビット精度の画像データから8ビット精度の画像データを生成するにあたり、8ビット精度の画素値=2×(14ビット精度の画素値)1/2のようにガンマ変換によって行われる。 1) When the low-bit image generation unit 101 of the image processing unit 12 generates 8-bit precision image data from the 14-bit precision image data in step S11 of this embodiment, the 8-bit precision pixel value = 2 × (14-bit precision pixel value) Gamma conversion is performed as in 1/2 .

2)上記ステップS11におけるガンマ変換処理に伴い、ステップS15及びステップS16において、各AF画素におけるG成分及びB成分で8ビット精度の第1の画素値G1及びB1を求めるための式(12)及び式(17)が、それぞれ次式(12)′及び式(17)′に変形される。
G1(x,y)=Gave(x,y)+W(x,y)−Wave(x,y) …(12)′
B1(x,y)=Bave(x,y)+W(x,y)−Wave(x,y) …(17)′
即ち、一の実施形態では、掛け算と割り算で行っていた処理を、本実施形態では足し算と引き算になっている。これは、公知のようにガンマ特性を有する画素値の足し算や引き算は、線形特性を有する画素値の掛け算や割り算に対応するからである。なお、本実施形態でも、64で割った際に、小数点以下を切り捨てるが、四捨五入しても良いし、切り上げても良い。
2) Along with the gamma conversion processing in step S11, in steps S15 and S16, the formula (12) for obtaining first pixel values G1 and B1 with 8-bit accuracy with the G component and B component in each AF pixel and Expression (17) is transformed into the following expressions (12) ′ and (17) ′, respectively.
G1 (x, y) = G ave (x, y) + W 8 (x, y) −W ave (x, y) (12) ′
B1 (x, y) = B ave (x, y) + W 8 (x, y) −W ave (x, y) (17) ′
That is, in the present embodiment, the processing performed by multiplication and division is addition and subtraction in this embodiment. This is because, as is well known, addition and subtraction of pixel values having gamma characteristics correspond to multiplication and division of pixel values having linear characteristics. In this embodiment as well, when it is divided by 64, the decimal part is rounded down, but it may be rounded off or rounded up.

3)同じく上記ステップS11におけるガンマ変換処理に伴い、ステップS18及びステップS19において、ビット誤差抑制部108は、各AF画素における画素値を、第1の画素値G1又はB1と第2の画素値G2又はB2とから求めるにあたり、各AF画素の第1の画素値G1及びB1から14ビット精度の画素値G1′(x,y)及びB1′(x,y)を、次式(28)及び次式(29)を用いて算出する。
G1′(x,y)=G1(x,y)×G1(x,y)/4 …(28)
B1′(x,y)=B1(x,y)×B1(x,y)/4 …(29)
これとともに、式(24)にて算出されるΔG14のクリップされる範囲が、0〜G1(x,y)/2に、式(26)にて算出されるΔB14のクリップされる範囲が、0〜B1(x,y)/2にそれぞれ変更される。
3) Similarly, in step S18 and step S19 following the gamma conversion processing in step S11, the bit error suppression unit 108 determines the pixel value in each AF pixel as the first pixel value G1 or B1 and the second pixel value G2. Alternatively, when obtaining from B2, the first pixel value G1 and the B1 pixel values G1 ′ (x, y) and B1 ′ (x, y) of each AF pixel are obtained from the following equation (28) and It calculates using Formula (29).
G1 ′ (x, y) = G1 (x, y) × G1 (x, y) / 4 (28)
B1 ′ (x, y) = B1 (x, y) × B1 (x, y) / 4 (29)
At the same time, the clipping range of ΔG 14 calculated by Expression (24) is 0 to G1 (x, y) / 2, and the clipping range of ΔB 14 calculated by Expression (26) is the same. , 0 to B1 (x, y) / 2, respectively.

このように本実施形態では、電子カメラ10で撮像された画像データを、低ビット画像生成部101によって、8ビット精度の画像データを生成し、その8ビット精度の画像データに基づいて、補正すべきAF画素における8ビット精度の画素値を算出するとともに、ビット誤差抑制部108において、元の14ビット精度の画像データから算出した画素値との差分に基づいて、8ビット精度の画素値から元の14ビット精度に戻す際に生じるビット誤差を抑制することによって、電子カメラ10の回路規模を抑制することができる。   As described above, in the present embodiment, the low-bit image generation unit 101 generates 8-bit precision image data from the image data captured by the electronic camera 10 and corrects the image data based on the 8-bit precision image data. In addition to calculating the 8-bit precision pixel value in the power AF pixel, the bit error suppression unit 108 calculates the original pixel value from the 8-bit precision pixel value based on the difference from the pixel value calculated from the original 14-bit precision image data. The circuit scale of the electronic camera 10 can be suppressed by suppressing the bit error that occurs when the 14-bit accuracy is restored.

また、低ビット画像生成部101において、14ビット精度の画像を8ビット精度の画像に変換する際、ガンマ変換を行ってからビット精度を落としている。そうすることにより、暗い(画素値が小さい)画像領域ではビット誤差が小さく、明るい(画素値が大きい)画像領域ではビット誤差が大きくなる。それに対応して、ビット誤差の補正量(クリッピング後のΔGとΔB)は暗い画像領域では小さくなり、コントラストの消失も暗い画像領域では小さくなる。人間の視覚は、暗い画像領域では微小な光量の変化を感知するので、暗い画像領域におけるコントラストの消失を小さく抑えればコントラストの消失を感知しにくくなる。
≪実施形態の補足事項≫
一の実施形態及び他の実施形態では、ビット誤差の補正値を求める処理で、第2の画素値G2又はB2と14ビット精度にした第1の画素値G1′又はB1′との差が所定範囲外(ビット誤差の範囲外)の場合には、0以下の場合には補正量を0に、63、G(x,y)/2又はB(x,y)/2以上の場合には、補正量を63、G(x,y)/2又はB(x,y)/2の値に設定したが、本発明はこれに限定されず、例えば、差が所定範囲外の値の場合には、補正量を全て0に設定し、差が所定範囲内の場合にはその差を補正値としても良い。そうすることによって、補正箇所のコントラストが充分高い場合には、差が所定範囲外になることによってコントラストの消失を避けることができる。
In addition, when converting a 14-bit precision image into an 8-bit precision image in the low bit image generation unit 101, the bit precision is lowered after performing gamma conversion. By doing so, the bit error is small in a dark (small pixel value) image region, and the bit error is large in a bright (large pixel value) image region. Correspondingly, the correction amount of bit error (ΔG and ΔB after clipping) is small in the dark image region, and the loss of contrast is also small in the dark image region. Human vision senses a minute change in the amount of light in a dark image region, so that it is difficult to detect the loss of contrast if the loss of contrast in the dark image region is kept small.
≪Supplementary items for the embodiment≫
In one embodiment and another embodiment, the difference between the second pixel value G2 or B2 and the first pixel value G1 ′ or B1 ′ having a 14-bit precision is predetermined in the process of obtaining the bit error correction value. In the case of out of range (out of bit error range), the correction amount is set to 0 when 0 or less, and when 63, G (x, y) / 2 or B (x, y) / 2 or more. The correction amount is set to 63, G (x, y) / 2 or B (x, y) / 2, but the present invention is not limited to this. For example, when the difference is a value outside the predetermined range Alternatively, all the correction amounts may be set to 0, and if the difference is within a predetermined range, the difference may be used as a correction value. By doing so, when the contrast of the correction portion is sufficiently high, the loss of contrast can be avoided by the difference being outside the predetermined range.

なお、一の実施形態及び他の実施形態では、補正係数記憶部106に記憶される補正係数KR、KG及びKBの値は、0.5〜1.2の1前後の値となるとしたが、本発明はこれに限定されず、任意の補正係数の値を状況に応じて適宜用いることができる。   In one embodiment and other embodiments, the values of the correction coefficients KR, KG, and KB stored in the correction coefficient storage unit 106 are about 1 to 0.5 to 1.2. The present invention is not limited to this, and any correction coefficient value can be appropriately used depending on the situation.

なお、一の実施形態及び他の実施形態では、撮像された画像データは14ビット精度を有し、低ビット画像生成部101によって生成される画像データは8ビット精度を有する場合について説明したが、本発明はこれに限定されない。撮像された画像のビット精度よりも第1の画素値算出部105の処理のビット精度を低くし、第2の画素値算出部107の演算精度を第1の画素値算出部105の処理のビット精度よりも高くすることにより、本発明の効果を得ることができる。   In one embodiment and other embodiments, the case has been described in which captured image data has 14-bit precision and image data generated by the low-bit image generation unit 101 has 8-bit precision. The present invention is not limited to this. The bit accuracy of the process of the first pixel value calculation unit 105 is made lower than the bit accuracy of the captured image, and the calculation accuracy of the second pixel value calculation unit 107 is set to be a bit of the process of the first pixel value calculation unit 105. By making it higher than the accuracy, the effect of the present invention can be obtained.

なお、一の実施形態及び他の実施形態では、AF画素の位置における画素値を算出する手順について説明したが、本発明はそれに限定されない。画素欠陥の補正や間引き読み出しによる動画のフレーム画像毎の補正など、画像を局所的に補正する処理全般について、本発明を適用することができる。なお、そのような場合において、補正対象の撮像画素の位置情報を、記憶部9の位置情報記憶部103に記憶させるようにすることが好ましい。   In the embodiment and the other embodiments, the procedure for calculating the pixel value at the position of the AF pixel has been described, but the present invention is not limited thereto. The present invention can be applied to all processes for locally correcting an image, such as correction of pixel defects and correction for each frame image of a moving image by thinning readout. In such a case, it is preferable to store the position information of the imaging pixel to be corrected in the position information storage unit 103 of the storage unit 9.

なお、一の実施形態及び他の実施形態では、AF画素の各々は左側又は右側からの光束を瞳分割する焦点検出用画素としたが、本発明はこれに限定されず、1つのAF画素で左側及び右側からの光束を瞳分割する焦点検出用画素でも良い。   In one embodiment and other embodiments, each AF pixel is a focus detection pixel that divides a light flux from the left side or the right side into pupils. However, the present invention is not limited to this, and one AF pixel is used. Focus detection pixels that divide the light flux from the left side and the right side into pupils may be used.

なお、一の実施形態及び他の実施形態では、電子カメラ10の場合について説明したが、本発明はこれに限定されず、図1において、撮像レンズ1、撮像素子2及びA/D変換部3を除いて、電子カメラ等で撮像された画像を読み込む入力部を設けた画像処理装置に対しても適応可能である。   In one embodiment and another embodiment, the case of the electronic camera 10 has been described. However, the present invention is not limited to this, and in FIG. 1, the imaging lens 1, the imaging element 2, and the A / D conversion unit 3. The image processing apparatus can be applied to an image processing apparatus provided with an input unit for reading an image captured by an electronic camera or the like.

なお、本発明に係る画像処理装置における処理をコンピュータで実現するためのプログラムに対しても適用可能である。   Note that the present invention can also be applied to a program for realizing the processing in the image processing apparatus according to the present invention by a computer.

本発明は、その精神またはその主要な特徴から逸脱することなく他の様々な形で実施することができる。そのため、上述した実施形態はあらゆる点で単なる例示に過ぎず、限定的に解釈されてはならない。さらに、特許請求の範囲の均等範囲に属する変形や変更は、全て本発明の範囲内である。   The present invention can be implemented in various other forms without departing from the spirit or main features thereof. For this reason, the above-described embodiment is merely an example in all respects and should not be construed in a limited manner. Further, all modifications and changes belonging to the equivalent scope of the claims are within the scope of the present invention.

1 撮像レンズ、2 撮像素子、3 A/D変換部、4 バッファメモリ、5 CPU、6 カードI/F、7 カードメモリ、8 操作部材、9 記憶部、10 電子カメラ、11 表示部、12 画像処理部、13 バス、101 低ビット画像生成部、102 AF画素位置設定部、103 位置情報記憶部、104 画像方向判定部、105 第1の画素値算出部、106 補正係数記憶部、107 第2の画素値算出部、108 ビット誤差抑制部、109 代入部、110 他の画像処理部 DESCRIPTION OF SYMBOLS 1 Imaging lens, 2 Imaging device, 3 A / D conversion part, 4 Buffer memory, 5 CPU, 6 Card I / F, 7 Card memory, 8 Operation member, 9 Storage part, 10 Electronic camera, 11 Display part, 12 Image Processing unit, 13 bus, 101 low bit image generation unit, 102 AF pixel position setting unit, 103 position information storage unit, 104 image direction determination unit, 105 first pixel value calculation unit, 106 correction coefficient storage unit, 107 second Pixel value calculation unit, 108-bit error suppression unit, 109 substitution unit, 110 other image processing unit

特開2007−282109号公報JP 2007-282109 A

Claims (11)

原画像データのビット精度よりも低いビット精度の第1の画像データを算出し、前記第1の画像データの処理対象画素の周辺の画素の画素値を用いて、前記処理対象画素の第1の画素値を算出する第1の画素値算出部と、
前記原画像データの前記処理対象画素の周辺の画素の画素値を用いて、前記処理対象画素の第2の画素値を算出する第2の画素値算出部と、
前記第1の画素値と前記第2の画素値とから求めた補正値を、前記第1の画素値に付加するビット誤差抑制部と、
を備えることを特徴とする画像処理装置。
First image data having a bit accuracy lower than the bit accuracy of the original image data is calculated, and the pixel values of the pixels around the processing target pixel of the first image data are used to calculate the first image data of the processing target pixel. A first pixel value calculation unit for calculating a pixel value;
A second pixel value calculation unit that calculates a second pixel value of the processing target pixel using pixel values of pixels around the processing target pixel of the original image data;
A bit error suppression unit that adds a correction value obtained from the first pixel value and the second pixel value to the first pixel value;
An image processing apparatus comprising:
請求項1に記載の画像処理装置において、
前記補正値は、所定範囲内の補正値であることを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The image processing apparatus according to claim 1, wherein the correction value is a correction value within a predetermined range.
請求項2に記載の画像処理装置において、
前記所定範囲は、前記第1の画像データのビット精度に基づいて設定されることを特徴とする画像処理装置。
The image processing apparatus according to claim 2,
The image processing apparatus according to claim 1, wherein the predetermined range is set based on bit accuracy of the first image data.
請求項2から3のいずれか1項に記載の画像処理装置において、
前記ビット誤差抑制部は、
前記処理対象画素における前記第2の画素値と前記第1の画素値との差を前記所定範囲内にクリップした値を前記補正値とする
ことを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 2 to 3,
The bit error suppression unit is
An image processing apparatus, wherein a value obtained by clipping a difference between the second pixel value and the first pixel value in the processing target pixel within the predetermined range is used as the correction value.
請求項2から3のいずれか1項に記載の画像処理装置において、
前記ビット誤差抑制部は、
前記処理対象画素における前記第2の画素値と前記第1の画素値との差を求め、前記差が所定範囲内ではない場合には前記補正値を0に設定し、前記差が所定範囲内の場合には前記差を前記補正値とする
ことを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 2 to 3,
The bit error suppression unit is
A difference between the second pixel value and the first pixel value in the processing target pixel is obtained, and when the difference is not within a predetermined range, the correction value is set to 0, and the difference is within the predetermined range. In the case of the image processing apparatus, the difference is set as the correction value.
請求項1から5のいずれか1項に記載の画像処理装置において、
前記第1の画素値算出部は、前記第1の画像データを前記原画像データに対してガンマ変換することによって算出することを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 5,
The image processing apparatus according to claim 1, wherein the first pixel value calculation unit calculates the first image data by performing gamma conversion on the original image data.
請求項1から6のいずれか1項に記載の画像処理装置において、
前記第1の画像データに基づいて、前記処理対象画素の周辺における画素値分布に関する方向を判定する画像方向判定部をさらに備え、
前記第1の画素値算出部及び前記第2の画素値算出部は、前記画像方向判定部による方向を参照して、前記処理対象画素における前記第1の画素値及び前記第2の画素値を算出する
ことを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 6,
An image direction determination unit that determines a direction related to a pixel value distribution around the processing target pixel based on the first image data;
The first pixel value calculation unit and the second pixel value calculation unit refer to the direction by the image direction determination unit, and calculate the first pixel value and the second pixel value in the processing target pixel. An image processing apparatus characterized by calculating.
請求項1から6のいずれか1項に記載の画像処理装置において、
前記処理対象画素は、異常な画素値を出力する撮像画素、又は焦点検出用画素であることを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 6,
The image processing apparatus, wherein the processing target pixel is an imaging pixel that outputs an abnormal pixel value or a focus detection pixel.
請求項1から6のいずれか1項に記載の画像処理装置において、
撮像素子によって撮像された前記原画像データを受け付ける入力部と、
前記処理対象画素の位置情報を記憶する位置情報記憶部と、
をさらに備えることを特徴とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 6,
An input unit that receives the original image data captured by the image sensor;
A position information storage unit for storing position information of the processing target pixel;
An image processing apparatus further comprising:
撮像素子と、
請求項9に記載の画像処理装置と、
を備えることを特徴とする撮像装置。
An image sensor;
An image processing device according to claim 9;
An imaging apparatus comprising:
請求項1から9のいずれか1項に記載の画像処理装置の処理をコンピュータで実現するための画像処理プログラム。   The image processing program for implement | achieving the process of the image processing apparatus of any one of Claim 1 to 9 with a computer.
JP2009005886A 2009-01-14 2009-01-14 Image processing apparatus, imaging apparatus, and image processing program Active JP5228929B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009005886A JP5228929B2 (en) 2009-01-14 2009-01-14 Image processing apparatus, imaging apparatus, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009005886A JP5228929B2 (en) 2009-01-14 2009-01-14 Image processing apparatus, imaging apparatus, and image processing program

Publications (2)

Publication Number Publication Date
JP2010166236A JP2010166236A (en) 2010-07-29
JP5228929B2 true JP5228929B2 (en) 2013-07-03

Family

ID=42582075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009005886A Active JP5228929B2 (en) 2009-01-14 2009-01-14 Image processing apparatus, imaging apparatus, and image processing program

Country Status (1)

Country Link
JP (1) JP5228929B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5818451B2 (en) 2011-02-09 2015-11-18 キヤノン株式会社 Imaging apparatus and control method
JP5740465B2 (en) * 2011-02-28 2015-06-24 富士フイルム株式会社 Imaging apparatus and defective pixel correction method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3830574B2 (en) * 1996-04-10 2006-10-04 松下電器産業株式会社 Defect correction device and solid-state imaging device using the same
JP3757484B2 (en) * 1996-09-03 2006-03-22 富士ゼロックス株式会社 Image processing device
US6876468B1 (en) * 2000-09-19 2005-04-05 Kabushiki Kaisha Toshiba Image processing apparatus that performs black coloring, gamma correction and tone processing
JP5028014B2 (en) * 2006-02-08 2012-09-19 株式会社日立ハイテクノロジーズ Pattern inspection method and apparatus
JP4935162B2 (en) * 2006-04-11 2012-05-23 株式会社ニコン Imaging apparatus, camera, and image processing method

Also Published As

Publication number Publication date
JP2010166236A (en) 2010-07-29

Similar Documents

Publication Publication Date Title
JP5200955B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5298638B2 (en) Image processing apparatus, imaging apparatus, correction coefficient calculation method, and image processing program
CN102870404B (en) Imaging device and dark current correction method of same
JP2003116060A (en) Correcting device for defective picture element
WO2006048962A1 (en) Pixel signal processor and pixel signal processing method
JP4992698B2 (en) Chromatic aberration correction apparatus, imaging apparatus, chromatic aberration calculation method, and chromatic aberration calculation program
TWI387353B (en) Pixel interpolation circuit, pixel interpolation method, and recording medium
JP5359553B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2004229055A (en) Image processor
JP5228929B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP5786355B2 (en) Defocus amount detection device and electronic camera
JP5353945B2 (en) Image processing apparatus, image processing program, and electronic camera
JP5631769B2 (en) Image processing device
JP5309940B2 (en) Image processing apparatus and imaging apparatus
JP5463871B2 (en) Image processing apparatus and electronic camera
JP5412945B2 (en) Imaging device, image processing apparatus, imaging apparatus, and image processing program
JP5159647B2 (en) Image processing apparatus and image processing method
JP2005086764A (en) Imaging apparatus and color data measuring method used for the imaging apparatus
JP5572992B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP4787403B2 (en) Automatic exposure apparatus and method
JP4769880B2 (en) Image processing apparatus and method
JP2009159404A (en) Image processing method, image processing device, and image formation device
JP2009164779A (en) Imaging apparatus
JP2009239974A (en) Automatic exposing device and method
JP5602825B2 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111227

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120627

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130213

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130304

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160329

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5228929

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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