JP2005159693A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

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
Application number
JP2003394896A
Other languages
Japanese (ja)
Inventor
Atsushi Kobashi
厚志 小橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Corp filed Critical Olympus Corp
Priority to JP2003394896A priority Critical patent/JP2005159693A/en
Publication of JP2005159693A publication Critical patent/JP2005159693A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus provided with a dynamic gamma correction section activated accurately at a high speed by obtaining luminance distribution information in parallel with the writing of main exposure image data to a frame memory. <P>SOLUTION: The image processing apparatus is configured of: the frame memory 5 for storing image data from an imaging element 1 via a system bus 6; a histogram arithmetic section 2 for receiving the image data in parallel with the storage of the image data to the frame memory and obtaining a histogram of the lightness information of at least one chrominance signal data in the image data to set a gamma characteristic; and an image processing section 3 for using the gamma characteristic obtained by the histogram arithmetic section to apply gamma correction to the image data stored in the frame memory. <P>COPYRIGHT: (C)2005,JPO&NCIPI

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号公報 特開平11−196292号公報 特開2000−138862号公報
In addition, the digital camera proposed in Japanese Patent Laid-Open Nos. 11-196292 and 2000-138862 obtains a histogram and a luminance distribution using pre-image data exposed by the image sensor immediately before photographing, and uses this information. It controls the gamma correction processing of the image actually taken (hereinafter referred to as the main exposure image).
JP-A-8-23460 JP 11-196292 A JP 2000-138862 A

しかし、特開平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 claim 1 is directed to a frame memory for storing image data from an image sensor, and image data is input in parallel with the storage in the frame memory, and the luminance distribution of the image data A luminance distribution information calculation unit that obtains information and a gamma correction unit that performs gamma correction on image data stored in the frame memory based on the obtained luminance distribution information constitute an image processing apparatus. .

請求項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 claims 1, 2, and 7. Embodiments 2, 3, and 4 correspond to the invention according to claim 3. Example 2 corresponds to the invention according to claim 4. Example 3 corresponds to the invention according to claim 5. Example 4 corresponds to the invention according to claim 6.

本発明は、本露光画像データを使い、画像データをメモリに書き込むのと並行して輝度分布情報を作成できる構成とすることにより、正確且つ高速な輝度分布情報を求めることができ、また一眼レフカメラのようなプリ撮像が不可能なデジタルカメラにおいても、被写体の輝度分布に応じて動的にガンマ変換特性を変化させることができる。   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 processing unit 3 is composed of an LUT using a memory. Reference numeral 4 denotes a CPU for controlling each component block, 5 denotes a frame memory for storing an image for one screen, and 6 denotes a system bus through which image data and control signals flow. Note that control blocks such as a memory controller necessary for the actual hardware configuration are omitted because they are not related to the essence of the present invention.

次に、図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 image sensor 1 is AD converted (not shown) to become digital image data via the system bus 6 and the frame memory 5. Is written to. In parallel with this, the digital image data is also input to the histogram calculation unit 2. The histogram calculation unit 2 creates histogram data from the input image data with the horizontal axis representing brightness and the vertical axis representing frequency. At this time, as the image data used for creating the histogram, only the color signal including a lot of luminance information among all the digital image data is used. For example, when a CCD having an RGB color filter is used as the image sensor 1, only the G signal is used among the RGB signals. As a result, a histogram can be efficiently obtained from a small amount of data, and a memory for storing the histogram data can be reduced.

また、ヒストグラム演算部2は、ヒストグラム作成時に画像の場所によってヒストグラム度数の重みを可変する機能も備えている。例えば、図3に示すように、画像の中央部の重み値が周辺部より大きくなるように、例えば周辺部の重み=1,中央部の重み=2に設定し、重み=2のエリア内においては、そのヒストグラムの度数を2倍にする。図3は、画像の中央部分に重要な被写体があると仮定した場合の重み付け例であり、このようにすることで、より重要な被写体の明るさやコントラストが適切になるように、ガンマ補正することが可能となる。   The histogram calculation unit 2 also has a function of varying the weight of the histogram frequency depending on the location of the image when creating the histogram. For example, as shown in FIG. 3, for example, the weight of the peripheral part = 1 and the weight of the central part = 2 are set so that the weight value of the central part of the image is larger than that of the peripheral part. Doubles the frequency of the histogram. Fig. 3 shows an example of weighting assuming that there is an important subject in the center of the image. By doing this, gamma correction is performed so that the brightness and contrast of the more important subject are appropriate. Is possible.

