JP2005159693A - Image processing apparatus - Google Patents
Image processing apparatus Download PDFInfo
- Publication number
- JP2005159693A JP2005159693A JP2003394896A JP2003394896A JP2005159693A JP 2005159693 A JP2005159693 A JP 2005159693A JP 2003394896 A JP2003394896 A JP 2003394896A JP 2003394896 A JP2003394896 A JP 2003394896A JP 2005159693 A JP2005159693 A JP 2005159693A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- gamma correction
- image
- luminance distribution
- distribution information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 90
- 238000003384 imaging method Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 22
- 238000000034 method Methods 0.000 description 22
- 230000001186 cumulative effect Effects 0.000 description 17
- 239000000470 constituent Substances 0.000 description 9
- 238000006243 chemical reaction Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 3
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 230000011514 reflex Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 1
- 238000004611 spectroscopical analysis Methods 0.000 description 1
Images
Abstract
Description
この発明は、画像処理装置、特に画像のガンマ補正を行う画像処理装置に関する。 The present invention relates to an image processing apparatus, and more particularly to an image processing apparatus that performs gamma correction of an image.
CCD等の撮像素子から得られる画像信号を、デジタル画像処理によって所望の画質の画像を得ることを目的とするデジタルカメラなどの画像処理装置において、画像処理の一機能としてガンマ補正処理がある。ガンマ補正処理は、画像をディスプレイやプリンタ等の出力デバイスで表示する際に最適な輝度表示となるように、画像の明るさやコントラストを補正するするものであり、通常、これらの出力デバイスは非線形の表示特性を持つため、ガンマ補正では出力デバイスが持つ表示特性と逆の非線形変換を行うことになる。このため、ガンマ補正処理には、メモリを用いたLUT(Look Up Table )による変換や、複数の一次式を組み合わせた折れ線近似式による変換などが用いられることが多い。デジタルカメラにおいて、これらのLUTや折れ線近似式の特性を変える場合は、撮影前に手動設定するのが一般的である。 In an image processing apparatus such as a digital camera intended to obtain an image of a desired image quality by digital image processing from an image signal obtained from an image pickup device such as a CCD, there is gamma correction processing as one function of image processing. The gamma correction process corrects the brightness and contrast of the image so that the brightness is displayed optimally when the image is displayed on an output device such as a display or printer. Usually, these output devices are nonlinear. Since it has display characteristics, gamma correction performs non-linear conversion opposite to the display characteristics of the output device. For this reason, in gamma correction processing, conversion using a LUT (Look Up Table) using a memory, conversion using a broken line approximation formula combining a plurality of linear expressions, and the like are often used. In digital cameras, when changing the characteristics of these LUTs and polygonal line approximation formulas, manual setting is generally performed before shooting.
一方、被写体の状況にあわせてガンマ特性を動的に変化させることにより、画像の明るさやコントラストを、よりきめ細かく補正する方法がある。例えば、特開平8−23460号公報では入力画像のヒストグラムを求め、その結果を元に複数のガンマ補正特性から一つを選択するという手法が提案されている。 On the other hand, there is a method of correcting the brightness and contrast of an image more finely by dynamically changing the gamma characteristic according to the state of the subject. For example, Japanese Patent Laid-Open No. 8-23460 proposes a method of obtaining a histogram of an input image and selecting one from a plurality of gamma correction characteristics based on the result.
また、特開平11−196292号公報及び特開2000−138862号公報で提案されているデジタルカメラは、撮影直前に撮像素子が露光したプリ撮像データを用いてヒストグラムや輝度分布を求め、この情報によって実際に撮影する画像(以下本露光画像と呼ぶ)のガンマ補正処理を制御している。
しかし、特開平8−23460号公報開示の手法をデジタルカメラに用いる場合、カメラの撮影処理シーケンスにおいて、どのタイミングでヒストグラムを作成するかについては開示がなされていない。仮に、いったん画像データをフレームメモリにためてからヒストグラムを作成し、その後、ヒストグラムから生成したガンマ特性によってガンマ変換を行う場合、処理時間が長くなるという問題がある。図15の(A),(B)は、この処理シーケンスを表した図である。図15の(A)は、ヒストグラムを求めない(動的にガンマ補正を行わない)場合の処理シーケンスであり、図15の(B)は、ヒストグラムを求め、動的にガンマ補正特性を選択する場合のシーケンスである。図15の(A)に示す処理シーケンスでは、撮影開始時点から1フレーム分の撮像データをDRAM等のフレームメモリに書き込む。その後、フレームメモリから順次画像を読み出し、ガンマ補正処理を含む画像処理を施した後、フレームメモリに書き戻す。ここで、図15の(A)においては撮像データ読み出し、ガンマ補正処理、処理後データ書き込みは同じ時間に処理しているように図示したが、実際には各処理ではクロック単位の遅延は発生しており、図ではそれを省略している。 However, when the technique disclosed in Japanese Patent Laid-Open No. 8-23460 is used for a digital camera, there is no disclosure as to when the histogram is created in the camera shooting sequence. If the histogram is created after the image data is once stored in the frame memory, and then gamma conversion is performed using the gamma characteristics generated from the histogram, there is a problem that the processing time becomes long. (A) and (B) of FIG. 15 are diagrams showing this processing sequence. FIG. 15A shows a processing sequence when the histogram is not obtained (dynamic gamma correction is not performed), and FIG. 15B obtains the histogram and dynamically selects the gamma correction characteristic. Sequence of cases. In the processing sequence shown in FIG. 15A, imaging data for one frame from the start of imaging is written in a frame memory such as a DRAM. Thereafter, images are sequentially read from the frame memory, subjected to image processing including gamma correction processing, and then written back to the frame memory. Here, in FIG. 15A, imaging data reading, gamma correction processing, and post-processing data writing are illustrated as being processed at the same time, but in actuality, a delay in units of clocks occurs in each processing. It is omitted in the figure.
一方、図15の(B)に示す処理シーケンスにおいては、撮影開始時点から1フレーム分の撮像データをDRAM等のフレームメモリに書き込む。次に、フレームメモリから順次画像を読み出しヒストグラムを作成し、ガンマ補正用LUTにガンマ特性を設定する。その後、再度フレームメモリから順次画像を読み出し、設定した特性を元にガンマ補正処理を施した後フレームメモリに書き戻す。したがって、図15の(A)に示す処理シーケンスに対し、1フレーム分の撮像データの読み出し時間が余計にかかることになる。 On the other hand, in the processing sequence shown in FIG. 15B, image data for one frame is written in a frame memory such as a DRAM from the shooting start time. Next, images are sequentially read from the frame memory, a histogram is created, and gamma characteristics are set in the gamma correction LUT. Thereafter, images are sequentially read from the frame memory again, and after being subjected to gamma correction processing based on the set characteristics, the image is written back to the frame memory. Therefore, it takes an extra time to read the imaging data for one frame with respect to the processing sequence shown in FIG.
また、特開平11−196292号公報及び特開2000−138862号公報開示の手法においては、本露光画像を使ってヒストグラムや輝度分布を求めていないため、特に高速で移動している被写体を撮影する場合において、正確なヒストグラムや輝度分布を求めることができない。更に、一眼レフタイプのデジカメのような、被写体光をミラーによってファインダーと撮像素子へ分光している場合、被写体光が撮像素子にあたるのは本露光時のみであるため、プリ撮像データの取得は不可能であり、したがってガンマ補正を動的に変化させることはできないことになる。 In the methods disclosed in JP-A-11-196292 and JP-A-2000-138862, since the histogram and the luminance distribution are not obtained using the main exposure image, a subject moving particularly fast is photographed. In some cases, an accurate histogram or luminance distribution cannot be obtained. Furthermore, when subject light is split into a viewfinder and an image sensor using a mirror, such as a single-lens reflex digital camera, pre-imaging data acquisition is not possible because the subject light hits the image sensor only during main exposure. This is possible, so the gamma correction cannot be changed dynamically.
本発明は、上記課題に鑑みてなされたものであり、本露光画像データをフレームメモリに書き込むのと並行して輝度分布情報を求めることにより、正確且つ高速に動作する動的ガンマ補正部を備えた画像処理装置を提供することを目的とする。 The present invention has been made in view of the above problems, and includes a dynamic gamma correction unit that operates accurately and at high speed by obtaining luminance distribution information in parallel with writing the main exposure image data into the frame memory. An object of the present invention is to provide an image processing apparatus.
上記問題点を解決するため、請求項1に係る発明は、撮像素子からの画像データを格納するフレームメモリと、該フレームメモリへの格納と並行して画像データが入力され、画像データの輝度分布情報を得る輝度分布情報算出部と、得られた輝度分布情報を元に、前記フレームメモリに保存された画像データに対してガンマ補正を行うガンマ補正部とで画像処理装置を構成するものである。
In order to solve the above problem, the invention according to
請求項2に係る発明は、請求項1に係る画像処理装置において、前記輝度分布情報算出部は、画像データの内、少なくとも一つの色信号データのヒストグラムから前記輝度分布情報を生成することを特徴とするものである。 According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the luminance distribution information calculation unit generates the luminance distribution information from a histogram of at least one color signal data in the image data. It is what.
請求項3に係る発明は、請求項1に係る画像処理装置において、前記輝度分布情報算出部は、画像データの内、少なくとも一つの色信号データの明るさに対して第1の閾値、及び第1の閾値とは異なる第2の閾値を設定して、第1の閾値以上の画像データの数、あるいは、第2の閾値以下の画像データの数の、少なくとも一方をカウントし、第1の閾値以上の画像データのカウント数、あるいは、第2の閾値以下の画像データのカウント数の、少なくとも一方を前記輝度分布情報として用いることを特徴とするものである。 According to a third aspect of the present invention, in the image processing apparatus according to the first aspect, the luminance distribution information calculation unit includes a first threshold value for the brightness of at least one color signal data of the image data, and a first threshold value. A second threshold different from the first threshold is set, and at least one of the number of image data equal to or greater than the first threshold or the number of image data equal to or smaller than the second threshold is counted, and the first threshold At least one of the above image data count number or the image data count number equal to or less than the second threshold is used as the luminance distribution information.
請求項4に係る発明は、請求項3に係る画像処理装置において、前記ガンマ補正部は、入力される画像データに対応するガンマ補正データからなるルックアップテーブルを複数記憶したメモリと、前記カウント数に応じてメモリ内の1つのルックアップテーブルを選択するセレクタとを有することを特徴とするものである。 According to a fourth aspect of the present invention, in the image processing apparatus according to the third aspect, the gamma correction unit includes a memory that stores a plurality of lookup tables including gamma correction data corresponding to input image data, and the count number. And a selector for selecting one look-up table in the memory.
請求項5に係る発明は、請求項3に係る画像処理装置において、前記ガンマ補正部は、前記カウント数に応じて、外部よりロードする、入力される画像データに対応するガンマ補正データからなるルックアップテーブルを選択してロードするセレクタと、ロードされたルックアップテーブルを記憶するメモリとを有することを特徴とするものである。 According to a fifth aspect of the present invention, in the image processing apparatus according to the third aspect, the gamma correction unit is configured to look from gamma correction data corresponding to input image data loaded from the outside in accordance with the count number. It has a selector for selecting and loading an up table, and a memory for storing the loaded look-up table.
請求項6に係る発明は、請求項3に係る画像処理装置において、前記ガンマ補正部は、入力される画像データに対応するガンマ補正データからなるルックアップテーブルを格納したメモリと、該メモリからのガンマ補正データに対し、前記カウント数より算出される係数を積和演算する演算部とを有することを特徴とするものである。 According to a sixth aspect of the present invention, in the image processing apparatus according to the third aspect, the gamma correction unit stores a lookup table including gamma correction data corresponding to input image data, and a memory from the memory. An arithmetic unit that performs a product-sum operation on a coefficient calculated from the count number with respect to the gamma correction data.
請求項7に係る発明は、請求項1に係る画像処理装置において、前記輝度分布情報算出部は、画像データの領域に、その位置に応じた重み付けを設定し、その重み付けを用いて輝度分布情報を算出することを特徴とするものである。 According to a seventh aspect of the present invention, in the image processing apparatus according to the first aspect, the luminance distribution information calculation unit sets a weight according to the position of the region of the image data, and uses the weight to determine the luminance distribution information. Is calculated.
各請求項に係る発明に対応する実施例について述べると、次の通りである。すなわち、請求項1,2,7に係る発明には、実施例1が対応する。請求項3に係る発明には、実施例2,3,及び4が対応する。請求項4に係る発明には、実施例2が対応する。請求項5に係る発明には、実施例3が対応する。請求項6に係る発明には、実施例4が対応する。
An embodiment corresponding to the invention according to each claim will be described as follows. That is, Example 1 corresponds to the invention according to
本発明は、本露光画像データを使い、画像データをメモリに書き込むのと並行して輝度分布情報を作成できる構成とすることにより、正確且つ高速な輝度分布情報を求めることができ、また一眼レフカメラのようなプリ撮像が不可能なデジタルカメラにおいても、被写体の輝度分布に応じて動的にガンマ変換特性を変化させることができる。 In the present invention, it is possible to obtain accurate and high-speed luminance distribution information by using the main exposure image data and creating luminance distribution information in parallel with writing the image data into the memory. Even in a digital camera such as a camera that cannot perform pre-imaging, the gamma conversion characteristics can be dynamically changed according to the luminance distribution of the subject.
次に、発明を実施するための最良の形態について説明する。 Next, the best mode for carrying out the invention will be described.
(実施例1)
まず、本発明に係る画像処理装置の実施例1について説明する。この実施例1では、本発明に係る画像処理装置をデジタルカメラに適用した場合について説明する。図1は、実施例1に係るデジタルカメラの構成を示すブロック構成図である。図1において、1は撮像素子、2は画像の輝度分布情報として、画像の明るさ情報のヒストグラムを求めるヒストグラム演算部、3はガンマ補正を含む種々の画像処理を行う画像処理部であり、画像処理部3内のガンマ補正部はメモリを用いたLUTで構成されている。4は各構成ブロックをコントロールするためのCPU、5は画像を1画面分保存するフレームメモリ、6は画像データやコントロール信号が流れるシステムバスである。なお、実際のハードウェア構成として必要な、メモリコントローラ等の制御ブロックは本発明の本質に関係ないため省略している。
(Example 1)
First, a first embodiment of the image processing apparatus according to the present invention will be described. In the first embodiment, a case where the image processing apparatus according to the present invention is applied to a digital camera will be described. FIG. 1 is a block diagram illustrating the configuration of the digital camera according to the first embodiment. In FIG. 1, 1 is an image sensor, 2 is a histogram calculation unit that obtains a histogram of image brightness information as image luminance distribution information, and 3 is an image processing unit that performs various image processing including gamma correction. The gamma correction unit in the
次に、図1に示したデジタルカメラの動作を、図2の処理シーケンス図を用いて説明する。まず、デジタルカメラのシャッター(図示せず)が押されると、撮像素子1で光電変換された画像データはAD変換(図示せず)され、デジタル画像データとなってシステムバス6を介しフレームメモリ5に書き込まれる。これと並行してデジタル画像データは、ヒストグラム演算部2にも入力される。ヒストグラム演算部2においては、入力された画像データから横軸を明るさ、縦軸を度数とするヒストグラムデータを作成する。このとき、ヒストグラム作成に用いる画像データとしては、全てのデジタル画像データのうち、輝度情報を多く含む色信号のみを使う。例えば、撮像素子1としてRGBカラーフィルタを備えたCCDを用いている場合には、RGB信号のうちG信号のみを使う。これにより、少ないデータから効率的にヒストグラムを求めることができ、ヒストグラムデータを保存するメモリ等を削減することができる。
Next, the operation of the digital camera shown in FIG. 1 will be described using the processing sequence diagram of FIG. First, when a shutter (not shown) of the digital camera is pressed, the image data photoelectrically converted by the
また、ヒストグラム演算部2は、ヒストグラム作成時に画像の場所によってヒストグラム度数の重みを可変する機能も備えている。例えば、図3に示すように、画像の中央部の重み値が周辺部より大きくなるように、例えば周辺部の重み=1,中央部の重み=2に設定し、重み=2のエリア内においては、そのヒストグラムの度数を2倍にする。図3は、画像の中央部分に重要な被写体があると仮定した場合の重み付け例であり、このようにすることで、より重要な被写体の明るさやコントラストが適切になるように、ガンマ補正することが可能となる。
The
次に、ヒストグラム演算部2では1フレーム分の画像データから作成したヒストグラムを、輝度の低い方から累積した累積ヒストグラムを作成し、これを画像処理部3内のガンマ補正LUTにロードする。この際、累積ヒストグラムの最大度値をLUTの出力ビット数にあわせて正規化しなければならないのは言うまでもない。ここで、得られる累積ヒストグラムについて図4の(A)〜(C)を用いて説明する。図4の(A)〜(C)は、それぞれ明るさの分布が異なる2枚の画像について、ヒストグラム(実線)と累積ヒストグラム(点線)を表した図である。但し、ヒストグラムと累積ヒストグラムが同じスケールになるように度数を調整してある。図4の(A)は画像中に明るい部分が多いときの図であり、累積ヒストグラムは明るい部分で傾きが大きくなる。したがって、この特性を用いてガンマ補正した場合、明るい部分に階調が多く割り当てられ、その結果良好な階調特性となる。一方、図4の(B)は画像中に暗い部分が多い場合の図であり、累積ヒストグラムは暗い部分で傾きが大きくなる。したがって、この特性を用いてガンマ補正した場合、暗い部分に階調が多く割り当てられ、その結果良好な階調特性となる。
Next, the
但し、この手法で求めた累積ヒストグラムをそのままガンマ補正として用いると、次のような問題が生じる。例えば、図4の(A)で説明した累積ヒストグラムは暗い部分の階調はほとんど表現されず、明るい部分のコントラストのみが大きく変化することになる。このような画像は元々の被写体のコントラストと大きく異なるため、結果として違和感のある画像となってしまう。また、例えばガンマ補正前の画像が均等な輝度分布をもっていいる場合、累積ヒストグラムは傾き1の直線となる。これをそのままガンマ補正の特性としてしまうと、結果的にガンマ補正されないことになってしまい、ガンマ補正の当初の目的であった出力デバイス上で良好な明るさ及びコントラストを表現するということができなくなってしまう。これらの問題を解決するため、予め出力デバイスの階調表示特性をキャンセルするようなガンマ特性を保持しておき、これと求めた累積ヒストグラムとの差分が、ある範囲を超えないように累積ヒストグラムを修正するという手法をとる必要がある。この態様を示したのが図4の(C)である。求めた累積ヒストグラムが点線、予め設定したガンマ特性を実線とすると、修正後のガンマ補正特性は一点鎖線のようになる。 However, if the cumulative histogram obtained by this method is used as it is for gamma correction, the following problems occur. For example, in the cumulative histogram described with reference to FIG. 4A, the gradation of the dark part is hardly expressed, and only the contrast of the bright part changes greatly. Such an image is greatly different from the contrast of the original subject, resulting in an uncomfortable image. For example, when the image before gamma correction has a uniform luminance distribution, the cumulative histogram is a straight line with a slope of 1. If this is used as a characteristic of gamma correction as it is, gamma correction will not be performed as a result, and it will not be possible to express good brightness and contrast on the output device that was the original purpose of gamma correction. End up. In order to solve these problems, a gamma characteristic that cancels the gradation display characteristic of the output device is held in advance, and the cumulative histogram is set so that the difference between this and the obtained cumulative histogram does not exceed a certain range. It is necessary to take a method of correcting. This mode is shown in FIG. If the obtained cumulative histogram is a dotted line, and the preset gamma characteristic is a solid line, the corrected gamma correction characteristic is a one-dot chain line.
上記手法で累積ヒストグラムを求めた後、画像処理部3はフレームメモリ5からシステムバス6を介し画像データを順次読み出し、ヒストグラム演算部2で設定されたガンマ特性を用いたガンマ補正処理や、その他種々の画像処理を行い、処理後の画像データをシステムバス6を介してフレームメモリ5に書き戻す。この撮像データ読み出し、画像処理、処理後データ書き戻しの各処理は1画素毎にパイプライン処理されるため、図2で示したように、ほぼ同じタイミングで始まり、終了する。また、これまで説明した処理シーケンスは、CPU4によって制御される。
After obtaining the cumulative histogram by the above method, the
以上のような構成でガンマ補正処理を行うことにより、処理時間を増やすことなく動的にガンマ補正特性を変化させることが可能となる。また、本露光画像データからヒストグラムを作成するため、正確な輝度分布情報を求めることができ、且つ、ミラー分光する機構を持った一眼レフデジタルカメラにおいても、ガンマ補正特性を動的に変化させることが実現可能となる。 By performing the gamma correction process with the above configuration, it is possible to dynamically change the gamma correction characteristic without increasing the processing time. In addition, since a histogram is created from the exposure image data, accurate luminance distribution information can be obtained, and gamma correction characteristics can be dynamically changed even in a single-lens reflex digital camera having a mechanism for mirror spectroscopy. Is feasible.
(実施例2)
次に、本発明の実施例2について説明する。前記実施例1では、画像の輝度分布情報としてヒストグラムを用いる形態のものを示したが、本実施例ではより簡便な手法で画像の輝度分布情報を求め、この輝度分布情報から動的にガンマ特性を変化させる形態について説明する。図5の(A)は、本発明の実施例2に係るデジタルカメラの構成を示すブロック構成図である。図5の(A)において、7は画像中のある第1の閾値以上の明るさの画素をカウントする明部カウンタ及び第2の閾値以下の明るさの画素をカウントする暗部カウンタ、8はガンマ補正を含む種々の画像処理を行う画像処理部であり、この画像処理部8内のガンマ補正部は図5の(B)に示すようにメモリを用いたLUT9を複数個と、それらのうち一つを選択するセレクタ10とで構成されている。その他の構成ブロックは、図1に示した実施例1の構成ブロックと同じであるため、同一の構成ブロックには同一の符号を付して示し、その説明を省略する。また、画像処理部8にはガンマ補正部以外の画像処理ブロックが存在してもかまわないが、本発明に影響しないため図示及び説明を省略する。
(Example 2)
Next, a second embodiment of the present invention will be described. In the first embodiment, the histogram is used as the luminance distribution information of the image. However, in this embodiment, the luminance distribution information of the image is obtained by a simpler method, and the gamma characteristic is dynamically calculated from the luminance distribution information. The form which changes is demonstrated. FIG. 5A is a block diagram showing a configuration of a digital camera according to
次に、図5に示した実施例2の動作を、図6の処理シーケンス図を用いて説明する。まず、デジタルカメラのシャッター(図示せず)が押されると、撮像素子1で光電変換された画像データはAD変換(図示せず)され、デジタル画像データとなってシステムバス6を介しフレームメモリ5に書き込まれる。これと並行してデジタル画像データは、明部暗部カウンタ7にも入力される。明部暗部カウンタ7はカウンタを2つ持ち、入力された画像データのうち、ある第1の閾値レベル以上の画素と、第2の閾値レベル以下の画素をカウントする。このとき、カウントする画像データとして、全てのデジタル画像データのうち、輝度情報を多く含む色信号のみを使うのは、実施例1と同じである。また、画像の場所によってカウント値の重み付けをするのも、実施例1と同じである。
Next, the operation of the second embodiment shown in FIG. 5 will be described using the processing sequence diagram of FIG. First, when a shutter (not shown) of the digital camera is pressed, the image data photoelectrically converted by the
次に、明部暗部カウンタ部7ではカウント結果を元にセレクト信号の生成を行う。このセレクト信号は、画像処理部8の複数あるガンマ補正LUT9を切り換えるための信号であり、例えば、明部カウンタ値、暗部カウンタ値がそれぞれ予め設定した第3の閾値以上であるときを1,以下であるときを0とすると、表1に示すような2ビットのセレクト信号を生成する。
Next, the bright /
次に、画像処理部8はフレームメモリ5からシステムバス6を介して画像データを順次読み出し、セレクト信号によりセレクタ10を介して選択されたLUT9を用いたガンマ補正や、その他の種々の画像処理を行い、システムバス6を介してフレームメモリ5に書き戻す。ここで、セレクト信号と、選択されるLUT9内のガンマ特性の関係を、図7を用いて説明する。図7は、4つのLUT9内に設定してあるガンマ特性カーブを表した図である。セレクト信号が00のときは、画像中には明部と暗部の割合が少ないということであるから、中間の明るさ域に階調が多く割り当てられるように、図7のaで示す特性が設定してあるLUT9を選択する。セレクト信号が01のときは、暗い部分が多いということであるから、画像の暗い領域に階調が多く割り当てられるように、図7のbで示す特性が設定してあるLUT9を選択し、セレクト信号が10のときは、明るい部分が多いということであるから、画像の明るい領域に階調が多く割り当てられるように、図7のcで示す特性が設定してあるLUT9を選択し、セレクト信号が11のときは、明るい部分と暗い部分が多いということであるから、画像の明るい領域と暗い領域に階調が多く割り当てられるように、図7のdで示す特性が設定してあるLUT9を選択する。
Next, the
本実施例2では、画像の明部及び暗部をカウントしたため、LUT9の数は4つとなっているが、カウントする明るさ域を更に細分化した場合は、LUT9の数を増やすことで対応可能となるし、逆に明るい部分又は暗い部分のいずれか一方のみをカウントした場合は、LUT9の数を減らすことができる。また、LUT9を構成するメモリは、ROM又はRAMどちらでもかまわない。
In the second embodiment, since the bright and dark portions of the image are counted, the number of
以上のような構成にすることで、画像の輝度分布情報をより簡単に求めることができ、処理時間を増やすことなく動的にガンマ補正特性を切り換えることが可能となる。 With the configuration as described above, the luminance distribution information of the image can be obtained more easily, and the gamma correction characteristics can be dynamically switched without increasing the processing time.
(実施例3)
次に、本発明の実施例3について説明する。前記実施例2では、画像の輝度分布情報として画像の明部及び暗部の数をカウントし、そのカウント値によってガンマ補正LUTを切り換えるようにした構成のものを示したが、本実施例ではカウント値を用いて別の手法で動的にガンマ特性を変化させる形態について説明する。図8の(A),(B)は、本発明の実施例3に係るデジタルカメラの構成を示すブロック構成図である。図8の(A)において、11はガンマ補正を含む種々の画像処理を行う画像処理部であり、この画像処理部11内のガンマ補正部は、図8の(B)に示すように、セレクタ12によってLUT13のアドレスポートに入力するデータを切り換え可能な構成となっている。なお、本実施例においては、LUT13はRAMで構成されており、図8の(B)ではシングルポートRAMを用いた場合の構成を示してある。その他の構成ブロックは、図2に示した実施例2の構成ブロックと同じであるため、同一の構成ブロックには同一の符号を付して示し、その説明を省略する。但し、明部暗部カウンタ7の出力信号線はシステムバス8に接続されている。
(Example 3)
Next,
次に、図8の(A),(B)に示した実施例3の動作を図9の処理シーケンス図を用いて説明する。まず、デジタルカメラのシャッター(図示せず)が押されてから、画像データをフレームメモリ5に書き込むのと並行して、明部暗部カウンタ7によって入力された画像データのうち、第1の閾値レベル以上の画素と、第2の閾値レベル以下の画素をカウントし、セレクト信号を生成するまでは、図5の(A)に示した実施例2と同じである。生成されたセレクト信号はシステムバス6を介し、CPU4に入力される。CPU4では、セレクト信号をもとに、例えば図7に示した複数のガンマ特性が保存されているメモリ(図示せず)から1つを選択し、画像処理部11内のガンマ補正LUT13に、選択したガンマ特性データ(LUTデータ)及びLUTメモリアドレスを出力する。この際、CPU4は、テーブルロード/ガンマ補正セレクト信号によりLUT13がCPU4からのLUTデータ及びLUTアドレスを入力できるようにセレクタ12を切り換える。LUT13へのLUTデータのロードが終了した後、CPU4はセレクタ12を切り換え、画像データを入力できる状態にする。次に、画像処理部11はフレームメモリ5からシステムバス6を介して画像データを順次読み出し、CPU4によってLUTデータがロードされたLUT13を用いたガンマ補正や、その他の種々の画像処理を行い、システムバス6を介してフレームメモリ5に書き戻す。
Next, the operation of the third embodiment shown in FIGS. 8A and 8B will be described with reference to the processing sequence diagram of FIG. First, after the shutter (not shown) of the digital camera is pressed, the first threshold level of the image data input by the bright /
以上のような構成にすることで、画像の輝度分布情報をより簡単に求めることができ、少ない回路規模で動的にガンマ補正特性を切り換えることが可能となる。 With the configuration as described above, the luminance distribution information of the image can be obtained more easily, and the gamma correction characteristics can be dynamically switched with a small circuit scale.
(実施例4)
次に、本発明の実施例4について説明する。本実施例は実施例2及び3と同様にカウント値を輝度分布情報として用いるが、実施例2及び3とは別の手法で動的にガンマ特性を可変させるように構成したものである。図10の(A),(B)は、本発明の実施例4に係るデジタルカメラの構成を示すブロック構成図である。図10の(A)において、14はガンマ補正を含む種々の画像処理を行う画像処理部であり、画像処理部14内のガンマ補正部は、図10の(B)に示すように、LUT15の出力信号と、積和係数生成部19からの信号とを、乗算器16及び加算器17を用いて積和演算する構成となっている。なお、18はクリップ部である。その他の構成ブロックは、図2に示した実施例2の構成ブロックと同じであるため、同一の構成ブロックには同一の符号を付して示し、その説明を省略する。
Example 4
Next, a fourth embodiment of the present invention will be described. In the present embodiment, the count value is used as the luminance distribution information as in the second and third embodiments, but the gamma characteristic is dynamically changed by a method different from the second and third embodiments. FIGS. 10A and 10B are block configuration diagrams showing the configuration of a digital camera according to
次に、図10の(A),(B)に示した実施例4の動作を、図11の処理シーケンス図を用いて説明する。画像データを、明部暗部カウンタ7によって第1の閾値レベル以上の画素と第2の閾値レベル以下の画素をカウントするまでは、実施例2と同じである。2つのカウント値は画像処理部14へ出力され、画像処理部14内の積和係数生成部19では、2つのカウント値からガンマ補正特性を変化させるための積和係数値を算出する。ここで、積和係数の働きを、図12の(A),(B)を用いて説明する。まず、LUT15には基本となるガンマ補正特性がセットされている。基本となるガンマ特性とは、出力デバイスの表示特性の逆特性となるようなガンマ特性であり、例えば図12の(A)及び図12の(B)の細実線のような特性である。
Next, the operation of the fourth embodiment shown in FIGS. 10A and 10B will be described with reference to the processing sequence diagram of FIG. The image data is the same as that in the second embodiment until the bright portion /
この基本となるガンマ特性に対して、まず乗算器16で傾きの調整を行う。乗算係数が1以上の場合、LUT出力値が大きいほど乗算後の増加分が大きくなり、すなわち、図12の(A)の点線のような明るい領域に階調が多く割り当てられるような特性となる。これに加算器17にてマイナス係数値を加算することにより、図12の(A)の太線のような特性に調整する。加算後の値はクリップ部18において、マイナスの値は0にクリップされる。逆に乗算係数が1以下の場合、LUT出力値が大きいほど傾きの減少分が大きくなり、すなわち、図12の(B)の点線のような暗い領域に階調が多く割り当てられるような特性となる。これを加算器17にてプラス係数を加算することにより、図12の(B)の太線のような特性に調整する。加算後の値は、クリップ部18にて所望の出力データ幅にクリップされる。
For this basic gamma characteristic, the
以上のガンマ特性を得るため、積和係数生成部19では、2つのカウント値をもとに例えば次のように積和係数を算出することとする。
明部カウント値>暗部カウント値で、且つ明部カウント値がある閾値を超えたとき、乗算係数K1を、
K1=1+(明部カウント値/全画素数)×α
とし、加算係数K2を、
K2=−K1×Y
とする。
In order to obtain the above gamma characteristics, the product-
When the bright part count value> dark part count value and the bright part count value exceeds a certain threshold, the multiplication coefficient K1 is
K1 = 1 + (bright part count value / total number of pixels) × α
And the addition coefficient K2 is
K2 = −K1 × Y
And
ここで、αは、K1の変化幅を調整するための設定値であり、ここでは0<α<10の値としている。例えばα=0.5 としたときK1は1〜1.5 の範囲の値となるから、基本ガンマ特性にかかる乗数は最大で1.5 に制限できることになる。また、Yは乗算後のガンマ特性値をオフセットさせる量を決める値であり、K1の大きさと連動させることにより、基本特性に対してのオフセット量を調整することができる。例えば図12の(A)では、Yを基本特性の最大出力値としたので、基本特性の最大値と積和演算後の出力最大値が一致するようにオフセットしている。 Here, α is a set value for adjusting the change width of K1, and here, 0 <α <10. For example, when α = 0.5, K1 takes a value in the range of 1 to 1.5, so that the multiplier for the basic gamma characteristic can be limited to 1.5 at the maximum. Y is a value that determines the amount by which the multiplied gamma characteristic value is offset, and the offset amount with respect to the basic characteristic can be adjusted by interlocking with the magnitude of K1. For example, in FIG. 12A, since Y is the maximum output value of the basic characteristic, offset is performed so that the maximum value of the basic characteristic matches the output maximum value after the product-sum operation.
一方、明部カウント値<暗部カウント値で、且つ暗部カウント値が閾値を超えたときは、
K1=1−(暗部カウント値/全画素数)×α
K2=K1×Y
とする。
また、上記二つの条件にあてはまらないときは、
K1=1
K2=0
とする。これは基本特性をそのまま使用する係数である。
On the other hand, when the bright part count value <dark part count value and the dark part count value exceeds the threshold value,
K1 = 1− (dark area count value / total number of pixels) × α
K2 = K1 × Y
And
If the above two conditions are not met,
K1 = 1
K2 = 0
And This is a coefficient that uses the basic characteristics as they are.
積和係数値を算出した後、画像処理部14はフレームメモリ5からシステムバス6を介して画像データを順次読み出し、LUT及び積和演算部を用いたガンマ補正や、その他の種々の画像処理を行い、システムバスを介してフレームメモリに書き戻す。
After calculating the product-sum coefficient value, the
以上のような構成にすることで、画像の輝度分布情報をより簡単に求めることができ、簡単な構成で処理時間を増やすことなく動的にガンマ補正特性を切り換えることが可能となる。 With the above configuration, the luminance distribution information of the image can be obtained more easily, and the gamma correction characteristics can be switched dynamically without increasing the processing time with a simple configuration.
(実施例5)
次に、本発明の実施例5について説明する。本実施例は、輝度分布情報の算出部を他の処理と共用するように構成したものである。本発明においては、画像の輝度分布情報として、画像全体のヒストグラム又は明部暗部のカウント値を算出している。デジタルカメラにおいて、このような画像全体から情報を求めなければならない処理の一つに、例えばオートホワイトバランス処理がある。最も単純なオートホワイトバランス処理は、撮影した画像全体の各色の平均値を求め、この平均値が同じ値になるように各色信号を調整するというものであるが、本発明に係る画像処理装置におけるガンマ補正部で用いているように、撮像素子のデータをフレームメモリに書き込むと並行してこの平均値を算出できれば、処理時間を延ばすことなくホワイトバランス処理を行うことが可能となる。
(Example 5)
Next, a fifth embodiment of the present invention will be described. In this embodiment, the luminance distribution information calculation unit is configured to be shared with other processes. In the present invention, as the luminance distribution information of the image, the histogram of the entire image or the count value of the bright and dark portions is calculated. In a digital camera, one of the processes that require information from the entire image is, for example, an auto white balance process. The simplest auto white balance processing is to obtain an average value of each color of the entire photographed image and adjust each color signal so that the average value becomes the same value. In the image processing apparatus according to the present invention, As used in the gamma correction unit, if the average value can be calculated in parallel with the writing of the image sensor data to the frame memory, the white balance processing can be performed without extending the processing time.
したがって、図13に示すように、デジタルカメラにおいて、輝度分布情報を求めると共に、各色信号の平均値又は累積加算値を求める輝度分布情報・各色平均値算出部20を設けることで、図14の処理シーケンスに示すように、撮像データをフレームメモリに書き込むと同時に、輝度分布情報・各色平均値算出部20において輝度分布情報と各色平均値を算出することができ、ガンマ補正用のパラメータとオートホワイトバランス用のパラメータが同時に算出され、画像処理部21においてガンマ補正処理とホワイトバランス補正処理を、処理時間を増やすことなく行うことができる。
Therefore, as shown in FIG. 13, in the digital camera, the luminance distribution information is obtained, and the luminance distribution information / each color average
1 撮像素子
2 ヒストグラム演算部
3 画像処理部
4 CPU
5 フレームメモリ
6 システムバス
7 明部暗部カウンタ
8 画像処理部
9 LUT
10 セレクタ
11 画像処理部
12 セレクタ
13 LUT
14 画像処理部
15 LUT
16 乗算器
17 加算器
18 クリップ部
19 積和係数生成部
20 輝度分布情報・各色平均値算出部
21 画像処理部
DESCRIPTION OF
5
10 Selector
11 Image processing section
12 Selector
13 LUT
14 Image processing section
15 LUT
16 multiplier
17 Adder
18 Clip section
19 Product-sum coefficient generator
20 Luminance distribution information / average value calculation unit for each color
21 Image processing section
Claims (7)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003394896A JP2005159693A (en) | 2003-11-26 | 2003-11-26 | Image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003394896A JP2005159693A (en) | 2003-11-26 | 2003-11-26 | Image processing apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005159693A true JP2005159693A (en) | 2005-06-16 |
Family
ID=34720793
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003394896A Pending JP2005159693A (en) | 2003-11-26 | 2003-11-26 | Image processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005159693A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007096997A (en) * | 2005-09-30 | 2007-04-12 | Toshiba Corp | Video signal processing apparatus and video signal processing method |
EP1791351A3 (en) * | 2005-11-24 | 2008-10-15 | Hitachi, Ltd. | Video processing apparatus and mobile terminal |
KR101180409B1 (en) | 2011-01-18 | 2012-09-10 | 위버브릿지(주) | Low illumination intensity image enhancement method and apparatus using histogram normalization and gamma correction |
JP5900351B2 (en) * | 2011-02-02 | 2016-04-06 | コニカミノルタ株式会社 | Method for manufacturing organic electroluminescence element |
WO2019111659A1 (en) * | 2017-12-07 | 2019-06-13 | 富士フイルム株式会社 | Image processing device, imaging device, image processing method, and program |
CN110675527A (en) * | 2019-09-28 | 2020-01-10 | 孔华 | On-site prevention device for porcelain collision behavior |
-
2003
- 2003-11-26 JP JP2003394896A patent/JP2005159693A/en active Pending
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007096997A (en) * | 2005-09-30 | 2007-04-12 | Toshiba Corp | Video signal processing apparatus and video signal processing method |
JP4504294B2 (en) * | 2005-09-30 | 2010-07-14 | 株式会社東芝 | Video signal processing apparatus and video signal processing method |
EP1791351A3 (en) * | 2005-11-24 | 2008-10-15 | Hitachi, Ltd. | Video processing apparatus and mobile terminal |
US7952645B2 (en) | 2005-11-24 | 2011-05-31 | Hitachi, Ltd. | Video processing apparatus and mobile terminal apparatus |
US8289450B2 (en) | 2005-11-24 | 2012-10-16 | Hitachi, Ltd. | Video processing apparatus with corrector for correcting an input video signal |
KR101180409B1 (en) | 2011-01-18 | 2012-09-10 | 위버브릿지(주) | Low illumination intensity image enhancement method and apparatus using histogram normalization and gamma correction |
JP5900351B2 (en) * | 2011-02-02 | 2016-04-06 | コニカミノルタ株式会社 | Method for manufacturing organic electroluminescence element |
WO2019111659A1 (en) * | 2017-12-07 | 2019-06-13 | 富士フイルム株式会社 | Image processing device, imaging device, image processing method, and program |
JPWO2019111659A1 (en) * | 2017-12-07 | 2020-09-24 | 富士フイルム株式会社 | Image processing equipment, imaging equipment, image processing methods, and programs |
US11838648B2 (en) | 2017-12-07 | 2023-12-05 | Fujifilm Corporation | Image processing device, imaging apparatus, image processing method, and program for determining a condition for high dynamic range processing |
CN110675527A (en) * | 2019-09-28 | 2020-01-10 | 孔华 | On-site prevention device for porcelain collision behavior |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5148989B2 (en) | Imaging device | |
US8254675B2 (en) | Image processing apparatus, imaging apparatus and image processing program | |
JP4622629B2 (en) | Imaging device | |
EP3293697A1 (en) | Image processing device, imaging device, image processing method, and storage medium storing image processing program for image processing device | |
US20160196640A1 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
US8155472B2 (en) | Image processing apparatus, camera, image processing program product and image processing method | |
JP2018207413A (en) | Imaging apparatus | |
US9019406B2 (en) | Imaging apparatus and image processing program for correcting dark area gradation | |
JP2004007202A (en) | Image processor | |
JP2008085634A (en) | Imaging apparatus and image processing method | |
US10387999B2 (en) | Image processing apparatus, non-transitory computer-readable medium storing computer program, and image processing method | |
JP6243629B2 (en) | Image processing apparatus and method, and imaging apparatus | |
JP2005159693A (en) | Image processing apparatus | |
US8102446B2 (en) | Image capturing system and image processing method for applying grayscale conversion to a video signal, and computer-readable recording medium having recorded thereon an image processing program for applying grayscale conversion to a video signal | |
JP5365881B2 (en) | Image processing apparatus and image processing method | |
JP2013192057A (en) | Imaging apparatus, control method of the same, and control program | |
JP2008219230A (en) | Imaging apparatus, and image processing method | |
JP2018181070A (en) | Image processing device and image processing method | |
JP3822486B2 (en) | Electronic camera and signal processing method | |
JP2017102393A (en) | Imaging apparatus | |
JP4833669B2 (en) | Imaging apparatus and signal processing method thereof | |
JP2004215063A (en) | Photographing device and outline correction method | |
JP2004222160A (en) | Digital camera | |
JP2007049533A (en) | Imaging apparatus and electronic information equipment | |
JP5754929B2 (en) | Image processing apparatus and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060831 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20090311 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090317 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090707 |