JP2012100215A - Image processing device, imaging device, and image processing program - Google Patents
Image processing device, imaging device, and image processing program Download PDFInfo
- Publication number
- JP2012100215A JP2012100215A JP2010248602A JP2010248602A JP2012100215A JP 2012100215 A JP2012100215 A JP 2012100215A JP 2010248602 A JP2010248602 A JP 2010248602A JP 2010248602 A JP2010248602 A JP 2010248602A JP 2012100215 A JP2012100215 A JP 2012100215A
- Authority
- JP
- Japan
- Prior art keywords
- pixel
- image processing
- color
- image
- component
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、画像処理装置、撮像装置および画像処理プログラムに関する。 The present invention relates to an image processing device, an imaging device, and an image processing program.
従来、CCDやCMOSなどの撮像素子は、製造時または製造後に生じる傷などにより正常に動作しない受光素子を欠陥画素として有する。そうした欠陥画素を有する撮像素子によって撮像された画像は、欠陥画素により画質が低下してしまう。そこで、欠陥画素による画質低下を回避するための様々な技術が開発されている。 2. Description of the Related Art Conventionally, an image sensor such as a CCD or CMOS has a light receiving element that does not operate normally as a defective pixel due to scratches generated during or after manufacture. An image picked up by an image pickup device having such a defective pixel deteriorates in image quality due to the defective pixel. Thus, various techniques have been developed to avoid image quality degradation due to defective pixels.
例えば、欠陥画素を中心とする参照領域における画素値の変化を検出することにより、欠陥画素の画素値を補正するのに最適な方向を決定し、その方向に配置された画素対を参照領域内から選択して、欠陥画素の画素値を補正する技術がある(特許文献1など参照)。
For example, by detecting a change in the pixel value in the reference area centered on the defective pixel, the optimum direction for correcting the pixel value of the defective pixel is determined, and the pixel pair arranged in that direction is determined in the reference area. There is a technique of selecting from the above and correcting the pixel value of the defective pixel (see
ところで、赤色(R)、緑色(G)、青色(B)の3色のカラーフィルタが所定の位置に配置(例えば、ベイヤ配列など)された撮像素子で撮像された画像の各画素は、いずれか1つの色成分の色情報しか有しない。そこで、従来技術では、高画質化するために、欠陥画素の補間処理した後、各画素が3つ全ての色成分の色情報を有するように、空格子補間や色変換などの処理を行うが、処理に時間がかかるという問題がある。 By the way, each pixel of an image captured by an image sensor in which three color filters of red (R), green (G), and blue (B) are arranged at predetermined positions (for example, a Bayer array) is Or only one color component color information. Therefore, in the prior art, in order to improve the image quality, after performing interpolation processing of defective pixels, processing such as empty grid interpolation and color conversion is performed so that each pixel has color information of all three color components. There is a problem that processing takes time.
上記従来技術が有する問題に鑑み、本発明の目的は、欠陥画素の補正処理と高画質化の処理とを、高精度かつ高速に行うことができる技術を提供することにある。 In view of the above-described problems of the conventional technology, an object of the present invention is to provide a technology capable of performing defective pixel correction processing and high image quality processing with high accuracy and high speed.
上記課題を解決するために、本発明の画像処理装置は、各画素が複数の色成分のいずれか1つの色成分の色情報を有する第1画像の色情報を注目画素の画素位置で加重加算して注目画素の色成分と異なる色成分の値を算出し、各画素が複数の色成分を有する第2画像を生成する画像処理部と、第1画像における欠陥画素の画素位置の情報を記憶する記憶部と、を備え、画像処理部は、第1画像の色情報を注目画素の画素位置で加重加算する複数の係数パターンを用意し、注目画素の色成分および欠陥画素の画素位置に基づいて、係数パターンを選択し加重加算する。 In order to solve the above problems, the image processing apparatus according to the present invention weights and adds the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the target pixel. And calculating a value of a color component different from the color component of the pixel of interest and generating a second image in which each pixel has a plurality of color components, and storing information on the pixel position of the defective pixel in the first image And a storage unit, wherein the image processing unit prepares a plurality of coefficient patterns for weighted addition of the color information of the first image at the pixel position of the target pixel, and based on the color component of the target pixel and the pixel position of the defective pixel The coefficient pattern is selected and weighted.
本発明の画像処理装置は、各画素が複数の色成分のいずれか1つの色成分の色情報を有する第1画像の色情報を注目画素の画素位置で加重加算して注目画素の色成分と異なる色成分の値を算出し、各画素が複数の色成分を有する第2画像を生成する画像処理部を備え、第1画像は、欠陥画素の画素位置の情報が付加され、画像処理部は、第1画像の色情報を注目画素の画素位置で加重加算する複数の係数パターンを用意し、注目画素の色成分および欠陥画素の画素位置に基づいて、係数パターンを選択し加重加算する。 The image processing apparatus of the present invention weights and adds the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the pixel of interest, The image processing unit calculates a value of different color components and generates a second image in which each pixel has a plurality of color components. The first image is added with pixel position information of defective pixels, and the image processing unit A plurality of coefficient patterns for weighting and adding the color information of the first image at the pixel position of the target pixel are prepared, and the coefficient pattern is selected and weighted and added based on the color component of the target pixel and the pixel position of the defective pixel.
また、画像処理部は、注目画素の画素位置における複数の方向に対する類似性の強弱を判定し、注目画素の色成分および欠陥画素の画素位置とともに、その判定結果に基づいて、係数パターンを選択してもよい。 In addition, the image processing unit determines the strength of similarity in a plurality of directions at the pixel position of the target pixel, and selects a coefficient pattern based on the determination result together with the color component of the target pixel and the pixel position of the defective pixel. May be.
また、画像処理部は、注目画素に隣接する画素が欠陥画素である場合、隣接する画素の画素位置に基づいて、注目画素の画素位置における複数の方向に対する類似性の強弱を判定してもよい。 In addition, when the pixel adjacent to the target pixel is a defective pixel, the image processing unit may determine the strength of similarity in a plurality of directions at the pixel position of the target pixel based on the pixel position of the adjacent pixel. .
また、係数パターンは、注目画素の画素位置を中心に複数の色成分の色情報が含まれる最小の領域内の画素の色情報を加重加算する零以上の値からなってもよい。 In addition, the coefficient pattern may include a value of zero or more that weights and adds the color information of the pixels in the minimum region including the color information of a plurality of color components with the pixel position of the target pixel as the center.
本発明の画像処理装置は、各画素が複数の色成分のいずれか1つの色成分の色情報を有する第1画像の色情報を零以上の可変な係数により注目画素の画素位置で加重加算して注目画素の色情報と異なる色成分の値を算出し、各画素が複数の色成分を有する第2画像を生成する画像処理部と、第1画像における欠陥画素の画素位置の情報を記憶する記憶部と、を備え、画像処理部は、注目画素の色成分および欠陥画素の画素位置に基づいて係数を変え、注目画素の色情報と注目画素に隣接する画素の色情報とを加重加算する。 The image processing apparatus according to the present invention weights and adds the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the target pixel by a variable coefficient of zero or more. And calculating a value of a color component different from the color information of the target pixel, generating an image processing unit that generates a second image in which each pixel has a plurality of color components, and storing information on the pixel position of the defective pixel in the first image And a storage unit, wherein the image processing unit changes a coefficient based on the color component of the target pixel and the pixel position of the defective pixel, and performs weighted addition of the color information of the target pixel and the color information of the pixel adjacent to the target pixel. .
本発明の画像処理装置は、各画素が複数の色成分のいずれか1つの色成分の色情報を有する第1画像の色情報を零以上の可変な係数により注目画素の画素位置で加重加算して注目画素の色情報と異なる色成分の値を算出し、各画素が複数の色成分を有する第2画像を生成する画像処理部を備え、第1画像は、欠陥画素の位置情報が付加され、画像処理部は、注目画素の色成分および欠陥画素の画素位置に基づいて係数を変え、注目画素の色情報と注目画素に隣接する画素の色情報とを加重加算する。 The image processing apparatus according to the present invention weights and adds the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the target pixel by a variable coefficient of zero or more. A color component value different from the color information of the pixel of interest, and an image processing unit that generates a second image in which each pixel has a plurality of color components. The first image is provided with position information of a defective pixel. The image processing unit changes the coefficient based on the color component of the target pixel and the pixel position of the defective pixel, and weights and adds the color information of the target pixel and the color information of the pixel adjacent to the target pixel.
また、画像処理部は、注目画素の画素位置における複数の方向に対する類似性の強弱を判定し、注目画素の色成分および欠陥画素の画素位置とともに、その判定結果に基づいて、係数を変えてもよい。 Further, the image processing unit may determine the strength of similarity in a plurality of directions at the pixel position of the target pixel, and change the coefficient based on the determination result together with the color component of the target pixel and the pixel position of the defective pixel. Good.
また、画像処理部は、注目画素に隣接する画素が欠陥画素である場合、隣接する画素の画素位置に基づいて、注目画素の画素位置における複数の方向に対する類似性の強弱を判定してもよい。 In addition, when the pixel adjacent to the target pixel is a defective pixel, the image processing unit may determine the strength of similarity in a plurality of directions at the pixel position of the target pixel based on the pixel position of the adjacent pixel. .
また、画像処理部は、第1画像の全ての画素において、第1画像の色情報を常に一定の色成分比率で加重加算してもよい。 Further, the image processing unit may always add the weight information of the color information of the first image at a constant color component ratio in all the pixels of the first image.
また、画像処理部は、第1画像が、画素密度の高い第1色成分と画素密度の低い第2色成分および第3色成分とからなる場合、第2色成分の色情報と第3色成分の色情報とを同一の色成分比率で加重加算してもよい。 In addition, when the first image includes a first color component having a high pixel density, a second color component having a low pixel density, and a third color component, the image processing unit includes the color information and the third color of the second color component. The component color information may be weighted and added at the same color component ratio.
本発明の画像処理装置は、各画素が複数の色成分のいずれか1つの色成分の色情報を有する第1画像の色情報を零以上の可変な係数により注目画素の画素位置で加重加算して注目画素の色情報と異なる色成分の値を算出し、予め決められた固定のフィルタ係数によるフィルタ処理を行うことによって、異なる色成分を補正し、各画素が複数の色成分を有する第2画像を生成する画像処理部と、第1画像における欠陥画素の画素位置の情報を記憶する記憶部と、を備え、画像処理部は、注目画素の色成分および欠陥画素の画素位置に基づいて係数を変える。 The image processing apparatus according to the present invention weights and adds the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the target pixel by a variable coefficient of zero or more. Second color component values different from the color information of the pixel of interest are calculated, and the filter processing is performed with a predetermined fixed filter coefficient to correct different color components, and each pixel has a plurality of color components. An image processing unit that generates an image, and a storage unit that stores information on the pixel position of the defective pixel in the first image, and the image processing unit calculates a coefficient based on the color component of the target pixel and the pixel position of the defective pixel. change.
本発明の画像処理装置は、各画素が複数の色成分のいずれか1つの色成分の色情報を有する第1画像の色情報を零以上の可変な係数により注目画素の画素位置で加重加算して注目画素の色情報と異なる色成分の値を算出し、予め決められた固定のフィルタ係数によるフィルタ処理を行うことによって、異なる色成分の値を補正し、各画素が複数の色成分を有する第2画像を生成する画像処理部を備え、第1画像は、欠陥画素の位置情報が付加され、画像処理部は、注目画素の色成分および欠陥画素の画素位置に基づいて係数を変える。 The image processing apparatus according to the present invention weights and adds the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the target pixel by a variable coefficient of zero or more. By calculating a value of a color component different from the color information of the target pixel and performing a filtering process with a predetermined fixed filter coefficient, the value of the different color component is corrected, and each pixel has a plurality of color components. An image processing unit that generates a second image is provided. Position information of the defective pixel is added to the first image, and the image processing unit changes the coefficient based on the color component of the pixel of interest and the pixel position of the defective pixel.
また、画像処理部は、注目画素の画素位置における複数の方向に対する類似性の強弱を判定し、注目画素の色成分および欠陥画素の画素位置とともに、その判定結果に基づいて、係数を変えてもよい。 Further, the image processing unit may determine the strength of similarity in a plurality of directions at the pixel position of the target pixel, and change the coefficient based on the determination result together with the color component of the target pixel and the pixel position of the defective pixel. Good.
また、画像処理部は、注目画素に隣接する画素が欠陥画素である場合、隣接する画素の画素位置に基づいて、注目画素の画素位置における複数の方向に対する類似性の強弱を判定してもよい。 In addition, when the pixel adjacent to the target pixel is a defective pixel, the image processing unit may determine the strength of similarity in a plurality of directions at the pixel position of the target pixel based on the pixel position of the adjacent pixel. .
また、画像処理部は、予め決められた固定のフィルタ係数として、正および負の値を含むフィルタ係数を用いてもよい。 The image processing unit may use a filter coefficient including positive and negative values as a predetermined fixed filter coefficient.
また、異なる色成分は、輝度成分および色差成分であってもよい。 Further, the different color components may be a luminance component and a color difference component.
また、画像処理部は、第1画像が、第1色成分、第2色成分および第3色成分を有する場合、第1色成分と第2色成分とで構成される第1類似度成分、第2色成分と第3色成分とで構成される第2類似度成分、第3色成分と第1色成分とで構成される第3類似度成分、第1色成分のみで構成される第4類似度成分、第2色成分のみで構成される第5類似度成分、第3色成分のみで構成される第6類似度成分の少なくとも1つの類似度成分を用いて、複数の方向に対する類似度を算出し、該類似度に基づいて、複数の方向に対する類似性の強弱を判定してもよい。 Further, the image processing unit, when the first image has a first color component, a second color component, and a third color component, a first similarity component composed of the first color component and the second color component, A second similarity component composed of the second color component and the third color component, a third similarity component composed of the third color component and the first color component, and a first similarity component composed of only the first color component. Similarity in a plurality of directions using at least one similarity component of a fourth similarity component, a fifth similarity component composed of only the second color component, and a sixth similarity component composed of only the third color component The degree of similarity may be determined for a plurality of directions based on the degree of similarity.
本発明の撮像装置は、撮像素子と、本発明の画像処理装置と、を備える。 The imaging device of the present invention includes an imaging element and the image processing device of the present invention.
本発明の画像処理プログラムは、各画素が複数の色成分のいずれか1つの色成分の色情報を有し、欠陥画素の画素位置の情報が付加された第1画像を読み込む入力手順と、第1画像の色情報を注目画素の画素位置で加重加算して注目画素の色成分と異なる色成分の値を算出し、各画素が複数の色成分を有する第2画像を生成する画像処理手順と、をコンピュータに実行させ、画像処理手順は、第1画像の色情報を注目画素の画素位置で加重加算する複数の係数パターンを用意し、注目画素の色成分および欠陥画素の位置関係に基づいて、係数パターンを選択し加重加算する。 An image processing program according to the present invention includes an input procedure for reading a first image in which each pixel has color information of any one of a plurality of color components and information on the pixel position of a defective pixel is added; An image processing procedure for calculating the value of a color component different from the color component of the target pixel by weight-adding the color information of one image at the pixel position of the target pixel, and generating a second image in which each pixel has a plurality of color components; The image processing procedure prepares a plurality of coefficient patterns for weighted addition of the color information of the first image at the pixel position of the target pixel, and based on the positional relationship between the color component of the target pixel and the defective pixel. The coefficient pattern is selected and weighted.
本発明によれば、欠陥画素の補正処理と高画質化の処理とを、高精度かつ高速に行うことができる。 According to the present invention, defective pixel correction processing and high image quality processing can be performed with high accuracy and high speed.
以下、図面に基づいて、本発明の実施形態について詳細を説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
ただし、本発明の実施形態では、本発明の画像処理装置が行う画像の高画質化の機能を備えた電子カメラを用いて説明を行う。 However, in the embodiment of the present invention, the description will be made using an electronic camera having a function of improving the image quality of an image performed by the image processing apparatus of the present invention.
図1は、本発明の実施形態に対応する電子カメラ1の機能ブロック図である。
FIG. 1 is a functional block diagram of an
図1において、電子カメラ1は、DFE10、画像処理部(例えば、画像処理専用の1チップ・マイクロプロセッサ)11、CPU12、メモリ13、表示インタフェース(表示I/F)14を備える。また、電子カメラ1は、メモリカード(カード状のリムーバブルメモリ)16とのインタフェースを実現するメディアI/F17、所定のケーブルや無線伝送路を介してPC(パーソナルコンピュータ)18などの外部装置とのインタフェースを実現する入出力I/F19を備える。電子カメラ1のこれら各構成要素は、バスを介して相互に情報伝達可能に接続される。
In FIG. 1, the
また、電子カメラ1は、撮像光学系20、撮像素子21、タイミングジェネレータ(TG)22を備える。撮像素子21は、撮像光学系20を透過して結像した光学像を撮像し、画像信号をDEF10に出力する。DFE10は、撮像素子21から出力される画像信号をA/D変換などの所定の信号処理を行うデジタルフロントエンド回路である。DEF10は、バスを介して、画像処理部11にデジタル化した画像信号を出力する。TG22は、CPU12からの制御指示に基づいて、撮像素子21、DEF10、画像処理部11それぞれに対し動作のタイミングを制御する。
The
また、電子カメラ1は、レリーズボタンやモード切り換え用の選択ボタンなどを有する操作部23を備え、操作部23によって受け付けた操作者からの操作指示を、CPU12に出力する。電子カメラ1は、表示I/F14によって生成出力される表示用画像を表示するモニタ15を備える。
The
PC18には、モニタ24やプリンタ25などが接続されており、CD−ROM26に記録されたアプリケーションプログラムが予めインストールされている。また、PC18は、不図示のCPU、メモリ、ハードディスクの他に、メモリカード16とのインタフェースを実現するメモリカード用I/F(不図示)や所定のケーブルや無線伝送路を介して電子カメラ1などの外部装置とのインタフェースを実現する外部I/F(不図示)を備える。
A
図1に示す構成の電子カメラ1において、操作部23を介し、操作者によって撮影モードが選択されてレリーズボタンが押されると、CPU12は、TG22を介して、撮像素子21、DEF10に対するタイミング制御を行う。撮像素子21は、光学像に対応する画像信号を生成する。その画像信号は、DEF10でA/D変換などの所定の信号処理が施され、Raw画像データとして、画像処理部11に供給される。なお、Raw画像データは、入射光の光量に対する出力信号値の関係が線形性を有するデジタル画像データである。
In the
本実施形態の撮像素子21の撮像面には、複数の受光素子がマトリックス状に配列されるとともに、各受光素子には、RGBのカラーフィルタが公知のベイヤ配列にしたがって配置される。撮像素子21によって撮像され画像処理部11に供給されるRaw画像データは、RGB表色系で示され、各画素は、R成分(第2色成分または第3色成分)、G成分(第1色成分)、B成分(第3色成分または第2色成分)のうち、いずれか1つの色成分の色情報を有する。なお、このようなRaw画像データを、「ベイヤ配列型画像データ」と称する。
A plurality of light receiving elements are arranged in a matrix on the image pickup surface of the
また、本実施形態の撮像素子21は、製造時または製造後に生じた傷などによって、正常に動作しない受光素子を欠陥画素として有するものとする。欠陥画素には、大きな値の画像信号を出力する「白欠陥」と、画像信号を出力しない「黒欠陥」とがあり、ベイヤ配列型画像データの欠陥画素は、白欠陥または黒欠陥に応じた画素値を有するものとする。本実施形態では、撮像素子21における欠陥画素の画素位置の情報(アドレスなど)が、画像の欠陥画素の画素位置の情報として、メモリ13(記憶部)に予め記憶されているものとする。
In addition, the
画像処理部11は、このようなベイヤ配列型画像データ(第1画像)を入力し、RGB表色系とは異なるYCbCr表色系の色成分である輝度成分と色差成分とを、全ての画素に対して算出し、輝度成分と色差成分との色成分からなる画像(第2画像)を生成する。画像処理部11は、全ての画素に輝度成分が対応付けられて成る輝度面と、全ての画素に色差成分が対応付けられて成る色差面とを、空格子処理により生成して高画質化を実現する。また、画像処理部11は、必要に応じて、このようにして生成した輝度面および色差面からRGB面を算出する色変換処理を行う。なお、本実施形態の画像処理部11は、後述するように、各画素(注目画素)において輝度成分と色差成分とを算出するにあたり、欠陥画素の画素位置を考慮しつつ行う。そして、このような一連の処理を「画像復元処理」と称する。 The image processing unit 11 inputs such Bayer array image data (first image), and converts luminance components and color difference components, which are color components of the YCbCr color system different from the RGB color system, into all pixels. And an image (second image) composed of the color components of the luminance component and the color difference component is generated. The image processing unit 11 generates a luminance plane in which luminance components are associated with all pixels and a color difference plane in which chrominance components are associated with all pixels by sky lattice processing to improve image quality. Realize. Further, the image processing unit 11 performs a color conversion process for calculating an RGB plane from the luminance plane and the color difference plane generated as described above, as necessary. As will be described later, the image processing unit 11 according to the present embodiment calculates the luminance component and the color difference component in each pixel (target pixel) while considering the pixel position of the defective pixel. Such a series of processing is referred to as “image restoration processing”.
なお、画像処理部11は、DFE10より出力されたベイヤ配列型画像データに対して画像復元処理を行うにあたり、ホワイトバランス処理、階調変換などの画像処理を行うものとする。また、画像処理部11は、画像復元処理などが完了したベイヤ配列型画像データに対し、必要に応じて圧縮処理を施し、メディアI/F17を介してメモリカード16に記録する。
Note that the image processing unit 11 performs image processing such as white balance processing and gradation conversion when performing image restoration processing on the Bayer array type image data output from the
そして、操作部23を介し、操作者によって再生モードが選択されると、メモリカード16に記録された画像データは、メディアI/F17を介して画像処理部11に読み出され、画像処理部11による伸長処理が施された後、表示I/F14を介してモニタ15に表示される。
When the playback mode is selected by the operator via the
なお、伸長処理が施された画像データは、モニタ15に表示されず、PC18側のモニタ24やプリンタ26で採用されている表色系に変換されて、入出力I/F19を介してPC18に供給されてもよい。ただし、画像復元処理によって生成されるRGB面を、モニタ15、24やプリンタ25で採用されている表色系に変換する処理は、公知の技術によって実現でき説明を省略する。
The decompressed image data is not displayed on the
また、画像処理部11は、画像処理が完了したベイヤ配列型画像データを、圧縮処理せずにメモリカード16に記録したり、PC18側のモニタ24やプリンタ25で採用されている表色系に変換して、入出力I/F19を介しPC18に供給したりしてもよい。
Further, the image processing unit 11 records the Bayer array type image data for which image processing has been completed on the
図2は、ベイヤ配列型画像データの色成分の配列を示す図である。すなわち、図2では、R、G、Bを用いて色成分の種類を示し、座標[i,j]の値を用いて各々の色成分に対応する画素の位置を示している。 FIG. 2 is a diagram showing an arrangement of color components of Bayer array type image data. That is, in FIG. 2, the types of color components are indicated using R, G, and B, and the positions of pixels corresponding to the respective color components are indicated using the values of coordinates [i, j].
図2(1)は、座標[i,j]の画素がR成分の注目画素である場合を示し、図2(2)は、座標[i,j]の画素がB成分の注目画素である場合を示し、図2(3)は、座標[i,j]の画素がG成分の注目画素である場合を示す。また、G成分の画素のうち、横方向にR成分が存在する画素を「Gr」と表記し、横方向にB成分が存在する画素を「Gb」と表記する。 FIG. 2 (1) shows a case where a pixel at coordinates [i, j] is an R component target pixel, and FIG. 2 (2) shows a pixel at coordinates [i, j] as a B component target pixel. FIG. 2 (3) shows a case where the pixel at coordinates [i, j] is the target pixel of the G component. Among the G component pixels, a pixel in which the R component is present in the horizontal direction is denoted as “Gr”, and a pixel in which the B component is present in the horizontal direction is denoted as “Gb”.
なお、後述する演算式では、各々の画素における色情報をG成分と他の色成分とで区別する場合、図2のR、BをZに置き換えて、R成分またはB成分の画素の色情報をZ[i,j]のように表記し、G成分の画素の色情報をG[i,j]のように表記する。また、各々の画素における色情報を色成分で区別しない場合、図2のR、G、BをAに置き換えて、任意の画素の色情報をA[i,j]のように表記する。
《一の実施形態》
図3〜図7は、本発明の一の実施形態における画像処理部11の動作フローチャートである。
In the arithmetic expression described later, when the color information in each pixel is distinguished from the G component and other color components, R and B in FIG. 2 are replaced with Z, and the color information of the R component or B component pixel is displayed. Is expressed as Z [i, j], and the color information of the G component pixel is expressed as G [i, j]. Further, when the color information in each pixel is not distinguished by the color component, R, G, and B in FIG. 2 are replaced with A, and the color information of an arbitrary pixel is expressed as A [i, j].
<< One Embodiment >>
3 to 7 are operation flowcharts of the image processing unit 11 according to the embodiment of the present invention.
ただし、図3〜図7は、画像処理部11が行う画像処理のうち、画像復元処理の動作を示す。図3は、画像復元処理のおおまかな動作を示し、図4〜図6は、画像復元処理に含まれる「輝度成分算出処理」の動作を示し、図7は、画像復元処理に含まれる「色差成分算出処理」の動作を示す。なお、以下において、画像処理部11が行う画像処理のうち、画像復元処理の動作を説明し、他の動作の説明は省略する。
1.縦横類似性を示す指標HVの設定処理
画像処理部11は、ベイヤ配列型画像データに対して、G成分が欠落する画素における縦方向および横方向に対する類似性(以下、「縦横類似性」と称する。)を判定し、その判定結果に基づいて、縦横類似性を示す指標HVを設定する(図3S1)。
3 to 7 show the operation of the image restoration process among the image processes performed by the image processing unit 11. 3 shows a rough operation of the image restoration process, FIGS. 4 to 6 show an operation of “luminance component calculation process” included in the image restoration process, and FIG. 7 shows a “color difference” included in the image restoration process. Operation of “component calculation process” will be described. In the following, among the image processing performed by the image processing unit 11, the operation of the image restoration processing will be described, and description of other operations will be omitted.
1. Setting processing of index HV indicating vertical / horizontal similarity The image processing unit 11 performs similarity in the vertical direction and horizontal direction of pixels lacking the G component (hereinafter referred to as “vertical / horizontal similarity”) with respect to Bayer array image data. And an index HV indicating vertical and horizontal similarity is set based on the determination result (S1 in FIG. 3).
すなわち、画像処理部11は、G成分が欠落する注目画素Zに対し、次式1および式2によって定義される縦方向の同色間類似度Cv0および横方向の同色間類似度Ch0を算出する。また、画像処理部11は、G成分が欠落する注目画素Zに対し、次式3および式4によって定義される縦方向の異色間類似度CvN0および横方向の異色間類似度ChN0を算出する。なお、本実施形態の画像処理部11は、次式1〜式4による各類似度の算出にあたり、注目画素および図2に示す範囲の画素のいずれかが欠陥画素である場合、欠陥画素が出力する画素値をそのまま用いて行うものとする。
・同色間類似度:
That is, the image processing unit 11 calculates the same-color similarity Cv0 in the vertical direction and the same-color similarity Ch0 in the horizontal direction defined by the following
・ Similarity between same colors:
ただし、次式5〜式8によって算出される各類似度は、値が小さい程、類似性が強いことを示す。また、次式5〜式8は、図8に示す係数パターンを用いて周辺加算を行うことに相当する。
・同色間類似度:
However, the similarity calculated by the following formulas 5 to 8 indicates that the smaller the value, the stronger the similarity. Further, the following Expressions 5 to 8 correspond to performing peripheral addition using the coefficient pattern shown in FIG.
・ Similarity between same colors:
ところで、式3および式4において、絶対値で括られる項は、隣接する2つの画素の色情報で構成される。そのため、式3および式4によって算出される異色間類似度には、一画素ピッチで変化するナイキスト周波数レベルの微細構造における類似性判定を可能にする。また、このような異色間類似度は、異なる色成分の色情報が全て同一の輝度情報を表していると仮定して算出されるため、異色間類似度を用いた類似性の強弱の判定は、無彩色部において信頼性が高い。
By the way, in Expression 3 and
一方、同色間類似度を用いた類似性の強弱の判定は、彩色部・無彩色部ともに全般的に信頼性が高いが、画像の構造が細かい部分では、異色間類似度を用いた場合に比べて信頼性が劣る。したがって、画像全体に対して信頼性の高い類似性の判定を行うには、画像全体を、無彩色部と彩色部に分け、各々の部分に適した類似度を用いる方法が好ましい。 On the other hand, the determination of the strength of similarity using the similarity between the same colors is generally reliable for both the chromatic and achromatic parts, but when the similarity between the different colors is used in the detailed part of the image Compared to reliability. Therefore, in order to determine the similarity with high reliability with respect to the entire image, it is preferable to divide the entire image into an achromatic portion and a chromatic portion and use a similarity suitable for each portion.
注目画素の近傍の画像が無彩色部であるか否かの判定には、局所的な色彩の有無を示す色指標が必要となるが、このような色指標として、局所的な色差情報が考えられる。上述したように算出される異色間類似度には、類似性の強弱と同時に局所的な色差情報が反映されることから、色指標として、異色間類似度を直接利用することができる。 In order to determine whether or not the image near the pixel of interest is an achromatic color part, a color index indicating the presence or absence of local color is required. As such a color index, local color difference information is considered. It is done. Since the similarity between different colors calculated as described above reflects local color difference information as well as the strength of similarity, the similarity between different colors can be directly used as a color index.
ただし、異色間類似度は、値が小さい程、類似性が強いことを示すので、縦方向および横方向に対する異色間類似度が共に大きな値である場合には、無彩色部で縦横両方向に対する類似性が弱いか、または、注目画素の近傍の画像が彩色部であることを意味する。逆に、縦方向と横方向との少なくとも1つの方向に対する異色間類似度が比較的小さな値であれば、注目画素の近傍の画像が無彩色部であり、類似性の強い方向が存在していることを意味する。 However, the similarity between different colors indicates that the smaller the value is, the stronger the similarity is. Therefore, if the similarity between different colors in the vertical and horizontal directions is a large value, the achromatic part is similar in both vertical and horizontal directions. This means that the image is weak or the image in the vicinity of the target pixel is a colored portion. On the other hand, if the similarity between different colors in at least one of the vertical direction and the horizontal direction is a relatively small value, the image in the vicinity of the target pixel is an achromatic color portion, and there is a direction with strong similarity. Means that
そこで、画像処理部11は、閾値ThNv,ThNhについて、
CvN[i,j]≦ThNv または ChN[i,j]≦ThNh … 条件1
が成り立つ場合、注目画素の近傍の画像が無彩色部であると判断し、条件1が成り立たない場合、注目画素の近傍の画像が彩色部であると判断する。ただし、閾値ThNv,ThNhは、階調が0〜255のとき10程度以下の値とする。
Therefore, the image processing unit 11 determines the threshold values ThNv and ThNh.
CvN [i, j] ≦ ThNv or ChN [i, j] ≦ ThNh ...
Is satisfied, it is determined that the image in the vicinity of the target pixel is an achromatic portion, and if the
画像処理部11は、注目画素の近傍の画像が無彩色部である場合、閾値Th0について、
|CvN[i,j]−ChN[i,j]|≦Th0 … 条件2
が成り立つか否かを判定する。この条件2は、縦方向の異色間類似度CvN[i,j]と横方向の異色間類似度ChN[i,j]とが同程度であるか否かを判定するための条件である。閾値Th0は、縦方向の異色間類似度CvN[i,j]と横方向の異色間類似度ChN[i,j]との差異が微少である場合、ノイズの影響によって一方の類似性が強いと誤判定されることを回避する役割を果たす。そのため、ノイズの多いカラー画像に対しては、閾値Th0の値を大きく設定することにより、類似性の判定の精度が更に高められる。
When the image near the target pixel is an achromatic part, the image processing unit 11
| CvN [i, j] −ChN [i, j] | ≦ Th0 ...
It is determined whether or not holds. This
したがって、画像処理部11は、条件2が成り立つ場合、注目画素が縦横両方向に対して類似性が弱い(または、強い)と判断し、縦横類似性を示す指標HV[i,j]に「0」を設定する。一方、画像処理部11は、条件2が成り立たない場合、
CvN[i,j]<ChN[i,j] … 条件3
が成り立つか否かを判定する。そして、画像処理部11は、条件3が成り立つ場合、注目画素が縦方向に対して類似性が強いと判断し、縦横類似性を示す指標HV[i,j]に「1」を設定する。一方、画像処理部11は、条件3が成り立たない場合、注目画素が横方向に対して類似性が強いと判断し、縦横類似性を示す指標HV[i,j]に「−1」を設定する。
Therefore, when the
CvN [i, j] <ChN [i, j] ... Condition 3
It is determined whether or not holds. Then, when the condition 3 is satisfied, the image processing unit 11 determines that the target pixel is highly similar in the vertical direction, and sets “1” to the index HV [i, j] indicating the vertical and horizontal similarity. On the other hand, if the condition 3 does not hold, the image processing unit 11 determines that the pixel of interest has strong similarity in the horizontal direction, and sets “−1” to the index HV [i, j] indicating the vertical and horizontal similarity. To do.
また、画像処理部11は、注目画素の近傍の画像が彩色部である場合、閾値Th1について、
|Cv[i,j]−Ch[i,j]|≦Th1 … 条件4
が成り立つか否かを判定する。この条件4は、縦方向の同色間類似度Cv[i,j]と横方向の同色間類似度Ch[i,j]とが同程度であるか否かを判定するための条件である。閾値Th1は、縦方向の同色間類似度Cv[i,j]と横方向の同色間類似度Ch[i,j]との差異が微少である場合、ノイズの影響によって一方の類似性が強いと誤判定されることを回避する役割を果たす。閾値Th1は、閾値Th0と同様に、ノイズの多いカラー画像に対して値を大きく設定することにより、類似性の判定の精度が高められる。
In addition, when the image in the vicinity of the target pixel is a coloring portion, the image processing unit 11
| Cv [i, j] −Ch [i, j] | ≦
It is determined whether or not holds.
したがって、画像処理部11は、条件4が成り立つ場合、注目画素が縦横両方向に対して類似性が弱い(または、強い)と判断し、縦横類似性を示す指標HV[i,j]に「0」を設定する。一方、画像処理部11は、条件4が成り立たない場合、
Cv[i,j]<Ch[i,j] … 条件5
が成り立つか否かを判定する。そして、画像処理部11は、条件5が成り立つ場合、注目画素が縦方向に対して類似性が強いと判断し、縦横類似性を示す指標HV[i,j]に「1」を設定する。一方、画像処理部11は、条件5が成り立たない場合、注目画素が横方向に対して類似性が強いと判断し、縦横類似性を示す指標HV[i,j]に「−1」を設定する。
Therefore, when the
Cv [i, j] <Ch [i, j] ... Condition 5
It is determined whether or not holds. Then, when the condition 5 is satisfied, the image processing unit 11 determines that the target pixel has a strong similarity in the vertical direction, and sets “1” to the index HV [i, j] indicating the vertical and horizontal similarity. On the other hand, if the condition 5 does not hold, the image processing unit 11 determines that the pixel of interest has strong similarity in the horizontal direction, and sets “−1” to the index HV [i, j] indicating the vertical and horizontal similarity. To do.
なお、本実施形態の画像処理部11は、指標HVを設定するにあたり、式1〜式8の演算において、注目画素を含む各画素が欠陥画素か否かを考慮しなかったが、考慮して行ってもよい。例えば、画像処理部11は、式1〜式4の演算を行うにあたり、メモリ13より欠陥画素の画素位置の情報を読み込み、画素G[i,j−1]もしくはG[i,j+1]、または画素G[i−1,j]もしくはG[i+1,j]が欠陥画素か否かを判定する。画像処理部11は、画素G[i,j−1]もしくはG[i,j+1]が欠陥画素である場合、式1〜式4の演算を行うことなく、縦横類似性を示す指標HV[i,j]に「1」を設定する。一方、画像処理部11は、画素G[i−1,j]もしくはG[i+1,j]が欠陥画素である場合、式1〜式4の演算を行うことなく、縦横類似性を示す指標HV[i,j]に「−1」を設定する。
Note that the image processing unit 11 of the present embodiment does not consider whether each pixel including the target pixel is a defective pixel or not in the calculations of
また、画像処理部11は、式1〜式4によって算出された各画素の画素位置での同色間類似度Cv0、Ch0および異色間類似度CvN0、ChN0のうち、メモリ13の欠陥画素の画素位置の情報に基づいて、欠陥画素を含んだ同色間類似度および異色間類似度を用いず、式5〜式8の周辺加算を行ってもよい。
In addition, the image processing unit 11 calculates the pixel position of the defective pixel in the
これらにより、類似度の精度向上を図ることができるとともに、処理速度を高速化することができる。
2.斜め類似性を示す指標DNの設定処理
次に、画像処理部11は、ベイヤ配列型画像データに対し、G成分が欠落する画素における斜め45度方向および斜め135度方向に対する類似性(以下、「斜め類似性」)を判定し、その判定結果に応じて、斜め類似性を示す指標DNを設定する(図3S2)。
As a result, the accuracy of similarity can be improved and the processing speed can be increased.
2. Setting processing of index DN indicating oblique similarity Next, the image processing unit 11 performs similarity to the 45 ° oblique direction and the oblique 135 ° direction (hereinafter referred to as “belonging to the oblique 135 ° direction” in pixels lacking the G component with respect to the Bayer array type image data. The diagonal similarity ") is determined, and an index DN indicating the diagonal similarity is set according to the determination result (S2 in FIG. 3).
すなわち、画像処理部11は、G成分が欠落する注目画素Zに対し、次式9および式10によって定義される斜め45度方向の類似度C45_0および斜め135度方向の類似度C35_0を算出する。
That is, the image processing unit 11 calculates the similarity C45_0 in the oblique 45 degree direction and the similarity C35_0 in the oblique 135 degree direction defined by the following
そして、画像処理部11は、次式11および式12による周辺加算を行い、斜め45度方向に対する類似度C45[i,j]および斜め135度方向に対する類似度C135[i,j]を算出する。ただし、次式11および式12は、図8に示す係数パターンを用いて周辺加算を行うことに相当する。
Then, the image processing unit 11 performs peripheral addition according to the following
次に、画像処理部11は、閾値Th2について、
|C45[i,j]−C135[i,j]|≦Th2 … 条件6
が成り立つか否かを判定する。画像処理部11は、条件6が成り立つ場合、注目画素が斜め方向に対して類似性が弱い(または、強い)と判断し、斜め類似性を示す指標DN[i,j]に「0」を設定する。一方、画像処理部11は、条件6が成り立たない場合、
C45[i,j]<C135[i,j] … 条件7
が成り立つか否かを判定する。
Next, the image processing unit 11 determines the threshold Th2.
| C45 [i, j] −C135 [i, j] | ≦
It is determined whether or not holds. When the
C45 [i, j] <C135 [i, j] ... Condition 7
It is determined whether or not holds.
画像処理部11は、条件7が成り立つ場合、注目画素が斜め45度方向に対して類似性が強いと判断し、斜め類似性を示す指標DN[i,j]に「1」を設定する。一方、画像処理部11は、条件7が成り立たない場合、注目画素が斜め135度方向に対して類似性が強いと判断し、斜め類似性を示す指標DN[i,j]に「−1」を設定する。 When the condition 7 is satisfied, the image processing unit 11 determines that the target pixel has a strong similarity with respect to the 45-degree oblique direction, and sets “1” to the index DN [i, j] indicating the diagonal similarity. On the other hand, when the condition 7 does not hold, the image processing unit 11 determines that the target pixel has a strong similarity with respect to the oblique 135 ° direction, and sets “−1” to the index DN [i, j] indicating the oblique similarity. Set.
なお、本実施形態の画像処理部11は、指標DNを設定するにあたり、上記指標HVの場合と同様に、式9〜式12の演算において、注目画素を含む各画素が欠陥画素か否かを考慮して行ってもよい。また、画像処理部11は、式9および式10より算出された各画素の画素位置での類似度C45_0、C135_0のうち、メモリ13の欠陥画素の画素位置の情報に基づいて、欠陥画素を含んだ類似度を除外し、式11および式12の周辺加算を行ってもよい。これにより、類似度の精度向上を図ることができるとともに、処理速度を高速化することができる。
3.輝度成分算出処理
次に、画像処理部11は、図4〜図6に示すフローチャートに基づいて、各画素に対し輝度成分算出処理を行い、輝度面を算出する(図3S3)。
Note that, in setting the index DN, the image processing unit 11 of the present embodiment determines whether each pixel including the target pixel is a defective pixel or not in the calculations of Expressions 9 to 12, as in the case of the index HV. You may consider it. In addition, the image processing unit 11 includes defective pixels based on information on the pixel positions of the defective pixels in the
3. Luminance Component Calculation Processing Next, the image processing unit 11 performs luminance component calculation processing on each pixel based on the flowcharts shown in FIGS. 4 to 6 to calculate a luminance plane (S3 in FIG. 3).
本実施形態の輝度成分算出処理は、ベイヤ配列型画像データのうち、注目画素を中心とする対象領域内にある複数の画素の色情報を加重加算することによって輝度成分を算出する。この加重加算に用いられる色情報は、注目画素における類似性の強弱に基づいて決められ、加重加算の係数は、輝度成分を構成するRGBの比率が一定となるように設定される。本実施形態では、画像処理部11が、このような輝度成分算出処理を行うために、類似性の強弱および欠陥画素の画素位置に応じて、係数の配置および値が変えられた複数種類の係数パターンを用意する。 In the luminance component calculation processing of the present embodiment, the luminance component is calculated by weight-adding the color information of a plurality of pixels in the target region centered on the target pixel in the Bayer array image data. The color information used for this weighted addition is determined based on the strength of similarity in the target pixel, and the weighted addition coefficient is set so that the ratio of RGB constituting the luminance component is constant. In the present embodiment, in order for the image processing unit 11 to perform such luminance component calculation processing, a plurality of types of coefficients whose coefficients are arranged and their values are changed according to the strength of similarity and the pixel position of the defective pixel. Prepare a pattern.
図9および図10は、輝度成分を生成する係数パターンの一例を示す。各係数パターンは、類似性および欠陥画素の画素位置に応じて、加重加算の対象となる色情報の位置および係数の値が変えられる。すなわち、RGBの3つの色成分の色情報が含まれる最も狭い領域内で、注目画素の色情報と注目画素に隣接する画素(斜め方向に隣接する画素を含む)の色情報とが加重加算されるようになっている。ここで、α,β,u1,u2,v1,v2,s1,s2,t1,t2は、全て零以上の値で次の条件を満たす。 9 and 10 show an example of a coefficient pattern for generating a luminance component. In each coefficient pattern, the position of color information and the value of the coefficient to be subjected to weighted addition are changed according to the similarity and the pixel position of the defective pixel. That is, the color information of the pixel of interest and the color information of the pixels adjacent to the pixel of interest (including pixels adjacent in the diagonal direction) are weighted and added within the narrowest region including the color information of the three color components of RGB. It has become so. Here, α, β, u 1 , u 2 , v 1 , v 2 , s 1 , s 2 , t 1 , t 2 are all zero or more and satisfy the following condition.
α+β=1,u1+u2=1,v1+v2=1,s1+s2=1,t1+t2=1
図9および図10に示す係数パターンは、輝度成分を構成するRGBの比率が「β/2:α:β/2」となるような値が設定されており、R成分の色情報とB成分の色情報とが同一の比率で加重加算される。すなわち、輝度成分Yは、
Y=α・G+β・(R+B)/2
の関係にある。これにより、Gr成分の画素とGb成分の画素とで共通の係数パターンを用いることができ、R成分の画素とB成分の画素とで共通の係数パターンを用いることができる。
α + β = 1, u 1 + u 2 = 1, v 1 + v 2 = 1, s 1 + s 2 = 1, t 1 + t 2 = 1
The coefficient patterns shown in FIGS. 9 and 10 are set such that the ratio of RGB constituting the luminance component is “β / 2: α: β / 2”, and the color information of the R component and the B component The color information is weighted and added at the same ratio. That is, the luminance component Y is
Y = α · G + β · (R + B) / 2
Are in a relationship. Accordingly, a common coefficient pattern can be used for the Gr component pixel and the Gb component pixel, and a common coefficient pattern can be used for the R component pixel and the B component pixel.
一般的に好ましい定数の設定としては、以下のような例が挙げられる。 Examples of generally preferred constant settings include the following examples.
u1≒u2,v1≒v2,s1≒s2,t1≒t2
(α,β)=(1/3,2/3),(4/9,5/9),(5/11,6/11),(1/2,1/2),(5/9,4/9),(3/5,2/5),(2/3,1/3)
なお、輝度成分を構成するRGBの比率は、「β/2:α:β/2」に限定されず、「α:β:γ」(α+β+γ=1,α≧0,β≧0,γ≧0)などであってもよい。例えば、α=0.3、β=0.6、γ=0.1の値とする。また、RGBの比率を「α:β:γ」とする場合、Gr成分の画素とGb成分の画素とで個別に係数パターンを設定する必要があり、R成分の画素とB成分の画素とで個別に係数パターンを設定する必要がある。
u 1 ≈u 2 , v 1 ≈v 2 , s 1 ≈s 2 , t 1 ≈t 2
(Α, β) = (1/3, 2/3), (4/9, 5/9), (5/11, 6/11), (1/2, 1/2), (5/9 , 4/9), (3/5, 2/5), (2/3, 1/3)
The ratio of RGB constituting the luminance component is not limited to “β / 2: α: β / 2”, but “α: β: γ” (α + β + γ = 1, α ≧ 0, β ≧ 0, γ ≧ 0) or the like. For example, α = 0.3, β = 0.6, and γ = 0.1. In addition, when the RGB ratio is “α: β: γ”, it is necessary to set coefficient patterns individually for the Gr component pixel and the Gb component pixel, and for the R component pixel and the B component pixel, respectively. It is necessary to set the coefficient pattern individually.
以上により、画像処理部11は、輝度成分算出処理において、注目画素がG成分であるか否かを判定する(図4S11)。 As described above, the image processing unit 11 determines whether or not the target pixel is the G component in the luminance component calculation processing (S11 in FIG. 4).
注目画素がG成分でない場合(図4S11のNO側)、画像処理部11は、注目画素における縦横類似性を示す指標HV[i,j]と斜め類似性を示す指標DN[i,j]との値に応じて(図4S12)、注目画素の類似性の強さを、case1〜case9のいずれかに分類する。 When the target pixel is not the G component (NO side in S11 in FIG. 4), the image processing unit 11 includes an index HV [i, j] indicating vertical and horizontal similarity in the target pixel and an index DN [i, j] indicating diagonal similarity. In accordance with the value of FIG. 4 (S12 in FIG. 4), the strength of similarity of the target pixel is classified into one of case1 to case9.
case1:(HV[i,j],DN[i,j])=(0,0):全ての方向の類似性が強い、または、全ての方向の類似性が弱い(類似性の強い方向が不明である)。 case1: (HV [i, j], DN [i, j]) = (0,0): The similarity in all directions is strong or the similarity in all directions is weak (the direction with strong similarity is Unknown).
case2:(HV[i,j],DN[i,j])=(0,1):斜め45度方向の類似性が強い。 case2: (HV [i, j], DN [i, j]) = (0,1): The similarity in the oblique 45 degree direction is strong.
case3:(HV[i,j],DN[i,j])=(0,−1):斜め135度方向の類似性が強い。 case3: (HV [i, j], DN [i, j]) = (0, −1): Similarity in the oblique 135 degree direction is strong.
case4:(HV[i,j],DN[i,j])=(1,0):縦方向の類似性が強い。 case4: (HV [i, j], DN [i, j]) = (1, 0): Similarity in the vertical direction is strong.
case5:(HV[i,j],DN[i,j])=(1,1):縦および斜め45度方向の類似性が強い。 case5: (HV [i, j], DN [i, j]) = (1,1): Strong similarity in the vertical and oblique 45 degree directions.
case6:(HV[i,j],DN[i,j])=(1,−1):縦および斜め135度方向の類似性が強い。 case6: (HV [i, j], DN [i, j]) = (1, -1): Similarity in the vertical and oblique 135 degrees directions is strong.
case7:(HV[i,j],DN[i,j])=(−1,0):横方向の類似性が強い。 case7: (HV [i, j], DN [i, j]) = (− 1, 0): The horizontal similarity is strong.
case8:(HV[i,j],DN[i,j])=(−1,1):横および斜め45度方向の類似性が強い。 case8: (HV [i, j], DN [i, j]) = (− 1,1): The similarity in the horizontal and oblique 45-degree directions is strong.
case9:(HV[i,j],DN[i,j])=(−1,−1):横および斜め135度方向の類似性が強い。 case9: (HV [i, j], DN [i, j]) = (− 1, −1): Similar in the horizontal and oblique 135 degree directions.
上記分類結果に応じて、画像処理部11は、輝度成分を算出する。すなわち、注目画素がcase1に分類され、注目画素が欠陥画素でない場合(図4S13のNO側)、画像処理部11は、係数パターン1を用いて輝度成分を算出する(図4S14)。一方、注目画素がcase1に分類され、注目画素が欠陥画素である場合(図4S13のYES側)、画像処理部11は、係数パターン1aを用いて輝度成分を算出する(図4S15)。
In accordance with the classification result, the image processing unit 11 calculates a luminance component. That is, when the target pixel is classified as
注目画素がcase2に分類され、注目画素が欠陥画素でない場合(図4S16のNO側)、画像処理部11は、係数パターン2を用いて輝度成分を算出する(図4S17)。一方、注目画素がcase2に分類され、注目画素が欠陥画素である場合(図4S16のYES側)、画像処理部11は、係数パターン2aを用いて輝度成分を算出する(図4S18)。
When the target pixel is classified as
注目画素がcase3に分類され、注目画素が欠陥画素でない場合(図4S19のNO側)、画像処理部11は、係数パターン3を用いて輝度成分を算出する(図4S20)。一方、注目画素がcase3に分類され、注目画素が欠陥画素である場合(図4S19のYES側)、画像処理部11は、係数パターン3aを用いて輝度成分を算出する(図4S21)。 When the target pixel is classified as case3 and the target pixel is not a defective pixel (NO side in FIG. 4S19), the image processing unit 11 calculates a luminance component using the coefficient pattern 3 (S20 in FIG. 4). On the other hand, when the target pixel is classified as case 3 and the target pixel is a defective pixel (YES side in FIG. 4 S19), the image processing unit 11 calculates a luminance component using the coefficient pattern 3a (FIG. 4 S21).
注目画素がcase4に分類され、注目画素が欠陥画素でない場合(図4S22のNO側)、画像処理部11は、係数パターン4を用いて輝度成分を算出する(図4S23)。一方、注目画素がcase4に分類され、注目画素が欠陥画素である場合(図4S22のYES側)、画像処理部11は、係数パターン4aを用いて輝度成分を算出する(図4S24)。 When the target pixel is classified as case4 and the target pixel is not a defective pixel (NO side in FIG. 4S22), the image processing unit 11 calculates a luminance component using the coefficient pattern 4 (S23 in FIG. 4). On the other hand, when the target pixel is classified as case4 and the target pixel is a defective pixel (YES side in FIG. 4S22), the image processing unit 11 calculates a luminance component using the coefficient pattern 4a (S24 in FIG. 4).
注目画素がcase5に分類され、注目画素が欠陥画素でない場合(図4S25のNO側)、画像処理部11は、係数パターン5を用いて輝度成分を算出する(図4S26)。一方、注目画素がcase5に分類され、注目画素が欠陥画素である場合(図4S25のYES側)、画像処理部11は、係数パターン5aを用いて輝度成分を算出する(図4S27)。 When the target pixel is classified as case 5 and the target pixel is not a defective pixel (NO side in FIG. 4 S25), the image processing unit 11 calculates a luminance component using the coefficient pattern 5 (S26 in FIG. 4). On the other hand, when the target pixel is classified as case5 and the target pixel is a defective pixel (YES side in FIG. 4S25), the image processing unit 11 calculates a luminance component using the coefficient pattern 5a (S27 in FIG. 4).
注目画素がcase6に分類され、注目画素が欠陥画素でない場合(図5S28のNO側)、画像処理部11は、係数パターン6を用いて輝度成分を算出する(図5S29)。一方、注目画素がcase6に分類され、注目画素が欠陥画素である場合(図5S28のYES側)、画像処理部11は、係数パターン6aを用いて輝度成分を算出する(図5S30)。
When the target pixel is classified as
注目画素がcase7に分類され、注目画素が欠陥画素でない場合(図5S31のNO側)、画像処理部11は、係数パターン7を用いて輝度成分を算出する(図5S32)。一方、注目画素がcase7に分類され、注目画素が欠陥画素である場合(図5S31のYES側)、画像処理部11は、係数パターン7aを用いて輝度成分を算出する(図5S33)。 When the target pixel is classified as case 7 and the target pixel is not a defective pixel (NO side in FIG. 5S31), the image processing unit 11 calculates a luminance component using the coefficient pattern 7 (S32 in FIG. 5). On the other hand, when the target pixel is classified as case 7 and the target pixel is a defective pixel (YES side in FIG. 5S31), the image processing unit 11 calculates a luminance component using the coefficient pattern 7a (S33 in FIG. 5).
注目画素がcase8に分類され、注目画素が欠陥画素でない場合(図5S34のNO側)、画像処理部11は、係数パターン8を用いて輝度成分を算出する(図5S35)。一方、注目画素がcase8に分類され、注目画素が欠陥画素である場合(図5S34のYES側)、画像処理部11は、係数パターン8aを用いて輝度成分を算出する(図5S36)。
When the target pixel is classified as
注目画素がcase9に分類され、注目画素が欠陥画素でない場合(図5S37のNO側)、画像処理部11は、係数パターン9を用いて輝度成分を算出する(図5S38)。一方、注目画素がcase9に分類され、注目画素が欠陥画素である場合(図5S37のYES側)、画像処理部11は、係数パターン9aを用いて輝度成分を算出する(図5S39)。 When the target pixel is classified as case 9, and the target pixel is not a defective pixel (NO side in FIG. 5S37), the image processing unit 11 calculates a luminance component using the coefficient pattern 9 (S38 in FIG. 5). On the other hand, when the target pixel is classified as case 9, and the target pixel is a defective pixel (YES side in FIG. 5S37), the image processing unit 11 calculates a luminance component using the coefficient pattern 9a (S39 in FIG. 5).
ここで、画像処理部11は、18通りの係数パターンのうち、例えば、係数パターン1を選択した場合、次式13のように輝度成分Y[i,j]を算出する。
Here, for example, when the
次に、画像処理部11は、G成分の注目画素の輝度成分Y[i,j]を、上述したような類似性の強さに関係なく、欠陥画素か否かに応じて図11に示す係数パターン10または10aを用いて算出する。
Next, the image processing unit 11 shows the luminance component Y [i, j] of the target pixel of the G component according to whether or not it is a defective pixel regardless of the similarity strength as described above. Calculation is performed using the
ところで、注目画素がG成分であり、かつ注目画素の左側に隣接する画素Z[i−1,j]の指標HV[i−1,j]と指標DN[i−1,j]とが「0」であり、係数パターン10や10aを用いて輝度成分を算出した場合、実際には存在しないチェックパターン状の偽構造が生じることがある。そこで、このような偽構造の発生を抑制するために、G成分の画素における輝度成分を算出する際、本実施形態の画像処理部11は、注目画素がG成分であると判定された場合(図4S11のYES側)、注目画素の左側に隣接する画素Z[i−1,j]の指標HVと指標DNとが「0」であるか否かを判定する(図6S40)。
Incidentally, the index HV [i−1, j] and the index DN [i−1, j] of the pixel Z [i−1, j] adjacent to the left side of the pixel of interest are the G component and the index DN [i−1, j] is “ When the luminance component is calculated using the
すなわち、画像処理部11は、指標HV[i−1,j]と指標DN[i−1,j]とが「0」である場合(図6S40のYES側)、画像処理部11は、注目画素またはそれに隣接する画素Zのいずれかが欠陥画素である否かに基づいて、G成分にローパスフィルタを掛ける係数パターン0、0a〜0eのいずれかを選択し、輝度成分Y[i,j]を算出する(図6S46〜S51)。
That is, when the index HV [i−1, j] and the index DN [i−1, j] are “0” (YES side in FIG. 6 S40), the image processing unit 11 Based on whether the pixel or any of the pixels Z adjacent thereto is a defective pixel, one of
ここで、図11において、α,β,e1,e2,e3,e4,e5,f1,f2,f3,f4は、零以上の値であり、e1+e2+e3+e4+e5=f1+f2+f3+f4=1、およびe3>e1,e2,e4,e5の関係を満たす。e1,e2,e3,e4,e5の値を可変することによって、ローパスフィルタの強弱の設定ができる。例えば、e1,e2,e3,e4,e5の値は、強いローパスフィルタを掛ける場合「1,1,6,1,1」などと設定し、弱いローパスフィルタを掛ける場合「1,1,14,1,1」などと設定する。 Here, in FIG. 11, α, β, e 1 , e 2 , e 3 , e 4 , e 5 , f 1 , f 2 , f 3 , and f 4 are zero or more values, and e 1 + e 2 + E 3 + e 4 + e 5 = f 1 + f 2 + f 3 + f 4 = 1 and e 3 > e 1 , e 2 , e 4 , e 5 are satisfied. By changing the values of e 1 , e 2 , e 3 , e 4 , and e 5 , the strength of the low-pass filter can be set. For example, the values of e 1 , e 2 , e 3 , e 4 , e 5 are set to “1, 1, 6, 1, 1” when applying a strong low-pass filter, and “1” when applying a weak low-pass filter. , 1, 14, 1, 1 "and the like.
また、係数パターン0a〜0eにおけるe3>e1,e2,e4,e5の関係により、画素G[i−1,j−1]、G[i−1,j+1]、G[i+1,j−1]、G[i+1,j+1]の影響を小さくすることができる。そのため、それらの画素が欠陥画素か否かの判定は省略でき、画像処理部11による画像処理の高速化を図ることができる。 In addition, the pixels G [i−1, j−1], G [i−1, j + 1], and G [i + 1] are determined according to the relationship of e 3 > e 1 , e 2 , e 4 , and e 5 in the coefficient patterns 0a to 0e. , J−1] and G [i + 1, j + 1] can be reduced. Therefore, the determination of whether or not these pixels are defective pixels can be omitted, and the speed of image processing by the image processing unit 11 can be increased.
また、係数パターン0a〜0eは、注目画素またはそれに隣接する画素が欠陥画素である場合、欠陥画素における画像値が同色成分を有する近傍の画素の画素値を平均した値となるように設定されている。 Also, the coefficient patterns 0a to 0e are set so that when the target pixel or a pixel adjacent thereto is a defective pixel, the image value of the defective pixel is an average value of the pixel values of neighboring pixels having the same color component. Yes.
例えば、画像処理部11は、注目画素およびそれに隣接する画素が欠陥画素でない場合(図6S46)、係数パターン0を選択し輝度成分Y[i,j]を次式14のように算出する。
For example, when the pixel of interest and the pixel adjacent thereto are not defective pixels (S46 in FIG. 6), the image processing unit 11 selects the
一方、指標HV[i−1,j]と指標DN[i−1,j]との少なくとも一方が「0」でない場合(図6S40のNO側)、画像処理部11は、注目画素が欠陥画素でない場合(図6A41のNO側)、係数パターン10を用いて輝度成分を算出し(図6S42)、注目画素が欠陥画素である場合(図6A41のYES側)、係数パターン10aを用いて輝度成分を算出する(図6S43)。
4.輝度面の補正処理
次に、画像処理部11は、算出された輝度面に対し、予め決められた固定のフィルタ係数によるフィルタ処理のエッジ強調処理を行い、輝度面を補正する(図3S4)。
On the other hand, when at least one of the index HV [i−1, j] and the index DN [i−1, j] is not “0” (NO side in FIG. 6), the image processing unit 11 determines that the target pixel is a defective pixel. If not (NO side in FIG. 6A41), the luminance component is calculated using the coefficient pattern 10 (S42 in FIG. 6). If the target pixel is a defective pixel (YES side in FIG. 6A41), the luminance component is calculated using the coefficient pattern 10a. Is calculated (S43 in FIG. 6).
4). Luminance Surface Correction Processing Next, the image processing unit 11 performs edge enhancement processing of filter processing with a predetermined fixed filter coefficient on the calculated luminance surface to correct the luminance surface (S4 in FIG. 3).
例えば、画像処理部11は、図12に示すように、フィルタ係数として正および負の値を含むバンドパスフィルタを輝度面に掛けた結果を、元の輝度面に加算することによって、エッジ強調処理を行う。すなわち、輝度面の補正は、次式15および式16による演算によって施される。
For example, as shown in FIG. 12, the image processing unit 11 adds the result obtained by applying a bandpass filter including positive and negative values as filter coefficients to the luminance plane to the original luminance plane, thereby performing edge enhancement processing. I do. That is, the correction of the luminance surface is performed by the calculation according to the following
なお、画像処理部11は、このように算出された輝度面を、モノクロ画像として出力してもよい。
5.色差成分算出処理
次に、画像処理部11は、R成分の画素およびB成分の画素に対して、図7に示す色差成分算出処理を行い、R成分の画素位置にCr成分を算出し、B成分の画素位置にCb成分を算出する(図3S5)。
Note that the image processing unit 11 may output the luminance plane calculated in this way as a monochrome image.
5. Color Difference Component Calculation Processing Next, the image processing unit 11 performs the color difference component calculation processing shown in FIG. 7 on the R component pixel and the B component pixel, calculates the Cr component at the R component pixel position, and B The Cb component is calculated at the pixel position of the component (S5 in FIG. 3).
本実施形態の色差成分算出処理では、ベイヤ配列型画像データのうち、注目画素を中心とする対象領域に位置する複数の画素の色情報を直接加重加算することによって色差成分を算出する。この加重加算に用いられる色情報や加重加算の係数は、注目画素における類似性の強弱に基づいて決められる。本実施形態では、この色差成分算出処理を行うための係数パターンが予め用意され、メモリ13に記憶されている。
In the color difference component calculation processing of the present embodiment, the color difference component is calculated by directly weight-adding the color information of a plurality of pixels located in the target region centered on the target pixel in the Bayer array image data. The color information used for the weighted addition and the weighted addition coefficient are determined based on the strength of similarity in the pixel of interest. In the present embodiment, a coefficient pattern for performing this color difference component calculation process is prepared in advance and stored in the
図13および図14は、色差成分を算出するために用いられる係数パターンの一例を示す。図14に示す係数パターンは、図13に示す係数パターンに比べ、偽色の発生を抑制する効果が大きい。なお、本実施形態では、図13に示す係数パターンとともに、注目画素またはそれに隣接する画素が欠陥画素である場合の図15〜図17に示す係数パターンを用いる。 13 and 14 show an example of a coefficient pattern used for calculating the color difference component. The coefficient pattern shown in FIG. 14 has a greater effect of suppressing the occurrence of false colors than the coefficient pattern shown in FIG. In the present embodiment, in addition to the coefficient pattern shown in FIG. 13, the coefficient pattern shown in FIGS. 15 to 17 in the case where the pixel of interest or a pixel adjacent thereto is a defective pixel is used.
本実施形態の画像処理部11は、注目画素(R成分の画素やB成分の画素)における縦横類似性を示す指標HV[i,j]の値に応じて、次のA〜Cに分類し(図7S60)、色差成分を算出する。 The image processing unit 11 according to the present embodiment classifies the following A to C according to the value of the index HV [i, j] indicating the vertical and horizontal similarity of the target pixel (R component pixel or B component pixel). (S60 in FIG. 7), the color difference component is calculated.
A)HV[i,j]=1の場合
画像処理部11は、注目画素Z[i,j]および縦方向に隣接する画素G[i,j±1]が欠陥画素でない場合(図7S61のNO側)、係数パターン11を用いて色差成分を算出する(図7S62)。一方、画像処理部11は、画素G[i,j−1]が欠陥画素である場合、係数パターン11aを用いて色差成分を算出し(図7S63)、画素G[i,j+1]が欠陥画素である場合、係数パターン11bを用いて色差成分を算出し(図7S64)、注目画素Z[i,j]が欠陥画素である場合、係数パターン11cを用いて色差成分を算出する(図7S65)。
A) When HV [i, j] = 1 The image processing unit 11 determines that the target pixel Z [i, j] and the vertically adjacent pixel G [i, j ± 1] are not defective pixels (in FIG. NO side), the color difference component is calculated using the coefficient pattern 11 (S62 in FIG. 7). On the other hand, when the pixel G [i, j-1] is a defective pixel, the image processing unit 11 calculates a color difference component using the coefficient pattern 11a (S63 in FIG. 7), and the pixel G [i, j + 1] is a defective pixel. If it is, the color difference component is calculated using the coefficient pattern 11b (S64 in FIG. 7). If the target pixel Z [i, j] is a defective pixel, the color difference component is calculated using the coefficient pattern 11c (S65 in FIG. 7). .
B)HV[i,j]=−1の場合
画像処理部11は、注目画素Z[i,j]および横方向に隣接する画素G[i±1,j]が欠陥画素でない場合(図7S66のNO側)、係数パターン12を用いて色差成分を算出する(図7S67)。一方、画像処理部11は、画素G[i−1,j]が欠陥画素である場合、係数パターン12aを用いて色差成分を算出し(図7S68)、画素G[i+1,j]が欠陥画素である場合、係数パターン12bを用いて色差成分を算出し(図7S69)、注目画素Z[i,j]が欠陥画素である場合、係数パターン12cを用いて色差成分を算出する(図7S70)。
B) When HV [i, j] = − 1 The image processing unit 11 determines that the target pixel Z [i, j] and the laterally adjacent pixel G [i ± 1, j] are not defective pixels (FIG. 7 S66). And the color difference component is calculated using the coefficient pattern 12 (S67 in FIG. 7). On the other hand, when the pixel G [i−1, j] is a defective pixel, the image processing unit 11 calculates a color difference component using the coefficient pattern 12a (S68 in FIG. 7), and the pixel G [i + 1, j] is a defective pixel. If it is, the color difference component is calculated using the coefficient pattern 12b (S69 in FIG. 7), and if the target pixel Z [i, j] is a defective pixel, the color difference component is calculated using the coefficient pattern 12c (S70 in FIG. 7). .
C)HV[i,j]=0の場合
画像処理部11は、注目画素Z[i,j]および縦横方向に隣接する画素G[i±1,j]、G[i,j±1]が欠陥画素でない場合(図7S71のNO側)、係数パターン13を用いて色差成分を算出する(図7S72)。一方、画像処理部11は、画素G[i,j−1]が欠陥画素である場合、係数パターン13aを用いて色差成分を算出し(図7S73)、画素G[i−1,j]が欠陥画素である場合、係数パターン13bを用いて色差成分を算出し(図7S74)、画素G[i+1,j]が欠陥画素である場合、係数パターン13cを用いて色差成分を算出し(図7S75)、画素G[i,j+1]が欠陥画素である場合、係数パターン13dを用いて色差成分を算出し(図7S76)、注目画素Z[i,j]が欠陥画素である場合、係数パターン13eを用いて色差成分を算出する(図7S77)。
C) In the case of HV [i, j] = 0 The image processing unit 11 reads the pixel of interest Z [i, j] and the pixels G [i ± 1, j] and G [i, j ± 1] adjacent in the vertical and horizontal directions. Is not a defective pixel (NO side in FIG. 7 S71), a color difference component is calculated using the coefficient pattern 13 (S72 in FIG. 7). On the other hand, when the pixel G [i, j-1] is a defective pixel, the image processing unit 11 calculates a color difference component using the coefficient pattern 13a (S73 in FIG. 7), and the pixel G [i-1, j] If it is a defective pixel, the color difference component is calculated using the coefficient pattern 13b (FIG. 7S74), and if the pixel G [i + 1, j] is a defective pixel, the color difference component is calculated using the coefficient pattern 13c (FIG. 7S75). ) When the pixel G [i, j + 1] is a defective pixel, a color difference component is calculated using the coefficient pattern 13d (S76 in FIG. 7). When the pixel of interest Z [i, j] is a defective pixel, the coefficient pattern 13e is calculated. Is used to calculate the color difference component (S77 in FIG. 7).
例えば、HV[i,j]=1、かつ注目画素およびそれに隣接する画素が欠陥画素でなく、注目画素がR成分である場合、画像処理部11は、係数パターン11を選択し色差成分Cr[i,j]を次式17のように算出する(図7S62)。 For example, when HV [i, j] = 1, the target pixel and the adjacent pixel are not defective pixels, and the target pixel is an R component, the image processing unit 11 selects the coefficient pattern 11 and selects the color difference component Cr [ i, j] is calculated as in the following equation 17 (S62 in FIG. 7).
なお、画像処理部11は、R成分またはB成分の注目画素Z[i,j]における指標HVの設定を、メモリ13に記憶された欠陥画素の画素位置の情報に基づいて行った場合、色差成分算出処理を簡略化することができる。すなわち、図3S1において、画素G[i,j−1]もしくはG[i,j+1]、または画素G[i−1,j]もしくはG[i+1,j]が欠陥画素と判定され、注目画素Zの指標HV[i,j]が1または−1に設定された場合、画像処理部11は、図7S61、S66またはS71において、注目画素Zが欠陥画素か否かを判定するだけでよい。
When the image processing unit 11 sets the index HV in the target pixel Z [i, j] of the R component or the B component based on the pixel position information of the defective pixel stored in the
例えば、HV[i,j]=1の場合、画像処理部11は、メモリ13の欠陥画素の画素位置の情報に基づいて、注目画素Z[i,j]が欠陥画素でないと判定した場合(図7S61のNO側)、係数パターン11を用いて色差成分を算出する(図7S62)。一方、画像処理部11は、注目画素Z[i,j]が欠陥画素であると判定した場合(図7S61のYES側)、係数パターン11cを用いて色差成分を算出する(図7S65)。 For example, when HV [i, j] = 1, the image processing unit 11 determines that the pixel of interest Z [i, j] is not a defective pixel based on information on the pixel position of the defective pixel in the memory 13 ( The color difference component is calculated using the coefficient pattern 11 (S62 in FIG. 7) (S62 in FIG. 7). On the other hand, when the image processing unit 11 determines that the target pixel Z [i, j] is a defective pixel (YES side in FIG. 7S61), the image processing unit 11 calculates a color difference component using the coefficient pattern 11c (FIG. 7S65).
また、HV[i,j]=−1の場合、画像処理部11は、欠陥画素の画素位置の情報に基づいて、注目画素Z[i,j]が欠陥画素でないと判定した場合(図7S66のNO側)、係数パターン12を用いて色差成分を算出する(図7S67)。一方、画像処理部11は、注目画素Z[i,j]が欠陥画素であると判定した場合(図7S66のYES側)、係数パターン12cを用いて色差成分を算出する(図7S70)。 When HV [i, j] = − 1, the image processing unit 11 determines that the target pixel Z [i, j] is not a defective pixel based on the pixel position information of the defective pixel (S66 in FIG. 7). And the color difference component is calculated using the coefficient pattern 12 (S67 in FIG. 7). On the other hand, when the image processing unit 11 determines that the target pixel Z [i, j] is a defective pixel (YES side in FIG. 7 S66), the image processing unit 11 calculates a color difference component using the coefficient pattern 12c (FIG. 7 S70).
また、HV[i,j]=0の場合、画像処理部11は、欠陥画素の画素位置の情報に基づいて、注目画素Z[i,j]が欠陥画素でないと判定した場合(図7S71のNO側)、係数パターン13を用いて色差成分を算出する(図7S72)。一方、画像処理部11は、注目画素Z[i,j]が欠陥画素であると判定した場合(図7S71のYES側)、係数パターン13eを用いて色差成分を算出する(図7S77)。
6.CrCb成分の補間処理
次に、画像処理部11は、上記色差成分算出処理を、全てのR成分の画素およびB成分の画素に対して行った後、Cr成分やCb成分が欠落する画素に、Cr成分やCb成分を補間して色差面を算出する(図3S6)。なお、Cr成分を補間する処理とCb成分を補間する処理とは、同様に行えるため、ここでは、Cr成分を補間する処理の説明を行い、Cb成分を補間する処理の説明は省略する。
When HV [i, j] = 0, the image processing unit 11 determines that the target pixel Z [i, j] is not a defective pixel based on the information on the pixel position of the defective pixel (in FIG. 7, S71). NO side), a color difference component is calculated using the coefficient pattern 13 (S72 in FIG. 7). On the other hand, when the image processing unit 11 determines that the target pixel Z [i, j] is a defective pixel (YES side in FIG. 7S71), the image processing unit 11 calculates a color difference component using the coefficient pattern 13e (FIG. 7S77).
6). CrCb Component Interpolation Processing Next, the image processing unit 11 performs the above-described color difference component calculation processing on all R component pixels and B component pixels, and then performs the processing on pixels that lack Cr components and Cb components. The color difference plane is calculated by interpolating the Cr component and the Cb component (S6 in FIG. 3). In addition, since the process which interpolates Cr component and the process which interpolates Cb component can be performed similarly, description of the process which interpolates Cr component is performed here, and description of the process which interpolates Cb component is abbreviate | omitted.
画像処理部11は、Cr成分が欠落する画素におけるCr成分として、その画素の周辺に位置する複数のR成分の画素におけるCr成分の平均値を求め、Cr成分を補間する。すなわち、画像処理部11は、次式18〜20に基づいて、B成分、Gr成分、およびGb成分それぞれの画素位置におけるCr成分の補間値を算出する。
・B成分の画素:
The image processing unit 11 obtains an average value of Cr components in a plurality of R component pixels around the pixel as a Cr component in a pixel lacking the Cr component, and interpolates the Cr component. That is, the image processing unit 11 calculates the interpolation value of the Cr component at each pixel position of the B component, the Gr component, and the Gb component based on the following equations 18-20.
-B component pixels:
・R成分の画素:
-R component pixels:
画像処理部11は、上述のようにCr成分やCb成分を補間して色差面を算出し、YCbCrのカラー画像として出力する。
7.RGB面の算出処理
画像処理部11は、輝度面と色差面とに対して表色系変換処理を行い、RGB面を算出する(図3S7)。
As described above, the image processing unit 11 interpolates the Cr component and the Cb component to calculate the color difference plane, and outputs it as a YCbCr color image.
7). RGB Surface Calculation Processing The image processing unit 11 performs color system conversion processing on the luminance surface and the color difference surface to calculate the RGB surface (S7 in FIG. 3).
すなわち、画像処理部11は、表色系変換処理として、例えば、次式25〜式27による演算を行いRGB面を算出する。
That is, as the color system conversion process, the image processing unit 11 calculates, for example, an RGB plane by performing calculations according to the following
本実施形態では、R成分の画素およびB成分の画素に対して18通りの係数パターンを用意し、類似性および注目画素が欠陥画素か否かに応じて係数パターンを選択して、輝度成分が算出される。したがって、微細なエッジ部に至るまで極めて滑らかな輝度面を生成することができる。 In this embodiment, 18 kinds of coefficient patterns are prepared for the R component pixel and the B component pixel, the coefficient pattern is selected according to the similarity and whether the target pixel is a defective pixel, and the luminance component is Calculated. Therefore, it is possible to generate a very smooth luminance surface up to a fine edge portion.
また、本実施形態では、注目画素および注目画素に隣接する画素のうち、様々な方向の類似性および欠陥画素の画素位置を考慮しつつ、最も狭い範囲に位置するRGBの3つの色成分の色情報を用いた加重加算を行うため、ベイヤ配列型画像データに対する輝度成分算出処理と相性がよく、滑らかな輝度面を算出することができる。 In the present embodiment, the colors of the three color components of RGB located in the narrowest range are considered in consideration of similarity in various directions and pixel positions of defective pixels among the target pixel and the pixels adjacent to the target pixel. Since weighted addition using information is performed, it is compatible with the luminance component calculation processing for Bayer array image data, and a smooth luminance surface can be calculated.
また、本実施形態では、輝度成分算出処理で用いられる係数パターンは、輝度成分を構成するRGBの比率が一定となるように設定されるとともに、欠陥画素の画素値が、類似性の方向に基づいて、欠陥画素と同色成分を有する近傍の周辺画素の画素値を平均した値に設定される。これにより、被写体に存在し得ない構造(ベイヤ配列に起因する構造)が画素ごとに変化するような構造となって現れることを抑制することができ、各画素で輝度値を構成するRGBの比率が不均一であった従来技術と比べ、より正確な輝度面および色差面を算出することができる。 In this embodiment, the coefficient pattern used in the luminance component calculation processing is set so that the ratio of RGB constituting the luminance component is constant, and the pixel value of the defective pixel is based on the direction of similarity. Thus, the pixel values of neighboring peripheral pixels having the same color component as the defective pixel are set to average values. As a result, it is possible to suppress the appearance of a structure that cannot exist in the subject (a structure resulting from the Bayer array) that changes for each pixel, and the ratio of RGB that constitutes a luminance value in each pixel. Compared with the prior art in which is non-uniform, more accurate luminance plane and color difference plane can be calculated.
また、本実施形態では、微細な構造を保持した輝度面にエッジ強調処理を行うことにより、高周波成分の補正が実現でき、高周波成分の補正が不十分であった従来技術と比べ、より高精細な輝度面が得られる。 In the present embodiment, the edge enhancement process is performed on the luminance surface having a fine structure, so that the correction of the high frequency component can be realized, and the high definition is higher than the conventional technology in which the correction of the high frequency component is insufficient. Brightness surface can be obtained.
また、本実施形態では、色差面が、輝度面とは独立にベイヤ配列型画像データから直接算出され、偽色の発生要因となる輝度面の周波数特性の影響を受けないことから、精度よく色差面を算出することができる。 In the present embodiment, the color difference plane is calculated directly from the Bayer array type image data independently of the luminance plane, and is not affected by the frequency characteristics of the luminance plane, which is a cause of false colors. The surface can be calculated.
また、図20に示すように、本実施形態では、類似性を示す指標がベイヤ配列型画像データ、または欠陥画素の画素位置の情報から直接算出される。すなわち、各画素における類似方向の分類を、構造的要因に関する高周波成分が一様に破壊されてしまった「ぼかされた輝度値」を参照して行っていた従来技術と異なり、ベイヤ配列型画像データ、または欠陥画素の画素位置の情報を直接用いて類似性が判定されるため、微細な構造部分における解像性能が高い輝度面を算出することができる。 As shown in FIG. 20, in this embodiment, an index indicating similarity is directly calculated from Bayer array image data or pixel position information of defective pixels. In other words, unlike the conventional technique in which the similar directions in each pixel are classified with reference to “blurred luminance values” in which high-frequency components related to structural factors are uniformly destroyed, a Bayer array image is used. Since similarity is determined by directly using data or pixel position information of defective pixels, a luminance plane with high resolution performance in a fine structure portion can be calculated.
このように、本実施形態によれば、欠陥画素の補正処理と高画質化の処理とが同時に施されることにより、高精度かつ高速に行うことができる。 As described above, according to the present embodiment, the defective pixel correction process and the high image quality process are performed at the same time, so that it can be performed with high accuracy and high speed.
また、本実施形態では、輝度面を算出する際に類似性が考慮されているので、高周波成分の補正が固定係数のバンドパスフィルタによって実現できる。そのため、従来技術で行われていた各々の画素の類似方向に応じて異なる補正値を用いる補正が不要であり、かつ、補正処理を行うための参照面が少なくて済む。したがって、輝度面の算出をハードウエアで行う場合、従来技術よりも、ハードウエアの構造を簡略化することができ、コストを削減することができる。 Further, in the present embodiment, since similarity is taken into account when calculating the luminance plane, the correction of the high frequency component can be realized by a band-pass filter having a fixed coefficient. Therefore, it is not necessary to perform correction using different correction values according to the similar direction of each pixel, which is performed in the prior art, and the number of reference planes for performing correction processing is small. Therefore, when the luminance plane is calculated by hardware, the hardware structure can be simplified and the cost can be reduced as compared with the prior art.
なお、本実施形態では、図3S6によってCr成分やCb成分が補間されて色差面が算出されたが、このような色差面に、偽色の発生を更に低減するための補正処理(例えば、メディアンフィルタなどによる処理)を適用してもよい。 In the present embodiment, the chrominance plane is calculated by interpolating the Cr component and the Cb component in FIG. 3S6. However, correction processing (for example, median processing) for further reducing the occurrence of false colors on such a chrominance plane is performed. Processing by a filter or the like may be applied.
なお、本実施形態の輝度成分算出処理では、注目画素がG成分の場合、注目画素の左側に隣接する画素における方向類似性に応じて選択的にローパスフィルタを掛けるための異なる係数パターン0、0a〜0e、10、10aを用意したが、通常の画像復元処理だけの場合、G成分の注目画素における輝度成分は、このような方向類似性に関係なく、係数パターン10、10aを用いて算出されてもよい。すなわち、図6S40〜S51の処理のうち、図6S41〜S43の処理のみが行われるのが好ましい。
《一の実施形態の変形例》
以下に、一の実施形態の変形例の動作について説明する。
In the luminance component calculation processing of the present embodiment, when the target pixel is the G component,
<< Modification of one embodiment >>
The operation of the modification of one embodiment will be described below.
本実施形態と一の実施形態との相違点は、一の実施形態で行われていた斜め類似性を示す指標DNの設定(図3S2)の処理が省略され、それに伴い図4〜図6に示す輝度成分算出処理が、図21および図22に示すように簡略化される点にある。すなわち、図21S12’および図22S40’において、本実施形態の画像処理部11は、指標HVのみに基づいて、係数パターンを選択する。なお、図21および図22に示す画像処理部11の動作フローチャートにおいて、図4〜図6と同じ動作を行うステップについては、同じステップ番号を付与し説明を省略する。 The difference between the present embodiment and the first embodiment is that the process of setting the index DN (FIG. 3S2) indicating the diagonal similarity performed in the first embodiment is omitted, and accordingly, FIGS. The luminance component calculation process shown is simplified as shown in FIGS. That is, in FIG. 21S12 'and FIG. 22S40', the image processing unit 11 of the present embodiment selects a coefficient pattern based only on the index HV. In the operation flowchart of the image processing unit 11 shown in FIGS. 21 and 22, steps that perform the same operations as those in FIGS. 4 to 6 are given the same step numbers and description thereof is omitted.
このように、本実施形態では、一の実施形態で行われていた斜め類似性を示す指標DNの設定が省略され、係数パターンの数が削減される。そのため、本実施形態によれば、様々な方向の微細なエッジ部に至るまで極めて滑らかな輝度面を、一の実施形態よりも簡略な処理手順で生成することができ、欠陥画素の補正処理と高画質化の処理とを高精度かつ高速に行うことができる。 As described above, in the present embodiment, the setting of the index DN indicating the diagonal similarity performed in the first embodiment is omitted, and the number of coefficient patterns is reduced. Therefore, according to the present embodiment, it is possible to generate a very smooth luminance surface up to fine edge portions in various directions with a simpler processing procedure than that of the first embodiment, High-quality processing can be performed with high accuracy and high speed.
なお、本実施形態の輝度成分算出処理では、注目画素がG成分の場合、注目画素の左側に隣接する画素における方向類似性に応じて選択的にローパスフィルタを掛けるための異なる係数パターン0、0a〜0e、10、10aを用意したが、通常の画像復元処理だけの場合、G成分の注目画素における輝度成分は、このような方向類似性に関係なく、係数パターン10、10aを用いて算出されてもよい。すなわち、図22S40’〜S51の処理のうち、図22S41〜43の処理のみが行われるのが好ましい。
《他の実施形態》
以下に、本発明の他の実施形態の動作について説明する。
In the luminance component calculation processing of the present embodiment, when the target pixel is the G component,
<< Other embodiments >>
The operation of another embodiment of the present invention will be described below.
本実施形態では、図1に示すPC18によって画像処理が行われる。
In the present embodiment, image processing is performed by the
なお、PC18には、CD−ROM26などの記録媒体に記録された画像処理プログラム(上記一の実施形態の画像処理部11による画像復元処理を実現する画像処理プログラム)が予めインストールされているものとする。すなわち、PC18内の不図示のハードディスクには、画像処理プログラムが不図示のCPUによって実行可能な状態で格納されている。
The
次に、図1を参照しつつ本実施形態の動作を説明する。 Next, the operation of this embodiment will be described with reference to FIG.
PC18によって画像復元処理される画像データは、電子カメラ1の撮像素子21によって撮像され、DFE10によって所定の信号処理が施されて生成された画像データとする。また、画像データは、画像処理部11によって、ホワイトバランス処理、階調変換やγ補正などの画像処理が予め施されているとする。さらに、その画像データは、画像処理部11によって、欠陥画素の画素位置の情報が付加されて画像ファイルとして生成され、カードI/F17を介してメモリカード16に記憶されているとする。
The image data subjected to the image restoration process by the
なお、画像ファイルは、例えば、Exif(Exchangeable image file format for digital still cameras)規格やTIFF/EP規格などに準拠した形式であるとする。また、画像データの欠陥画素の画素値は、公知の欠陥画素補正処理により予め補正されていてもよい。 It is assumed that the image file has a format conforming to, for example, the Exif (Exchangeable image file format for digital still cameras) standard or the TIFF / EP standard. The pixel value of the defective pixel in the image data may be corrected in advance by a known defective pixel correction process.
そして、電子カメラ1において、操作部23を介し操作者によりPC通信モードが選択され画像データの転送が指示されると、カードI/F17および入出力I/F19を介して、カードメモリ16に記憶された画像ファイルがPC18へ転送される。PC18のCPU(不図示)は、電子カメラ1から画像ファイルを読み込むと、上述した画像処理プログラムを実行する。PC18のCPU(不図示)は、画像処理プログラムに基づいて、画像ファイルに付加された欠陥画素の画素位置の情報を読み込み、画像データに対して、一の実施形態と同様の画像復元処理を行う。
In the
なお、画像処理プログラムの実行により、画像復元処理された画像データは、必要に応じて圧縮処理して不図示のハードディスクに記録されたり、モニタ24やプリンタ25で採用されている表色系に変換され表示出力されたりするのが好ましい。
By executing the image processing program, the image data subjected to the image restoration process is compressed as necessary and recorded on a hard disk (not shown), or converted into a color system adopted by the
このように、本実施形態では、上記実施形態と同様の画像復元処理がPC18により行われ、欠陥画素の補正処理と高画質化の処理とを高精度かつ高速に行うことができる。
As described above, in the present embodiment, the image restoration process similar to that in the above-described embodiment is performed by the
また、PC18のCPU(不図示)は、画像ファイルを記録したメモリカード16がPC18に直接装着された場合、そのメモリカード16から画像データを読み出し画像処理プログラムを実行してもよい。
Further, the CPU (not shown) of the
また、本実施形態では、画像復元処理において、欠陥画素の画素位置の情報が付加された画像データを用いたが、PC18が、画像ファイルとともに、電子カメラ1から撮像素子21の欠陥画素の画素位置の情報を読み込み、不図示のメモリなどに記録することにより、欠陥画素の画素位置の情報が付加されていない画像ファイルの画像データに対しても画像復元処理を行うことができる。
In the present embodiment, the image data to which the pixel position information of the defective pixel is added is used in the image restoration processing. However, the
また、画像処理プログラムは、インターネットを介して所定のホームページにアクセスすることによって、PC18にダウンロードされてインストールされてもよい。
The image processing program may be downloaded and installed on the
また、画像処理プログラムは、PC18で実行せず、インターネットなどを介して接続される遠隔地のサーバなどで実行されてもよい。すなわち、PC18は、電子カメラ1から読み込んだ画像データを、インターネットなどを介して、画像処理プログラムが実行可能なサーバなどに転送することにより、その画像データに対し画像復元処理を行ってもよい。
《実施形態の補足事項》
上記実施形態では、RGB表色系で示され、かつ、各々の画素にR,G,Bのいずれか1つの色成分の色情報が存在する画像に対する処理を説明したが、同様の処理は、他の表色系で示される画像に対しても適用できる。
Further, the image processing program may not be executed by the
<< Additional items of embodiment >>
In the above-described embodiment, the processing for an image that is represented in the RGB color system and in which each pixel has color information of any one of R, G, and B color components has been described. The present invention can also be applied to an image shown in another color system.
上記実施形態では、色成分が図2に示すように配列された画像データを処理対象としたが、本発明はこれに限定されず、様々な色成分の配列の画像データを処理対象とすることができる。 In the above-described embodiment, image data in which color components are arranged as shown in FIG. 2 is a processing target. However, the present invention is not limited to this, and image data having various color component arrangements is a processing target. Can do.
上記実施形態では、画像データは、画像復元処理の前にホワイトバランス処理などの画像処理が施されたが、本発明はこれに限定されず、画像復元処理の後にホワイトバランス処理などの画像処理を行ってもよい。 In the above embodiment, the image data is subjected to image processing such as white balance processing before the image restoration processing, but the present invention is not limited to this, and image processing such as white balance processing is performed after the image restoration processing. You may go.
以上の詳細な説明により、実施形態の特徴点及び利点は明らかになるであろう。これは、特許請求の範囲が、その精神及び権利範囲を逸脱しない範囲で前述のような実施形態の特徴点及び利点にまで及ぶことを意図する。また、当該技術分野において通常の知識を有する者であれば、あらゆる改良及び変更に容易に想到できるはずであり、発明性を有する実施形態の範囲を前述したものに限定する意図はなく、実施形態に開示された範囲に含まれる適当な改良物及び均等物によることも可能である。 From the above detailed description, features and advantages of the embodiment will become apparent. It is intended that the scope of the claims extend to the features and advantages of the embodiments described above without departing from the spirit and scope of the right. Further, any person having ordinary knowledge in the technical field should be able to easily come up with any improvements and changes, and there is no intention to limit the scope of the embodiments having the invention to those described above. It is also possible to use appropriate improvements and equivalents included in the scope disclosed in.
1 電子カメラ、10 DFE、11 画像処理部、12 CPU、13 メモリ、14 表示I/F、15、24 モニタ、16 メモリカード、17 メディアI/F、18 PC、19 入出力I/F、20 撮像光学系、21 撮像素子、22 TG、23 操作部、25 プリンタ、26 CD−ROM 1 electronic camera, 10 DFE, 11 image processing unit, 12 CPU, 13 memory, 14 display I / F, 15, 24 monitor, 16 memory card, 17 media I / F, 18 PC, 19 input / output I / F, 20 Imaging optical system, 21 imaging device, 22 TG, 23 operation unit, 25 printer, 26 CD-ROM
Claims (20)
前記第1画像における欠陥画素の画素位置の情報を記憶する記憶部と、を備え、
前記画像処理部は、前記第1画像の色情報を前記注目画素の画素位置で加重加算する複数の係数パターンを用意し、前記注目画素の色成分および前記欠陥画素の画素位置に基づいて、前記係数パターンを選択し加重加算する
ことを特徴とする画像処理装置。 The color information of the first image in which each pixel has color information of any one of a plurality of color components is weighted and added at the pixel position of the pixel of interest to obtain a value of a color component different from the color component of the pixel of interest. An image processing unit that calculates and generates a second image in which each pixel has a plurality of color components;
A storage unit that stores information on pixel positions of defective pixels in the first image,
The image processing unit prepares a plurality of coefficient patterns for weight-adding the color information of the first image at the pixel position of the target pixel, and based on the color component of the target pixel and the pixel position of the defective pixel, An image processing apparatus characterized by selecting a coefficient pattern and performing weighted addition.
前記第1画像は、欠陥画素の画素位置の情報が付加され、
前記画像処理部は、前記第1画像の色情報を前記注目画素の画素位置で加重加算する複数の係数パターンを用意し、前記注目画素の色成分および前記欠陥画素の画素位置に基づいて、前記係数パターンを選択し加重加算する
ことを特徴とする画像処理装置。 The color information of the first image in which each pixel has color information of any one of a plurality of color components is weighted and added at the pixel position of the pixel of interest to obtain a value of a color component different from the color component of the pixel of interest. An image processing unit that calculates and generates a second image in which each pixel has a plurality of color components;
In the first image, information on the pixel position of the defective pixel is added,
The image processing unit prepares a plurality of coefficient patterns for weight-adding the color information of the first image at the pixel position of the target pixel, and based on the color component of the target pixel and the pixel position of the defective pixel, An image processing apparatus characterized by selecting a coefficient pattern and performing weighted addition.
前記画像処理部は、前記注目画素の画素位置における複数の方向に対する類似性の強弱を判定し、前記注目画素の色成分および欠陥画素の画素位置とともに、その判定結果に基づいて、前記係数パターンを選択することを特徴とする画像処理装置。 The image processing apparatus according to claim 1 or 2,
The image processing unit determines the strength of similarity in a plurality of directions at the pixel position of the target pixel, and calculates the coefficient pattern based on the determination result together with the color component of the target pixel and the pixel position of the defective pixel. An image processing apparatus characterized by selecting.
前記画像処理部は、前記注目画素に隣接する画素が前記欠陥画素である場合、前記隣接する画素の画素位置に基づいて、前記注目画素の画素位置における複数の方向に対する類似性の強弱を判定することを特徴とする画像処理装置。 The image processing apparatus according to claim 3.
When the pixel adjacent to the target pixel is the defective pixel, the image processing unit determines the strength of similarity in a plurality of directions at the pixel position of the target pixel based on the pixel position of the adjacent pixel. An image processing apparatus.
前記係数パターンは、前記注目画素の画素位置を中心に前記複数の色成分の色情報が含まれる最小の領域内の画素の色情報を加重加算する零以上の値からなることを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 1 to 4,
The coefficient pattern is an image having a value of zero or more that weights and adds color information of pixels in a minimum area including color information of the plurality of color components centered on a pixel position of the target pixel. Processing equipment.
前記第1画像における欠陥画素の画素位置の情報を記憶する記憶部と、を備え、
前記画像処理部は、前記注目画素の色成分および前記欠陥画素の画素位置に基づいて前記係数を変え、前記注目画素の色情報と前記注目画素に隣接する画素の色情報とを加重加算する
ことを特徴とする画像処理装置。 The color information of the pixel of interest by weight-adding the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the pixel of interest using a variable coefficient of zero or more. An image processing unit that calculates a value of a different color component and generates a second image in which each pixel has a plurality of color components;
A storage unit that stores information on pixel positions of defective pixels in the first image,
The image processing unit changes the coefficient based on a color component of the target pixel and a pixel position of the defective pixel, and performs weighted addition of the color information of the target pixel and the color information of a pixel adjacent to the target pixel. An image processing apparatus.
前記第1画像は、欠陥画素の位置情報が付加され、
前記画像処理部は、前記注目画素の色成分および前記欠陥画素の画素位置に基づいて前記係数を変え、前記注目画素の色情報と前記注目画素に隣接する画素の色情報とを加重加算する
ことを特徴とする画像処理装置。 The color information of the pixel of interest by weight-adding the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the pixel of interest using a variable coefficient of zero or more. An image processing unit that calculates a value of a different color component and generates a second image in which each pixel has a plurality of color components,
In the first image, position information of defective pixels is added,
The image processing unit changes the coefficient based on a color component of the target pixel and a pixel position of the defective pixel, and performs weighted addition of the color information of the target pixel and the color information of a pixel adjacent to the target pixel. An image processing apparatus.
前記画像処理部は、前記注目画素の画素位置における複数の方向に対する類似性の強弱を判定し、前記注目画素の色成分および前記欠陥画素の画素位置とともに、その判定結果に基づいて、前記係数を変えることを特徴とする画像処理装置。 The image processing apparatus according to claim 6 or 7,
The image processing unit determines the strength of similarity in a plurality of directions at the pixel position of the target pixel, and calculates the coefficient based on the determination result together with the color component of the target pixel and the pixel position of the defective pixel. An image processing apparatus characterized by changing.
前記画像処理部は、前記注目画素に隣接する画素が前記欠陥画素である場合、前記隣接する画素の画素位置に基づいて、前記注目画素の画素位置における複数の方向に対する類似性の強弱を判定することを特徴とする画像処理装置。 The image processing apparatus according to claim 8.
When the pixel adjacent to the target pixel is the defective pixel, the image processing unit determines the strength of similarity in a plurality of directions at the pixel position of the target pixel based on the pixel position of the adjacent pixel. An image processing apparatus.
前記画像処理部は、前記第1画像の全ての画素において、前記第1画像の色情報を常に一定の色成分比率で加重加算することを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 6 to 9,
The image processing device, wherein all the pixels of the first image weight-add the color information of the first image at a constant color component ratio at all times.
前記画像処理部は、前記第1画像が、画素密度の高い第1色成分と画素密度の低い第2色成分および第3色成分とからなる場合、前記第2色成分の色情報と前記第3色成分の色情報とを同一の色成分比率で加重加算することを特徴とする画像処理装置。 The image processing apparatus according to claim 10.
When the first image is composed of a first color component having a high pixel density, a second color component having a low pixel density, and a third color component, the image processing unit is configured to display color information of the second color component and the first color component. An image processing apparatus characterized by performing weighted addition of color information of three color components at the same color component ratio.
前記第1画像における欠陥画素の画素位置の情報を記憶する記憶部と、を備え、
前記画像処理部は、前記注目画素の色成分および前記欠陥画素の画素位置に基づいて前記係数を変える
ことを特徴とする画像処理装置。 The color information of the pixel of interest by weight-adding the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the pixel of interest using a variable coefficient of zero or more. By calculating a value of a different color component and performing filter processing with a predetermined fixed filter coefficient, the different color component is corrected, and a second image in which each pixel has a plurality of color components is generated. An image processing unit;
A storage unit that stores information on pixel positions of defective pixels in the first image,
The image processing device, wherein the image processing unit changes the coefficient based on a color component of the pixel of interest and a pixel position of the defective pixel.
前記第1画像は、欠陥画素の位置情報が付加され、
前記画像処理部は、前記注目画素の色成分および前記欠陥画素の画素位置に基づいて前記係数を変える
ことを特徴とする画像処理装置。 The color information of the pixel of interest by weight-adding the color information of the first image in which each pixel has color information of any one of a plurality of color components at the pixel position of the pixel of interest using a variable coefficient of zero or more. By calculating a value of a different color component and performing filter processing with a predetermined fixed filter coefficient, the different color component is corrected, and a second image in which each pixel has a plurality of color components is generated. An image processing unit,
In the first image, position information of defective pixels is added,
The image processing device, wherein the image processing unit changes the coefficient based on a color component of the pixel of interest and a pixel position of the defective pixel.
前記画像処理部は、前記注目画素の画素位置における複数の方向に対する類似性の強弱を判定し、前記注目画素の色成分および前記欠陥画素の画素位置とともに、その判定結果に基づいて、前記係数を変えることを特徴とする画像処理装置。 The image processing apparatus according to claim 12 or 13,
The image processing unit determines the strength of similarity in a plurality of directions at the pixel position of the target pixel, and calculates the coefficient based on the determination result together with the color component of the target pixel and the pixel position of the defective pixel. An image processing apparatus characterized by changing.
前記画像処理部は、前記注目画素に隣接する画素が前記欠陥画素である場合、前記隣接する画素の画素位置に基づいて、前記注目画素の画素位置における複数の方向に対する類似性の強弱を判定することを特徴とする画像処理装置。 The image processing apparatus according to claim 14.
When the pixel adjacent to the target pixel is the defective pixel, the image processing unit determines the strength of similarity in a plurality of directions at the pixel position of the target pixel based on the pixel position of the adjacent pixel. An image processing apparatus.
前記画像処理部は、前記予め決められた固定のフィルタ係数として、正および負の値を含むフィルタ係数を用いることを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 12 to 15,
The image processing apparatus, wherein the image processing unit uses a filter coefficient including positive and negative values as the predetermined fixed filter coefficient.
前記異なる色成分は、輝度成分および色差成分であることを特徴とする画像処理装置。 The image processing apparatus according to any one of claims 12 to 16,
The image processing apparatus according to claim 1, wherein the different color components are a luminance component and a color difference component.
前記画像処理部は、前記第1画像が、第1色成分、第2色成分および第3色成分を有する場合、
前記第1色成分と前記第2色成分とで構成される第1類似度成分、
前記第2色成分と前記第3色成分とで構成される第2類似度成分、
前記第3色成分と前記第1色成分とで構成される第3類似度成分、
前記第1色成分のみで構成される第4類似度成分、
前記第2色成分のみで構成される第5類似度成分、
前記第3色成分のみで構成される第6類似度成分
の少なくとも1つの類似度成分を用いて、複数の方向に対する類似度を算出し、該類似度に基づいて、前記複数の方向に対する類似性の強弱を判定する
ことを特徴とする画像処理装置。 The image processing apparatus according to claim 17.
The image processing unit, when the first image has a first color component, a second color component, and a third color component,
A first similarity component composed of the first color component and the second color component;
A second similarity component composed of the second color component and the third color component;
A third similarity component composed of the third color component and the first color component;
A fourth similarity component composed of only the first color component;
A fifth similarity component composed only of the second color component;
The similarity with respect to a plurality of directions is calculated using at least one similarity component of the sixth similarity component composed of only the third color component, and the similarity with respect to the plurality of directions is calculated based on the similarity. An image processing apparatus characterized by determining the strength of the image.
請求項1ないし請求項18のいずれか1項に記載の画像処理装置と、
を備えることを特徴とする撮像装置。 An image sensor;
An image processing device according to any one of claims 1 to 18,
An imaging apparatus comprising:
前記第1画像の前記色情報を注目画素の画素位置で加重加算して前記注目画素の色成分と異なる色成分の値を算出し、前記各画素が複数の色成分を有する第2画像を生成する画像処理手順と、をコンピュータに実行させ、
前記画像処理手順は、前記第1画像の前記色情報を前記注目画素の画素位置で加重加算する複数の係数パターンを用意し、前記注目画素の色成分および前記欠陥画素の位置関係に基づいて、前記係数パターンを選択し加重加算する
ことを特徴とする画像処理プログラム。 An input procedure for reading a first image in which each pixel has color information of any one of a plurality of color components and information on the pixel position of a defective pixel is added;
The color information of the first image is weighted and added at the pixel position of the target pixel to calculate a value of a color component different from the color component of the target pixel, and a second image in which each pixel has a plurality of color components is generated. Image processing procedure to be executed by a computer,
The image processing procedure prepares a plurality of coefficient patterns for weighted addition of the color information of the first image at the pixel position of the target pixel, and based on the positional relationship between the color component of the target pixel and the defective pixel, An image processing program, wherein the coefficient pattern is selected and weighted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010248602A JP2012100215A (en) | 2010-11-05 | 2010-11-05 | Image processing device, imaging device, and image processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010248602A JP2012100215A (en) | 2010-11-05 | 2010-11-05 | Image processing device, imaging device, and image processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2012100215A true JP2012100215A (en) | 2012-05-24 |
Family
ID=46391605
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010248602A Withdrawn JP2012100215A (en) | 2010-11-05 | 2010-11-05 | Image processing device, imaging device, and image processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2012100215A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017041738A (en) * | 2015-08-19 | 2017-02-23 | 株式会社東芝 | Solid-state imaging device |
JP2017055317A (en) * | 2015-09-11 | 2017-03-16 | キヤノン株式会社 | Image data generation device, imaging apparatus and image data generation program |
-
2010
- 2010-11-05 JP JP2010248602A patent/JP2012100215A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017041738A (en) * | 2015-08-19 | 2017-02-23 | 株式会社東芝 | Solid-state imaging device |
JP2017055317A (en) * | 2015-09-11 | 2017-03-16 | キヤノン株式会社 | Image data generation device, imaging apparatus and image data generation program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5045421B2 (en) | Imaging apparatus, color noise reduction method, and color noise reduction program | |
JP3985679B2 (en) | Image processing method, image processing program, and image processing apparatus | |
JP4054184B2 (en) | Defective pixel correction device | |
JP4284628B2 (en) | IMAGING DEVICE, IMAGE PROCESSING DEVICE, IMAGE PROCESSING METHOD, PROGRAM FOR IMAGE PROCESSING METHOD, AND RECORDING MEDIUM CONTAINING PROGRAM FOR IMAGE PROCESSING METHOD | |
JP4154847B2 (en) | Image processing apparatus, image processing method, and computer-readable recording medium storing image processing program | |
JP4465002B2 (en) | Noise reduction system, noise reduction program, and imaging system. | |
US20060092298A1 (en) | Image processing method, image processing program and image processor | |
US8320714B2 (en) | Image processing apparatus, computer-readable recording medium for recording image processing program, and image processing method | |
JP3972816B2 (en) | Image processing apparatus and color system conversion method | |
JP4321064B2 (en) | Image processing apparatus and image processing program | |
JP4329542B2 (en) | Image processing apparatus and image processing program for determining similarity of pixels | |
JP6282123B2 (en) | Image processing apparatus, image processing method, and program | |
JP2010211773A (en) | Image process apparatus, image process method and computer program | |
JP2012100215A (en) | Image processing device, imaging device, and image processing program | |
US8675106B2 (en) | Image processing apparatus and control method for the same | |
US8654220B2 (en) | Image processing apparatus and control method for the same | |
JP3730063B2 (en) | Color component generation apparatus, color component generation method, and multicolor image pickup apparatus using the same | |
JP4196055B2 (en) | Image processing method, image processing program, and image processing apparatus | |
JP4239483B2 (en) | Image processing method, image processing program, and image processing apparatus | |
JP4239480B2 (en) | Image processing method, image processing program, and image processing apparatus | |
JP4122082B2 (en) | Signal processing apparatus and processing method thereof | |
JP4239484B2 (en) | Image processing method, image processing program, and image processing apparatus | |
JP4155559B2 (en) | Signal processing apparatus and method | |
JP2018107659A (en) | Luminance signal generating device, luminance signal generating method, and program | |
JP2012227869A (en) | Image processing device, image processing method and digital camera |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20140107 |