次に、ヒストグラム演算部2では1フレーム分の画像データから作成したヒストグラムを、輝度の低い方から累積した累積ヒストグラムを作成し、これを画像処理部3内のガンマ補正LUTにロードする。この際、累積ヒストグラムの最大度値をLUTの出力ビット数にあわせて正規化しなければならないのは言うまでもない。ここで、得られる累積ヒストグラムについて図4の(A)〜(C)を用いて説明する。図4の(A)〜(C)は、それぞれ明るさの分布が異なる2枚の画像について、ヒストグラム(実線)と累積ヒストグラム(点線)を表した図である。但し、ヒストグラムと累積ヒストグラムが同じスケールになるように度数を調整してある。図4の(A)は画像中に明るい部分が多いときの図であり、累積ヒストグラムは明るい部分で傾きが大きくなる。したがって、この特性を用いてガンマ補正した場合、明るい部分に階調が多く割り当てられ、その結果良好な階調特性となる。一方、図4の(B)は画像中に暗い部分が多い場合の図であり、累積ヒストグラムは暗い部分で傾きが大きくなる。したがって、この特性を用いてガンマ補正した場合、暗い部分に階調が多く割り当てられ、その結果良好な階調特性となる。   Next, the histogram calculation unit 2 creates a cumulative histogram obtained by accumulating the histogram created from the image data for one frame from the lower luminance, and loads it into the gamma correction LUT in the image processing unit 3. In this case, it goes without saying that the maximum value of the cumulative histogram must be normalized according to the number of output bits of the LUT. Here, the obtained cumulative histogram will be described with reference to FIGS. 4A to 4C are diagrams showing a histogram (solid line) and a cumulative histogram (dotted line) for two images each having a different brightness distribution. However, the frequency is adjusted so that the histogram and the cumulative histogram have the same scale. FIG. 4A is a diagram when there are many bright portions in the image, and the cumulative histogram has a large slope in the bright portions. Therefore, when gamma correction is performed using this characteristic, a large number of gradations are assigned to the bright part, resulting in good gradation characteristics. On the other hand, FIG. 4B is a diagram in the case where there are many dark portions in the image, and the cumulative histogram has a large inclination in the dark portions. Therefore, when gamma correction is performed using this characteristic, a large number of gradations are assigned to dark portions, resulting in good gradation characteristics.

但し、この手法で求めた累積ヒストグラムをそのままガンマ補正として用いると、次のような問題が生じる。例えば、図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 image processing unit 3 sequentially reads out the image data from the frame memory 5 via the system bus 6, performs gamma correction processing using the gamma characteristic set by the histogram calculation unit 2, and other various types The processed image data is written back to the frame memory 5 via the system bus 6. Since each process of reading out the image data, image processing, and post-processing data writing back is pipelined for each pixel, as shown in FIG. 2, it starts and ends at substantially the same timing. The processing sequence described so far is controlled by the CPU 4.

以上のような構成でガンマ補正処理を行うことにより、処理時間を増やすことなく動的にガンマ補正特性を変化させることが可能となる。また、本露光画像データからヒストグラムを作成するため、正確な輝度分布情報を求めることができ、且つ、ミラー分光する機構を持った一眼レフデジタルカメラにおいても、ガンマ補正特性を動的に変化させることが実現可能となる。   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 Embodiment 2 of the present invention. In FIG. 5A, reference numeral 7 denotes a bright part counter for counting pixels having a brightness equal to or higher than a first threshold in the image, and a dark part counter for counting pixels having a brightness lower than the second threshold, and 8 denotes a gamma. The image processing unit performs various image processing including correction. The gamma correction unit in the image processing unit 8 includes a plurality of LUTs 9 using a memory as shown in FIG. And a selector 10 for selecting one. The other constituent blocks are the same as the constituent blocks of the first embodiment shown in FIG. 1, and therefore, the same constituent blocks are denoted by the same reference numerals and description thereof is omitted. The image processing unit 8 may include image processing blocks other than the gamma correction unit, but illustration and description thereof are omitted because they do not affect the present invention.

