JP5621335B2 - Image processing apparatus, image processing method, and image pickup apparatus - Google Patents

Image processing apparatus, image processing method, and image pickup apparatus Download PDF

Info

Publication number
JP5621335B2
JP5621335B2 JP2010134828A JP2010134828A JP5621335B2 JP 5621335 B2 JP5621335 B2 JP 5621335B2 JP 2010134828 A JP2010134828 A JP 2010134828A JP 2010134828 A JP2010134828 A JP 2010134828A JP 5621335 B2 JP5621335 B2 JP 5621335B2
Authority
JP
Japan
Prior art keywords
image
exposure time
luminance
brightness
gamma correction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010134828A
Other languages
Japanese (ja)
Other versions
JP2012004621A (en
Inventor
智子 石垣
智子 石垣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2010134828A priority Critical patent/JP5621335B2/en
Publication of JP2012004621A publication Critical patent/JP2012004621A/en
Application granted granted Critical
Publication of JP5621335B2 publication Critical patent/JP5621335B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/40Picture signal circuits

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)
  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)

Description

本発明は、撮像素子におけるダイナミックレンジの調整を図る画像処理装置及び画像処理方法、並びに該画像処理装置を備えた画像撮像装置に関する。   The present invention relates to an image processing apparatus and an image processing method for adjusting a dynamic range in an image sensor, and an image imaging apparatus including the image processing apparatus.

撮像素子におけるダイナミックレンジとは、一枚の撮像の中で表現できる最小の被写体照度と最大照度の比を表わす。一般にレンズの絞りやシャッタースピードの調整により、ダイナミックレンジを輝度軸に対して平行移動させることで、明るい被写体から暗い被写体までを適切な階調で撮影することが可能である。また、実際にシャッタースピードを変化させる代わりに、撮像素子の電荷蓄積時間を制御することで露光時間を調整する電子シャッタも広く用いられている。   The dynamic range in the image sensor represents the ratio of the minimum object illuminance and the maximum illuminance that can be expressed in one image. In general, by moving the dynamic range in parallel with the luminance axis by adjusting the lens aperture and shutter speed, it is possible to shoot from a bright subject to a dark subject with appropriate gradation. An electronic shutter that adjusts the exposure time by controlling the charge accumulation time of the image sensor instead of actually changing the shutter speed is also widely used.

しかし、明るい部分と暗い部分との輝度差が撮像素子のダイナミックレンジよりも大きいような被写体を撮影した際においては、明るい部分が白とびし、暗い部分が黒つぶれしてしまう。   However, when photographing a subject whose luminance difference between the bright part and the dark part is larger than the dynamic range of the image sensor, the bright part is overexposed and the dark part is overshadowed.

これを回避するため、従来、撮像フレームF(i)の輝度ヒストグラムを生成して該撮像フレームF(i)の明暗を判断し、明すぎる又は暗すぎる場合に応じて最適な露光時間を設定し、次の撮像フレーム(i+1)の輝度を調整することが知られている。また、例えば特許文献1では、露光時間に加え、最適なゲインや最適なガンマ補正値を設定して、広ダイナミックレンジの画像を得るようにしている。   In order to avoid this, conventionally, a brightness histogram of the imaging frame F (i) is generated to determine the brightness of the imaging frame F (i), and an optimal exposure time is set according to whether the imaging frame F (i) is too bright or too dark. It is known to adjust the luminance of the next imaging frame (i + 1). For example, in Patent Document 1, an optimum gain and an optimum gamma correction value are set in addition to the exposure time to obtain an image with a wide dynamic range.

上述のような従来の撮像フレームF(i)の輝度ヒストグラムから、最適な露光時間とガンマ補正値を設定する方法では、露光時間とガンマ補正が互いに影響を及ぼし合う可能性があり、理想的な画像が得られるかどうか疑わしい問題があった。   In the method of setting the optimum exposure time and gamma correction value from the luminance histogram of the conventional imaging frame F (i) as described above, the exposure time and gamma correction may affect each other, which is ideal. There was a question of whether an image could be obtained.

これの解決策としては、まず、撮像フレームF(i)の輝度ヒストグラムをもとに最適な露光時間を設定し、次に、その露光時間で撮影した撮像フレーム(i+1)の輝度ヒストグラムをもとに最適なガンマ補正を設定し、次の撮像フレーム(i+2)で、そのガンマ補正値を反映するようにする方法が考えられるが、理想的な画像を得るまでには2フレームの遅延が発生する。フレームレートを落として使用するときには、数十フレームの遅延が発生してしまう。   As a solution to this, first, an optimal exposure time is set based on the luminance histogram of the imaging frame F (i), and then, based on the luminance histogram of the imaging frame (i + 1) photographed at that exposure time. It is possible to set an optimal gamma correction for the image and reflect the gamma correction value in the next imaging frame (i + 2). However, a delay of 2 frames occurs until an ideal image is obtained. . When using at a reduced frame rate, a delay of several tens of frames occurs.

本発明は、フレームの遅延を少なくして、かつ、より確実に理想的な撮像に近づけ、広ダイナミックレンジの画像を得ることができる画像処理装置及び画像処理方法、並びに該画像処理装置を備えた画像撮像装置を提供することを目的とする。   The present invention includes an image processing apparatus and an image processing method capable of obtaining a wide dynamic range image with reduced frame delay and more reliably approaching ideal imaging, and the image processing apparatus. An object is to provide an image pickup apparatus.

請求項1の発明の画像処理装置は、撮像素子から出力される画像フレームF(i)の画像データからガンマ補正の効果を取り除くガンマ補正除去手段と、前記ガンマ補正の効果が取り除かれた画像フレームF(i)の画像データから輝度ヒストグラムを作成する輝度ヒストグラム作成手段と、前記輝度ヒストグラムの特徴から最適露光時間を算出する最適露光時間算出手段と、前記撮像素子が前記最適露光時間で撮影した際の画像フレームF(i+1)の画像データの輝度(以下、仮想輝度)を推定し、仮想輝度ヒストグラムを作成する輝度ヒストグラム推定手段と、前記仮想輝度ヒストグラムの特徴から最適ガンマ補正値を算出する最適ガンマ補正値算出手段とを有し、前記最適露光時間及び前記最適ガンマ補正値を設定して得られる次の画像フレームF(i+1)の画像データを送出することを特徴とする。   An image processing apparatus according to a first aspect of the present invention includes a gamma correction removing unit that removes the effect of gamma correction from the image data of the image frame F (i) output from the image sensor, and an image frame from which the effect of the gamma correction is removed. A brightness histogram creating means for creating a brightness histogram from the image data of F (i), an optimum exposure time calculating means for calculating an optimum exposure time from the characteristics of the brightness histogram, and when the image sensor has taken an image at the optimum exposure time Brightness histogram estimation means for estimating the brightness (hereinafter referred to as virtual brightness) of image data of the image frame F (i + 1) of the image and creating a virtual brightness histogram, and optimal gamma for calculating an optimal gamma correction value from the characteristics of the virtual brightness histogram Correction value calculation means, and the following is obtained by setting the optimum exposure time and the optimum gamma correction value Characterized by sending the image data of the image frame F (i + 1).

請求項2の発明は、請求項1に記載の画像処理装置において、撮像素子から出力される画像フレームF(i)の画像データの明度を分類する明度分類手段を有し、前記画像フレームF(i)の画像データの明度が所定の条件を満足する場合、該画像フレームF(i)の画像データをそのまま送出することを特徴とする。   According to a second aspect of the present invention, in the image processing apparatus according to the first aspect of the present invention, the image processing apparatus according to the first aspect includes lightness classification means for classifying the lightness of the image data of the image frame F (i) output from the image sensor, When the brightness of the image data i) satisfies a predetermined condition, the image data of the image frame F (i) is sent as it is.