次に、図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 image sensor 1 is AD converted (not shown) to become digital image data via the system bus 6 and the frame memory 5. Is written to. In parallel with this, the digital image data is also input to the bright / dark counter 7. The bright and dark area counter 7 has two counters, and counts pixels that are equal to or higher than a certain first threshold level and pixels that are equal to or lower than a second threshold level in the input image data. At this time, as the image data to be counted, only the color signal containing a lot of luminance information among all the digital image data is used as in the first embodiment. Also, the weighting of the count value according to the location of the image is the same as in the first embodiment.

次に、明部暗部カウンタ部7ではカウント結果を元にセレクト信号の生成を行う。このセレクト信号は、画像処理部8の複数あるガンマ補正LUT9を切り換えるための信号であり、例えば、明部カウンタ値、暗部カウンタ値がそれぞれ予め設定した第3の閾値以上であるときを1,以下であるときを0とすると、表1に示すような2ビットのセレクト信号を生成する。   Next, the bright / dark counter unit 7 generates a select signal based on the count result. This select signal is a signal for switching a plurality of gamma correction LUTs 9 in the image processing unit 8. For example, when the bright part counter value and the dark part counter value are each equal to or greater than a preset third threshold value, 1 or less. When 0 is set to 0, a 2-bit select signal as shown in Table 1 is generated.

Figure 2005159693
Figure 2005159693

次に、画像処理部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 image processing unit 8 sequentially reads out image data from the frame memory 5 via the system bus 6, and performs gamma correction using the LUT 9 selected via the selector 10 by the select signal and other various image processing. And write back to the frame memory 5 via the system bus 6. Here, the relationship between the select signal and the gamma characteristic in the selected LUT 9 will be described with reference to FIG. FIG. 7 is a diagram showing gamma characteristic curves set in the four LUTs 9. When the select signal is 00, it means that the ratio of the bright part and the dark part is small in the image. Therefore, the characteristic shown by a in FIG. 7 is set so that many gradations are assigned to the intermediate brightness range. The selected LUT 9 is selected. When the select signal is 01, it means that there are many dark parts. Therefore, the LUT 9 having the characteristics shown in FIG. 7b is selected so that many gradations are assigned to the dark area of the image, and the select signal is selected. When the signal is 10, it means that there are many bright parts. Therefore, the LUT 9 having the characteristics shown by c in FIG. 7 is selected so that many gradations are assigned to the bright area of the image, and the select signal is selected. 11 indicates that there are a lot of bright and dark areas. Therefore, the LUT 9 having the characteristics shown by d in FIG. 7 is set so that many gradations are assigned to the bright and dark areas of the image. select.

本実施例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 LUTs 9 is 4. However, when the brightness range to be counted is further subdivided, it can be handled by increasing the number of LUTs 9. On the contrary, when only one of the bright part and the dark part is counted, the number of LUTs 9 can be reduced. Further, the memory constituting the LUT 9 may be either ROM or RAM.

以上のような構成にすることで、画像の輝度分布情報をより簡単に求めることができ、処理時間を増やすことなく動的にガンマ補正特性を切り換えることが可能となる。   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, Embodiment 3 of the present invention will be described. In the second embodiment, the number of bright and dark portions of the image is counted as the luminance distribution information of the image, and the gamma correction LUT is switched according to the count value. However, in this embodiment, the count value is shown. A mode in which the gamma characteristic is dynamically changed by another method will be described. FIGS. 8A and 8B are block configuration diagrams showing the configuration of a digital camera according to Embodiment 3 of the present invention. In FIG. 8A, reference numeral 11 denotes an image processing unit that performs various image processing including gamma correction. The gamma correction unit in the image processing unit 11 includes a selector as shown in FIG. 12, the data input to the address port of the LUT 13 can be switched. In this embodiment, the LUT 13 is constituted by a RAM, and FIG. 8B shows a configuration in the case of using a single port RAM. The other constituent blocks are the same as the constituent blocks of the second embodiment shown in FIG. 2, and therefore the same constituent blocks are denoted by the same reference numerals and the description thereof is omitted. However, the output signal line of the bright / dark counter 7 is connected to the system bus 8.