請求項3の発明は、請求項2に記載の画像処理装置において、前記明度分類手段にて、前記画像フレームF(i)の画像データが高明度、中間明度、低明度に分類され、中間明度の画素数が予め定めた数より多く、高明度と低明度の画素数が予め定めた数より少ない場合、あるいは、高明度、中間明度、低明度ともに画素数が予め定めた数より少ない場合に、前記画像フレームF(i)の画像データをそのまま送出することを特徴とする。   According to a third aspect of the present invention, in the image processing apparatus according to the second aspect, the lightness classification means classifies the image data of the image frame F (i) into high lightness, intermediate lightness, and low lightness, and the intermediate lightness. When the number of pixels is larger than the predetermined number and the number of high and low lightness pixels is smaller than the predetermined number, or when the number of pixels of the high lightness, intermediate lightness, and low lightness is smaller than the predetermined number The image data of the image frame F (i) is transmitted as it is.

請求項4の発明は、請求項1乃至3のいずれか1項に記載の画像処理装置において、前記輝度ヒストグラム推定手段は、前記ガンマ成分除去手段でガンマ補正の効果が除かれた撮像フレームF(i)の画像データの輝度Y(x,y)gammaoffと、前記最適露光時間算出手段で算出された最適露光時間Tb、現露光時間Tnとから、仮想輝度Y’(x,y)を、
Y’(x,y)=Y(x,y)gammaoff*Tb/Tn
として算出し推定することを特徴とする。
According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the luminance histogram estimation means is an imaging frame F () in which the effect of gamma correction is removed by the gamma component removal means. From the brightness Y (x, y) gammaoff of the image data i), the optimum exposure time Tb calculated by the optimum exposure time calculation means, and the current exposure time Tn, a virtual brightness Y ′ (x, y) is obtained.
Y ′ (x, y) = Y (x, y) gammaoff * Tb / Tn
Is calculated and estimated.

請求項5の発明は、請求項1乃至4のいずれか1項に記載の画像処理装置において、前記輝度ヒストグラム推定手段は、仮想輝度が適正かどうか判定し、適正でない場合には、前記最適露光時間算出手段にフィードバックをかけて最適露光時間を調整せしめ、調整された最適露光時間をもとに再び仮想輝度を推定し、仮想輝度ヒストグラムを作成し直すことを特徴とする。   According to a fifth aspect of the present invention, in the image processing device according to any one of the first to fourth aspects, the luminance histogram estimation means determines whether or not the virtual luminance is appropriate. Feedback is made to the time calculation means to adjust the optimum exposure time, the virtual brightness is estimated again based on the adjusted optimum exposure time, and the virtual brightness histogram is recreated.

請求項6の発明は、請求項5に記載の画像処理装置において、前記輝度ヒストグラム推定手段は、最高明度付近の仮想輝度の画素数が予め定めた数より多い場合、あるいは最低明度付近の仮想輝度の画素数が予め定めた数より多い場合に、仮想輝度が適当でないと判定することを特徴とする。   According to a sixth aspect of the present invention, in the image processing apparatus according to the fifth aspect, the luminance histogram estimation means is configured to determine whether the number of pixels of the virtual luminance near the maximum brightness is larger than a predetermined number, or the virtual luminance near the minimum brightness. When the number of pixels is larger than a predetermined number, it is determined that the virtual luminance is not appropriate.

請求項7の発明は、請求項5又は6に記載の画像処理装置において、前記最適露光時間算出手段へのフィードバックは、最適露光時間及び最適ガンマ補正値の設定が1フレーム遅延内で収まる限り何回でも行われることを特徴とする。   According to a seventh aspect of the present invention, in the image processing apparatus according to the fifth or sixth aspect, the feedback to the optimum exposure time calculation means is as long as the optimum exposure time and optimum gamma correction value are set within one frame delay. It is characterized by being performed even once.

請求項8の発明の画像処理方法は、撮像素子から出力される画像フレームF(i)の画像データからガンマ補正の効果を取り除くガンマ補正除去ステップと、前記ガンマ補正の効果が取り除かれた画像フレームF(i)の画像データから輝度ヒストグラムを作成する輝度ヒストグラム作成ステップと、前記輝度ヒストグラムの特徴から最適露光時間を算出する最適露光時間算出ステップと、前記撮像素子が前記最適露光時間で撮影した際の画像フレームF(i+1)の画像データの輝度(以下、仮想輝度)を推定し、仮想輝度ヒストグラムを作成する輝度ヒストグラム推定ステップと、前記仮想輝度ヒストグラムの特徴から最適ガンマ補正値を算出する最適ガンマ補正値算出ステップとを有し、前記最適露光時間及び前記最適ガンマ補正値を設定して得られる次の画像フレームF(i+1)の画像データを送出することを特徴とする。   An image processing method according to an eighth aspect of the present invention is a gamma correction removing step for removing gamma correction effect from image data of an image frame F (i) output from an image sensor, and an image frame from which the gamma correction effect is removed. A brightness histogram creating step of creating a brightness histogram from the image data of F (i), an optimal exposure time calculating step of calculating an optimal exposure time from the characteristics of the brightness histogram, and when the image sensor has taken an image at the optimal exposure time A luminance histogram estimation step for estimating the luminance of the image data of the image frame F (i + 1) (hereinafter referred to as virtual luminance) and creating a virtual luminance histogram, and an optimal gamma for calculating an optimal gamma correction value from the characteristics of the virtual luminance histogram A correction value calculating step, and calculating the optimum exposure time and the optimum gamma correction value. Characterized by sending the image data of the next image frame F obtained by the constant (i + 1).

請求項9の発明は、請求項8に記載の画像処理方法において、撮像素子から出力される画像フレームF(i)の画像データの明度を分類する明度分類ステップを有し、前記画像フレームF(i)の画像データの明度が所定の条件を満足する場合、該画像フレームF(i)の画像データをそのまま送出することを特徴とする。   A ninth aspect of the present invention is the image processing method according to the eighth aspect, further comprising a lightness classification step of classifying the lightness of the image data of the image frame F (i) output from the image sensor, wherein the image frame F ( When the brightness of the image data i) satisfies a predetermined condition, the image data of the image frame F (i) is sent as it is.

請求項10の発明は、請求項8又は9に記載の画像処理方法において、前記輝度ヒストグラム推定ステップは、仮想輝度が適正かどうか判定し、適正でない場合には、前記最適露光時間算出手段にフィードバックをかけて最適露光時間を調整せしめ、調整された最適露光時間をもとに再び仮想輝度を推定し、仮想輝度ヒストグラムを作成し直すことを特徴とする。   According to a tenth aspect of the present invention, in the image processing method according to the eighth or ninth aspect, the luminance histogram estimating step determines whether or not the virtual luminance is appropriate, and if not, feeds back to the optimum exposure time calculating means. To adjust the optimum exposure time, estimate the virtual brightness again based on the adjusted optimum exposure time, and recreate the virtual brightness histogram.

請求項11の発明は、請求項10に記載の画像処理方法において、前記最適露光時間算出ステップへのフィードバックは、最適露光時間及び最適ガンマ補正値の設定が1フレーム遅延内で収まる限り何回でも行われることを特徴とする。   According to an eleventh aspect of the present invention, in the image processing method according to the tenth aspect, the feedback to the optimum exposure time calculation step can be performed any number of times as long as the optimum exposure time and the optimum gamma correction value are set within one frame delay. It is performed.

請求項12の発明の画像撮像装置は、被写体の光学像を集光する光学系と、前記光学系により集光された光学像を電気信号に変換し、画像データを出力する撮像素子と、前記請求項1乃至7のいずれか1項に記載の画像処理装置と、前記画像処理装置から送出される画像データを表示する表示装置とを備えていることを特徴とする。   An image pickup apparatus according to a twelfth aspect of the invention includes an optical system that collects an optical image of a subject, an image pickup device that converts the optical image collected by the optical system into an electrical signal, and outputs image data; The image processing apparatus according to claim 1, and a display device that displays image data sent from the image processing apparatus.

本発明の画像処理装置及び画像処理方法によれば、ガンマ補正の効果が取り除かれた撮像フレームF(i)の輝度ヒストグラムから最適な露光時間を算出するとともに、該露光時間を設定した際の撮像フレームF(i+1)の輝度を推定し、その輝度ヒストグラム(仮想輝度ヒストグラム)を元に最適なガンマ補正値を算出し、該最適化した露光時間とガンマ補正値を次の実際の撮像フレームF(i+1)に反映させることで、1フレームのみの遅延で、理想的な撮像に近づけ、広ダイナミックレンジの画像を得ることができる。また、撮像フレームF(i)の明度を分類し、所定の条件を満足する場合には、該撮像フレームF(i)をそのまま出力することで、不必要なフレームの遅延を抑止することができる。したがって、少ないフレーム遅延で、より確実に理想的な撮像に近づける広ダイナミックレンジの調整が可能な画像撮像装置を提供することができる。   According to the image processing apparatus and the image processing method of the present invention, the optimum exposure time is calculated from the luminance histogram of the imaging frame F (i) from which the effect of the gamma correction is removed, and the imaging when the exposure time is set is performed. The brightness of the frame F (i + 1) is estimated, an optimal gamma correction value is calculated based on the brightness histogram (virtual brightness histogram), and the optimized exposure time and gamma correction value are calculated for the next actual imaging frame F ( By reflecting in i + 1), an image with a wide dynamic range can be obtained with a delay of only one frame and approaching ideal imaging. Further, if the brightness of the imaging frame F (i) is classified and a predetermined condition is satisfied, unnecessary imaging delay can be suppressed by outputting the imaging frame F (i) as it is. . Therefore, it is possible to provide an image capturing apparatus capable of adjusting a wide dynamic range that can more reliably approach ideal imaging with a small frame delay.

本発明の画像処理装置を備えた画像撮像装置の全体構成図である。1 is an overall configuration diagram of an image pickup apparatus including an image processing apparatus of the present invention. 図1中の画像処理装置の一実施形態の詳細機能ブロック図である。It is a detailed functional block diagram of one Embodiment of the image processing apparatus in FIG. 図2の画像処理装置の全体的処理フローチャートである。3 is an overall process flowchart of the image processing apparatus of FIG. 2. 画像フレームの輝度ヒストグラムのタイプを説明する図である。It is a figure explaining the type of the brightness | luminance histogram of an image frame. 図2中の輝度ヒストグラム推定部の詳細機能ブロック図である。FIG. 3 is a detailed functional block diagram of a luminance histogram estimation unit in FIG. 2. ガンマ補正曲線の一例を示す図である。It is a figure which shows an example of a gamma correction curve. 図1中の画像処理装置の別の実施形態の詳細機能ブロック図である。It is a detailed functional block diagram of another embodiment of the image processing apparatus in FIG. 図7の画像処理装置の全体的処理フローチャートである。FIG. 8 is an overall process flowchart of the image processing apparatus of FIG. 7. FIG.

以下、本発明の実施の形態について図面を参照して詳しく説明する。
図1は、本発明の画像処理装置を備えた画像撮像装置の全体構成図を示す。本画像撮像装置は、例えば、車載カメラ装置として使用されるが、勿論、用途はそれに限らない。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is an overall configuration diagram of an image pickup apparatus including an image processing apparatus according to the present invention. This image capturing apparatus is used as, for example, an in-vehicle camera apparatus, but the application is not limited thereto.

図1において、光学系100は撮像素子200に被写体光を効率よく集光させる。撮像素子200はCCDやCMOSなどの光センサを有し、その光強度に応じた強弱の電気信号(アナログ信)に変換する。さらに、撮像素子200は、光センサの露光時間を調整する電子シャッタ、光センサから出力されるアナログ信号の画像信号を所定のレベルに調整するAGC回路、その画像信号をデジタル信号の画像データに変換するADC回路、該画像データに対してガンマ補正を行うガンマ補正回路などを内蔵している。   In FIG. 1, the optical system 100 efficiently collects subject light on the image sensor 200. The image sensor 200 has an optical sensor such as a CCD or CMOS, and converts it into a strong or weak electric signal (analog signal) corresponding to the light intensity. The image sensor 200 further includes an electronic shutter that adjusts the exposure time of the optical sensor, an AGC circuit that adjusts an analog image signal output from the optical sensor to a predetermined level, and converts the image signal into digital image data. An ADC circuit for performing gamma correction on the image data, and the like.

画像処理装置300はフレームメモリ310と画像処理部320を有する。撮像素子200から出力される画像データは、フレームメモリ310に格納されると共に画像処理部320に入力される。画像処理部320は、その一実施形態では、撮像素子200から出力される画像データの明度を分類し、所定の条件を満足する場合には、フレームメモリ310に格納された現撮像フレームF(i)の画像データをそのまま出力する。一方、所定の条件を満足しない場合あるいは他の実施形態では、撮像素子200から出力された現撮像フレームF(i)の画像データからガンマ補正の効果を取り除いた後、該画像データの輝度ヒストグラムから最適露光時間を算出し、さらに、該露光時間で撮影して得られる画像データの輝度(仮想輝度)を推定(予測)して、その仮想輝度ヒストグラムから最適ガンマ補正値を算出し、これら最適露光時間及び最適ガンマ補正値を撮像素子200に設定する。そして、画像処理部320は、撮像素子200から出力されてフレームメモリ310に新たに格納される次の撮像フレームF(i+1)の画像データを送出するようにする。この画像処理部320の詳細については後述する。   The image processing apparatus 300 includes a frame memory 310 and an image processing unit 320. Image data output from the image sensor 200 is stored in the frame memory 310 and input to the image processing unit 320. In the embodiment, the image processing unit 320 classifies the brightness of the image data output from the image sensor 200, and when the image processing unit 320 satisfies a predetermined condition, the current imaging frame F (i stored in the frame memory 310 is stored. ) Image data is output as it is. On the other hand, when the predetermined condition is not satisfied or in another embodiment, after removing the effect of gamma correction from the image data of the current imaging frame F (i) output from the imaging device 200, the luminance histogram of the image data is used. The optimum exposure time is calculated, and the brightness (virtual brightness) of the image data obtained by shooting with the exposure time is estimated (predicted), and the optimum gamma correction value is calculated from the virtual brightness histogram. The time and the optimum gamma correction value are set in the image sensor 200. Then, the image processing unit 320 transmits the image data of the next imaging frame F (i + 1) that is output from the imaging device 200 and newly stored in the frame memory 310. Details of the image processing unit 320 will be described later.

DAC(デジタル・アナログ変換器)400は、フレームメモリ310から出力される画像データを入力し、例えば、NTSC方式の映像信号に変換する。表示装置500は、該映像信号を表示する。   A DAC (digital / analog converter) 400 receives image data output from the frame memory 310 and converts the image data into, for example, an NTSC video signal. The display device 500 displays the video signal.

図2は、画像処理装置300の主要構成である画像処理部320の一実施形態の詳細機能ブロック図を示す。本実施形態では、画像処理部320は、明度分類部321、ガンマ成分除去部322、輝度ヒストグラム作成部323、最適露光時間算出部324、輝度ヒストグラム推定部325、最適ガンマ補正値算出部326、及び、これら各部の動作やフレームメモリ310の読み書き動作、撮像素子200の動作を制御する制御部317などで構成される。   FIG. 2 is a detailed functional block diagram of an embodiment of the image processing unit 320 which is the main configuration of the image processing apparatus 300. In the present embodiment, the image processing unit 320 includes a lightness classification unit 321, a gamma component removal unit 322, a luminance histogram creation unit 323, an optimal exposure time calculation unit 324, a luminance histogram estimation unit 325, an optimal gamma correction value calculation unit 326, and The control unit 317 controls the operation of each unit, the read / write operation of the frame memory 310, the operation of the image sensor 200, and the like.

なお、画像処理部320は、例えばCPU,ROM,RAM等で構成され、ROMに記憶されたプログラムをCPUが実行することで、各部の機能が実現される。また、RAMは、処理途中の画像データや必要な閾値、パラメータ等を記憶するために用いられる。勿論、画像処理部320の各部はハードロジツクで構成することでもよい。   Note that the image processing unit 320 includes, for example, a CPU, a ROM, a RAM, and the like, and the functions of each unit are realized by the CPU executing a program stored in the ROM. The RAM is used to store image data being processed, necessary threshold values, parameters, and the like. Of course, each unit of the image processing unit 320 may be configured by hard logic.