次に、図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 / dark counter 7 is written in parallel with the writing of the image data into the frame memory 5. The steps up to counting the above pixels and pixels below the second threshold level and generating a select signal are the same as those in the second embodiment shown in FIG. The generated select signal is input to the CPU 4 via the system bus 6. Based on the select signal, the CPU 4 selects one from a memory (not shown) in which a plurality of gamma characteristics shown in FIG. 7 are stored, for example, and selects it in the gamma correction LUT 13 in the image processing unit 11. The gamma characteristic data (LUT data) and the LUT memory address are output. At this time, the CPU 4 switches the selector 12 so that the LUT 13 can input the LUT data and the LUT address from the CPU 4 by the table load / gamma correction select signal. After loading the LUT data into the LUT 13, the CPU 4 switches the selector 12 so that image data can be input. Next, the image processing unit 11 sequentially reads out the image data from the frame memory 5 via the system bus 6 and performs gamma correction using the LUT 13 loaded with the LUT data by the CPU 4 and other various image processings. Write back to the frame memory 5 via the bus 6.

以上のような構成にすることで、画像の輝度分布情報をより簡単に求めることができ、少ない回路規模で動的にガンマ補正特性を切り換えることが可能となる。   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 Embodiment 4 of the present invention. In FIG. 10A, reference numeral 14 denotes an image processing unit that performs various image processing including gamma correction. The gamma correction unit in the image processing unit 14 includes an LUT 15 as shown in FIG. A product-sum operation is performed using the multiplier 16 and the adder 17 on the output signal and the signal from the product-sum coefficient generation unit 19. Reference numeral 18 denotes a clip portion. The other constituent blocks are the same as the constituent blocks of the second embodiment shown in FIG. 2, and therefore the same constituent blocks are denoted by the same reference numerals and the description thereof is omitted.

次に、図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 / dark portion counter 7 counts the pixels having the first threshold level or higher and the pixels having the second threshold level or lower. The two count values are output to the image processing unit 14, and a product-sum coefficient generation unit 19 in the image processing unit 14 calculates a product-sum coefficient value for changing the gamma correction characteristic from the two count values. Here, the function of the product-sum coefficient will be described with reference to FIGS. First, a basic gamma correction characteristic is set in the LUT 15. The basic gamma characteristic is a gamma characteristic that is the reverse characteristic of the display characteristic of the output device, and is, for example, a characteristic such as a thin solid line in FIGS. 12A and 12B.

この基本となるガンマ特性に対して、まず乗算器16で傾きの調整を行う。乗算係数が1以上の場合、LUT出力値が大きいほど乗算後の増加分が大きくなり、すなわち、図12の(A)の点線のような明るい領域に階調が多く割り当てられるような特性となる。これに加算器17にてマイナス係数値を加算することにより、図12の(A)の太線のような特性に調整する。加算後の値はクリップ部18において、マイナスの値は0にクリップされる。逆に乗算係数が1以下の場合、LUT出力値が大きいほど傾きの減少分が大きくなり、すなわち、図12の(B)の点線のような暗い領域に階調が多く割り当てられるような特性となる。これを加算器17にてプラス係数を加算することにより、図12の(B)の太線のような特性に調整する。加算後の値は、クリップ部18にて所望の出力データ幅にクリップされる。   For this basic gamma characteristic, the multiplier 16 first adjusts the inclination. When the multiplication coefficient is 1 or more, the larger the LUT output value, the larger the increase after multiplication, that is, a characteristic in which a large number of gradations are assigned to a bright region such as the dotted line in FIG. . By adding a negative coefficient value to the adder 17 to this, the characteristic as shown by the thick line in FIG. The value after addition is clipped to 0 in the clip unit 18. On the other hand, when the multiplication coefficient is 1 or less, the larger the LUT output value, the larger the decrease in the slope, that is, the characteristic that many gradations are assigned to a dark region such as the dotted line in FIG. Become. By adding a plus coefficient to the adder 17, the characteristic is adjusted to the characteristic shown by the thick line in FIG. The value after the addition is clipped to a desired output data width by the clip unit 18.

以上のガンマ特性を得るため、積和係数生成部19では、2つのカウント値をもとに例えば次のように積和係数を算出することとする。
明部カウント値>暗部カウント値で、且つ明部カウント値がある閾値を超えたとき、乗算係数K1を、
K1=1+(明部カウント値/全画素数)×α
とし、加算係数K2を、
K2=−K1×Y
とする。
In order to obtain the above gamma characteristics, the product-sum coefficient generator 19 calculates the product-sum coefficient based on the two count values as follows, for example.
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 image processing unit 14 sequentially reads out the image data from the frame memory 5 via the system bus 6, and performs gamma correction using the LUT and the product-sum operation unit and other various image processing. And write back to the frame memory via the system bus.

以上のような構成にすることで、画像の輝度分布情報をより簡単に求めることができ、簡単な構成で処理時間を増やすことなく動的にガンマ補正特性を切り換えることが可能となる。   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 value calculation unit 20 that obtains the average value or the cumulative addition value of each color signal is provided, whereby the processing of FIG. As shown in the sequence, the luminance distribution information and each color average value calculation unit 20 can calculate the luminance distribution information and each color average value at the same time as the imaging data is written to the frame memory, and the parameters for gamma correction and auto white balance Parameters are calculated at the same time, and the image processing unit 21 can perform the gamma correction process and the white balance correction process without increasing the processing time.

本発明に係る画像処理装置の実施例1の構成を示すブロック構成図である。1 is a block configuration diagram showing a configuration of Embodiment 1 of an image processing apparatus according to the present invention. 図1に示した実施例1の動作を説明するための処理シーケンスを示す図である。It is a figure which shows the process sequence for demonstrating operation | movement of Example 1 shown in FIG. 画像に対する重み付け例を示す図である。It is a figure which shows the example of weighting with respect to an image. 明るさに関するヒストグラムと累積ヒストグラムの関係、並びに累積ヒストグラムの修正態様を示す図である。It is a figure which shows the relationship between the histogram regarding brightness, and a cumulative histogram, and the correction | amendment aspect of a cumulative histogram. 本発明の実施例2の構成を示すブロック構成図である。It is a block block diagram which shows the structure of Example 2 of this invention. 図5に示した実施例2の動作を説明するための処理シーケンスを示す図である。It is a figure which shows the process sequence for demonstrating operation | movement of Example 2 shown in FIG. 図5に示した実施例2における4つのLUT内に設定されているガンマ特性カーブを示す図である。FIG. 6 is a diagram illustrating gamma characteristic curves set in four LUTs in the second embodiment illustrated in FIG. 5. 本発明の実施例3の構成を示すブロック構成図である。It is a block block diagram which shows the structure of Example 3 of this invention. 図8に示した実施例3の動作を説明するための処理シーケンスを示す図である。It is a figure which shows the process sequence for demonstrating operation | movement of Example 3 shown in FIG. 本発明の実施例4の構成を示すブロック構成図である。It is a block block diagram which shows the structure of Example 4 of this invention. 図10に示した実施例4の動作を説明するための処理シーケンスを示す図である。FIG. 11 is a diagram showing a processing sequence for explaining an operation of the fourth embodiment shown in FIG. 図10に示した実施例4における積和演算部の動作を示す説明図である。FIG. 11 is an explanatory diagram illustrating an operation of a product-sum operation unit in the fourth embodiment illustrated in FIG. 10. 本発明の実施例5の構成を示すブロック構成図である。It is a block block diagram which shows the structure of Example 5 of this invention. 図13に示した実施例5の動作を説明するための処理シーケンスを示す図である。FIG. 14 is a diagram showing a processing sequence for explaining the operation of the fifth embodiment shown in FIG. 従来のガンマ補正手法を説明するための処理シーケンスを示す図である。It is a figure which shows the processing sequence for demonstrating the conventional gamma correction method.