図3に、本実施形態の全体的処理フローチャートを示す。以下、図3を参照して本実施形態の画像処理装置300(特に画像処理部320)の動作を詳述する。   FIG. 3 shows an overall process flowchart of the present embodiment. Hereinafter, the operation of the image processing apparatus 300 (particularly the image processing unit 320) of this embodiment will be described in detail with reference to FIG.

制御部327は、まず、フレーム番号iを初期設定する(ステップ1001)。そして、撮像素子200から出力される撮像フレームF(i)の画像データをフレームメモリ310に格納すると共に明度分類部321に入力する(ステップ1002)。   First, the control unit 327 initializes the frame number i (step 1001). Then, the image data of the imaging frame F (i) output from the imaging device 200 is stored in the frame memory 310 and input to the lightness classification unit 321 (step 1002).

明度分類部321は、この入力された撮像フレームF(i)の画像データの明度を分類する(ステップ1003)。具体的には、入力された画像データの輝度ヒストグラムを作成して、それを高明度、中間明度および低明度の各範囲に分け、それぞれの画素数をカウントし、該カウント値を所定の閾値と比較して、下記のタイプのいずれかに分類する。なお、輝度ヒストグラムを高明度、中間明度、低明度の各範囲に分ける閾値や、各範囲のカウント値を比較する閾値は予め決めておく。   The brightness classification unit 321 classifies the brightness of the input image data of the imaging frame F (i) (step 1003). Specifically, a luminance histogram of input image data is created, divided into high brightness, intermediate brightness, and low brightness ranges, the number of pixels is counted, and the count value is set as a predetermined threshold value. Compared and classified into one of the following types. Note that a threshold for dividing the luminance histogram into each range of high brightness, intermediate brightness, and low brightness, and a threshold for comparing the count values of each range are determined in advance.

タイプa:低明度の画素数が多く、中間明度と高明度の画素数が少ない。
タイプb:高明度の画素数が多く、低明度と中間明度の画素数が少ない。
タイプc:中間明度の画素数が多く、低明度と高明度の画素数が少ない。
タイプd:低明度と高明度の画素数が多く、中間明度の画素数が少ない。
タイプe:低明度、中間明度、高明度の画素数がいずれも少ない。
図4は、上記タイプa〜eを輝度ヒストグラムで表わした図である。
Type a: The number of pixels of low brightness is large, and the number of pixels of intermediate brightness and high brightness is small.
Type b: The number of pixels of high brightness is large, and the number of pixels of low brightness and intermediate brightness is small.
Type c: The number of pixels of intermediate brightness is large, and the number of pixels of low brightness and high brightness is small.
Type d: The number of pixels of low brightness and high brightness is large, and the number of pixels of intermediate brightness is small.
Type e: The number of pixels of low brightness, intermediate brightness, and high brightness are all small.
FIG. 4 is a diagram showing the types a to e as luminance histograms.

制御部327は、明度分類部321から分類結果を受け取り、撮像フレームF(i)がいずれのタイプに属するか判定する(ステップ1004)。そして、タイプcおよびeの場合、制御部327は、フレームメモリ310に対して、該フレームメモリ310に格納された撮像フレームF(i)の画像データをそのままDAC400へ出力するように制御し(ステップ1005)、i←i+1として(ステップ1006)、ステップ1018に進む。すなわち、タイプcおよびeの場合、撮像画像は明るすぎず、暗すぎず、良い状態であるので、露光時間もガンマ補正も変更する必要がない。本実施形態では、このような場合、現撮像フレームF(i)の画像データをそのまま出力することで、不必要なフレームの遅延を抑止することができる。   The control unit 327 receives the classification result from the lightness classification unit 321, and determines which type the imaging frame F (i) belongs to (step 1004). In the case of types c and e, the control unit 327 controls the frame memory 310 so as to output the image data of the imaging frame F (i) stored in the frame memory 310 to the DAC 400 as it is (step S31). 1005), i ← i + 1 (step 1006), and the process proceeds to step 1018. That is, in the case of types c and e, the captured image is not too bright and not too dark, and is in a good state, so that neither the exposure time nor the gamma correction needs to be changed. In this embodiment, in such a case, unnecessary frame delay can be suppressed by outputting the image data of the current imaging frame F (i) as it is.

一方、タイプa,bおよびdの場合には、制御部327は、フリームメモリ310に対して、該フレームメモリ310に格納された現撮像フレームF(i)の画像データをガンマ成分除去部322に入力するように制御する。以下、ガンマ成分除去部322から最適ガンマ補正値算出部326の各処理は、撮像素子200のブランキング期間に実施される。   On the other hand, in the case of types a, b, and d, the control unit 327 sends the image data of the current imaging frame F (i) stored in the frame memory 310 to the gamma component removal unit 322 with respect to the freem memory 310. Control to input. Hereinafter, each process from the gamma component removal unit 322 to the optimum gamma correction value calculation unit 326 is performed during the blanking period of the image sensor 200.

ガンマ成分除去部322は、入力された現撮像フレームF(i)の画像データからガンマ補正の効果を取り除き、撮像素子200の光センサが光電変換した状態の画像データを出力する(ステップ1007)。具体的には、現撮像フレームF(i)の各画素の輝度情報Y(x,y)について、逆ガンマ補正関数を乗じることで、撮像素子200の光センサが出力した生の輝度情報Y(x,y)_gammaoffを得る。   The gamma component removal unit 322 removes the effect of gamma correction from the input image data of the current imaging frame F (i), and outputs image data in a state where the optical sensor of the imaging device 200 is photoelectrically converted (step 1007). Specifically, the luminance information Y (x, y) of each pixel of the current imaging frame F (i) is multiplied by an inverse gamma correction function, thereby obtaining the raw luminance information Y (output from the optical sensor of the imaging device 200). x, y) _gammaoff is obtained.

いま、撮像素子200の光センサが出力した輝度Y(x,y)_gammaoffにガンマ補正を実行した輝度Y(x,y)が、下記の式で表わされるとする。
Y(x,y)=a*ln(Y(x,y)_gammaoff)+b (a,bは係数)
この場合、ガンマ補正の効果を除くためには、次のように計算すればよい。
Y(x,y)_gammaoff=e^((Y(x,y)−b)/a) (^はべき乗)
Now, it is assumed that the luminance Y (x, y) obtained by performing gamma correction on the luminance Y (x, y) _gammaoff output from the optical sensor of the image sensor 200 is expressed by the following equation.
Y (x, y) = a * ln (Y (x, y) _gammaoff) + b (a and b are coefficients)
In this case, in order to exclude the effect of gamma correction, the following calculation may be performed.
Y (x, y) _gammaoff = e ^ ((Y (x, y) -b) / a) (^ is a power)

輝度ヒストグラム作成部823は、ガンマ成分除去部322にてガンマ補正の効果が取り除かれた現撮像フレームF(i)の画像データを入力して、その輝度ヒストグラムを作成する(ステップ1008)。   The luminance histogram creation unit 823 receives the image data of the current imaging frame F (i) from which the gamma correction effect has been removed by the gamma component removal unit 322, and creates the luminance histogram (step 1008).

最適露光時間算出部324は、輝度ヒストグラム作成部323で作成された輝度ヒストグラムの特徴から最適露光時間を算出する(ステップ1009)。具体的には、輝度ヒストグラムのタイプa〜e(図4参照)によって、以下のように最適露光時間を決める。   The optimum exposure time calculation unit 324 calculates the optimum exposure time from the characteristics of the brightness histogram created by the brightness histogram creation unit 323 (step 1009). Specifically, the optimum exposure time is determined as follows according to the luminance histogram types a to e (see FIG. 4).

タイプa:露光時間を現設定値より長時間にする。
タイプb:露光時間を現設定値より短時間にする。
タイプc:露光時間を現設定値のままとする。
タイプd:高明度画素数>低明度画素数なら、露光時間を現設定値より短時間にする。
高明度画素数<低明度画素数なら、露光時間を現設定値より長時間にする。
タイプe:露光時間を現設定値のままとする。
なお、タイプa,b,dにおいて、露光時間を現設定値に対して、どの程度長時間あるいは短時間にするかは、その低明度画素数あるいは高明度画素数に応じて決めればよい。また、タイプdにおいて、高明度画素数≒低明度画素数の場合には、露光時間を現設定値より短時間にするか長時間にするかは、ユーザ設定等により予め決めておけばよい。
Type a: The exposure time is set longer than the current set value.
Type b: The exposure time is set shorter than the current set value.
Type c: The exposure time is kept at the current set value.
Type d: If the number of high lightness pixels> the number of low lightness pixels, the exposure time is shorter than the current set value.
If the number of high lightness pixels <the number of low lightness pixels, the exposure time is set longer than the current set value.
Type e: Leave the exposure time at the current set value.
In types a, b, and d, how long or short the exposure time is with respect to the current set value may be determined according to the number of low-lightness pixels or the number of high-lightness pixels. In the case of type d, when the number of high lightness pixels is equal to the number of low lightness pixels, whether the exposure time should be shorter or longer than the current set value may be determined in advance by user setting or the like.

最適露光時間算出部324は、算出した最適露光時間を撮像素子200に設定する(ステップ1010)。なお、後述するように、最適露光時間算出部324では、輝度ヒストグラム推定部325からのフィードバック指示により、算出した露光時間を調整することが可能である。この場合には、調整後の露光時間が最適露光時間として撮像素子200に設定されることとなる。   The optimum exposure time calculation unit 324 sets the calculated optimum exposure time in the image sensor 200 (step 1010). As will be described later, the optimum exposure time calculation unit 324 can adjust the calculated exposure time by a feedback instruction from the luminance histogram estimation unit 325. In this case, the adjusted exposure time is set in the image sensor 200 as the optimum exposure time.

輝度ヒストグラム推定部325は、ガンマ成分除去部322からガンマ補正の効果が取り除かれた現撮像フレームF(i)の画像データを入力し、さらに、最適露光時間算出部324から最適露光時間を入力して、該最適露光時間を設定した際の撮像素子200の光センサが出力する次撮像フレームF(i+1)の各画素の輝度(仮想輝度と称す)を予測計算して、その仮想輝度ヒストグラムを作成する(ステップ1011)。また、この輝度ヒストグラム推定部325では、仮想輝度が適正かどうかチェックし、適正でないし場合には、最適露光時間算出部324にフィードバックをかけて最適露光時間を調整させる。そして、調整後の最適露光時間を用いて、改めて仮想輝度を予測計算し、仮想輝度ヒストグラムを作成し直すようにする。   The luminance histogram estimation unit 325 receives the image data of the current imaging frame F (i) from which the gamma correction effect has been removed from the gamma component removal unit 322, and further receives the optimum exposure time from the optimum exposure time calculation unit 324. And predicting and calculating the luminance (referred to as virtual luminance) of each pixel of the next imaging frame F (i + 1) output from the optical sensor of the imaging device 200 when the optimum exposure time is set, and creating the virtual luminance histogram (Step 1011). In addition, the luminance histogram estimation unit 325 checks whether or not the virtual luminance is appropriate. If the virtual luminance is not appropriate, the optimal exposure time is adjusted by applying feedback to the optimal exposure time calculation unit 324. Then, the virtual brightness is predicted and calculated again using the adjusted optimum exposure time, and the virtual brightness histogram is recreated.

図5に、輝度ヒストグラム推定部325の詳細機能ブロック図を示す。仮想輝度計算部3251は、ガンマ成分除去部322からのガンマ補正の効果が除かれた現撮像フレームF(i)の画像データの輝度Y(x,y)_gammaoffと、最適露光時間算出部324で算出された最適露光時間Tbと、現撮像フレームF(i)の露光時間Tnとから、仮想輝度Y’(x,y)を以下のように計算する。
Y’(x,y)=Y(x,y)_gammaoff*Tb/Tn
これを現撮像フレームF(i)の全画素について繰り返す。ここで、露光時間Tnは、前回算出された最適露光時間であり、最適露光時間算出部324から送付されたものを該仮想輝度計算部3251で保持しておくようにする。
FIG. 5 shows a detailed functional block diagram of the luminance histogram estimation unit 325. The virtual luminance calculation unit 3251 uses the luminance Y (x, y) _gammaoff of the image data of the current imaging frame F (i) from which the gamma correction effect from the gamma component removal unit 322 is removed, and the optimum exposure time calculation unit 324. From the calculated optimum exposure time Tb and the exposure time Tn of the current imaging frame F (i), the virtual luminance Y ′ (x, y) is calculated as follows.
Y ′ (x, y) = Y (x, y) _gammaoff * Tb / Tn
This is repeated for all pixels of the current imaging frame F (i). Here, the exposure time Tn is the optimal exposure time calculated last time, and the virtual brightness calculation unit 3251 holds the one sent from the optimal exposure time calculation unit 324.

仮想輝度ヒストグラム作成部3253は、仮想輝度計算部3251で計算された仮想輝度のヒストグラム(仮想輝度ヒストグラム)を作成する。   The virtual luminance histogram creation unit 3253 creates a virtual luminance histogram (virtual luminance histogram) calculated by the virtual luminance calculation unit 3251.

適正輝度判定部3252は、仮想輝度計算部3251で計算された仮想輝度が適正かどうかチェックし、適正でない場合、最適露光時間算出部324にフィードバックをかけて最適露光時間を調整させる。例えば、画像データが8ビットとした場合、仮想輝度Y’が255付近(最高明度付近)の画素数をカウントして、そのカウント値が予め設定した閾値より大きい場合には(明るすぎる)、最適露光時間Tbを短くするように最適露光時間算出部324にフィードバックする。また、仮想輝度Y’が0付近(最低明度付近)の画素数をカウントして、そのカウント値が予め設定した閾値より大きい場合には(暗すぎる)、最適露光時間Tbを長くするように最適露光時間算出部324にフィードバックする。   The appropriate luminance determination unit 3252 checks whether or not the virtual luminance calculated by the virtual luminance calculation unit 3251 is appropriate. If the virtual luminance is not appropriate, the optimal luminance time calculation unit 324 is fed back to adjust the optimal exposure time. For example, when the image data is 8 bits, the number of pixels whose virtual luminance Y ′ is around 255 (near maximum brightness) is counted, and the count value is larger than a preset threshold value (too bright), the optimum The optimum exposure time calculation unit 324 is fed back so as to shorten the exposure time Tb. Further, when the number of pixels where the virtual luminance Y ′ is near 0 (near the minimum brightness) is counted and the count value is larger than a preset threshold value (too dark), the optimum exposure time Tb is optimally lengthened. This is fed back to the exposure time calculation unit 324.

最適露光時間算出部324では、輝度ヒストグラム推定部325(適正輝度判定部3252)からのフィードバックを受けて最適露光時間Tbを調整し、あらためて最適露光時間Tbを輝度ヒストグラム推定部325へ送出する。   The optimum exposure time calculation unit 324 adjusts the optimum exposure time Tb in response to feedback from the brightness histogram estimation unit 325 (appropriate brightness determination unit 3252), and sends the optimum exposure time Tb to the brightness histogram estimation unit 325 again.

仮想輝度計算部3251は、最適露光時間計算部324からの調整後の最適露光時間Tbを用いて、あらためて仮想輝度Y’を計算し、仮想輝度ヒストグラム作成部3253では、該仮想輝度をもとに仮想輝度ヒストグラムを作成し直す。また、適正輝度判定部3252では、更に該仮想輝度が適正かどうかチェックし、適正でない場合、再び最適露光時間算出部324にフィードバックをかける。このフィードバッグは、最適露光時間および後述の最適ガンマ補正値の設定が1フレーム遅延内で収まる間、何回行っても構わない。   The virtual luminance calculation unit 3251 again calculates the virtual luminance Y ′ using the adjusted optimal exposure time Tb from the optimal exposure time calculation unit 324, and the virtual luminance histogram creation unit 3253 calculates based on the virtual luminance. Recreate the virtual brightness histogram. In addition, the appropriate luminance determination unit 3252 further checks whether the virtual luminance is appropriate. If the virtual luminance is not appropriate, the appropriate luminance determination unit 3252 feeds back the optimum exposure time calculation unit 324 again. This feedback may be performed any number of times as long as the optimum exposure time and the optimum gamma correction value described later fall within one frame delay.