符号の説明Explanation of symbols

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 SYMBOLS 1 Image pick-up element 2 Histogram calculation part 3 Image processing part 4 CPU
5 Frame memory 6 System bus 7 Bright / dark counter 8 Image processor 9 LUT
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)

撮像素子からの画像データを格納するフレームメモリと、該フレームメモリへの格納と並行して画像データが入力され、画像データの輝度分布情報を得る輝度分布情報算出部と、得られた輝度分布情報を元に、前記フレームメモリに保存された画像データに対してガンマ補正を行うガンマ補正部とを有する画像処理装置。   A frame memory that stores image data from the image sensor, a luminance distribution information calculation unit that receives the image data in parallel with the storage in the frame memory, and obtains luminance distribution information of the image data, and the obtained luminance distribution information And a gamma correction unit that performs gamma correction on the image data stored in the frame memory. 前記輝度分布情報算出部は、画像データの内、少なくとも一つの色信号データのヒストグラムから前記輝度分布情報を生成することを特徴とする請求項1に係る画像処理装置。   The image processing apparatus according to claim 1, wherein 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. 前記輝度分布情報算出部は、画像データの内、少なくとも一つの色信号データの明るさに対して第1の閾値、及び第1の閾値とは異なる第2の閾値を設定して、第1の閾値以上の画像データの数、あるいは、第2の閾値以下の画像データの数の、少なくとも一方をカウントし、第1の閾値以上の画像データのカウント数、あるいは、第2の閾値以下の画像データのカウント数の、少なくとも一方を前記輝度分布情報として用いることを特徴とする請求項1に係る画像処理装置。   The luminance distribution information calculation unit sets a first threshold value and a second threshold value different from the first threshold value for the brightness of at least one color signal data in the image data, At least one of the number of image data equal to or greater than the threshold or the number of image data equal to or less than the second threshold is counted, and the count of image data equal to or greater than the first threshold or image data equal to or less than the second threshold. The image processing apparatus according to claim 1, wherein at least one of the count numbers is used as the luminance distribution information. 前記ガンマ補正部は、入力される画像データに対応するガンマ補正データからなるルックアップテーブルを複数記憶したメモリと、前記カウント数に応じてメモリ内の1つのルックアップテーブルを選択するセレクタとを有することを特徴とする請求項3に係る画像処理装置。   The gamma correction unit includes a memory that stores a plurality of lookup tables including gamma correction data corresponding to input image data, and a selector that selects one lookup table in the memory according to the count number. An image processing apparatus according to claim 3. 前記ガンマ補正部は、前記カウント数に応じて、外部よりロードする、入力される画像データに対応するガンマ補正データからなるルックアップテーブルを選択してロードするセレクタと、ロードされたルックアップテーブルを記憶するメモリとを有することを特徴とする請求項3に係る画像処理装置。   The gamma correction unit selects a lookup table made of gamma correction data corresponding to input image data to be loaded from the outside according to the count number, and a loaded lookup table. An image processing apparatus according to claim 3, further comprising a memory for storing the image. 前記ガンマ補正部は、入力される画像データに対応するガンマ補正データからなるルックアップテーブルを格納したメモリと、該メモリからのガンマ補正データに対し、前記カウント数より算出される係数を積和演算する演算部とを有することを特徴とする請求項3に係るの画像処理装置。   The gamma correction unit includes a memory storing a lookup table composed of gamma correction data corresponding to input image data, and a product-sum operation on a coefficient calculated from the count for the gamma correction data from the memory. The image processing apparatus according to claim 3, further comprising: an arithmetic unit that performs the operation. 前記輝度分布情報算出部は、画像データの領域に、その位置に応じた重み付けを設定し、その重み付けを用いて輝度分布情報を算出することを特徴とする請求項1に係る画像処理装置。   The image processing apparatus according to claim 1, wherein the luminance distribution information calculation unit sets weighting corresponding to the position of the region of the image data, and calculates the luminance distribution information using the weighting.
JP2003394896A 2003-11-26 2003-11-26 Image processing apparatus Pending JP2005159693A (en)

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)

* Cited by examiner, † Cited by third party
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

Cited By (11)

* Cited by examiner, † Cited by third party
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