図2及び図3に戻り、最適ガンマ補正値算出部326は、輝度ヒストグラム推定部325で作成された仮想輝度ヒストグラムの特徴から最適ガンマ補正値を算出する(ステップ1012)。ここでも、輝度ヒストグラムのタイプa〜e(図4参照)によって、以下のように最適ガンマ補正値を決める。
タイプa:低明度のコントラストを確保する。
タイプb:高明度のコントラストを確保する。
タイプc:中間明度のコントラストを確保する。
タイプd:高明度画素数>低明度画素数なら、高明度のコントラストを確保する。
高明度画素数<低明度画素数なら、低明度のコントラストを確保する。
タイプe:一般的なガンマ曲線とする。例えば、タイプcのケースと同じとする。
2 and 3, the optimum gamma correction value calculation unit 326 calculates the optimum gamma correction value from the characteristics of the virtual luminance histogram created by the luminance histogram estimation unit 325 (step 1012). Again, the optimum gamma correction value is determined as follows according to the types a to e (see FIG. 4) of the luminance histogram.
Type a: Ensures low brightness contrast.
Type b: A high brightness contrast is ensured.
Type c: Ensures contrast of intermediate brightness.
Type d: If the number of high lightness pixels> the number of low lightness pixels, a high lightness contrast is secured.
If the number of high lightness pixels <the number of low lightness pixels, a low lightness contrast is secured.
Type e: A general gamma curve is used. For example, it is the same as the case of type c.

なお、タイプa,b,c,dにおいて、どの程度、コントラストを確保するか(どの程度ガンマ補正するか)は、その低明度画素数、高明度画素数あるいは中間明度画素数に応じて決めればよい。また、タイプdにおいて、高明度画素数≒低明度画素数の場合には、高明度あるいは低明度のコントラストのいずれを確保するかは、ユーザ設定等により予め決めておけばよい。   In the types a, b, c, and d, how much contrast is to be secured (how much gamma correction is to be performed) can be determined according to the number of low lightness pixels, high lightness pixels, or intermediate lightness pixels. Good. In type d, when the number of high lightness pixels≈the number of low lightness pixels, it may be determined in advance by user setting or the like whether to secure high lightness or low lightness contrast.

最適ガンマ補正値算出部326は、算出した最適ガンマ補正値を撮像素子200に設定する(ステップ1013)。図6に、上記タイプa〜eに対応するガンマ補正曲線の一例を示す。   The optimal gamma correction value calculation unit 326 sets the calculated optimal gamma correction value in the image sensor 200 (step 1013). FIG. 6 shows an example of a gamma correction curve corresponding to the types a to e.

制御部327は、i←i+1とする(ステップ1014)。そして、撮像素子200から次に出力された撮像フレームF(i+1)の画像データをフレームメモリ310に格納し、そのままDAC400側へ出力するようにする(ステップ1015、1016)。この撮像フレームF(F+1)の画像データは、最適露光時間及び最適ガンマ補正が施されたものであり、理想的な撮像に近いものとなっている。   The control unit 327 sets i ← i + 1 (step 1014). Then, the image data of the imaging frame F (i + 1) output next from the imaging device 200 is stored in the frame memory 310 and is output to the DAC 400 side as it is (steps 1015 and 1016). The image data of the imaging frame F (F + 1) has been subjected to optimal exposure time and optimal gamma correction, and is close to ideal imaging.

その後、制御部327は、i←i+2として(ステップ1017)、ステップ1018に進み、最終フレームまで到達したかどうか判定する(ステップ1018)。そして、最終フレームまで到達しない場合には、ステップ1002に戻り、到達したなら処理を終了とする。   Thereafter, the control unit 327 sets i ← i + 2 (step 1017), proceeds to step 1018, and determines whether or not the final frame has been reached (step 1018). If the final frame has not been reached, the process returns to step 1002, and if the final frame has been reached, the process ends.

本実施形態によれば、ガンマ補正の効果が取り除かれた撮像フレームF(i)の輝度ヒストグラムをもとに最適露光時間を算出して設定すると共に、この最適露光時間を設定した際に、撮像素子が出力する撮像フレームF(i+1)の仮想輝度を推定(予測)し、その仮想輝度ヒストグラムをもとに最適ガンマ補正値を算出して設定し、こうして最適化した露光時間とガンマ補正を次の実際の撮像フレームF(i+1)に反映することで、1フレームのみの遅延で、理想的な撮像に近づけ、広ダイナミックレンジの画像を得ることができる。また、撮像フレームF(i)の明度を分類し、露光時間もガンマ補正も変更する必要がない場合には、該撮像フレームF(i)を直ちに出力することで、不必要なフレームの遅延を抑止することができる。   According to the present embodiment, the optimal exposure time is calculated and set based on the luminance histogram of the imaging frame F (i) from which the effect of gamma correction has been removed, and when this optimal exposure time is set, imaging is performed. Estimate (predict) the virtual brightness of the imaging frame F (i + 1) output by the element, calculate and set the optimal gamma correction value based on the virtual brightness histogram, and then perform the exposure time and gamma correction optimized in this way. By reflecting this in the actual imaging frame F (i + 1), it is possible to obtain an image with a wide dynamic range by approaching ideal imaging with a delay of only one frame. Also, if it is not necessary to classify the brightness of the imaging frame F (i) and change the exposure time and gamma correction, the imaging frame F (i) is output immediately, thereby reducing unnecessary frame delay. Can be deterred.

図7は、画像処理装置300の主要構成である画像処理部310の別の実施形態の詳細機能ブロック図を示したものである。図2との構成上の相違点は、明度分類部321がないことであり、それ以外は図2と同じである。   FIG. 7 is a detailed functional block diagram of another embodiment of the image processing unit 310 that is the main configuration of the image processing apparatus 300. The difference in configuration from FIG. 2 is that there is no lightness classification unit 321, and the rest is the same as FIG. 2.

図8に、本実施形態の画像処理装置300(特にその画像処理部320)の全体的処理フローチャートを示す。制御部327は、まず、フレーム番号iを初期設定する(ステップ2001)。そして、撮像素子200から出力される撮像フレームF(i)の画像データをフレームメモリ310を経由してガンマ成分除去部322に入力する(ステップ2002)。これ以降のステップ2003〜2014の処理は、先の図3のステップ1007〜1018とまったく同じであるので、説明は省略する。なお、ステップ2002では、撮像素子200から出力される撮像フレームF(i)の画像データを、フレームメモリ310を経由することなく直接、ガンマ成分除去部322に入力することでもよい。   FIG. 8 shows an overall processing flowchart of the image processing apparatus 300 (particularly, the image processing unit 320) of the present embodiment. First, the control unit 327 initially sets the frame number i (step 2001). Then, the image data of the imaging frame F (i) output from the imaging element 200 is input to the gamma component removal unit 322 via the frame memory 310 (step 2002). Subsequent steps 2003 to 2014 are the same as steps 1007 to 1018 in FIG. In step 2002, the image data of the imaging frame F (i) output from the imaging device 200 may be directly input to the gamma component removal unit 322 without passing through the frame memory 310.

本実施形態においても、先の実施形態と同様に、1フレームのみの遅延で、理想的な画像に近づけ、広ダイナミックレンジの画像を得ることができる。しかも、構成の簡素化、処理の簡単化が可能になる。なお、本実施形態では、露光時間もガンマ補正も変更する必要がない場合でも、1フレームの遅延を必要とするが、表示面上の見た目には、先の実施形態と大差がない。   Also in this embodiment, an image having a wide dynamic range can be obtained by approaching an ideal image with a delay of only one frame, as in the previous embodiment. In addition, the configuration can be simplified and the processing can be simplified. In this embodiment, even if it is not necessary to change the exposure time and the gamma correction, a delay of one frame is required, but the appearance on the display surface is not much different from the previous embodiment.

以上、2つの実施形態を示したが、本発明はこれに限定されるものではない。例えば、画像処理部320がガンマ補正部を備えることでもよい。この場合、図3や図8において、ステップ1002やステップ2002の後にガンマ補正のステップが追加されることになる。また、ステップ1013、2009は、最適ガンマ補正値を画像処理部320内のガンマ補正部へ設定と変更されることになる。   As mentioned above, although two embodiment was shown, this invention is not limited to this. For example, the image processing unit 320 may include a gamma correction unit. In this case, a gamma correction step is added after step 1002 or step 2002 in FIGS. In steps 1013 and 2009, the optimum gamma correction value is set to the gamma correction unit in the image processing unit 320.

さらに、実施形態の説明では、最適露光時間算出部と最適ガンマ補正値算出部が、算出した最適露光時間あるいは最適ガンマ補正値をそれぞれ個別に設定するとしたが、制御部が、これら最適露光時間及び最適ガンマ補正値を受け取り、まとめて設定することでもよい。   Further, in the description of the embodiment, the optimum exposure time calculation unit and the optimum gamma correction value calculation unit individually set the calculated optimum exposure time or optimum gamma correction value, respectively. The optimum gamma correction value may be received and set collectively.

例えば、車載カメラの場合、トンネルへの出入りなど、照度が変化しやすい環境で使用されることが多い。これに対応するため、まず、画面明度を露光調整で大まかに調整し、次いで、ガンマ補正で微調整を行う。この場合、露光調整が合っていない状態でガンマ補正を行うと、大胆なガンマ補正が実行される可能性があり、画像劣化の原因になるが、本発明の画像処理装置を備えた画像撮像装置によれば、このような事態を避けることができる。   For example, in-vehicle cameras are often used in environments where the illuminance tends to change, such as entering and exiting a tunnel. To cope with this, first, the screen brightness is roughly adjusted by exposure adjustment, and then fine adjustment is performed by gamma correction. In this case, if gamma correction is performed in a state where the exposure adjustment is not correct, bold gamma correction may be performed, causing image deterioration. However, the image pickup apparatus including the image processing apparatus of the present invention According to this, such a situation can be avoided.

100 光学系
200 撮像素子
300 画像処理装置
310 フレームメモリ
320 画像処理部
321 明度分類部
322 ガンマ成分除去部
323 輝度ヒストグラム作成部
324 最適露光時間算出部
325 輝度ヒストグラム推定部
326 最適ガンマ補正値算出部
327 制御部
400 DAC
500 表示装置
3251 仮想輝度計算部
3252 適正輝度判定部
3253 仮想輝度ヒストグラム作成部
DESCRIPTION OF SYMBOLS 100 Optical system 200 Image pick-up element 300 Image processing apparatus 310 Frame memory 320 Image processing part 321 Brightness classification part 322 Gamma component removal part 323 Luminance histogram creation part 324 Optimal exposure time calculation part 325 Luminance histogram estimation part 326 Optimal gamma correction value calculation part 327 Control unit 400 DAC
500 display device 3251 virtual luminance calculation unit 3252 appropriate luminance determination unit 3253 virtual luminance histogram creation unit

特開2008−005365号公報JP 2008-005365 A

Claims (10)

撮像素子から出力される画像フレームF(i)の画像データからガンマ補正の効果を取り除くガンマ補正除去手段と、
前記ガンマ補正の効果が取り除かれた画像フレームF(i)の画像データから輝度ヒストグラムを作成する輝度ヒストグラム作成手段と、
前記輝度ヒストグラムの特徴から最適露光時間を算出する最適露光時間算出手段と、
前記撮像素子が前記最適露光時間で撮影した際の画像フレームF(i+1)の画像データの輝度(以下、仮想輝度)を推定し、仮想輝度ヒストグラムを作成する輝度ヒストグラム推定手段と、
前記仮想輝度ヒストグラムの特徴から最適ガンマ補正値を算出する最適ガンマ補正値算出手段と
撮像素子から出力される画像フレームF(i)の画像データの明度を、高明度、中間明度、低明度に分類する明度分類手段と、を有し、
前記最適露光時間及び前記最適ガンマ補正値を設定して得られる次の画像フレームF(i+1)の画像データを送出し、中間明度の画素数が予め定めた数より多く、高明度と低明度の画素数が予め定めた数より少ない場合は、前記画像フレームF(i)の画像データをそのまま送出することを特徴とする画像処理装置。
Gamma correction removing means for removing the effect of gamma correction from the image data of the image frame F (i) output from the image sensor;
A luminance histogram creating means for creating a luminance histogram from the image data of the image frame F (i) from which the effect of the gamma correction is removed;
Optimum exposure time calculating means for calculating an optimum exposure time from the characteristics of the luminance histogram;
Luminance histogram estimation means for estimating the luminance (hereinafter referred to as virtual luminance) of the image data of the image frame F (i + 1) when the image pickup device is photographed with the optimum exposure time, and creating a virtual luminance histogram;
Optimal gamma correction value calculating means for calculating an optimal gamma correction value from the characteristics of the virtual luminance histogram ;
Brightness classification means for classifying the brightness of the image data of the image frame F (i) output from the image sensor into high brightness, intermediate brightness, and low brightness ;
Sending out image data of the next image frame F (i + 1) obtained by setting the optimum exposure time and the optimum gamma correction value, the number of pixels of intermediate brightness is larger than a predetermined number, and high brightness and low brightness When the number of pixels is smaller than a predetermined number , the image processing apparatus transmits the image data of the image frame F (i) as it is.
前記輝度ヒストグラム推定手段は、前記ガンマ補正除去手段でガンマ補正の効果が除かれた撮像フレームF(i)の画像データの輝度Y(x,y)gammaoffと、前記最適露光時間算出手段で算出された最適露光時間Tb、現露光時間Tnとから、仮想輝度Y’(x,y)を、
Y’(x,y)=Y(x,y)gammaoff*Tb/Tn
として算出し推定することを特徴とする請求項1に記載の画像処理装置。
The luminance histogram estimation means is calculated by the luminance Y (x, y) gammaoff of the image data of the imaging frame F (i) from which the effect of gamma correction has been removed by the gamma correction removal means and the optimum exposure time calculation means. From the optimum exposure time Tb and the current exposure time Tn, the virtual luminance Y ′ (x, y) is
Y ′ (x, y) = Y (x, y) gammaoff * Tb / Tn
The image processing apparatus according to claim 1 , wherein the image processing apparatus calculates and estimates as follows.
前記輝度ヒストグラム推定手段は、仮想輝度が適正かどうか判定し、適正でない場合には、前記最適露光時間算出手段にフィードバックをかけて最適露光時間を調整せしめ、調整された最適露光時間をもとに再び仮想輝度を推定し、仮想輝度ヒストグラムを作成し直すことを特徴とする請求項1又は2のいずれか1項に記載の画像処理装置。 The brightness histogram estimation means determines whether or not the virtual brightness is appropriate. If the virtual brightness is not appropriate, the optimum exposure time calculation means is fed back to adjust the optimum exposure time, and based on the adjusted optimum exposure time. The image processing apparatus according to claim 1 , wherein the virtual luminance is estimated again and a virtual luminance histogram is recreated. 前記輝度ヒストグラム推定手段は、最高明度付近の仮想輝度の画素数が予め定めた数より多い場合、あるいは最低明度付近の仮想輝度の画素数が予め定めた数より多い場合に、仮想輝度が適当でないと判定することを特徴とする請求項3に記載の画像処理装置。 The luminance histogram estimation means is not suitable for virtual luminance when the number of pixels of virtual luminance near the maximum brightness is larger than a predetermined number, or when the number of pixels of virtual luminance near the minimum luminance is larger than a predetermined number. The image processing apparatus according to claim 3 , wherein: 前記最適露光時間算出手段へのフィードバックは、最適露光時間及び最適ガンマ補正値の設定が1フレーム遅延内で収まる限り何回でも行われることを特徴とする請求項3又は4に記載の画像処理装置。 5. The image processing apparatus according to claim 3, wherein the feedback to the optimum exposure time calculation means is performed any number of times as long as the optimum exposure time and the optimum gamma correction value are set within one frame delay. . 撮像素子から出力される画像フレームF(i)の画像データからガンマ補正の効果を取り除くガンマ補正除去ステップと、
前記ガンマ補正の効果が取り除かれた画像フレームF(i)の画像データから輝度ヒストグラムを作成する輝度ヒストグラム作成ステップと、
前記輝度ヒストグラムの特徴から最適露光時間を算出する最適露光時間算出ステップと、
前記撮像素子が前記最適露光時間で撮影した際の画像フレームF(i+1)の画像データの輝度(以下、仮想輝度)を推定し、仮想輝度ヒストグラムを作成する輝度ヒストグラム推定ステップと、
前記仮想輝度ヒストグラムの特徴から最適ガンマ補正値を算出する最適ガンマ補正値算
出ステップと
撮像素子から出力される画像フレームF(i)の画像データの明度を、高明度、中間明度、低明度に分類する明度分類ステップと、を有し、
前記最適露光時間及び前記最適ガンマ補正値を設定して得られる次の画像フレームF(i+1)の画像データを送出し、中間明度の画素数が予め定めた数より多く、高明度と低明度の画素数が予め定めた数より少ない場合は、前記画像フレームF(i)の画像データをそのまま送出することを特徴とする画像処理方法。
A gamma correction removal step for removing the effect of gamma correction from the image data of the image frame F (i) output from the image sensor;
A luminance histogram creating step of creating a luminance histogram from the image data of the image frame F (i) from which the effect of the gamma correction is removed;
An optimum exposure time calculating step for calculating an optimum exposure time from the characteristics of the luminance histogram;
A luminance histogram estimating step of estimating a luminance (hereinafter referred to as virtual luminance) of image data of an image frame F (i + 1) when the image pickup device is photographed with the optimum exposure time, and creating a virtual luminance histogram;
An optimal gamma correction value calculating step for calculating an optimal gamma correction value from the characteristics of the virtual luminance histogram ;
A lightness classification step of classifying the lightness of the image data of the image frame F (i) output from the image sensor into high lightness, intermediate lightness, and low lightness ;
Sending out image data of the next image frame F (i + 1) obtained by setting the optimum exposure time and the optimum gamma correction value, the number of pixels of intermediate brightness is larger than a predetermined number, and high brightness and low brightness When the number of pixels is smaller than a predetermined number , the image processing method is characterized in that the image data of the image frame F (i) is transmitted as it is.
撮像素子から出力される画像フレームF(i)の画像データの明度を分類する明度分類ステップを有し、
前記画像フレームF(i)の画像データの明度が所定の条件を満足する場合、該画像フレームF(i)の画像データをそのまま送出することを特徴とする請求項6に記載の画像処理方法。
A lightness classification step of classifying the lightness of the image data of the image frame F (i) output from the image sensor;
7. The image processing method according to claim 6 , wherein when the brightness of the image data of the image frame F (i) satisfies a predetermined condition, the image data of the image frame F (i) is sent as it is.
前記輝度ヒストグラム推定ステップは、仮想輝度が適正かどうか判定し、適正でない場合には、前記最適露光時間算出ステップにフィードバックをかけて最適露光時間を調整せしめ、調整された最適露光時間をもとに再び仮想輝度を推定し、仮想輝度ヒストグラムを作成し直すことを特徴とする請求項6又は7に記載の画像処理方法。 The luminance histogram estimation step determines whether or not the virtual luminance is appropriate. If the virtual luminance is not appropriate, feedback is made to the optimum exposure time calculation step to adjust the optimum exposure time, and based on the adjusted optimum exposure time. 8. The image processing method according to claim 6 , wherein the virtual luminance is estimated again and a virtual luminance histogram is recreated. 前記最適露光時間算出ステップへのフィードバックは、最適露光時間及び最適ガンマ補正値の設定が1フレーム遅延内で収まる限り何回でも行われることを特徴とする請求項8記載の画像処理方法。 9. The image processing method according to claim 8, wherein the feedback to the optimum exposure time calculating step is performed any number of times as long as the optimum exposure time and the optimum gamma correction value are set within one frame delay. 被写体の光学像を集光する光学系と、
前記光学系により集光された光学像を電気信号に変換し、画像データを出力する撮像素子と、
前記請求項1乃至5のいずれか1項に記載の画像処理装置と、
前記画像処理装置から送出される画像データを表示する表示装置と、
を備えていることを特徴とする画像撮像装置。
An optical system for condensing the optical image of the subject;
An image sensor that converts an optical image collected by the optical system into an electrical signal and outputs image data;
The image processing apparatus according to any one of claims 1 to 5 ,
A display device for displaying image data sent from the image processing device;
An image pickup apparatus comprising:
JP2010134828A 2010-06-14 2010-06-14 Image processing apparatus, image processing method, and image pickup apparatus Expired - Fee Related JP5621335B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010134828A JP5621335B2 (en) 2010-06-14 2010-06-14 Image processing apparatus, image processing method, and image pickup apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010134828A JP5621335B2 (en) 2010-06-14 2010-06-14 Image processing apparatus, image processing method, and image pickup apparatus

Publications (2)

Publication Number Publication Date
JP2012004621A JP2012004621A (en) 2012-01-05
JP5621335B2 true JP5621335B2 (en) 2014-11-12

Family

ID=45536164

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010134828A Expired - Fee Related JP5621335B2 (en) 2010-06-14 2010-06-14 Image processing apparatus, image processing method, and image pickup apparatus

Country Status (1)

Country Link
JP (1) JP5621335B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015126416A (en) * 2013-12-26 2015-07-06 キヤノン株式会社 Image processing apparatus, control method, and program
DE102015012809A1 (en) * 2015-10-02 2017-04-06 Audi Ag Image recording device for a motor vehicle and method for operating such an image recording device
JP7077100B2 (en) * 2018-03-28 2022-05-30 キヤノン株式会社 Imaging device and its control method, and program

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10322592A (en) * 1997-03-17 1998-12-04 Konica Corp Method and device for controlling electronic camera
JP2008005365A (en) * 2006-06-26 2008-01-10 Victor Co Of Japan Ltd Imaging device
JP2008294524A (en) * 2007-05-22 2008-12-04 Nikon Corp Image processor and image processing method
CN101803366B (en) * 2007-07-25 2015-01-14 坎德拉微系统(S)私人有限公司 Exposure control for an imaging system
JP5149055B2 (en) * 2007-12-27 2013-02-20 イーストマン コダック カンパニー Imaging device

Also Published As

Publication number Publication date
JP2012004621A (en) 2012-01-05

Similar Documents

Publication Publication Date Title
US9350905B2 (en) Image signal processing apparatus, image signal processing method, and image capturing apparatus
US9596400B2 (en) Image pickup apparatus that periodically changes exposure condition, a method of controlling image pickup apparatus, and storage medium
EP3128740A1 (en) Image-capturing device, method for outputting image data, and program
JP6324090B2 (en) Imaging device
US9071766B2 (en) Image capturing apparatus and control method thereof
EP2839634B1 (en) Imaging device and image processing method
WO2016129405A1 (en) Image processing device, image processing method, and program
JP2014153959A (en) Image processing device, image processing method, program, and storage medium
US9892497B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP4999871B2 (en) Imaging apparatus and control method thereof
JP2015144475A (en) Imaging apparatus, control method of the same, program and storage medium
JP2008148180A (en) Imaging apparatus, image processing device and method, and computer program
JP5149055B2 (en) Imaging device
WO2015190320A1 (en) Image capture apparatus and image capture method
US9191573B2 (en) Image capturing apparatus for determining an exposure condition by calculating aphotmetric value for each object region and method of controlling the same
JP5621335B2 (en) Image processing apparatus, image processing method, and image pickup apparatus
JP5713643B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2020071809A (en) Image processing device and image processing method
JP2009200743A (en) Image processor, image processing method, image processing program and imaging apparatus
US8982244B2 (en) Image capturing apparatus for luminance correction, a control method therefor, and a recording medium
JP2010183460A (en) Image capturing apparatus and method of controlling the same
JP2008005083A (en) Imaging apparatus
JP2010183461A (en) Image capturing apparatus and method of controlling the same
JP2018181070A (en) Image processing device and image processing method
JP5520863B2 (en) Image signal processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130404

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20130801

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20130826

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20130826

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140107

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140304

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140507

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140702

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140826

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140908

R151 Written notification of patent or utility model registration

Ref document number: 5621335

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees