JP2009017336A - Imaging device and imaging system - Google Patents
Imaging device and imaging system Download PDFInfo
- Publication number
- JP2009017336A JP2009017336A JP2007178139A JP2007178139A JP2009017336A JP 2009017336 A JP2009017336 A JP 2009017336A JP 2007178139 A JP2007178139 A JP 2007178139A JP 2007178139 A JP2007178139 A JP 2007178139A JP 2009017336 A JP2009017336 A JP 2009017336A
- Authority
- JP
- Japan
- Prior art keywords
- pixel data
- information
- restoration
- image
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、撮像装置に係り、特に、複数種類の露光時間で被写体を撮像して得られる画素信号を合成して、撮像画像のダイナミックレンジを拡大することができる撮像装置に関する。 The present invention relates to an imaging apparatus, and more particularly, to an imaging apparatus capable of expanding a dynamic range of a captured image by combining pixel signals obtained by imaging a subject with a plurality of types of exposure times.
従来、監視や防犯を目的としたカメラが様々な場所に設置されている。一般的にカメラのダイナミックレンジは人間のダイナミックレンジよりも狭いため、人間の目であれば確認できるはずの対象物が、カメラ映像では黒つぶれ或いは白とびにより映らない問題があった。そこで広ダイナミックレンジ(HDR(High Dynamic Range))映像を得る手段として、多段階露光による画像合成方法が存在する。多段階露光による画像合成方法を用いた撮像装置としては、例えば、特許文献1に記載された撮像装置及び撮像方法がある。
Conventionally, cameras for surveillance and crime prevention have been installed in various places. In general, since the dynamic range of a camera is narrower than that of a human, there is a problem that an object that can be confirmed by human eyes is not reflected in a camera image due to blackout or overexposure. Therefore, as a means for obtaining a wide dynamic range (HDR) image, there is an image composition method using multi-step exposure. As an imaging apparatus using an image composition method by multistage exposure, for example, there is an imaging apparatus and an imaging method described in
特許文献1に記載の撮像装置及び撮像方法は、多段露光画像を合成してHDR画像を生成する際に、移動物の有無を画素毎に判定して画像の合成比率を変化させる。例えば移動物がある領域では露光時間の小さい(短い)画像を使用し、移動物がなく飽和していない領域では露光時間の大きい(長い)画像を使用する。
しかしながら、上記特許文献1の従来技術においては、合成後の画像において、重要な画像部分がボケて識別できないようなときに、合成に使用しなかった画素の情報は捨ててしまうので、例えば、合成前の画像を参照したり、合成前の画像を手がかりにして重要な画像部分の識別処理を行うなどすることはできなかった。
そこで、本発明は、このような従来の技術の有する未解決の課題に着目してなされたものであって、合成後の画像に合成前の画像を復元するための情報を付与することが可能な撮像装置及び撮像システムを提供することを目的としている。
However, in the prior art of the above-mentioned
Therefore, the present invention has been made paying attention to such an unsolved problem of the conventional technology, and it is possible to add information for restoring the pre-combination image to the composited image. An object of the present invention is to provide an imaging device and an imaging system.
〔形態1〕 上記目的を達成するために、形態1の撮像装置は、
受光した光を電荷に変換して蓄積する複数の光電変換素子をマトリックス状に配列した構成の光電変換部と、前記光電変換素子の露光時間を制御する機能とを備えた撮像装置であって、
前記光電変換素子の構成する各画素から、複数種類の露光時間で露光された時の前記複数種類の露光時間に対応する画素信号を読み出す画素信号読出手段と、
前記画素信号読出手段で読み出した、前記複数種類の露光時間に対応する画素信号のデータである画素データを前記画素毎に合成する画素データ合成手段と、
前記画素データ合成手段で合成後の画素データに、前記複数種類の露光時間における所定の露光時間に対応する前記合成前の画素データを復元する際に用いる復元情報を付与する復元情報付与手段と、を備えることを特徴とする。
[Mode 1] In order to achieve the above object, an imaging apparatus according to
An imaging apparatus comprising: a photoelectric conversion unit having a configuration in which a plurality of photoelectric conversion elements that convert received light into electric charges and store them are arranged in a matrix; and a function of controlling an exposure time of the photoelectric conversion elements,
Pixel signal reading means for reading out pixel signals corresponding to the plurality of types of exposure times when exposed at a plurality of types of exposure times from each pixel constituting the photoelectric conversion element;
Pixel data synthesizing means for synthesizing pixel data, which is pixel data corresponding to the plurality of types of exposure times, read by the pixel signal reading means for each pixel;
Restoration information giving means for giving restoration information used when restoring the pre-combination pixel data corresponding to predetermined exposure times in the plurality of types of exposure times to the pixel data after the pixel data synthesis means has been combined; It is characterized by providing.
このような構成であれば、被写体の撮像において、例えば、光電変換素子が露光時間T1〜TN(T1<T2<・・・<T(N−1)、TN)の順にそれぞれ露光されると、各露光時間で光電変換素子に蓄積された電荷量に応じた画素信号がそれぞれ読み出される。この読出処理においては、例えば、T1〜TNの各露光時間で光電変換素子を露光し、各露光時間で露光された光電変換素子から破壊読み出しによって画素信号を読み出すことが可能である。また、例えば、露光時間TNまでの露光を行い、各露光時間T1〜TNの時点において、光電変換素子から非破壊読み出しで画素信号を読み出すことも可能である。以下、形態19に記載の撮像方法において同じである。 With such a configuration, when the subject is imaged, for example, when the photoelectric conversion elements are exposed in the order of exposure times T1 to TN (T1 <T2 <... <T (N-1), TN), Pixel signals corresponding to the amount of charge accumulated in the photoelectric conversion element at each exposure time are read out. In this reading process, for example, it is possible to expose the photoelectric conversion element at each exposure time of T1 to TN and read out the pixel signal from the photoelectric conversion element exposed at each exposure time by destructive reading. Further, for example, it is possible to perform exposure up to the exposure time TN and to read out the pixel signal from the photoelectric conversion element by nondestructive reading at each exposure time T1 to TN. Hereinafter, the same applies to the imaging method according to the nineteenth aspect.
複数種類の露光時間(T1〜TN)にそれぞれ対応する画素信号が読み出されると、画素毎に、該読み出された複数種類の露光時間にそれぞれ対応する画素信号のデータである画素データが画素毎に合成される。例えば、露光時間T1〜T3で露光された場合は、対象画素に対する、この3種類の露光時間に対応した画素データが合成され、対象画素の合成画素データが生成される。また、この合成画素データによって、広ダイナミックレンジ(HDR)の撮像画像データが構成されることになる。 When pixel signals corresponding to a plurality of types of exposure times (T1 to TN) are read out, pixel data, which is data of pixel signals corresponding to the read out types of exposure times, is displayed for each pixel. Is synthesized. For example, when exposure is performed at exposure times T1 to T3, pixel data corresponding to these three types of exposure times for the target pixel is synthesized, and synthesized pixel data of the target pixel is generated. Further, the synthesized pixel data constitutes captured image data with a wide dynamic range (HDR).
そして、合成後の画素データには、複数種類の露光時間のうち所定露光時間に対応する合成前の画素データを復元する際に用いる復元情報が付与される。この復元情報は、この情報だけで合成前の画素データを復元できるもの、復元情報に加え合成後の画素データの情報も用いて合成前の画素データを復元できるもの、復元情報に対応するデータが記憶されたデータテーブルを参照して合成前の画素データを復元できるものなどが該当する。以下、形態19の撮像方法、形態20の画像処理装置、形態21の画像処理プログラム、形態22の画像処理方法などにおいて同じである。
Then, restoration information used when restoring the pre-combination pixel data corresponding to the predetermined exposure time among a plurality of types of exposure time is added to the post-combination pixel data. This restoration information can be used to restore the pre-combination pixel data only with this information, the restoration information can be used to restore the pre-combination pixel data using the post-combination pixel data information, and there is data corresponding to the restoration information. For example, the pixel data before synthesis can be restored by referring to the stored data table. Hereinafter, the same applies to the imaging method of
以上より、合成後の画素データに、所定露光時間の合成前の画素データを復元する際に用いる復元情報を付与することができるので、合成後の画素データに付与された復元情報を用いて合成前の画素データを復元することができる。
これにより、例えば、合成後の画像において、重要な被写体が識別できない状態であるときに、合成前の画像を復元して、その復元された画像から識別したり、復元した合成前の画像と合成後の画像とを用いて識別したりするなど、撮像後において、合成前の画像を利用した識別処理などを行うことができるという効果が得られる。
As described above, restoration information used when restoring pixel data before composition for a predetermined exposure time can be added to the pixel data after composition. Therefore, composition is performed using the restoration information given to the pixel data after composition. Previous pixel data can be restored.
As a result, for example, when an important subject cannot be identified in the combined image, the pre-combination image is restored and identified from the restored image, or combined with the restored pre-combination image. For example, it is possible to perform identification processing using an image before composition after imaging, such as identification using a subsequent image.
ここで、上記「光電変換部」は、例えば、CCD(charge-coupled device)や、CMOS技術などを用いて構成された撮像素子である。例えば、CMOS技術を利用した非破壊読み出し可能な撮像素子としては、閾値変調型撮像素子(例えば、VMIS(Threshold Voltage Modulation Image Sensor))などがある。以下、形態19の撮像方法において同じである。
Here, the above-mentioned “photoelectric conversion unit” is an image sensor configured using, for example, a charge-coupled device (CCD), CMOS technology, or the like. For example, as a nondestructive readable image sensor using CMOS technology, there is a threshold modulation image sensor (for example, VMIS (Threshold Voltage Modulation Image Sensor)). Hereinafter, the same applies to the imaging method of
また、上記露光時間を制御する機能とは、例えば、グローバルシャッタ、フォーカルプレーンシャッタ(ローリングシャッタ)等の方式を含む公知の電子シャッタ機能や、撮像装置の有する絞り機構を制御して露光量を変更する機能などが該当する。電子シャッタ機能は、CCDやCMOSなどから構成される撮像素子に電圧をかけて、撮像素子に光を電荷として蓄積させる機能を有している。絞り機構は、絞り羽と呼ばれる光を遮る羽根がレンズの中に入っており、この羽を開閉させてレンズに入る光の量を調節する機構である。以下、形態19の撮像方法において同じである。
The function for controlling the exposure time is, for example, a known electronic shutter function including a system such as a global shutter, a focal plane shutter (rolling shutter), or the aperture mechanism of the imaging apparatus, and the exposure amount is changed. Applicable functions. The electronic shutter function has a function of applying a voltage to an image sensor composed of a CCD, a CMOS, etc., and accumulating light as an electric charge in the image sensor. The diaphragm mechanism is a mechanism that adjusts the amount of light that enters the lens by opening and closing the wing, which is called a diaphragm blade, that blocks light. Hereinafter, the same applies to the imaging method of
また、上記破壊読み出しは、光電変換素子から電荷(画素信号)を読み出すときに、当該光電変換素子に蓄積された電荷を空にするリセット処理を伴うものである。
また、上記非破壊読み出しは、光電変換素子から電荷(画素信号)を読み出すときに、当該光電変換素子に蓄積された電荷を空にせず蓄積状態を維持したままで読み出すものである。つまり、電荷読み出し時にリセット処理を行わないため、設定された露光時間に至るまで、電荷の蓄積途中において、異なる露光時間に対して何度でも電荷の読み出しを行うことができる。従って、非破壊読み出しは、多段階露光を容易に実現することができるという利点がある。以下、形態19に記載の撮像方法において同じである。
The destructive readout is accompanied by a reset process for emptying the charge accumulated in the photoelectric conversion element when the charge (pixel signal) is read from the photoelectric conversion element.
The non-destructive reading is to read out charges (pixel signals) from a photoelectric conversion element while keeping the accumulated state without emptying the charge accumulated in the photoelectric conversion element. That is, since the reset process is not performed at the time of reading the charge, the charge can be read out repeatedly for different exposure times during the accumulation of the charge until reaching the set exposure time. Therefore, non-destructive readout has an advantage that multistage exposure can be easily realized. Hereinafter, the same applies to the imaging method according to the nineteenth aspect.
〔形態2〕 更に、形態2の撮像装置は、形態1に記載の撮像装置において、
前記復元情報は、前記合成前の画素データが有する、単色の輝度情報と色差情報と色信号情報とのうち少なくともいずれか1つを含むことを特徴とする。
このような構成であれば、例えば、画素データがモノクロの画素データであれば、その輝度情報を復元情報として、合成後の画素データに付与することができる。
[Mode 2] Further, the imaging apparatus according to mode 2 is the imaging apparatus according to
The restoration information includes at least one of single-color luminance information, color difference information, and color signal information included in the pixel data before synthesis.
With such a configuration, for example, if the pixel data is monochrome pixel data, the luminance information can be given as restoration information to the combined pixel data.
また、例えば、画素データが複数色の色信号情報からなるカラー画素データであれば、いずれか一色の輝度情報もしくはいずれか一色の輝度情報及び色差情報、または各色の色信号情報を復元情報として、合成後の画素データに付与することができる。
ここで、上記色信号情報は、色情報及びその輝度情報を含む信号の情報である。
For example, if the pixel data is color pixel data composed of color signal information of a plurality of colors, the luminance information of any one color or the luminance information and color difference information of any one color, or the color signal information of each color is used as restoration information. It can be given to the combined pixel data.
Here, the color signal information is signal information including color information and luminance information thereof.
〔形態3〕 更に、形態3の撮像装置は、形態2に記載の撮像装置において、
前記復元情報は、前記合成前の画素データが有する輝度情報と前記合成後の画素データが有する輝度情報との差分値の情報、前記合成前の画素データが有する色差情報と前記合成後の画素データが有する色差情報との差分値の情報、及び前記合成前の画素データが有する色信号情報と前記合成後の画素データが有する色信号情報との差分値の情報のうち少なくともいずれか1つを含むことを特徴とする。
[Mode 3] Further, the imaging apparatus according to
The restoration information includes information on a difference value between luminance information included in the pixel data before combination and luminance information included in the pixel data after combination, color difference information included in the pixel data before combination, and pixel data after combination. At least one of the difference value information with respect to the color difference information possessed by the color signal information and the difference value information between the color signal information possessed by the pixel data before composition and the color signal information possessed by the pixel data after composition. It is characterized by that.
このような構成であれば、合成前の画素データが有する輝度情報と合成後の画素データが有する輝度情報との差分値の情報、合成前の画素データが有する色差情報と合成後の画素データが有する色差情報との差分値の情報、及び合成前の画素データが有する色信号情報と合成後の画素データが有する色信号情報との差分値の情報のうちいずれか1つを復元情報として、合成後の画素データに付与することができる。
これにより、復元情報として、付与するデータ量を低減することができるという効果が得られる。
With such a configuration, the difference information between the luminance information included in the pixel data before combining and the luminance information included in the pixel data after combining, the color difference information included in the pixel data before combining, and the pixel data after combining The difference information between the color difference information and the color signal information included in the pixel data before combination and the color signal information included in the pixel data after combination are used as restoration information. It can be given to subsequent pixel data.
Thereby, the effect that the data amount provided as restoration information can be reduced is acquired.
〔形態4〕 更に、形態4の撮像装置は、形態1乃至3のいずれか1に記載の撮像装置において、
前記復元情報付与手段は、前記合成後の画素データにおける下位のNCビットのビット列を、前記復元情報のNビットのビット列を圧縮したNCビットのビット列(NC<N)に入れ替えることを特徴とする。
[Mode 4] Furthermore, the imaging device according to mode 4 is the imaging device according to any one of
The restoration information adding means replaces a bit string of lower-order NC bits in the combined pixel data with an NC bit string (NC <N) obtained by compressing an N-bit bit string of the restoration information.
このような構成であれば、復元情報として付与する情報のデータ量を低減することができると共に、合成後の画像データの形式を変更することなく復元情報を付与することができるという効果が得られる。例えば、8ビットの輝度情報を復元情報として付与するときに、上位3ビットの情報に圧縮して、この3ビットの復元情報を、合成後の画素データの下位3ビットに代えて埋め込むことで、合成後の画像及び合成前の画像の双方が、オリジナルと殆ど遜色のない画質で得られると共に、画素データの形式を変更することなく復元情報を付与することができるので、特別な処理を施すことなく汎用のアプリケーションソフトなどにおいて復元情報の付与された合成後の画像データを取り扱うことができる。 With such a configuration, it is possible to reduce the amount of information to be given as restoration information, and to obtain the effect that restoration information can be given without changing the format of the image data after synthesis. . For example, when 8-bit luminance information is given as restoration information, it is compressed into upper 3 bits of information, and this 3-bit restoration information is embedded instead of the lower 3 bits of the combined pixel data, Both post-combination and pre-combination images can be obtained with image quality comparable to that of the original, and restoration information can be added without changing the format of the pixel data, so special processing is performed. In addition, it is possible to handle post-combination image data to which restoration information is added in general-purpose application software or the like.
〔形態5〕 更に、形態5の撮像装置は、形態1乃至4のいずれか1に記載の撮像装置において、
前記復元情報付与手段は、前記画素データが複数色の色信号情報を有するときに、前記合成前の画素データが有する前記複数色の色信号情報を復元する際に用いる前記複数色の各色に対応する復元情報を、前記合成後の画素データが有する各色の色信号情報にそれぞれ付与することを特徴とする。
[Embodiment 5] Furthermore, the imaging apparatus according to Embodiment 5 is the imaging apparatus according to any one of
The restoration information adding means corresponds to each color of the plurality of colors used when restoring the color signal information of the plurality of colors included in the pixel data before the synthesis when the pixel data has color signal information of a plurality of colors. The restoration information is added to the color signal information of each color included in the combined pixel data.
このような構成であれば、各画素の画素データを構成する、例えばR、G、Bの三原色にそれぞれ対応する輝度情報を復元するための情報を復元情報として付与することができるので、合成後の各色の色信号情報(各色の画素データ)に付与された復元情報から各色の合成前の画素データを復元することができる。 With such a configuration, information for restoring luminance information corresponding to the three primary colors of R, G, and B, for example, constituting the pixel data of each pixel can be added as restoration information. It is possible to restore the pixel data before synthesis of each color from the restoration information given to the color signal information (pixel data of each color).
〔形態6〕 更に、形態6の撮像装置は、形態1乃至3のいずれか1に記載の撮像装置において、
前記復元情報付与手段は、前記画素データが複数色の色信号情報を含むときに、前記合成前の画素データの前記複数色のうちのいずれか一色の色信号情報のビット列を前記複数色の色数分に分割し、前記合成後の各色の画素データの下位側のビット列を、前記分割した各ビット列に入れ替えることで、前記合成後の画素データに前記復元情報を付与することを特徴とする。
[Mode 6] Furthermore, the imaging device according to mode 6 is the imaging device according to any one of
When the pixel data includes color signal information of a plurality of colors, the restoration information providing unit converts a bit string of color signal information of any one color of the plurality of colors of the pixel data before synthesis into the colors of the plurality of colors. The restoration information is added to the combined pixel data by dividing the pixel data into several minutes and replacing the bit string on the lower side of the combined pixel data with the divided bit strings.
このような構成であれば、合成前の画素データが有する複数色の色信号情報のうち、いずれか一色の色信号情報を情報の損失なく復元情報として合成後の画素データに付与することができると共に、一色分の色信号情報を付与するだけで済むので付与するデータ量を低減することができるという効果が得られる。更に、合成後の画素データの形式を変更することなく復元情報を付与することができるという効果も得られる。
なお、この場合は、例えば、復元情報の色信号情報と、合成後の画素データが有する他の色の色信号情報とを用いることで合成前の画素データを復元することができる。
With such a configuration, the color signal information of any one color among the color signal information of the plurality of colors included in the pixel data before synthesis can be added to the pixel data after synthesis as restoration information without loss of information. At the same time, since it is only necessary to provide color signal information for one color, an effect of reducing the amount of data to be provided can be obtained. Furthermore, there is an effect that restoration information can be given without changing the format of the combined pixel data.
In this case, for example, the pixel data before synthesis can be restored by using the color signal information of the restoration information and the color signal information of other colors included in the pixel data after synthesis.
〔形態7〕 更に、形態7の撮像装置は、形態1乃至3のいずれか1に記載の撮像装置において、
前記復元情報付与手段は、前記画素データがR(Red)、G(Green)、B(Blue)の色信号情報を有するときに、前記合成前の画素データが有する色信号情報を、輝度情報及び色差情報に分け、該輝度情報を3つに分割し、前記合成後の各色の画素データの下位側のビット列を、前記分割した各ビット列に入れ替えることで、前記合成後の画素データに前記復元情報を付与することを特徴とする。
[Mode 7] Furthermore, the imaging device according to mode 7 is the imaging device according to any one of
When the pixel data includes R (Red), G (Green), and B (Blue) color signal information, the restoration information adding unit converts the color signal information included in the pixel data before combining into luminance information and Divided into color difference information, the luminance information is divided into three, and the lower-order bit string of the pixel data of each color after the combination is replaced with the divided bit string, whereby the restoration information is added to the pixel data after the combination. It is characterized by giving.
このような構成であれば、合成前の画素データが有する輝度情報を情報の損失なく復元情報として合成後の画素データに付与することができると共に、輝度情報のみを付与するだけで済むので付与するデータ量を低減することができるという効果が得られる。更に、合成後の画素データの形式を変更することなく復元情報を付与することができるという効果も得られる。
なお、この場合は、合成後の各色信号情報に分割して付与された復元情報(輝度情報)を結合することで、元データに対して輝度情報に損失のないモノクロデータを復元することができる。
With such a configuration, the luminance information included in the pixel data before combining can be added to the pixel data after combining as restoration information without loss of information, and only the luminance information needs to be added. The effect that the amount of data can be reduced is obtained. Furthermore, there is an effect that restoration information can be given without changing the format of the combined pixel data.
In this case, monochrome data with no loss of luminance information can be restored to the original data by combining the restoration information (luminance information) that is divided and given to each color signal information after synthesis. .
〔形態8〕 更に、形態8の撮像装置は、形態3に記載の撮像装置において、
前記画素データのビット数よりも少ないビット数Lで表現される各ビット列に対応付けて、それぞれ異なる数値の前記差分値の情報を記憶した差分情報テーブルを備え、
前記復元情報付与手段は、前記合成後の画素データの下位側のLビットを、前記差分情報テーブルにおける、前記合成前の画素データの前記復元情報に最も近い差分値の情報に対応付けられたビット列に入れ替えることを特徴とする。
[Embodiment 8] Furthermore, an imaging apparatus according to Embodiment 8 is the imaging apparatus according to
In correspondence with each bit string represented by a bit number L smaller than the number of bits of the pixel data, a difference information table storing information of the difference values of different numerical values, respectively,
The restoration information providing means is a bit string in which L bits on the lower side of the combined pixel data are associated with information on difference values closest to the restoration information of the pixel data before combining in the difference information table It is characterized by replacing with.
このような構成であれば、復元情報として付与されたビット列に対応した差分値の情報をテーブルから取得して、合成前の画素データを復元することができるので、付与する復元情報のデータ量を低減しつつ、より精度良く合成前の画素データを復元することができるという効果が得られる。更に、テーブルとして有する情報を差分値の情報としたので、差分情報テーブルのサイズを小さくすることができるという効果も得られる。 With such a configuration, information on the difference value corresponding to the bit string assigned as restoration information can be obtained from the table and the pixel data before synthesis can be restored. While reducing, it is possible to restore the pre-combination pixel data with higher accuracy. Furthermore, since the information included in the table is used as the difference value information, the effect that the size of the difference information table can be reduced is also obtained.
ここで、上記差分値の情報は、合成前の画素データをS、合成後の画素データをPとすると、例えば、画素データS及びPの絶対的な差分量である絶対差分量α「α=S−P」、又は差分値の画素データPに対する相対量である相対差分量β「β=S/P」などが該当する。以下、形態9の撮像装置において同じである。
また、上記差分情報テーブルは、例えば、3ビットから構成される各ビット列に、差分値の情報を対応付けて記憶した差分情報テーブルを作成する場合を例に挙げると、「000」、「001」、・・・、「110」、「111」の8種類のビット列に対して差分値の情報を対応付けて記憶することになる。例えば、絶対差分量であれば、前記8種類のビット列に対して、+192、+128、+64・・・、−192、−255を対応付けて記憶し、一方、相対差分量であれば、175%、150%、・・・、25%、0%などを対応付けて記憶する。なお、ビット列のビット数を増やすことによって、より細かい差分値の情報を用意することができる。以下、形態9の撮像装置において同じである。
Here, the difference value information is, for example, an absolute difference amount α “α = α = the absolute difference amount between the pixel data S and P, where S is pixel data before combining and P is pixel data after combining. S−P ”, or a relative difference amount β“ β = S / P ”, which is a relative amount of the difference value with respect to the pixel data P, corresponds. Hereinafter, the same applies to the imaging device according to the ninth embodiment.
Further, for example, when the difference information table is created by creating a difference information table in which difference value information is stored in association with each bit string composed of 3 bits, for example, “000”, “001” ,..., “110”, “111” are stored in association with the difference value information for the eight types of bit strings. For example, in the case of an absolute difference amount, +192, +128, +64..., -192, -255 are stored in association with the eight types of bit strings, while on the other hand, in the case of a relative difference amount, 175%. , 150%,..., 25%, 0%, etc. are stored in association with each other. Note that, by increasing the number of bits in the bit string, finer difference value information can be prepared. Hereinafter, the same applies to the imaging device according to the ninth embodiment.
〔形態9〕 更に、形態9の撮像装置は、形態3乃至8のいずれか1に記載の撮像装置において、
前記合成前の画素データから生成される画像の明るさの情報を、前記合成後の画素データから生成される画像の明るさの情報に近似する近似手段を備えることを特徴とする。
このような構成であれば、例えば、復元情報の付与に差分情報テーブルを用いる場合に、復元情報として付与するビット列に対して、より細かい差分値の情報を対応付けることができる。これによって、各ビット列間の差分値の差を小さくすることができるので、より精度良く合成前の画素データを復元することができるという効果が得られる。また、差分値を小さくできるので、差分値の情報を復元情報としてそのまま付与する場合に、そのデータ量(ビット数)を低減することができるという効果が得られる。また、差分値を圧縮して付与する場合においても、同じビット数でより高精度の情報を付与することができるという効果が得られる。
[Embodiment 9] Furthermore, the imaging device according to
The image processing apparatus includes an approximation unit that approximates the brightness information of the image generated from the pre-combination pixel data to the brightness information of the image generated from the post-combination pixel data.
With such a configuration, for example, when a difference information table is used for assigning restoration information, it is possible to associate finer difference value information with a bit string assigned as restoration information. As a result, the difference in the difference value between the bit strings can be reduced, so that it is possible to restore the pre-combination pixel data with higher accuracy. In addition, since the difference value can be reduced, an effect that the data amount (the number of bits) can be reduced when the difference value information is directly applied as restoration information can be obtained. In addition, even when the difference value is compressed and given, an effect that more accurate information can be given with the same number of bits can be obtained.
〔形態10〕 更に、形態10の撮像装置は、形態9に記載の撮像装置において、
前記近似手段は、前記合成前の画素データから生成される画像のガンマ値を調整することで、該画像の明るさの情報を、前記合成後の画素データから生成される画像の明るさの情報に近似することを特徴とする。
このような構成であれば、合成前の画素データから生成される画像に対して、画像の明るさの変化と、出入力電圧の比であるガンマ値を調整することで、合成前の画素データから生成される画像の明るさの情報を、合成後の画素データから生成される画像の明るさの情報に適切に近似させることができる。
[Mode 10] Further, the imaging apparatus according to
The approximating means adjusts the gamma value of the image generated from the pixel data before synthesis, thereby obtaining the brightness information of the image as the information on the brightness of the image generated from the pixel data after synthesis. It is characterized in that
With such a configuration, the pixel data before synthesis is adjusted by adjusting the gamma value, which is the ratio between the change in image brightness and the input / output voltage, for the image generated from the pixel data before synthesis. Can be appropriately approximated to the brightness information of the image generated from the combined pixel data.
これにより、例えば、復元情報の付与に差分情報テーブルを用いる場合に、復元情報として付与するビット列に対して、より細かい差分値の情報を対応付けることができる。これによって、各ビット列間の差分値の差を小さくすることができるので、より精度良く合成前の画素データを復元することができるという効果が得られる。また、差分値を小さくできるので、差分値の情報を復元情報としてそのまま付与する場合に、そのデータ量(ビット数)を低減することができるという効果が得られる。また、差分値を圧縮して付与する場合においても、同じビット数でより高精度の情報を付与することができるという効果が得られる。 Thereby, for example, when a difference information table is used for giving restoration information, finer difference value information can be associated with a bit string given as restoration information. As a result, the difference in the difference value between the bit strings can be reduced, so that it is possible to restore the pre-combination pixel data with higher accuracy. In addition, since the difference value can be reduced, an effect that the data amount (the number of bits) can be reduced when the difference value information is directly applied as restoration information can be obtained. In addition, even when the difference value is compressed and given, an effect that more accurate information can be given with the same number of bits can be obtained.
〔形態11〕 更に、形態11の撮像装置は、形態9に記載の撮像装置において、
前記近似手段は、前記合成前の画素データから生成される画像のゲインを調整することで、該画像の明るさの情報を、前記合成後の画素データから生成される画像の明るさの情報に近似することを特徴とする。
このような構成であれば、合成前の画素データから生成される画像に対して、その出力信号のゲインを調整することで、合成前の画素データから生成される画像の明るさの情報を、合成後の画素データから生成される画像の明るさの情報に適切に近似させることができる。
[Mode 11] Furthermore, an imaging apparatus according to
The approximating means adjusts the gain of the image generated from the pixel data before the synthesis to change the brightness information of the image into the information of the brightness of the image generated from the pixel data after the synthesis. It is characterized by approximation.
With such a configuration, by adjusting the gain of the output signal for the image generated from the pixel data before synthesis, information on the brightness of the image generated from the pixel data before synthesis is obtained. It is possible to appropriately approximate the brightness information of the image generated from the combined pixel data.
これにより、差分情報テーブルにおいて、復元情報として付与するビット列に対して、より細かい差分値の情報を対応付けることができる。これによって、各ビット列間の差分値の差を小さくすることができるので、より精度良く合成前の画素データを復元することができるという効果が得られる。 Thereby, in the difference information table, finer difference value information can be associated with the bit string to be given as restoration information. As a result, the difference in the difference value between the bit strings can be reduced, so that it is possible to restore the pre-combination pixel data with higher accuracy.
〔形態12〕 更に、形態12の撮像装置は、形態1乃至11のいずれか1に記載の撮像装置において、
前記複数種類の露光時間に対応する画素データに基づき、該複数種類の露光時間に対応する画素データの中から、復元対象とする露光時間の画素データを選択する復元画像選択手段を備え、
前記復元情報付与手段は、前記復元画像選択手段で決定された前記復元対象の画素データの復元情報を、前記合成後の画素データに付与することを特徴とする。
[Mode 12] Furthermore, the imaging device according to
Based on the pixel data corresponding to the plurality of types of exposure time, comprising restored image selection means for selecting pixel data of the exposure time to be restored from among the pixel data corresponding to the plurality of types of exposure time,
The restoration information adding unit adds the restoration information of the restoration target pixel data determined by the restoration image selection unit to the combined pixel data.
このような構成であれば、複数種類の露光時間にそれぞれ対応する画像の画素データに基づき、これら各露光時間に対応する画素データのうち、比較的画質の良好となる(被写体が比較的はっきりと表示された)画像を形成する画素データを復元対象として選択することができる。
これにより、合成後の画像の画質が悪かったときなどに参照したり、被写体の識別処理に用いたりするのにより適切な画素データの復元情報を付与することができるという効果が得られる。
With such a configuration, based on pixel data of images corresponding to a plurality of types of exposure times, among the pixel data corresponding to each of these exposure times, the image quality is relatively good (the subject is relatively clear). The pixel data forming the displayed image can be selected as a restoration target.
Thereby, it is possible to refer to when the image quality of the combined image is poor, or to obtain appropriate pixel data restoration information by using it for subject identification processing.
〔形態13〕 更に、形態13の撮像装置は、形態12に記載の撮像装置において、
前記復元画像選択手段は、前記合成前の画素データから構成される露光時間毎の画像の輝度情報のヒストグラムに基づき、前記復元対象とする露光時間に対応する画素データを選択することを特徴とする。
このような構成であれば、例えば、理想的な輝度情報のヒストグラムの形状と、各露光時間に対応する合成前の画素データから構成される画像のヒストグラムとを比較し、これらのうち、理想的な輝度情報(シャープな画質となる輝度情報)のヒストグラムに最も近い形状のヒストグラムを有する画像を判別することができる。
[Mode 13] Further, the imaging apparatus according to
The restoration image selection means selects pixel data corresponding to the exposure time to be restored based on a histogram of luminance information of an image for each exposure time constituted by the pixel data before synthesis. .
With such a configuration, for example, an ideal luminance information histogram shape is compared with a histogram of an image composed of pre-combination pixel data corresponding to each exposure time. It is possible to discriminate an image having a histogram having a shape closest to the histogram of accurate luminance information (luminance information with sharp image quality).
従って、複数種類の露光時間にそれぞれ対応する画素データのうち、理想的なヒストグラムに最も近いヒストグラムを有する画像を形成する画素データの復元情報を、合成後の各画素データに付与することができるので、合成後の画像の画質が悪かったときなどに参照したり、被写体の識別処理に用いたりするのにより適切な画素データの復元情報を付与することができるという効果が得られる。 Therefore, restoration information of pixel data that forms an image having a histogram closest to an ideal histogram among pixel data corresponding to a plurality of types of exposure times can be added to each combined pixel data. In addition, it can be referred to when the image quality of the combined image is poor, or can be used for subject identification processing, so that it is possible to provide appropriate pixel data restoration information.
〔形態14〕 更に、形態14の撮像装置は、形態12に記載の撮像装置において、
前記復元画像選択手段は、前記合成前の画素データから構成される露光時間毎の画像の周波数情報に基づき、前記復元対象とする露光時間に対応する画素データを選択することを特徴とする。
このような構成であれば、例えば、合成前の画素データの高周波数成分などから、各露光時間に対応する画素データから構成される画像の画質を判断することができるので、これらを比較することで、画質の最も良い(例えば、ボケた画像とならない又は比較的ボケ具合が軽い)画像や最も情報(オブジェクト)を含む画像などを判別することができる。
[Mode 14] Further, the imaging apparatus according to
The restored image selection means selects pixel data corresponding to the exposure time to be restored based on the frequency information of the image for each exposure time configured from the pixel data before synthesis.
With such a configuration, for example, the image quality of the image composed of pixel data corresponding to each exposure time can be determined from the high frequency component of the pixel data before synthesis, and so on. Thus, it is possible to determine an image with the best image quality (for example, an image that does not become blurred or relatively lightly blurred) or an image that includes the most information (object).
従って、複数種類の露光時間にそれぞれ対応する画像のうち、例えば、高周波成分をより多く含む画像(よりシャープで且つより多くのオブジェクトを含む画像)を形成する画素データの復元情報を、合成後の各画素データに付与することで、合成後の画像の画質が悪かったときなどに参照したり、被写体の識別処理に用いたりするのにより適切な画像の復元情報を付与することができるという効果が得られる。
ここで、周波数成分の抽出処理は、例えば、ラプラシアンフィルタなどの公知のエッジフィルタ(ハイパスフィルタ)を用いて画素データに含まれるエッジ成分(高周波数成分)を抽出するなどして行われる。
Therefore, among the images corresponding to each of the plurality of types of exposure times, for example, restoration information of pixel data that forms an image containing more high-frequency components (an image that is sharper and contains more objects) By adding to each pixel data, it is possible to refer to when the image quality of the synthesized image is poor, or to provide appropriate image restoration information when used for subject identification processing. can get.
Here, the frequency component extraction processing is performed by, for example, extracting an edge component (high frequency component) included in the pixel data using a known edge filter (high pass filter) such as a Laplacian filter.
〔形態15〕 一方、上記目的を達成するために、形態15の撮像システムは、
形態1乃至14のいずれか1に記載の撮像装置と、
前記合成後の画素データに付与された復元情報に基づき、前記合成前の画素データを復元する画素データ復元手段と、を備えることを特徴とする。
このような構成であれば、上記形態1乃至13に記載の撮像装置と同等の作用が得られると共に、合成後の画素データに含まれる復元情報を用いて所定露光時間に対応する合成前の画素データを復元することができる。
これにより、上記形態1乃至14のいずれか1に記載の撮像装置と同等の効果が得られる。
[Mode 15] On the other hand, in order to achieve the above object, the imaging system of
The imaging apparatus according to any one of
Pixel data restoring means for restoring the pre-combination pixel data based on the restoration information given to the combined pixel data.
With such a configuration, an operation equivalent to that of the imaging device according to any one of the first to thirteenth aspects can be obtained, and a pre-combination pixel corresponding to a predetermined exposure time using restoration information included in the post-combination pixel data. Data can be restored.
Thereby, an effect equivalent to that of the imaging device according to any one of the first to fourteenth aspects is obtained.
ここで、本システムは、単一の装置、端末その他の機器として実現するようにしてもよいし、複数の装置、端末その他の機器を通信可能に接続したネットワークシステムとして実現するようにしてもよい。後者の場合、各構成要素は、それぞれ通信可能に接続されていれば、複数の機器等のうちいずれに属していてもよい。 Here, this system may be realized as a single device, terminal, or other device, or may be realized as a network system in which a plurality of devices, terminals, or other devices are communicably connected. . In the latter case, each component may belong to any one of a plurality of devices and the like as long as they are connected so as to communicate with each other.
〔形態16〕 更に、形態16の撮像システムは、形態15に記載の撮像システムにおいて、
前記画素データ復元手段は、前記画素データが複数色の色信号情報を有し、且つ前記合成後の画素データの有する復元情報が前記複数色のうちのいずれか一色の輝度情報であるときに、該輝度情報と、前記合成後の画素データが有する色差情報とに基づき、前記合成前の画素データを復元することを特徴とする。
このような構成であれば、合成前後の画素データにおいて色差には殆ど差がないことから、合成後の画素データの色差情報を用いて合成前の画素データを復元することでオリジナルと殆ど遜色のない画像を復元することができるという効果が得られる。
[Mode 16] Furthermore, an imaging system according to
When the pixel data has color signal information of a plurality of colors and the restoration information of the combined pixel data is luminance information of any one of the colors, The pre-combination pixel data is restored based on the luminance information and the color difference information of the post-combination pixel data.
With such a configuration, there is almost no difference in color difference between the pixel data before and after the synthesis, and therefore, by restoring the pixel data before synthesis using the color difference information of the pixel data after synthesis, the color difference between the original and the original is almost the same. It is possible to restore an image that is not present.
〔形態17〕 更に、形態17の撮像システムは、形態15又は16に記載の撮像システムにおいて、
前記画素データ復元手段は、前記画素データがR(Red)、G(Green)、B(Blue)の色信号情報を含み、且つ前記合成後の画素データに含まれる復元情報が前記R、G、Bの色信号情報を輝度情報と色差情報に分けたときの該輝度情報を色数分に分割した情報であるときに、前記合成後の各色に対応する画素データに付与された前記分割された各輝度情報を結合して、前記合成前の画素データの単色の輝度情報を復元することを特徴とする。
[Mode 17] Furthermore, an imaging system according to
The pixel data restoration unit includes the pixel data including color signal information of R (Red), G (Green), and B (Blue), and the restoration information included in the combined pixel data is the R, G, When the color signal information of B is divided into luminance information and color difference information, the luminance information is divided into the number of colors, and the divided information given to the pixel data corresponding to each color after the combination is divided. The luminance information is combined to restore single-color luminance information of the pixel data before synthesis.
このような構成であれば、合成後の各色信号情報に分割して付与された復元情報(輝度情報)を結合することで、元データに対して輝度情報に損失のないモノクロデータを復元することができる。
従って、元データを復元するための情報として、輝度データのみを付与すれば良いので、復元情報のデータ量を小さくできるという効果が得られると共に、色は単色となるが、元データと同じ輝度情報の画像を復元することができるので、画質の良い画像の輝度情報を復元情報として付与することで、画像中の重要物などをはっきりと視認できる画像を復元することができるという効果が得られる。
With such a configuration, it is possible to restore monochrome data with no loss of luminance information with respect to the original data by combining restoration information (luminance information) that is divided and added to each color signal information after synthesis. Can do.
Therefore, since only luminance data needs to be given as information for restoring the original data, there is an effect that the data amount of the restored information can be reduced, and the color is monochromatic, but the same luminance information as the original data is obtained. Therefore, it is possible to restore an image in which an important object in the image can be clearly visually recognized by adding luminance information of an image with good image quality as restoration information.
〔形態18〕 更に、形態18の撮像システムは、形態15乃至17のいずれか1に記載の撮像システムにおいて、
前記画素データのビット数よりも少ないビット数Lで表現される各ビット列に対応付けて、それぞれ異なる数値の前記差分値の情報を記憶した差分情報テーブルを備え、
前記画素データ復元手段は、前記合成後の画素データに含まれる復元情報が前記差分値の情報に対応するビット列であるときに、該ビット列に対応する差分値の情報を前記差分情報テーブルから取得し、該取得した差分値の情報に基づき、前記合成前の画素データを復元することを特徴とする。
[Mode 18] Furthermore, an imaging system according to
In correspondence with each bit string represented by a bit number L smaller than the number of bits of the pixel data, a difference information table storing information of the difference values of different numerical values, respectively,
When the restoration information included in the combined pixel data is a bit string corresponding to the difference value information, the pixel data restoration unit obtains difference value information corresponding to the bit string from the difference information table. The pixel data before synthesis is restored based on the acquired difference value information.
このような構成であれば、復元情報として付与されたビット列に対応した差分値の情報をテーブルから取得して、合成前の画素データを復元することができるので、差分情報テーブルの精度次第で、復元対象の画像により近い画質の画像を復元することができるという効果が得られる。 With such a configuration, information on the difference value corresponding to the bit string assigned as restoration information can be acquired from the table and the pixel data before synthesis can be restored, so depending on the accuracy of the difference information table, An effect is obtained that an image having an image quality closer to the image to be restored can be restored.
〔形態19〕 一方、上記目的を達成するために、形態19の撮像方法は、
受光した光を電荷に変換して蓄積する複数の光電変換素子をマトリックス状に配列した構成の光電変換部と、前記光電変換素子の露光時間を制御する機能とを備えた撮像装置に用いられる撮像方法であって、
前記光電変換素子の構成する各画素から、複数種類の露光時間で露光された時の前記複数種類の露光時間に対応する画素信号を読み出す画素信号読出ステップと、
前記画素信号読出ステップで読み出した、前記複数種類の露光時間に対応する画素信号のデータである画素データを前記画素毎に合成する画素データ合成ステップと、
前記画素データ合成ステップで合成後の画素データに、前記複数種類の露光時間における所定の露光時間に対応する前記合成前の画素データを復元する際に用いる復元情報を付与する復元情報付与ステップと、を含むことを特徴とする。
これにより、形態1の撮像装置と同等の作用及び効果が得られる。
[Mode 19] On the other hand, in order to achieve the above object, an imaging method according to
Imaging used in an imaging apparatus having a photoelectric conversion unit having a configuration in which a plurality of photoelectric conversion elements that convert received light into charges and store them in a matrix and a function for controlling the exposure time of the photoelectric conversion elements A method,
A pixel signal reading step of reading out pixel signals corresponding to the plurality of types of exposure times when exposed at a plurality of types of exposure times from each pixel constituting the photoelectric conversion element;
A pixel data synthesis step for synthesizing, for each pixel, pixel data that is pixel data corresponding to the plurality of types of exposure times read out in the pixel signal readout step;
A restoration information giving step for giving restoration information used when restoring the pre-combination pixel data corresponding to predetermined exposure times in the plurality of types of exposure times to the pixel data after the pixel data synthesis step; It is characterized by including.
Thereby, the same operation and effect as those of the imaging device of
〔形態20〕 また、上記目的を達成するために、形態20の画像処理装置は、
複数種類の露光時間で被写体を撮像して得られる、各露光時間にそれぞれ対応した画素信号から構成される画素データを画素毎に合成する画素データ合成手段と、
前記画素データ合成手段で合成後の画素データに、前記複数種類の露光時間における所定の露光時間に対応する合成前の画素データを復元する際に用いる復元情報を付与する復元情報付与手段と、を備えることを特徴とする。
これにより、形態1の撮像装置と同等の作用及び効果が得られる。
[Mode 20] In order to achieve the above object, an image processing apparatus according to
Pixel data synthesizing means for synthesizing pixel data composed of pixel signals respectively corresponding to each exposure time obtained by imaging a subject with a plurality of types of exposure times;
Restoration information giving means for giving restoration information used when restoring pre-combination pixel data corresponding to predetermined exposure times in the plurality of types of exposure times to the pixel data after the pixel data synthesis means It is characterized by providing.
Thereby, the same operation and effect as those of the imaging device of
〔形態21〕 また、上記目的を達成するために、形態21の画像処理プログラムは、
複数種類の露光時間で被写体を撮像して得られる、各露光時間にそれぞれ対応した画素信号から構成される画素データを画素毎に合成する画素データ合成ステップと、
前記画素データ合成ステップで合成後の画素データに、前記複数種類の露光時間における所定の露光時間に対応する合成前の画素データを復元する際に用いる復元情報を付与する復元情報付与ステップとからなる処理をコンピュータに実行させるためのプログラムを含むことを特徴とする。
このような構成であれば、コンピュータによってプログラムが読み取られ、読み取られたプログラムに従ってコンピュータが処理を実行すると、形態1に記載の撮像装置と同等の作用及び効果が得られる。
[Form 21] In order to achieve the above object, an image processing program of
A pixel data synthesizing step for synthesizing pixel data composed of pixel signals respectively corresponding to each exposure time obtained by imaging a subject with a plurality of types of exposure times;
A restoration information adding step of adding restoration information used when restoring pixel data before synthesis corresponding to predetermined exposure times in the plurality of types of exposure time to the pixel data after synthesis in the pixel data synthesis step. A program for causing a computer to execute processing is included.
With such a configuration, when the program is read by the computer and the computer executes processing in accordance with the read program, the same operations and effects as those of the imaging apparatus according to the first aspect are obtained.
〔形態22〕 また、上記目的を達成するために、形態22の画像処理方法は、
複数種類の露光時間で被写体を撮像して得られる、各露光時間にそれぞれ対応した画素信号から構成される画素データを画素毎に合成する画素データ合成ステップと、
前記画素データ合成ステップで合成後の画素データに、前記複数種類の露光時間における所定の露光時間に対応する合成前の画素データを復元する際に用いる復元情報を付与する復元情報付与ステップと、を含むことを特徴とする。
これにより、形態1に記載の撮像装置と同等の作用及び効果が得られる。
[Mode 22] In order to achieve the above object, an image processing method according to
A pixel data synthesizing step for synthesizing pixel data composed of pixel signals respectively corresponding to each exposure time obtained by imaging a subject with a plurality of types of exposure times;
A restoration information giving step for giving restoration information used when restoring pixel data before synthesis corresponding to predetermined exposure times in the plurality of types of exposure time to the pixel data after synthesis in the pixel data synthesis step; It is characterized by including.
Thereby, the same operation and effect as those of the imaging device according to the first aspect can be obtained.
〔第1の実施の形態〕
以下、本発明の第1の実施の形態を図面に基づき説明する。図1〜図7は、本発明に係る撮像装置、撮像システム、撮像方法、画像処理装置、画像処理プログラム及び画像処理方法の第1の実施の形態を示す図である。
まず、本発明に係る撮像システムの構成を図1に基づき説明する。図1は、本発明に係る撮像システム100の構成を示すブロック図である。
[First Embodiment]
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. 1 to 7 are diagrams showing a first embodiment of an imaging apparatus, an imaging system, an imaging method, an image processing apparatus, an image processing program, and an image processing method according to the present invention.
First, the configuration of an imaging system according to the present invention will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of an
撮像システム100は、図1に示すように、3種類の露光時間T1〜T3(T1<T2<T3)で被写体を撮像する撮像部10と、撮像部10から出力される露光時間T1〜T3にそれぞれ対応する画素信号の出力先を露光時間の種類毎に切り替えるスイッチ(SW)11と、露光時間T1に対応する画素信号のデータ(以下、第1画素データと称す)を記憶する第1メモリ12と、露光時間T2に対応する画素信号のデータ(以下、第2画素データと称す)を記憶する第2メモリ13と、露光時間T3に対応する画素信号のデータ(以下、第3画素データと称す)を記憶する第3メモリ14とを含んで構成される。
As shown in FIG. 1, the
撮像部10は、CCD及び受光素子(フォトトランジスタ)を含んで構成されるCCDイメージセンサを備え、レンズを介して被写体からの光を各画素に集光すると共に、電子シャッタ機能により露光時間を制御して、露光時間T1、T2、T3で各画素の受光素子を露光する。そして、露光時間T1、T2、T3でそれぞれ露光された各画素からこれら各露光時間に対応する画素信号(アナログデータ)を読み出し、該読み出したアナログの画素信号を、不図示のAFE(Analog Front End)においてデジタルの画素信号(画素データ)に変換してからSW11に出力する。このとき、撮像部10からは、出力する画素データが露光時間T1、T2、T3のいずれに対応するものなのかを識別する信号も出力する。
The
SW11は、撮像部10から画素データが入力されると、これと対応して入力された識別信号に基づきスイッチを切り替え、第1〜第3メモリ12〜14のうち識別信号が示す露光時間に対応するメモリに、入力された画素データを出力する。
第1〜第3メモリ12〜14は、フレームメモリ及びメモリコントローラから構成され、それぞれ自己に対応する露光時間で撮像された1フレーム分の画素データを記憶する。このとき、メモリコントローラによって、不図示のタイミング制御部からのピクセルクロック、垂直同期信号及び水平同期信号に基づき、各画素データの2次元の格納アドレスを生成し、2次元のメモリ空間上のデータとして管理する。
When the pixel data is input from the
The first to
撮像システム100は、更に、露光時間T1〜T3に対応する画素データを合成する画素データ合成部15と、復元対象の画像を選択する復元対象画像選択部16と、画素データ合成部15で合成後の画素データ(以下、合成後画素データと称す)に、復元対象の画素データを復元するための復元情報を付与する復元情報付与部17と、復元情報の付与された合成後画素データ(以下、復元情報付与合成後画素データと称す)を保存する画像保存部18と、復元情報付与合成後画素データに基づき画像を表示する表示部19と、復元情報付与合成後画素データに付与された復元情報に基づき復元対象の画素データを復元する画素データ復元部20とを含んで構成される。
The
画素データ合成部15は、まず、露光時間T1〜T3に対応する画素データをT3に合わせて正規化し、次に、該正規化後のT1〜T3の画素データを合成して合成後画素データを生成する。合成後画素データは、露光時間の異なる3つの画素データを合成して生成されるため、各画素の合成後画素データにより構成される画像は、ダイナミックレンジの広い画像(HDR画像)となる。
The pixel
また、画素データ合成部15は、例えば、外部機器等において、表示部の表示能力が合成後画素データ(HDR画素データ)のダイナミックレンジに対応していないときのために、合成後画素データに対して、ガンマ補正又はLUT(Look-Up Table)による補正を行い、ハイライト部を圧縮することが可能である。
復元対象画像選択部16は、図2に示すように、ヒストグラム生成部16aと、比較部16bと、画素データ選択部16cとを含んで構成される。
In addition, the pixel
As illustrated in FIG. 2, the restoration target
ここで、図2は、復元対象画像選択部16の詳細な構成を示すブロック図である。
ヒストグラム生成部16aは、第1〜第3メモリから露光時間T1〜T3にそれぞれ対応する第1〜第3画素データを読み出し、該読み出した第1〜第3画素データに基づき、露光時間毎に、画素値(輝度値)と画素数との関係を示すヒストグラムを生成する。該生成された、露光時間T1〜T3の画像にそれぞれ対応するヒストグラムは、比較部16bに出力される。
Here, FIG. 2 is a block diagram illustrating a detailed configuration of the restoration target
The histogram generation unit 16a reads the first to third pixel data corresponding to the exposure times T1 to T3 from the first to third memories, and for each exposure time based on the read first to third pixel data. A histogram indicating the relationship between the pixel value (luminance value) and the number of pixels is generated. The generated histograms corresponding to the images of the exposure times T1 to T3 are output to the comparison unit 16b.
比較部16bは、理想的な分布形状を有するヒストグラム(以下、理想ヒストグラムと称す)を有し、該理想ヒストグラムと、露光時間T1〜T3の画像にそれぞれ対応する第1〜第3ヒストグラムとを比較する。具体的に、理想ヒストグラムと第1〜第3ヒストグラムとで、各輝度レベルあるいは所定範囲の輝度レベルに対する画素数を比較し、両者が最も一致する露光時間の情報を比較結果として、画素データ選択部16cに出力する。 The comparison unit 16b has a histogram having an ideal distribution shape (hereinafter referred to as an ideal histogram), and compares the ideal histogram with first to third histograms corresponding to images with exposure times T1 to T3, respectively. To do. Specifically, the ideal histogram and the first to third histograms compare the number of pixels with respect to each luminance level or a predetermined range of luminance levels, and use the exposure time information that best matches both as a comparison result to obtain a pixel data selection unit. To 16c.
画素データ選択部16cは、比較部16bから露光時間の情報が入力されると、第1〜第3メモリ12〜14のうち、露光時間の情報に対応するメモリから画素データを読み出し、該読み出した画素データを復元対象の画素データ(以下、復元対象画素データと称す)として、復元情報付与部17に出力する。
復元情報付与部17は、復元情報生成部17aと、復元情報埋込部17bとを含んで構成される。
When the information on the exposure time is input from the comparison unit 16b, the pixel
The restoration
ここで、図3は、復元情報付与部17の詳細な構成を示すブロック図である。
復元情報生成部17aは、復元対象画像選択部16から入力された復元対象画素データに基づき、該復元対象画素データを復元するための復元情報を生成する。
本実施の形態においては、具体的に、画素データが単色のデータであれば、復元対象画素データ(Nビット)における上位NCビット(NC<N)を抽出する。また、画素データがR、G、Bなどの各色に対応したデータであれば、各色に対応した画素データ(Nビット)の上位NCビットを抽出する。復元情報生成部17aは、これら抽出した上位NCビットのデータを復元情報として、復元情報埋込部17bに出力する。
Here, FIG. 3 is a block diagram illustrating a detailed configuration of the restoration
The restoration
In the present embodiment, specifically, if the pixel data is monochromatic data, the higher NC bits (NC <N) in the restoration target pixel data (N bits) are extracted. If the pixel data is data corresponding to each color such as R, G, B, etc., the upper NC bits of the pixel data (N bits) corresponding to each color are extracted. The restoration
復元情報埋込部17bは、復元情報生成部17aから入力された復元情報を、画素データ合成部15から入力された合成後画素データに埋め込む。
具体的に、合成後画素データの下位NCビットのデータを、復元情報のNCビットのデータに入れ替える。これにより、復元情報の付与された復元情報付与合成後画素データが生成される。該生成された復元情報付与合成後画素データは、画像保存部18及び表示部19にそれぞれ出力される。
The restoration
Specifically, the data of the lower NC bits of the post-combination pixel data is replaced with the NC bit data of the restoration information. As a result, post-combination pixel data with restoration information added with restoration information is generated. The generated post-combination pixel data with restoration information added is output to the
画像保存部18は、フラッシュメモリやハードディスク等の記憶媒体及びそのドライブ装置を有し、復元情報付与部で復元情報の付与された復元情報付与合成後画素データを、所定のファイル形式で記憶媒体に保存する。
表示部19は、HDRディスプレイ(例えば、コントラスト比が「40000:1」など)から構成されており、復元情報付与部17から入力された復元情報付与合成後画像データ(以下、復元情報付与HDR画像データと称す)、又は画像保存部18によって保存された復元情報付与HDR画像データに基づき、被写体の画像を表示する。また、HDRディスプレイにより、復元情報付与HDR画像データの画像をレンジ圧縮せずに表示することができる。
The
The
画素データ復元部20は、復元指示に応じて、復元対象の復元情報付与合成後画素データを画像保存部18を介して記憶媒体から読み出し、該読み出した復元情報付与合成後画素データに含まれる復元情報に基づき、復元対象の画素データを復元する。
本実施の形態では、復元対象画素データの上位NCビットが復元情報として付与されているので、該NCビットを、Nビットのデータに戻す(下位(N−NC)ビットを全て0)にしたデータに変換することで、復元対象画素データを復元する。
In response to the restoration instruction, the pixel
In the present embodiment, since the upper NC bits of the restoration target pixel data are given as the restoration information, the NC bits are returned to N-bit data (the lower (N-NC) bits are all 0). The restoration target pixel data is restored by converting to.
なお、撮像システム100の上記各構成部の機能は、ハードウェアのみ、ソフトウェアのみ、ハードウェアとソフトウェアとの組み合わせのいずれかで実現される。従って、撮像システム100は、ソフトウェアを用いて機能を実現する構成部がある場合に、図示していないが、ソフトウェアを実行するためのプロセッサ、ソフトウェアを記憶するためのROM等の記憶媒体、ソフトウェアの実行に用いるRAM等の記憶媒体、各構成部とのデータの授受を行うためのバスなどを備える。
Note that the functions of the above-described components of the
また、上記各構成部は、1つの装置内に全てが含まれる構成(この場合は、撮像装置=撮像システムとなる)としても良いし、撮像部10、SW11、第1〜第3メモリ12〜14、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17を1つの装置内で構成(この場合は、撮像装置に対応する)し、画像保存部18、表示部19及び画素データ復元部20は1つ又は複数の装置で構成しても良い。後者の場合は、撮像装置と、画像保存部18、表示部19及び画素データ復元部20とは、有線又は無線で接続する。
In addition, each of the above-described components may be configured so as to be entirely included in one device (in this case, an imaging device = an imaging system), or the
次に、図4〜図7に基づき、本実施の形態の動作を説明する。
ここで、図4は、直線合成した合成後画素データと、ガンマ補正によってハイライト部を圧縮した合成後画素データとの関係を示す図である。また、図5(a)〜(d)は、理想形のヒストグラムと、露光時間T1〜T3に対応する画像のヒストグラムとの一例を示す図である。また、図6は、復元情報の生成処理及び復元情報の埋込処理の概念の一例を示す図である。また、図7(a)〜(f)は、画素データ合成処理、復元対象画像選択処理、復元情報の埋込処理、復元対象画像の復元処理を含む一連の処理の流れを示す図である。
Next, the operation of the present embodiment will be described with reference to FIGS.
Here, FIG. 4 is a diagram illustrating a relationship between the combined pixel data obtained by linear combination and the combined pixel data obtained by compressing the highlight portion by gamma correction. FIGS. 5A to 5D are diagrams illustrating an example of an ideal histogram and an image histogram corresponding to exposure times T1 to T3. FIG. 6 is a diagram illustrating an example of a concept of restoration information generation processing and restoration information embedding processing. FIGS. 7A to 7F are diagrams showing a flow of a series of processing including pixel data synthesis processing, restoration target image selection processing, restoration information embedding processing, and restoration target image restoration processing.
撮像システム100は、まず、電子シャッタ機能によりシャッタ速度(露光時間)を制御して、露光時間T1(15H)、T2(100H)、T3(500H)の順で、撮像部10の各画素を露光し、各露光時間における露光量に応じた画素信号を読み出す。ここで、Hは、1水平期間の時間(s)を表す。従って、例えば15Hであれば、露光時間は、15×H(s)となる。
The
読み出した画素信号(アナログデータ)は、不図示のラインメモリに一旦蓄えられた後、不図示のAFEを介してデジタルの画素データへと変換され、露光時間T1〜T3を識別する識別信号と共にSW11へと出力される。SW11は、画素データ及び識別信号が入力されると、第1〜第3メモリ12〜14のうち、識別信号の示す露光時間に対応したメモリへとスイッチを切り替え、該メモリに向けて画素データを出力する。ここで、画素データは、8ビットの階調値(輝度値)を有するデータであるとする。
The read pixel signal (analog data) is temporarily stored in a line memory (not shown), then converted to digital pixel data via an AFE (not shown), and SW11 together with an identification signal for identifying exposure times T1 to T3. Is output. When the pixel data and the identification signal are input, the
一方、第1〜第3メモリ12〜14は、画素データが入力されると、メモリコントローラによって、不図示のタイミング制御部から入力される垂直同期信号、水平同期信号、ピクセルクロックに基づき、入力された画素データに対する2次元のアドレス(x,y)を生成すると共に、該アドレスに対応する記憶領域に画素データを記憶する。なお、第1〜第3メモリ12〜14において、同一画素のアドレス値を共通とする。
On the other hand, when the pixel data is input, the first to
ここでは、露光時間T1〜T3において、図7(a)〜(c)に示すような画像に対応した第1〜第3画素データがそれぞれ得られたとする。
このようにして、第1〜第3メモリ12〜14に、1フレーム分の露光時間T1〜T3に対応する画素データが記憶されると、画素データ合成部15は、第1〜第3メモリ12〜14から、画素毎に、露光時間T1〜T3に対応する第1〜第3画素データをそれぞれ読み出す。一方、復元対象画像選択部16は、第1〜第3メモリ12〜14から、画像毎に、第1〜第3画素データを読み出す。
画素データ合成部15は、読み出した各画素に対する第1〜第3画素データを合成する。
合成の方法としては、第1〜第3画素データを直線合成して、その後、必要に応じて、ガンマ補正又はLUTによる補正を行い、ハイライト部を圧縮する。
Here, it is assumed that first to third pixel data corresponding to images as shown in FIGS. 7A to 7C are obtained in the exposure times T1 to T3, respectively.
In this manner, when the pixel data corresponding to the exposure times T1 to T3 for one frame is stored in the first to
The pixel
As a combining method, the first to third pixel data are linearly combined, and thereafter gamma correction or LUT correction is performed as necessary to compress the highlight portion.
具体的に、下式(1)に従って、露光時間T1〜T3に対応する第1〜第3画素データを直線合成する。
IMG_HDR_Linear=(IMG_T1×T3/T1+IMG_T2×T3/T2+IMG_T3×T3/T3)/(255×T3/T1+255×T3/T2+255×T3/T3) ・・・(1)
上式(1)において、IMG_HDR_Linearは合成後画素データの画素値、IMG_T1〜IMG_T3は第1〜第3画素データの画素値である。
上式(1)に示すように、第1〜第3画素データを露光時間T3に合わせて正規化して、その総和を求め、更に、この総和を、ハイライトの輝度レベルを第1〜第3画素データと同様に正規化した総和で除算することによって、合成後画素データを得る。
Specifically, the first to third pixel data corresponding to the exposure times T1 to T3 are linearly synthesized according to the following expression (1).
IMG_HDR_Linear = (IMG_T1 × T3 / T1 + IMG_T2 × T3 / T2 + IMG_T3 × T3 / T3) / (255 × T3 / T1 + 255 × T3 / T2 + 255 × T3 / T3) (1)
In the above equation (1), IMG_HDR_Linear is the pixel value of the combined pixel data, and IMG_T1 to IMG_T3 are the pixel values of the first to third pixel data.
As shown in the above equation (1), the first to third pixel data are normalized in accordance with the exposure time T3 to obtain the sum, and the sum is used as the highlight brightness level to the first to third. Similar to the pixel data, the post-combination pixel data is obtained by dividing by the normalized sum.
更に、ハイライト部を圧縮する場合は、下式(2)に従って、図4に示す入出力関係を有するガンマ値によってガンマ補正を行い、合成後画素データのハイライト部を圧縮する。
IMG_HDR_Gamma=255×IMG_HDR_Linear0.3 ・・・(2)
ここでは、ガンマ補正によるハイライト部の圧縮を行っているが、これに限らず、LUTを用いた補正を行うことも可能である。LUTを用いることによって、より確実にハイライト部の圧縮を行うことができる。
Further, when the highlight portion is compressed, gamma correction is performed by the gamma value having the input / output relationship shown in FIG. 4 according to the following equation (2), and the highlight portion of the combined pixel data is compressed.
IMG_HDR_Gamma = 255 × IMG_HDR_Linear 0.3 (2)
Although the highlight portion is compressed by gamma correction here, the present invention is not limited to this, and correction using an LUT can also be performed. By using the LUT, the highlight portion can be more reliably compressed.
なお、上記ハイライト部の圧縮/非圧縮に関わらず合成後の画素データを合成後画素データと称す。また、上式(1)は、ガンマ補正によるハイライト部の圧縮を前提とした式となっているので、ガンマ補正を行わない場合でも、上式(1)で算出した合成後の画素値に対して「255」を乗算する必要がある。
このようにして、画素毎に合成後画素データが生成されると、該生成された合成後画素データは復元情報付与部17に出力される。
Note that the combined pixel data is referred to as combined pixel data regardless of whether the highlight portion is compressed or not. In addition, since the above equation (1) is an equation based on the premise that the highlight portion is compressed by gamma correction, even if the gamma correction is not performed, the combined pixel value calculated by the above equation (1) is used. On the other hand, it is necessary to multiply “255”.
When the combined pixel data is generated for each pixel in this way, the generated combined pixel data is output to the restoration
なお、この時点では、上記合成後画素データから、図7(d)に示すような合成画像が得られる。
一方、復元対象画像選択部16は、各露光時間に対応した画素データ群に基づき、画像毎に、各輝度値(輝度レベル)に対応する画素数を計数し、輝度レベルと画素数との関係を示す輝度ヒストグラムを生成する。
At this time, a composite image as shown in FIG. 7D is obtained from the post-combination pixel data.
On the other hand, the restoration target
ここでは、露光時間T1〜T3の各画像に対して、図5(b)〜(d)に示す第1〜第3ヒストグラムが生成されたとする。
これら生成された第1〜第3ヒストグラムの情報は、比較部16bに出力される。
比較部16bは、ヒストグラム生成部16aから第1〜第3ヒストグラムの情報が入力されると、該第1〜第3ヒストグラムと、図5(a)に示す理想ヒストグラムとを比較する。
Here, it is assumed that the first to third histograms shown in FIGS. 5B to 5D are generated for the images of the exposure times T1 to T3.
The information of the generated first to third histograms is output to the comparison unit 16b.
When the first to third histogram information is input from the histogram generation unit 16a, the comparison unit 16b compares the first to third histograms with the ideal histogram shown in FIG.
図5(a)に示すように、理想ヒストグラムは、「0〜255」の輝度レベルの範囲に対して、輝度値「0」、「255」の画素数を「0」とし、輝度値127の画素数を最大数として、これら「0」、「127」、「255」を各頂点として結んだ二等辺三角形を形成している。
一方、図5(b)に示すように、露光時間T1に対応する第1ヒストグラムは、輝度レベルの比較的低い範囲(輝度値85以下の範囲)の画素数が多くなっている。また、図5(c)に示すように、露光時間T2に対応する第2ヒストグラムは、中間範囲(輝度値86〜169の範囲)の輝度レベルの画素数が多くなっている。また、図5(d)に示すように、露光時間T3に対応する第3ヒストグラムは、輝度レベルの比較的高い範囲(輝度値170以上の範囲)の画素数が多くなっている。
As shown in FIG. 5A, the ideal histogram has a luminance value of 127 with luminance values “0” and “255” set to “0” with respect to a luminance level range of “0 to 255”. An isosceles triangle is formed by connecting these “0”, “127”, and “255” as vertices with the maximum number of pixels.
On the other hand, as shown in FIG. 5B, the first histogram corresponding to the exposure time T1 has a large number of pixels in a relatively low luminance level range (a luminance value of 85 or less). As shown in FIG. 5C, the second histogram corresponding to the exposure time T2 has a large number of pixels in the luminance level in the intermediate range (range of luminance values 86 to 169). As shown in FIG. 5D, the third histogram corresponding to the exposure time T3 has a large number of pixels in a relatively high luminance level range (a luminance value of 170 or more).
以上より、中間範囲の画素数が最も多い露光時間T2に対応する第2ヒストグラムが、理想ヒストグラムと形状が一番似ていると判断できるので、比較部16bは、露光時間T2の情報を、画素データ選択部16cに出力する。
画素データ選択部16cは、露光時間T2の情報が入力されると、露光時間T2に対応する第2メモリ13に対して、画素データのリードコマンドを出力する。
As described above, since the second histogram corresponding to the exposure time T2 having the largest number of pixels in the intermediate range can be determined to have the most similar shape to the ideal histogram, the comparison unit 16b uses the information on the exposure time T2 as the pixel. It outputs to the
When the information about the exposure time T2 is input, the pixel
第2メモリ13は、画素データ選択部16cからリードコマンドを受け取ると、メモリコントローラによってフレームメモリの先頭アドレスから順次第2画素データを読みだして、該読み出した第2画素データを画素データ選択部16cに転送する。
画素データ選択部16cは、第2メモリ13から転送されてきた第2画素データを、復元対象画素データとして、復元情報付与部17に出力する。
When the
The pixel
復元情報付与部17は、復元対象画像選択部16から復元対象画素データ(ここでは、第2画素データ)が入力され、画素データ合成部15から合成後画素データが入力されると、まず、復元情報生成部17aにおいて、復元対象画素データの上位NCビットのデータを抽出する。
ここでは、画素データがモノクロデータであるとして、図6に示すように、合成後画素データをP「10101010(2進数)」、復元対象画素データをS「10101010(2進数)」とする。
When the restoration target pixel data (here, the second pixel data) is input from the restoration target
Here, assuming that the pixel data is monochrome data, the post-combination pixel data is P “10101010 (binary number)” and the restoration target pixel data is S “10101010 (binary number)” as shown in FIG.
そして、図6に示すように、復元対象画素データS「10101010」の上位3ビット「101」を抽出する。
具体的に、復元対象画素データSの上位3ビットを右(下位側)に5ビットシフトすると共に、シフト後の上位5ビットを全て「0」にしたデータ「00000101」を生成する。
Then, as shown in FIG. 6, the upper 3 bits “101” of the restoration target pixel data S “10101010” are extracted.
Specifically, the upper 3 bits of the restoration target pixel data S are shifted to the right (lower side) by 5 bits, and data “00000101” in which all the upper 5 bits after the shift are set to “0” is generated.
そして、上記生成した「00000101」を復元情報として、復元情報埋込部17bに出力する。
復元情報埋込部17bは、復元情報生成部17aから復元情報「00000101」が入力されると、合成後画素データP「10101010」の上位5ビット「10101」を抽出する。
Then, the generated “00000101” is output to the restoration
When the restoration information “00000101” is input from the restoration
具体的に、内部論理回路によって、合成後画素データP「10101010」と「11111000」との論理積を演算し、下位3ビットを「0」とした「10101000」を得る。
そして、合成後画素データPの上位5ビットが抽出されると、復元情報埋込部17bは、内部論理回路によって、復元情報「00000101」と、「10101000」との論理和を演算し、図6に示すように、復元対象画素データSの上位3ビット「101」を、合成後画素データPの下位3ビットに埋め込む。これにより、合成後画素データに対して、復元情報が付与された、復元情報付与合成後画素データ「10101101」が生成される。
Specifically, the internal logic circuit calculates the logical product of the combined pixel data P “10101010” and “11111000” to obtain “10101000” with the lower 3 bits set to “0”.
When the upper 5 bits of the combined pixel data P are extracted, the restoration
なお、第1〜第3画素データがカラーデータである場合は、各色の色信号に対応した画素データに対して、上記モノクロデータと同様の処理を行う。具体的に、第1〜第3画素データが、例えば、R、G、Bの三原色に対応する3種類の画素データを含んでいるときに、上記モノクロデータのときと同様に、R、G、B各色の画素データの上位3ビットをそれぞれ抽出し、該抽出した3ビットのデータを、合成後画素データにおける各色の画素データの下位3ビットに、同じ色同士でそれぞれ埋め込む。 When the first to third pixel data is color data, the same processing as the monochrome data is performed on the pixel data corresponding to the color signal of each color. Specifically, when the first to third pixel data include, for example, three types of pixel data corresponding to the three primary colors R, G, and B, as in the case of the monochrome data, R, G, The upper 3 bits of the pixel data of each color B are extracted, and the extracted 3-bit data is embedded in the lower 3 bits of the pixel data of each color in the combined pixel data with the same colors.
上記一連の処理を、被写体の撮像領域に対応する全画素に対して行うことで、広ダイナミックレンジで且つ復元情報が付与された画像データ(復元情報付与HDR画像データ)が生成される。該生成された復元情報付与HDR画像データは、表示部19に出力されると共に、画像保存部18に出力される。
画像保存部18は、復元情報付与部17から入力された復元情報付与HDR画像データを、所定のファイル形式で記憶媒体に保存する。
By performing the above-described series of processing for all the pixels corresponding to the imaging area of the subject, image data (restoration information-added HDR image data) with a wide dynamic range and with restoration information is generated. The generated restoration information-added HDR image data is output to the
The
表示部19は、復元情報付与部17から入力された復元情報付与HDR画像データに基づき、被写体の広ダイナミックレンジの画像をリアルタイムに表示する。一方、リアルタイムに映像を表示しない場合は、表示部19は、ユーザからの指示に応じて、画像保存部18によって保存された復元情報付与HDR画像データを記憶媒体から読み出し、該読み出した復元情報付与HDR画像データに基づき、図7(e)に示すように、被写体の広ダイナミックレンジの画像を表示する。
The
復元情報が付与された合成後画素データにおいては、下位3ビットのデータの一部又は全部が付与前の合成後画素データと異なる場合があるが、上位5ビットが付与前のデータと同じであるため、付与後の画質は付与前の画質と殆ど遜色がない。
一方、被写体の広ダイナミックレンジ画像において、例えば、重要な情報が識別できない状態となっており、合成前の画像を参照したいときなどに、画素データ復元部20において、復元対象(合成前)の画像を復元することができる。
In the post-combination pixel data to which the restoration information is added, some or all of the lower 3 bits of data may be different from the post-combination pixel data before the addition, but the upper 5 bits are the same as the data before the addition. Therefore, the image quality after the application is almost the same as the image quality before the application.
On the other hand, in a wide dynamic range image of a subject, for example, when important information cannot be identified, and when it is desired to refer to an image before synthesis, the pixel
復元対象の画像を復元する場合は、画素データ復元部20に対して、復元したい復元情報付与HDR画像データの情報を含む復元指示を与える。
画素データ復元部20は、復元指示が入力されると、復元対象の復元情報付与HDR画像データを画像保存部18を介して記憶媒体から読み出す。
そして、読み出した復元情報付与HDR画像データに基づき、復元情報付与画素データ毎(画素毎)に、復元対象画素データの復元を行う。
When restoring an image to be restored, a restoration instruction including information of restoration information-added HDR image data to be restored is given to the pixel
When the restoration instruction is input, the pixel
Then, the restoration target pixel data is restored for each restoration information addition pixel data (for each pixel) based on the read restoration information addition HDR image data.
本実施の形態においては、復元情報付与画素データ(8ビット)における下位3ビットが復元情報となるので、下位3ビットを左(上位側)に5ビットシフトし、シフト後の下位5ビットを「0」として(そのままでも良い)、復元対象画素データを復元する。例えば、復元情報付与画素データが「10101101(2進数)」である場合に、下位3ビット「101」を左に5ビットシフトし、シフト後の下位5ビットを全て「0」にした「10100000」が復元された復元対象画素データ(以下、復元データと称す)となる。 In the present embodiment, since the lower 3 bits in the restoration information-added pixel data (8 bits) are restoration information, the lower 3 bits are shifted to the left (upper side) by 5 bits, and the lower 5 bits after the shift are changed to “ As “0” (may be left as it is), the restoration target pixel data is restored. For example, when the restoration information addition pixel data is “10101101 (binary number)”, the lower 3 bits “101” are shifted to the left by 5 bits, and the lower 5 bits after the shift are all set to “0”. Is restored pixel data to be restored (hereinafter referred to as restoration data).
このようにして復元されたデータから、図7(f)に示すように、復元対象の画像である露光時間T2に対応した画像を得ることができる。
なお、復元データは、元のデータ「10101010」に対して、下位5ビットの一部又は全部のデータが異なる場合があるが、少なくとも上位3ビットは元データと同じ値となるので、復元データから構成される画像データの画像は、元の画像データの画像と殆ど遜色のない画質となる。
As shown in FIG. 7F, an image corresponding to the exposure time T2, which is an image to be restored, can be obtained from the data restored in this way.
Note that the restored data may differ in part or all of the lower 5 bits from the original data “10101010”, but at least the upper 3 bits have the same value as the original data. The image of the configured image data has an image quality almost the same as that of the original image data.
以上、本実施の形態の撮像システム100は、CCDイメージセンサの各画素を、3種類の露光時間T1〜T3で露光して得られた画素データを合成して広ダイナミックレンジの画像に対応した合成後画素データを生成することができる。
また、露光時間T1〜T3にそれぞれ対応する第1〜第3の画素データから、露光時間毎に、輝度のヒストグラム(第1〜第3ヒストグラム)を生成し、該生成した第1〜第3ヒストグラムと、理想ヒストグラムとを比較して、該比較結果から、最も理想ヒストグラムに近いヒストグラムに対応する露光時間の画素データを対象画素データとして選択することができる。
As described above, the
Also, luminance histograms (first to third histograms) are generated for each exposure time from the first to third pixel data respectively corresponding to the exposure times T1 to T3, and the generated first to third histograms are generated. From the comparison result, the pixel data of the exposure time corresponding to the histogram closest to the ideal histogram can be selected as the target pixel data.
また、上記選択した復元対象画素データの上位NCビットのデータから復元情報を生成し、合成後画素データの下位NCビットを、復元情報に入れ替えることで、合成後画素データに復元情報を付与することができる。
また、復元情報の付与された画素データから、復元対象の画素データを復元することができる。
Further, restoration information is generated from the data of the upper NC bits of the selected restoration target pixel data, and the restoration information is given to the post-combination pixel data by replacing the lower NC bits of the post-combination pixel data with the restoration information. Can do.
Further, it is possible to restore the pixel data to be restored from the pixel data to which the restoration information is added.
以上より、露光時間T1〜T3のうち、画質の最も良い露光時間の画素データを復元対象画素データとして選択し、この復元対象画素データを復元するための復元情報を合成画素データに付与することができる。
また、復元対象画素データを圧縮したデータを復元情報として、これを合成画素データの下位ビットと入れ替えることで付与するようにしたので、合成後画素データの形式を変更せずに復元情報を付与することができる。これにより、復元情報として付与するデータを小さくできると共に、復元情報付与合成後画素データの形式を変換することなく汎用のアプリケーションなどで使用できる。
As described above, it is possible to select pixel data having the best exposure time among the exposure times T1 to T3 as restoration target pixel data and to add restoration information for restoring the restoration target pixel data to the composite pixel data. it can.
In addition, since the data obtained by compressing the restoration target pixel data is given as restoration information by replacing it with lower bits of the synthesized pixel data, restoration information is given without changing the format of the synthesized pixel data. be able to. As a result, the data to be added as restoration information can be reduced, and can be used in a general-purpose application or the like without converting the format of restoration-information-added combined pixel data.
また、復元情報付与合成画素データから、復元対象の画素データを復元することができるので、合成画像において、重要な被写体の画像がボケていたりした場合に、復元対象画素データを復元し、その復元データから構成される画像を参照したり、該画像の画像データを用いて識別処理などを行ったりすることができる。
上記第1の実施の形態において、撮像部10のCCDイメージセンサは、形態1又は19に記載の光電変換部に対応し、撮像部10における各画素から画素信号を読み出す処理は、形態1に記載の画素信号読出手段又は形態19に記載の画素信号読出ステップに対応し、画素データ合成部15は、形態1又は20に記載の画素データ合成手段に対応し、復元対象画像選択部16は、形態12又は13に記載の復元画像選択手段に対応し、復元情報付与部17は、形態1、4、5、12及び20のいずれか1に記載の復元情報付与手段又は形態19、21及び22のいずれか1に記載の復元情報付与ステップに対応し、画素データ復元部20は、形態15に記載の画素データ復元手段に対応する。
Further, since the restoration target pixel data can be restored from the restoration information-added synthetic pixel data, the restoration target pixel data is restored and restored when the image of an important subject is blurred in the synthesized image. It is possible to refer to an image composed of data and perform identification processing using image data of the image.
In the first embodiment, the CCD image sensor of the
また、上記第1の実施の形態において、撮像システム100における、撮像部10、SW11、第1〜第3メモリ12〜14、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17から構成されるブロックは、形態1、2、3、4、5、12及び13のいずれか1に記載の撮像装置に対応し、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17から構成されるブロックは、形態20に記載の画像処理装置に対応する。
〔第1の実施の形態の変形例1〕
次に、図8〜図10に基づき、本発明に係る撮像装置、撮像システム、撮像方法、画像処理装置、画像処理プログラム及び画像処理方法の第1の実施の形態の変形例1を説明する。
In the first embodiment, the
[
Next, a first modification of the first embodiment of the imaging apparatus, imaging system, imaging method, image processing apparatus, image processing program, and image processing method according to the present invention will be described with reference to FIGS.
上記第1の実施の形態において、復元対象画像選択部16で、各露光時間に対応した画像のヒストグラムに基づき復元対象の画素データを選択しているのに対して、本変形例1は、各露光時間に対応する周波数成分に基づき復元対象の画素データを選択している点が異なる。
更に、上記第1の実施の形態において、復元情報付与部17において、復元対象の画素データがカラー画像データであるときに、各色に対応する画素データの上位3ビットを抽出して、該上位3ビットのデータを、各色に対応する合成後画素データの下位3ビットにそれぞれ埋め込むことで合成後画素データに対して復元情報を付与しているのに対して、本変形例1は、複数色に対応する画素データのうち、いずれか一色に対応する画素データの情報を複数色の色数分に分割し、該分割したデータを復元情報として、合成後画素データの各色の画素データの下位ビットに埋め込むことで合成後画素データに対して復元情報を付与する点が異なる。
In the first embodiment, the restoration target
Furthermore, in the first embodiment, when the restoration target pixel data is color image data, the restoration
また、画素データ復元部20における復元対象の画素データの復元方法が、上記相違点に伴い上記第1の実施の形態と異なる。
具体的に、本変形例1の撮像システム100は、復元対象画像選択部16が、復元対象画像選択部16’に変更され、更に、復元情報付与部17及び画素データ復元部20の処理内容が異なっており、それ以外の構成部は、上記第1の実施の形態の撮像システム100と同様となる。
Further, the restoration method of the pixel data to be restored in the pixel
Specifically, in the
以下、上記第1の実施の形態と同様の構成部には同じ符号を付して説明を適宜省略し、上記第1の実施の形態と異なる部分を詳細に説明する。
まず、図8に基づき、復元対象画像選択部16’の詳細な構成を説明する。
ここで、図8は、復元対象画像選択部16’の詳細な構成を示すブロック図である。
復元対象画像選択部16’は、図8に示すように、周波数成分抽出部16dと、比較部16eと、画素データ選択部16cとを含んで構成される。
Hereinafter, the same components as those in the first embodiment are denoted by the same reference numerals, description thereof will be omitted as appropriate, and portions different from those in the first embodiment will be described in detail.
First, a detailed configuration of the restoration target
Here, FIG. 8 is a block diagram illustrating a detailed configuration of the restoration target
As illustrated in FIG. 8, the restoration target
公知のエッジ抽出フィルタを用いたエッジ抽出などによって、露光時間T1〜T3の画素信号の周波数成分を抽出(算出)する。
周波数成分抽出部16dは、公知のラプラシアンフィルタ(ハイパスフィルタ)を用いて、エッジ抽出対象の画素とその周辺画素の画素データに対してフィルタ処理を行い、対象画素データに対するエッジ成分(高周波成分)を抽出する。
The frequency components of the pixel signals of the exposure times T1 to T3 are extracted (calculated) by edge extraction using a known edge extraction filter.
The frequency
比較部16eは、周波数成分抽出部16dで抽出された露光時間T1〜T3の画素データにそれぞれ対応したエッジ成分に基づき、露光時間T1〜T3に対応する画像のうち、エッジ成分量の最も多い画像の露光時間の情報を、比較結果として画素データ選択部16cに出力する。
次に、本変形例1における復元情報付与部17について説明する。
The
Next, the restoration
なお、本実施の形態においては、各画素データが、R、G、Bの三原色の各色信号に対応する、画素データR(Nビット)、画素データG(Nビット)、画素データB(Nビット)の3種類の画素データをそれぞれ含むものとする。
本変形例1における復元情報生成部17aは、復元対象画像選択部16’から復元対象画素データRsGsBsが入力されると、本実施の形態においては、まず、復元対象画素データRsGsBsを構成するRs、Gs、Bsの各色に対応する画素データRs、Gs、Bsの中から画素データGsを選択し、該画素データGs(Nビット)を色数(3)で分割する。
In this embodiment, each pixel data corresponds to each color signal of the three primary colors of R, G, and B. Pixel data R (N bits), pixel data G (N bits), pixel data B (N bits) ) Of three types of pixel data.
In the present embodiment, when the restoration target pixel data RsGsBs is input from the restoration target
本実施の形態においては、画素データGs(Nビット)が均等に3分割できないビット数のデータである場合は、画素データGsを倍にするなどして、均等に3分割できるビット数のデータに変換する。例えば、画素データGsが8ビットである場合は、2倍にして9ビットのデータに変換し、該変換後の画素データGsを3分割する。
このようにして3分割して得られた3種類の分割データGsA〜GsC(N/3ビット)は復元情報として、復元情報埋込部17bに出力される。例えば、画素データGsが「101010101(2進数)」であった場合に、上位ビット側から順に、分割データGsAは「101」、分割データGsBは「010」、分割データGsCは「101」となる。
In the present embodiment, when the pixel data Gs (N bits) is data having a number of bits that cannot be equally divided into three, the pixel data Gs is doubled, for example, so that the number of bits can be equally divided into three. Convert. For example, when the pixel data Gs is 8 bits, it is doubled and converted to 9-bit data, and the converted pixel data Gs is divided into three.
The three types of divided data GsA to GsC (N / 3 bits) obtained by dividing into three in this way are output to the restoration
本変形例1における復元情報埋込部17bは、復元情報生成部17aから分割データGsA〜GsCが入力されると、該分割データGsA〜GsCを、合成後画素データRpGpBpにおける各色に対応する画素データRp、Gp、Bpの下位「N/3」ビットに埋め込むことで、合成後画素データに復元情報を付与する。
具体的に、画素データRpの下位「N/3」ビットに分割データGsAを埋め込み、画素データGpの下位「N/3」ビットに分割データGsBを埋め込み、画素データBpの下位「N/3」ビットに分割データGsCを埋め込む。
When the division information GsA to GsC is input from the restoration
Specifically, the divided data GsA is embedded in the lower “N / 3” bits of the pixel data Rp, the divided data GsB is embedded in the lower “N / 3” bits of the pixel data Gp, and the lower “N / 3” of the pixel data Bp. The divided data GsC is embedded in the bit.
このようにして、分割データGsA〜GsCが埋め込まれた画素データRp、Gp、Bpは、復元情報付与合成後画素データとして、画像保存部18及び表示部19にそれぞれ出力される。
次に、本変形例1における画素データ復元部20について説明する。
本変形例1における画素データ復元部20は、画像保存部18から復元情報付与合成後画素データを取得すると、該復元情報付与合成後画素データに含まれる各色の画素データRp、Gp、Bpに含まれる復元情報に基づき、復元対象の画素データRs、Gs、Bsを復元する。
In this way, the pixel data Rp, Gp, and Bp in which the divided data GsA to GsC are embedded are output to the
Next, the pixel
When the pixel
具体的には、復元情報付与合成後画素データRp、Gp、Bpの下位「N/3」ビットに復元情報GsA、GsB、GsCがそれぞれ埋め込まれているので、まず、Rp、Gp、Bpから、復元情報GsA、GsB、GsCの各ビット列を抽出し、更に、抽出したビット列を、復元対象の画素データGsの対応するビット位置へとシフトしたデータを生成する。これらシフトしたデータの論理和を演算することで、復元対象の画素データGsを求めることができる。 Specifically, since the restoration information GsA, GsB, and GsC are respectively embedded in the lower “N / 3” bits of the restoration information-added combined pixel data Rp, Gp, and Bp, first, from Rp, Gp, and Bp, Each bit string of the restoration information GsA, GsB, and GsC is extracted, and data obtained by shifting the extracted bit string to a corresponding bit position of the pixel data Gs to be restored is generated. The pixel data Gs to be restored can be obtained by calculating the logical sum of these shifted data.
画素データGsが復元されると、該画素データGsと画素データGpとの比を、画素データRp、Bpにそれぞれ乗じることで、復元対象の画素データRs(「Rs=Rp×Gs/Gp」)、画素データBs(「Bs=Bp×Gs/Gp」)を求めることができる。
次に、図9〜図10に基づき、本実施の形態の動作を説明する。
ここで、図9(a)は、ハイパスフィルタの一例を示す図であり、(b)は処理対象画素とその周辺8画素の画素値の一例を示す図である。また、図10は、図9(a)のハイパスフィルタでフィルタ処理後の各露光時間の画像及び合成後の画像の一例を示す図である。
When the pixel data Gs is restored, pixel data Rs (“Rs = Rp × Gs / Gp”) to be restored is obtained by multiplying the pixel data Rp and Bp by the ratio between the pixel data Gs and the pixel data Gp, respectively. Pixel data Bs (“Bs = Bp × Gs / Gp”) can be obtained.
Next, the operation of the present embodiment will be described with reference to FIGS.
Here, FIG. 9A is a diagram illustrating an example of a high-pass filter, and FIG. 9B is a diagram illustrating an example of pixel values of a pixel to be processed and its surrounding eight pixels. FIG. 10 is a diagram showing an example of an image at each exposure time after the filter processing by the high-pass filter in FIG. 9A and an image after synthesis.
なお、画素データ合成部15までの動作は、上記第1の実施の形態と同様となるので説明を省略する。
以下、復元対象画像選択部16’の動作から説明する。
復元対象画像選択部16は、周波数成分抽出部16dにおいて、露光時間T1〜T3にそれぞれ対応した画素データ群に基づき、画像毎に、各画素データに対してラプラシアンフィルタ(ハイパスフィルタ)を用いたフィルタ処理を行い、各露光時間に対応する画像のエッジ成分量を抽出する。
The operation up to the pixel
Hereinafter, the operation of the restoration target
In the frequency
ここでは、まず、処理対象の画素データ(x,y)と、該画素データの画素の周辺8画素の画素データに対して、図9(a)に示すようなハイパスフィルタを用いてフィルタ処理し、各画素のエッジ成分(高周波成分)を抽出する。
例えば、処理対象画素とその周辺8画素の画素値が、図9(b)に示すようになっている場合は、処理対象画素のエッジ成分は、図9(a)のハイパスフィルタを用いて、「60×1+60×1+60×1+60×1+60×−9+60×1+60×1+60×1+60×1=−60」と抽出される。
Here, first, the pixel data (x, y) to be processed and the pixel data of the eight pixels around the pixel of the pixel data are filtered using a high-pass filter as shown in FIG. The edge component (high frequency component) of each pixel is extracted.
For example, when the pixel values of the processing target pixel and the surrounding eight pixels are as shown in FIG. 9B, the edge component of the processing target pixel is obtained using the high-pass filter of FIG. “60 × 1 + 60 × 1 + 60 × 1 + 60 × 1 + 60 × −9 + 60 × 1 + 60 × 1 + 60 × 1 + 60 × 1 = −60” is extracted.
このようなエッジ成分の抽出処理を、露光時間T1〜T3にそれぞれ対応する画像の全画素に対して行い、更に、画像毎に抽出した各画素のエッジ成分の絶対値の総和を画像のエッジ成分量として算出する。ここで、露光時間T1、T2、T3に対応するエッジ成分量を、それぞれE1、E2、E3とする。該算出されたエッジ成分量E1〜E3は、比較部16eに出力される。
Such edge component extraction processing is performed on all pixels of the image corresponding to the exposure times T1 to T3, respectively, and the sum of absolute values of the edge components of each pixel extracted for each image is used as the edge component of the image. Calculate as a quantity. Here, the edge component amounts corresponding to the exposure times T1, T2, and T3 are E1, E2, and E3, respectively. The calculated edge component amounts E1 to E3 are output to the
比較部16eは、周波数成分抽出部16dから、エッジ成分量E1〜E3が入力されると、該E1〜E3に基づき、復元対象として復元情報を付与する露光時間の画像を選択する。本実施の形態においては、エッジ成分量が多いほど画像の先鋭度が高いと定義し、エッジ成分量E1〜E3のそれぞれの値の大小を比較して、最も大きい値のエッジ成分量に対応する露光時間の画像を、復元対象の画像として選択し、該画像の露光時間の情報を、画素データ選択部16cに出力する。
When the edge component amounts E1 to E3 are input from the frequency
ここでは、露光時間T1〜T3に対応するフィルタ処理後の画像が、図10(a)〜(c)に示すようになったとする。各画像の白色の部分が、エッジ成分となる。図10(a)〜(c)を見ると解るように、これらのうちでは、露光時間T3に対応する画像にエッジ成分が最も多く含まれている。つまり、露光時間T3に対応する画像には、より多くのオブジェクトが写っていることが期待されるので、露光時間T3の時間情報が画素データ選択部16cに出力される。
Here, it is assumed that the image after the filter processing corresponding to the exposure times T1 to T3 is as shown in FIGS. The white part of each image is an edge component. As can be seen from FIGS. 10A to 10C, among these, the image corresponding to the exposure time T3 contains the most edge components. That is, since it is expected that more objects are reflected in the image corresponding to the exposure time T3, the time information of the exposure time T3 is output to the pixel
画素データ選択部16cは、露光時間T3の情報が入力されると、露光時間T3に対応する第3メモリ14に対して、画素データのリードコマンドを出力する。
第3メモリ14は、画素データ選択部16cからリードコマンドを受け取ると、メモリコントローラによってフレームメモリの先頭アドレスから順次第3画素データを読みだして、該読み出した第3画素データを画素データ選択部16cに転送する。
When the information about the exposure time T3 is input, the pixel
When the
画素データ選択部16cは、第3メモリ14から転送されてきた第3画素データを、復元対象画素データとして、復元情報付与部17に出力する。
復元情報付与部17は、復元対象画像選択部16から復元対象画素データ(ここでは、第3画素データ)が入力され、画素データ合成部15から合成後画素データが入力されると、まず、復元情報生成部17aにおいて、第3画素データに含まれる画素データRs、Gs、Bsのうち、画素データGsを3分割する。ここでは、画素データGsが8ビットであるとして、これを2倍にして9ビットのデータに変換してから3分割する。3分割して得られた分割データGsA〜GsCは復元情報として、復元情報埋込部17bに出力される。
The pixel
When the restoration target pixel data (here, the third pixel data) is input from the restoration target
復元情報埋込部17bは、画素データ合成部15から合成後画素データが入力され、復元情報生成部17aから復元情報(GsA〜GsC)が入力されると、合成後画素データを構成する各色の画素データRp、Gp、Bpの下位3ビットに、分割データGsA、GsB、GsCをそれぞれ埋め込む。例えば、画素データRp、Gp、Bpがいずれも「10101010(2進数)」であり、GsA、GsB、GsCが、「101」、「010」、「101」である場合には、上記第1の実施の形態における復元情報埋込部17bと同様に、画素データRpの下位3ビットにGsAを、Gpの下位3ビットにGsBを、Bpの下位3ビットにGsCをそれぞれ埋め込み、各色の画素データが、Rp「10101101」、Gp「10101010」、Bp「10101101」で構成される復元情報付与合成後画素データを生成する。
The restoration
上記一連の処理を、被写体の撮像領域に対応する全画素に対して行うことで、復元情報付与HDR画像データが生成される。該生成された復元情報付与HDR画像データは、画像保存部18及び表示部19にそれぞれ出力される。
一方、上記のような復元情報付与HDR画像データから復元対象の画像を復元する場合の、画素データ復元部20の動作を説明する。
Restoration information-added HDR image data is generated by performing the above-described series of processing on all the pixels corresponding to the imaging region of the subject. The generated restoration information-added HDR image data is output to the
On the other hand, the operation of the pixel
画素データ復元部20は、復元指示が入力されると、復元対象の復元情報付与HDR画像データを画像保存部18を介して記憶媒体から読み出す。
そして、読み出した復元情報付与HDR画像データに基づき、復元情報付与画素データ毎(画素毎)に、復元対象画素データの復元を行う。
本実施の形態においては、例えば、復元情報付与合成後画素データの各色の画素データRp、Gp、Bpが、それぞれ「10101101(2進数)」、「10101010(2進数)」、「10101101(2進数)」である場合に、これらの下位3ビットが復元情報となるので、Rpに付与されたGsの復元情報GsAは、Rp「10101101」と「00000111」との論理積を演算して「00000101」を抽出し、次に、「00000101」の下位3ビット「101」を左に5ビットシフトして、「10100000」と求めることができる。
When the restoration instruction is input, the pixel
Then, the restoration target pixel data is restored for each restoration information addition pixel data (for each pixel) based on the read restoration information addition HDR image data.
In the present embodiment, for example, pixel data Rp, Gp, and Bp of each color of post-synthesis information-added combined pixel data are “10101101 (binary number)”, “10101010 (binary number)”, and “10101101 (binary number), respectively. ) ”, These lower 3 bits are used as restoration information, so that the restoration information GsA of Gs given to Rp is obtained by calculating a logical product of Rp“ 10101101 ”and“ 00000111 ”. Next, the lower 3 bits “101” of “00000101” are shifted to the left by 5 bits to obtain “10100000”.
また、Gpに付与されたGsの復元情報GsBは、まず、Gp「10101010」と「00000111」との論理積を演算して「00000010」を抽出し、次に、「00000010」の下位3ビットを左に2ビットシフトして、「00001000」と求めることができる。
また、Bpに付与されたGsの復元情報GsCは、まず、Bp「10101101」と「00000111」との論理積を演算して「00000101」を抽出し、次に、「00000101」の下位3ビットを右に1ビットシフトして、「00000010」と求めることができる。ここで、右に1ビットシフトして最下位ビットを削除するのは、分割データの作成時に画素データGsを乗算器などで2倍にして9ビットのデータとして扱っているからである。
In addition, Gs restoration information GsB given to Gp first calculates the logical product of Gp “10101010” and “00000111” to extract “00000010”, and then extracts the lower 3 bits of “00000010”. By shifting 2 bits to the left, “00001000” can be obtained.
Also, the Gs restoration information GsC assigned to Bp first calculates the logical product of Bp “10101101” and “00000111” to extract “00000101”, and then extracts the lower 3 bits of “00000101”. It is possible to obtain “00000010” by shifting 1 bit to the right. Here, the reason why the least significant bit is deleted by shifting 1 bit to the right is that the pixel data Gs is doubled by a multiplier or the like when the divided data is created and treated as 9-bit data.
そして、このようにして求められたGsA、GsB、GsCの論理和を演算することで、復元対象の画素データGs「10101010」を求めることができる。
画素データGsが求まると、更に、該画素データGsと画素データGpとの比「Gs/Gp」を、画素データRp、画素データBpにそれぞれ乗じることで、復元対象の画素データRs(「Rs=Rp×Gs/Gp」)、画素データBs(「Bs=Bp×Gs/Gp」)を求める。
Then, the pixel data Gs “10101010” to be restored can be obtained by calculating the logical sum of GsA, GsB, and GsC thus obtained.
When the pixel data Gs is obtained, the pixel data Rp and the pixel data Bp are multiplied by the ratio “Gs / Gp” between the pixel data Gs and the pixel data Gp, respectively, so that the pixel data Rs (“Rs = Rp × Gs / Gp ”) and pixel data Bs (“ Bs = Bp × Gs / Gp ”).
以上、露光時間T1〜T3にそれぞれ対応する第1〜第3の画素データから、露光時間毎に、周波数成分量(エッジ成分量E1〜E3)を抽出し、該抽出したエッジ成分量の値の大小を比較して、最も値の大きいエッジ成分量に対応した露光時間の画素データを対象画素データとして選択することができる。
また、上記選択した復元対象画素データ(Nビット)の複数色の各色に対応する画素データのうちいずれか一色の画素データを色数Cで分割し、該分割して得られた分割データを(いずれもN/Cビット)を、合成後画素データの各色に対応する画素データの下位「N/C」ビットに埋め込むことで、合成後画素データに復元情報を付与することができる。
As described above, the frequency component amounts (edge component amounts E1 to E3) are extracted for each exposure time from the first to third pixel data corresponding to the exposure times T1 to T3, respectively. By comparing the sizes, pixel data having an exposure time corresponding to the edge component amount having the largest value can be selected as target pixel data.
Further, pixel data of any one of the pixel data corresponding to each of a plurality of colors of the selected restoration target pixel data (N bits) is divided by the number of colors C, and the divided data obtained by the division is ( By embedding N / C bits) in the lower “N / C” bits of the pixel data corresponding to each color of the combined pixel data, restoration information can be added to the combined pixel data.
また、復元情報の付与された画素データから、復元情報として付与した一色に対応する画素データと、合成後画素データの複数色に対応する画素データとを用いて、復元対象の各色の画素データを復元することができる。
以上より、露光時間T1〜T3のうち、先鋭度の最も大きい露光時間の画素データを復元対象画素データとして選択し、この復元対象画素データを復元するための復元情報を合成画素データに付与することができる。
Further, from the pixel data to which the restoration information is added, the pixel data of each color to be restored is obtained by using the pixel data corresponding to one color given as the restoration information and the pixel data corresponding to a plurality of colors of the combined pixel data. Can be restored.
As described above, the pixel data of the exposure time having the highest sharpness among the exposure times T1 to T3 is selected as the restoration target pixel data, and restoration information for restoring the restoration target pixel data is given to the composite pixel data. Can do.
また、復元対象画素データの各色の画素データのうちいずれか一色の画素データを色数で分割したものを復元情報として、合成画素データの各色の画素データの下位ビットに分散して埋め込むようにしたので、合成後画素データの形式を変更せずに復元情報を付与することができる。これにより、復元情報として付与するデータを小さくできると共に、復元情報付与合成後画素データをそのまま汎用のアプリケーションなどで使用できる。 In addition, pixel data of any one color of pixel data of restoration target pixel data divided by the number of colors is used as restoration information, and is distributed and embedded in the lower bits of the pixel data of each color of the synthesized pixel data. Therefore, restoration information can be given without changing the format of post-combination pixel data. As a result, the data to be added as restoration information can be reduced, and the post-synthesis information-added combined pixel data can be used as it is in a general-purpose application.
また、復元情報付与合成画素データから、復元対象の画素データを復元することができるので、合成画像において、重要な被写体の画像がボケていたりした場合に、復元対象画素データを復元し、その復元データから構成される画像を参照したり、該画像の画像データを用いて識別処理などを行ったりすることができる。
上記変形例1において、復元対象画像選択部16は、形態12又は14に記載の復元画像選択手段に対応し、復元情報付与部17は、形態1、6、12及び20のいずれか1に記載の復元情報付与手段又は形態19、21及び22のいずれか1に記載の復元情報付与ステップに対応し、画素データ復元部20は、形態15又は16に記載の画素データ復元手段に対応する。
Further, since the restoration target pixel data can be restored from the restoration information-added synthetic pixel data, the restoration target pixel data is restored and restored when the image of an important subject is blurred in the synthesized image. It is possible to refer to an image composed of data and perform identification processing using image data of the image.
In the first modification, the restoration target
また、上記第1の実施の形態において、撮像システム100における、撮像部10、SW11、第1〜第3メモリ12〜14、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17から構成されるブロックは、形態1、2、3、6、12及び14のいずれか1に記載の撮像装置に対応し、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17から構成されるブロックは、形態20に記載の画像処理装置に対応する。
〔第1の実施の形態の変形例2〕
次に、本発明に係る撮像装置、撮像システム、撮像方法、画像処理装置、画像処理プログラム及び画像処理方法の第1の実施の形態の変形例2を説明する。
In the first embodiment, the
[Modification 2 of the first embodiment]
Next, a second modification of the first embodiment of the imaging apparatus, imaging system, imaging method, image processing apparatus, image processing program, and image processing method according to the present invention will be described.
本変形例2は、R、G、Bの各色に対応する画素データを輝度データと色差データとに分割し、更に、輝度データを3分割して得られたデータを復元情報として、合成後画素データの各色の画素データの下位ビットに埋め込むことで合成後画素データに対して復元情報を付与する点が、上記第1の実施の形態及び上記変形例1と異なる。
また、画素データ復元部20において、復元対象の画素データの復元方法が、上記相違点に伴い上記第1の実施の形態及び上記変形例1と異なる。
In the second modification, pixel data corresponding to each color of R, G, and B is divided into luminance data and color difference data, and further, the data obtained by dividing the luminance data into three is used as restoration information, and the combined pixel The point that restoration information is given to post-combination pixel data by embedding in the lower bits of pixel data of each color of data is different from the first embodiment and the first modification.
Further, in the pixel
具体的に、本変形例1の撮像システム100は、復元情報付与部17及び画素データ復元部20の処理内容が異なる以外は、上記第1の実施の形態の撮像システム100と同様となる。
以下、上記第1の実施の形態と同様の構成部には同じ符号を付して説明を適宜省略し、上記第1の実施の形態と異なる部分を詳細に説明する。
Specifically, the
Hereinafter, the same components as those in the first embodiment are denoted by the same reference numerals, description thereof will be omitted as appropriate, and portions different from those in the first embodiment will be described in detail.
まず、本変形例2における復元情報付与部17について説明する。
なお、本実施の形態においては、各画素データが、R、G、Bの三原色の各色信号に対応する、画素データR(Nビット)、画素データG(Nビット)、画素データB(Nビット)の3種類の画素データをそれぞれ含むものとする。
本変形例2における復元情報生成部17aは、復元対象画像選択部16から復元対象画素データRsGsBsが入力されると、復元対象画素データRsGsBsを構成するR、G、Bの各色に対応する画素データRs、Gs、Bsを、輝度データYと、色差データCb、Crとに分割し、輝度データYを3分割する。
First, the restoration
In this embodiment, each pixel data corresponds to each color signal of the three primary colors of R, G, and B. Pixel data R (N bits), pixel data G (N bits), pixel data B (N bits) ) Of three types of pixel data.
When the restoration target pixel data RsGsBs is input from the restoration target
ここでは、色差データの情報は復元情報として付与しないので、輝度データYのみを、下式(4)に従って求める。
Y=0.30×Rs+0.59×Gs+0.11×Bs ・・・(4)
本実施の形態においては、輝度データY(Nビット)が均等に3分割できないビット数のデータである場合は、輝度データを求める際の係数を倍にするなどして、均等に3分割できるビット数のデータに変換する。例えば、各画素データが8ビットである場合は、下式(5)に示すように、輝度データYを求めるときの係数を2倍にして9ビットの輝度データを求め、該輝度データYを3分割する。
Y=0.60×Rs+1.17×Gs+0.23×Bs ・・・(5)
上記式(4)又は(5)に従って算出した輝度データYを3分割して得られた3種類の分割データYA〜YC(N/3ビット)は復元情報として、復元情報埋込部17bに出力される。なお、輝度データYの上位〜下位に向かって分割データYA、YB、YCとなる。
Here, since the information of the color difference data is not given as the restoration information, only the luminance data Y is obtained according to the following equation (4).
Y = 0.30 × Rs + 0.59 × Gs + 0.11 × Bs (4)
In this embodiment, when the luminance data Y (N bits) is data having a number of bits that cannot be equally divided into three, the bits that can be equally divided into three, for example, by doubling the coefficient used when obtaining the luminance data. Convert to number data. For example, when each pixel data is 8 bits, as shown in the following equation (5), the coefficient for obtaining the luminance data Y is doubled to obtain 9-bit luminance data, and the luminance data Y is set to 3 To divide.
Y = 0.60 × Rs + 1.17 × Gs + 0.23 × Bs (5)
Three types of divided data YA to YC (N / 3 bits) obtained by dividing the luminance data Y calculated according to the above formula (4) or (5) into three are output to the restoration
本変形例2における復元情報埋込部17bは、復元情報生成部17aから分割データYA〜YCが入力されると、該分割データYA〜YCを、合成後画素データRpGpBpを構成する各色の画素データRp、Gp、Bpの下位「N/3」ビットに埋め込むことで、合成後画素データに復元情報を付与する。
具体的に、画素データRpの下位「N/3」ビットに分割データYAを埋め込み、画素データGpの下位「N/3」ビットに分割データYBを埋め込み、画素データBpの下位「N/3」ビットに分割データYCを埋め込む。
When the division information YA to YC is input from the restoration
Specifically, the divided data YA is embedded in the lower “N / 3” bits of the pixel data Rp, the divided data YB is embedded in the lower “N / 3” bits of the pixel data Gp, and the lower “N / 3” of the pixel data Bp. The divided data YC is embedded in the bits.
このようにして、分割データYA〜YCが埋め込まれた画素データRp、Gp、Bpは、復元情報付与合成後画素データとして、画像保存部18及び表示部19にそれぞれ出力される。
次に、本変形例2における画素データ復元部20について説明する。
本変形例2における画素データ復元部20は、画像保存部18から復元情報付与合成後画素データを取得すると、該復元情報付与合成後画素データに含まれる各色の画素データRp、Gp、Bpに含まれる復元情報に基づき、復元対象の輝度データYを復元する。また、本実施の形態においては、復元対象のカラー画像を、モノクロ画像として復元する。
In this way, the pixel data Rp, Gp, and Bp in which the divided data YA to YC are embedded are output to the
Next, the pixel
When the pixel
具体的には、復元情報付与合成後画素データRp、Gp、Bpの下位「N/3」ビットに復元情報YA、YB、YCがそれぞれ埋め込まれているので、上記第1の実施の形態の変形例1と同様の方法で、輝度データYを求めることができる。この輝度データYが復元対象のモノクロ画像データとなる。
以上、復元対象画素データのR、G、Bの各色に対応する画素データ(Nビット)を、輝度データY及び色差データCb、Crに分割し、輝度データYを3分割し、該分割して得られた分割データYA〜YC(いずれもN/Cビット)を、合成後画素データの各色に対応する画素データの下位「N/C」ビットに埋め込むことで、合成後画素データに復元情報を付与することができる。
Specifically, the restoration information YA, YB, and YC are embedded in the lower “N / 3” bits of the restoration-information-added combined pixel data Rp, Gp, and Bp, respectively. Luminance data Y can be obtained in the same manner as in Example 1. This luminance data Y becomes the monochrome image data to be restored.
As described above, the pixel data (N bits) corresponding to the R, G, and B colors of the restoration target pixel data is divided into the luminance data Y and the color difference data Cb, Cr, and the luminance data Y is divided into three. By embedding the obtained divided data YA to YC (all N / C bits) in the lower “N / C” bits of the pixel data corresponding to each color of the combined pixel data, restoration information is added to the combined pixel data. Can be granted.
また、復元情報の付与された画素データから、復元情報として付与した輝度データを復元することで、復元対象のモノクロ画素データを復元することができる。
以上より、復元対象画素データの各色の画素データから求めた輝度データを3分割したものを復元情報として、合成画素データの各色の画素データの下位ビットに分散して埋め込むようにしたので、復元対象の画像の輝度情報を損失無く復元情報として付与できると共に、復元情報付与合成後画素データを、形式変換等せずにそのまま汎用のアプリケーションなどで使用できる。
Further, by restoring the luminance data given as the restoration information from the pixel data to which the restoration information is given, it is possible to restore the monochrome pixel data to be restored.
As described above, since the luminance data obtained from the pixel data of each color of the restoration target pixel data is divided into three as restoration information, it is distributed and embedded in the lower bits of the pixel data of each color of the composite pixel data. The luminance information of the image can be given as restoration information without loss, and the post-synthesis information-added combined pixel data can be used as it is in a general-purpose application without format conversion.
また、復元情報付与合成画素データから、復元対象の画素データを復元することができるので、合成画像において、重要な被写体の画像がボケていたりした場合に、復元対象画素データを復元し、その復元データから構成される画像を参照したり、該画像の画像データを用いて識別処理などを行ったりすることができる。
上記変形例2において、復元情報付与部17は、形態1、7、12及び20のいずれか1に記載の復元情報付与手段又は形態19、21及び22のいずれか1に記載の復元情報付与ステップに対応し、画素データ復元部20は、形態15又は17に記載の画素データ復元手段に対応する。
Further, since the restoration target pixel data can be restored from the restoration information-added synthetic pixel data, the restoration target pixel data is restored and restored when the image of an important subject is blurred in the synthesized image. It is possible to refer to an image composed of data and perform identification processing using image data of the image.
In the second modification, the restoration
また、上記変形例2において、撮像システム100における、撮像部10、SW11、第1〜第3メモリ12〜14、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17から構成されるブロックは、形態1、2、3、7、12及び14のいずれか1に記載の撮像装置に対応し、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17から構成されるブロックは、形態20に記載の画像処理装置に対応する。
In the second modification, the
〔第2の実施の形態〕
以下、本発明の第2の実施の形態を図面に基づき説明する。図11〜図13は、本発明に係る撮像装置、撮像システム、撮像方法、画像処理装置、画像処理プログラム及び画像処理方法の第2の実施の形態を示す図である。
[Second Embodiment]
Hereinafter, a second embodiment of the present invention will be described with reference to the drawings. 11 to 13 are diagrams showing a second embodiment of an imaging apparatus, an imaging system, an imaging method, an image processing apparatus, an image processing program, and an image processing method according to the present invention.
上記第1の実施の形態、上記変形例1及び上記変形例2においては、復元対象画素データの情報を圧縮又は分割したものを復元情報として、合成後画素データに付与しているのに対して、本実施の形態は、所定ビット列から構成される検出ビット列に対応付けて差分情報が登録された差分情報テーブルを有し、復元対象画素データを復元するための差分情報に対応する検出ビット列を復元情報として、合成後画素データに付与する点が異なる。 In the first embodiment, the first modification, and the second modification, information obtained by compressing or dividing the information of the restoration target pixel data is given to the post-combination pixel data as restoration information. The present embodiment has a difference information table in which difference information is registered in association with a detection bit string made up of a predetermined bit string, and restores the detection bit string corresponding to the difference information for restoring the restoration target pixel data. The difference is that the information is added to the combined pixel data.
具体的に、本実施の形態の撮像システム200は、上記第1の実施の形態の撮像システム100において、復元情報付与部17が、本実施の形態の動作処理に対応した復元情報付与部21に変更され、差分情報テーブル記憶部22が追加され、更に、こられの変更及び追加に応じて画素データ復元部20の処理内容が異なり、それ以外は、上記第1の実施の形態の撮像システム100と同様となる。
Specifically, in the
以下、上記第1の実施の形態と同様の構成部には同じ符号を付して説明を適宜省略し、上記第1の実施の形態と異なる部分を詳細に説明する。
まず、図11に基づき、本実施の形態の撮像システム200の構成を説明する。
ここで、図11は、撮像システム200の構成を示すブロック図である。
撮像システム200は、図11に示すように、撮像部10と、スイッチ(SW)11と、第1〜第3メモリ12〜14と、画素データ合成部15と、復元対象画像選択部16と、差分情報テーブルに基づき復元対象の画素データの復元情報を合成後画素データに付与する復元情報付与部21と、差分情報テーブルを記憶する差分情報テーブル記憶部22と、画像保存部18と、表示部19と、差分情報テーブルに基づき復元対象の画素データを復元する画素データ復元部20と、を含んで構成される。
Hereinafter, the same components as those in the first embodiment are denoted by the same reference numerals, description thereof will be omitted as appropriate, and portions different from those in the first embodiment will be described in detail.
First, based on FIG. 11, the structure of the
Here, FIG. 11 is a block diagram illustrating a configuration of the
As shown in FIG. 11, the
復元情報付与部21は、図12に示すように、復元情報生成部21aと、復元情報埋込部21bとを含んで構成される。
ここで、図12は、復元情報付与部21の詳細な構成を示すブロック図である。
復元情報生成部21aは、画素データ合成部15から入力された合成後画素データと、復元対象画像選択部16から入力された復元対象画素データと、差分情報テーブル記憶部22に記憶された差分情報テーブルとに基づき、復元対象画素データを復元するための復元情報を生成する。
As shown in FIG. 12, the restoration
Here, FIG. 12 is a block diagram illustrating a detailed configuration of the restoration
The restoration information generation unit 21 a includes post-combination pixel data input from the pixel
本実施の形態においては、具体的に、画素データが単色のデータであれば、まず、復元対象画素データS(Nビット)と、合成後画素データP(Nビット)とに基づき差分情報を生成する。
具体的に、復元対象画素データSと合成後画素データPとの絶対的な差分量を差分情報とする場合は、「絶対差分量α=S−P」を演算で求める。また、復元対象画素データSと合成後画素データPとの相対的な差分量を差分情報とする場合は、「相対差分量β=S/P」を演算で求める。
In the present embodiment, specifically, if the pixel data is monochromatic data, first, difference information is generated based on the restoration target pixel data S (N bits) and the combined pixel data P (N bits). To do.
Specifically, when the absolute difference amount between the restoration target pixel data S and the combined pixel data P is used as the difference information, “absolute difference amount α = S−P” is obtained by calculation. When the relative difference between the restoration target pixel data S and the combined pixel data P is used as difference information, “relative difference amount β = S / P” is obtained by calculation.
また、画素データがR、G、Bなどの各色に対応したデータであれば、復元対象画素データの各色に対応した画素データRs、Gs、Bs(Nビット)と、合成後画素データの各色に対応した画素データRp、Gp、Bp(Nビット)との色毎の差分情報を求める。
更に、復元情報生成部21aは、差分情報テーブルの各差分情報と、上記演算で求めた差分情報とを比較し、該差分情報と最も近い差分情報に対応付けられた検出ビット列(NCビット(NC<N))を取得する。そして、該取得した検出ビット列を復元情報として、復元情報埋込部21bに出力する。
If the pixel data is data corresponding to each color such as R, G, B, etc., the pixel data Rs, Gs, Bs (N bits) corresponding to each color of the restoration target pixel data and each color of the combined pixel data Difference information for each color from corresponding pixel data Rp, Gp, Bp (N bits) is obtained.
Furthermore, the restoration information generation unit 21a compares each difference information in the difference information table with the difference information obtained by the above calculation, and detects a bit string (NC bit (NC bit (NC <N)). Then, the acquired detection bit string is output to the restoration
復元情報埋込部21bは、復元情報生成部21aから入力された復元情報を、画素データ合成部15から入力された合成後画素データに埋め込む。
具体的に、復元情報埋込部21bは、上記第1の実施の形態の復元情報埋込部17bと同様に、合成後画素データの下位NCビットのデータを、復元情報のNCビットのデータに入れ替える。これにより、復元情報の付与された復元情報付与合成後画素データが生成される。該生成された復元情報付与合成後画素データは、画像保存部18及び表示部19にそれぞれ出力される。
The restoration
Specifically, similarly to the restoration
図11に戻って、差分情報テーブル記憶部22は、NCビットのビット列から構成される各検出ビット列に対応付けて、差分情報(画素データの階調範囲に応じた離散的な絶対差分量又は相対差分量の情報)が記憶された差分情報テーブルを記憶する。
画素データ復元部20は、復元指示に応じて画像保存部18から復元情報付与合成後画素データを取得し、該取得した復元情報付与合成後画素データに含まれる検出ビット列を抽出し、該抽出した検出ビット列に対応する差分情報を、差分情報テーブル記憶部22に記憶された差分情報テーブルから取得する。
Returning to FIG. 11, the difference information
The pixel
更に、画素データ復元部20は、上記取得した差分情報と合成後画素データとから復元対象画素データSを復元する。
具体的に、差分情報が絶対差分量αであれば「S=P+α」を演算して復元対象画素データSを復元する。また、差分情報が相対差分量βであれば「S=P×β」を演算することで復元対象画素データSを復元する。
Further, the pixel
Specifically, if the difference information is the absolute difference amount α, “S = P + α” is calculated to restore the restoration target pixel data S. If the difference information is the relative difference amount β, the restoration target pixel data S is restored by calculating “S = P × β”.
なお、一般的に、合成前の画像は、合成後の画像と比較して暗い画像となるため、差分情報テーブルには、なるべく負の係数(復元時に輝度を減少させる値)を持たせることが望ましい。
ここで、撮像システム200の上記各構成部の機能は、ハードウェアのみ、ソフトウェアのみ、ハードウェアとソフトウェアとの組み合わせのいずれかで実現される。従って、撮像システム200は、ソフトウェアを用いて機能を実現する構成部がある場合に、図示していないが、ソフトウェアを実行するためのプロセッサ、ソフトウェアを記憶するためのROM等の記憶媒体、ソフトウェアの実行に用いるRAM等の記憶媒体、各構成部とのデータの授受を行うためのバスなどを備える。
In general, an image before synthesis is darker than an image after synthesis. Therefore, the difference information table may have a negative coefficient as much as possible (a value for reducing luminance at the time of restoration). desirable.
Here, the function of each component of the
また、上記各構成部は、1つの装置内に全てが含まれる構成(この場合は、撮像装置=撮像システムとなる)としても良いし、撮像部10、SW11、第1〜第3メモリ12〜14、画素データ合成部15、復元対象画像選択部16、復元情報付与部21及び差分情報テーブル記憶部22を1つの装置内で構成(この場合は、撮像装置に対応する)し、画像保存部18、表示部19及び画素データ復元部20は1つ又は複数の装置で構成しても良い。後者の場合は、撮像装置と、画像保存部18、表示部19及び画素データ復元部20とは、有線又は無線で接続する。
In addition, each of the above-described components may be configured so as to be entirely included in one device (in this case, an imaging device = an imaging system), or the
次に、図13に基づき、本実施の形態の動作を説明する。
ここで、図13は、差分情報テーブルの一例を示す図である。
なお、復元対象画像選択部16までの動作は、上記第1の実施の形態と同様となるので説明を省略する。
以下、復元情報付与部21の動作から説明する。
Next, the operation of the present embodiment will be described with reference to FIG.
Here, FIG. 13 is a diagram illustrating an example of the difference information table.
Since the operation up to the restoration target
Hereinafter, the operation of the restoration
なお、ここでは、画素データはモノクロのデータであるとする。
復元情報付与部21は、復元対象画像選択部16から復元対象画素データ(ここでは、第2画素データとする)が入力され、画素データ合成部15から合成後画素データが入力されると、まず、復元情報生成部21aにおいて、復元対象画素データと、合成後画素データとに基づき差分情報を生成する。
Here, it is assumed that the pixel data is monochrome data.
When the restoration target pixel data (here, referred to as second pixel data) is input from the restoration target
例えば、合成後画素データPの画素値が「140」、復元対象画素データSの画素値が「85」であったとすると、絶対差分量αは「α=85−140=−55」となり、相対差分量βは「β=85/140≒61[%]」となる。
次に、復元情報生成部21aは、上記生成した差分情報と、差分情報テーブルの差分情報とを比較して、最も近い値を有する差分情報に対応した検出ビット列を、復元情報として取得する。
For example, when the pixel value of the post-combination pixel data P is “140” and the pixel value of the restoration target pixel data S is “85”, the absolute difference amount α is “α = 85−140 = −55”, The difference amount β is “β = 85 / 140≈61 [%]”.
Next, the restoration information generation unit 21a compares the generated difference information with the difference information in the difference information table, and acquires a detection bit string corresponding to the difference information having the closest value as restoration information.
ここで、差分情報テーブルが、3ビットの検出ビット列に対して、図13に示すような絶対差分量又は相対差分量を有しているとする。
αが「−55」の場合は、図13に示すように、「−64」が最も近い値となっているので、復元情報生成部21aは、差分情報テーブル記憶部22に記憶された差分情報テーブルから、「−64」に対応する検出ビット列「100」を復元情報として取得する。
Here, it is assumed that the difference information table has an absolute difference amount or a relative difference amount as shown in FIG. 13 with respect to a 3-bit detection bit string.
When α is “−55”, since “−64” is the closest value as shown in FIG. 13, the restoration information generation unit 21 a stores the difference information stored in the difference information
また、βが「61[%]」の場合は、図13に示すように、「50[%]」が最も近い値となっているので、復元情報生成部21aは、差分情報テーブル記憶部22に記憶された差分情報テーブルから、「50[%]」に対応する「101」を復元情報として取得する。
従って、差分情報を絶対差分量αとした場合は「100」が、差分情報を相対差分量βとした場合は「101」が復元情報として、復元情報埋込部21bに出力される。
Further, when β is “61 [%]”, as shown in FIG. 13, “50 [%]” is the closest value, so that the restoration information generation unit 21 a performs the difference information
Accordingly, when the difference information is the absolute difference amount α, “100” is output to the restoration
復元情報埋込部21bは、復元情報生成部21aから復元情報が入力されると、合成後画素データ「10001100(2進数)」の下位3ビットを、該入力された復元情報(3ビット)に入れ替える。この具体的な方法は、上記第1の実施の形態と同様となるので説明を省略する。
なお、第1〜第3画素データがカラーデータである場合は、各色の色信号に対応した画素データに対して、上記モノクロデータと同様の処理を行う。具体的に、第1〜第3画素データが、例えば、R、G、Bの三原色に対応する3種類の画素データを含んでいるときに、上記モノクロデータのときと同様に、R、G、B各色の画素データと、合成後画素データにおけるR、G、B各色の画素データとの差分情報を色毎に生成し、該生成した差分情報に対応する検出ビット列(例えば、3ビット)を差分情報テーブルから取得し、該取得した検出ビット列を、合成後画素データにおける各色の画素データの下位3ビットに、同じ色同士でそれぞれ埋め込む。
When the restoration information is input from the restoration information generation unit 21a, the restoration
When the first to third pixel data is color data, the same processing as the monochrome data is performed on the pixel data corresponding to the color signal of each color. Specifically, when the first to third pixel data include, for example, three types of pixel data corresponding to the three primary colors R, G, and B, as in the case of the monochrome data, R, G, Difference information between the pixel data of each B color and the pixel data of each R, G, B color in the combined pixel data is generated for each color, and a detection bit string (for example, 3 bits) corresponding to the generated difference information is set as a difference. Obtained from the information table, the obtained detection bit string is embedded in the lower 3 bits of the pixel data of each color in the post-combination pixel data with the same color.
上記一連の処理を、被写体の撮像領域に対応する全画素に対して行うことで、広ダイナミックレンジで且つ復元情報が付与され画像データ(以下、復元情報付与HDR画像データと称す)が生成される。該生成された復元情報付与HDR画像データは、表示部19に出力されると共に、画像保存部18に出力される。
一方、上記のような復元情報付与HDR画像データから復元対象の画像を復元する場合の、画素データ復元部20の動作を説明する。
By performing the above-described series of processing for all the pixels corresponding to the imaging region of the subject, image data (hereinafter referred to as restoration information-added HDR image data) with a wide dynamic range and the restoration information is generated. . The generated restoration information-added HDR image data is output to the
On the other hand, the operation of the pixel
画素データ復元部20は、復元指示が入力されると、復元対象の復元情報付与HDR画像データを画像保存部18を介して記憶媒体から読み出す。
そして、読み出した復元情報付与HDR画像データに基づき、復元情報付与画素データ毎(画素毎)に、復元対象画素データの復元を行う。
復元情報付与画素データの下位3ビットには、差分情報テーブルに対応した検出ビットが埋め込まれているので、画素データ復元部20は、まず検出ビットを抽出する。
When the restoration instruction is input, the pixel
Then, the restoration target pixel data is restored for each restoration information addition pixel data (for each pixel) based on the read restoration information addition HDR image data.
Since the detection bits corresponding to the difference information table are embedded in the lower 3 bits of the restoration information-added pixel data, the pixel
ここでは、絶対差分量αに対応する検出ビット列「100」が抽出されたとする。
次に、この抽出した検出ビット列「100」を用いて、図13に示すような絶対差分量を有する差分情報テーブルを検索する。これにより、図13に示すように、「100」に対応する絶対差分量「−64」が索出される。
復元情報に対応する絶対差分量αが索出されると、索出された該絶対差分量α「−64」と、合成後画素データP「140」とから、復元対象画素データS「S=P+α=140−64=76」を復元する。
Here, it is assumed that the detected bit string “100” corresponding to the absolute difference amount α is extracted.
Next, using the extracted detection bit string “100”, a difference information table having an absolute difference amount as shown in FIG. 13 is searched. Thereby, as shown in FIG. 13, the absolute difference amount “−64” corresponding to “100” is searched.
When the absolute difference amount α corresponding to the restoration information is retrieved, the restoration target pixel data S “S = P + α is obtained from the retrieved absolute difference amount α“ −64 ”and the combined pixel data P“ 140 ”. = 140−64 = 76 ”is restored.
一方、相対差分量βに対応する検出ビット列「101」が抽出された場合は、この抽出した検出ビット列「101」を用いて、図13に示すような絶対差分量を有する差分情報テーブルを検索する。これにより、図13に示すように、「101」に対応する相対差分量「50[%]」が索出される。
復元情報に対応する相対差分量βが索出されると、索出された該相対差分量β「50[%]」と、合成後画素データP「140」とから、復元対象画素データS「S=P×β=140×0.5=70」を復元する。
On the other hand, when the detected bit string “101” corresponding to the relative difference amount β is extracted, the difference information table having the absolute difference amount as shown in FIG. 13 is searched using the extracted detected bit string “101”. . Thereby, as shown in FIG. 13, the relative difference amount “50 [%]” corresponding to “101” is searched.
When the relative difference amount β corresponding to the restoration information is retrieved, the restoration target pixel data S “S” is obtained from the retrieved relative difference amount β “50 [%]” and the combined pixel data P “140”. = P × β = 140 × 0.5 = 70 ”is restored.
以上より、復元対象画素データの画素データと、合成後画素データとの差分情報を生成し、該生成した差分情報に最も近い値の、差分情報テーブルに記憶された差分情報に対応する検出ビット列を復元情報として、合成画素データの下位ビットに埋め込むことで、復元対象の画素データの復元情報を、合成後画素データに付与することができる。
これにより、差分情報テーブルの設定内容次第で、復元対象の画像を精度良く復元できる復元情報を付与できると共に、差分情報によってテーブルを構成することで画素データそのものを用いるよりもテーブルの容量を低減することができる。また、復元情報を合成後画素データの下位ビットに埋め込む構成としたので、復元情報付与合成後画素データを、形式変換等せずにそのまま汎用のアプリケーションなどで使用できる。
As described above, the difference information between the pixel data of the restoration target pixel data and the combined pixel data is generated, and the detection bit string corresponding to the difference information stored in the difference information table having the value closest to the generated difference information is obtained. By embedding the restoration information in the lower bits of the combined pixel data, the restoration information of the pixel data to be restored can be added to the combined pixel data.
Thereby, depending on the setting contents of the difference information table, restoration information that can restore the restoration target image with high accuracy can be given, and the table capacity can be reduced rather than using the pixel data itself by configuring the table with the difference information. be able to. Further, since the restoration information is embedded in the lower bits of the post-combination pixel data, the post-synthesis information-added post-combination pixel data can be used as it is in a general-purpose application without format conversion.
また、復元情報(検索ビット列)を検索キーとして、差分情報テーブルを検出し、検索キーに対応する差分情報を取得して、該取得した差分情報と、合成後画素データとから復元対象の画素データを復元することができる。
合成画像において、重要な被写体の画像がボケていたりした場合に、復元対象画素データを復元し、その復元データから構成される画像を参照したり、該画像の画像データを用いて識別処理などを行ったりすることができる。
Further, using the restoration information (search bit string) as a search key, the difference information table is detected, the difference information corresponding to the search key is obtained, and the pixel data to be restored is obtained from the obtained difference information and the combined pixel data. Can be restored.
When the image of an important subject is blurred in the composite image, the restoration target pixel data is restored, an image composed of the restoration data is referred to, and an identification process is performed using the image data of the image. Can go.
上記第2の実施の形態において、復元情報付与部21は、形態1、8、12及び20のいずれか1に記載の復元情報付与手段又は形態19、21及び22のいずれか1に記載の復元情報付与ステップに対応し、画素データ復元部20は、形態15又は17に記載の画素データ復元手段に対応する。
また、上記第2の実施の形態において、撮像システム100における、撮像部10、SW11、第1〜第3メモリ12〜14、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17から構成されるブロックは、形態1、2、3、8、12及び14のいずれか1に記載の撮像装置に対応し、画素データ合成部15、復元対象画像選択部16及び復元情報付与部17から構成されるブロックは、形態20に記載の画像処理装置に対応する。
In the second embodiment, the restoration
In the second embodiment, the
〔第2の実施の形態の変形例〕
次に、図14〜図17に基づき、本発明に係る撮像装置、撮像システム、撮像方法、画像処理装置、画像処理プログラム及び画像処理方法の第2の実施の形態の変形例を説明する。
[Modification of Second Embodiment]
Next, a modification of the second embodiment of the imaging apparatus, imaging system, imaging method, image processing apparatus, image processing program, and image processing method according to the present invention will be described with reference to FIGS.
本変形例は、復元情報を生成及び付与する前処理として、復元対象の画像(以下、復元対象画像と称す)の明るさを合成後の画像(以下、合成画像と称す)の明るさに近似する処理を行うことで、差分情報テーブルを構成する絶対差分量α及び相対差分量βの値をより細かい値にした点が上記第2の実施の形態と異なる。
具体的に、本変形例の撮像システム200’は、上記第2の実施の形態の撮像システム200に、上記明るさを近似する処理を行う近似部23を追加し、更に、差分情報テーブル記憶部22に記憶される差分情報テーブルが近似部23の近似内容に応じたものとなっている。
In this modification, as preprocessing for generating and assigning restoration information, the brightness of an image to be restored (hereinafter referred to as a restoration target image) is approximated to the brightness of an image after synthesis (hereinafter referred to as a synthesized image). This is different from the second embodiment in that the absolute difference amount α and the relative difference amount β constituting the difference information table are made finer by performing the process.
Specifically, the
以下、上記第1及び第2の実施の形態と同様の構成部には同じ符号を付して説明を適宜省略し、上記第1及び第2の実施の形態と異なる部分を詳細に説明する。
まず、図14に基づき、本実施の形態の撮像システム200’の構成を説明する。
ここで、図14は、撮像システム200’の構成を示すブロック図である。
撮像システム200’は、図14に示すように、撮像部10と、スイッチ(SW)11と、第1〜第3メモリ12〜14と、画素データ合成部15と、復元対象画像選択部16と、復元情報付与部21と、差分情報テーブル記憶部22と、復元対象画像の明るさを合成画像の明るさに近似させる近似部23と、画像保存部18と、表示部19と、画素データ復元部20と、を含んで構成される。
Hereinafter, the same components as those in the first and second embodiments are denoted by the same reference numerals, description thereof will be omitted as appropriate, and portions different from those in the first and second embodiments will be described in detail.
First, the configuration of the
Here, FIG. 14 is a block diagram showing a configuration of the
As illustrated in FIG. 14, the
近似部23は、復元対象画像選択部16から入力された復元対象画素データを補正することで画像の入出力特性を調整し、復元対象画像の明るさを合成画像の明るさに近似させる。
本実施の形態において、近似部23は、第1の明るさ近似処理として、復元対象画素データから生成される復元対象画像のガンマ値を調整することで、復元対象画像の明るさを合成画像の明るさに近似させる処理を実行することができる。
The approximating
In the present embodiment, as the first brightness approximation process, the approximating
更に、近似部23は、第2の明るさ近似処理として、復元対象画素データから生成される復元対象画像のゲインを調整することで、復元対象画像の明るさを合成画像の明るさに近似させる処理を実行することができる。
ここで、撮像システム200’の上記各構成部の機能は、ハードウェアのみ、ソフトウェアのみ、ハードウェアとソフトウェアとの組み合わせのいずれかで実現される。従って、撮像システム200’は、ソフトウェアを用いて機能を実現する構成部がある場合に、図示していないが、ソフトウェアを実行するためのプロセッサ、ソフトウェアを記憶するためのROM等の記憶媒体、ソフトウェアの実行に用いるRAM等の記憶媒体、各構成部とのデータの授受を行うためのバスなどを備える。
Further, as the second brightness approximation process, the approximating
Here, the function of each component of the
また、上記各構成部は、1つの装置内に全てが含まれる構成(この場合は、撮像装置=撮像システムとなる)としても良いし、撮像部10、SW11、第1〜第3メモリ12〜14、画素データ合成部15、復元対象画像選択部16、復元情報付与部21、差分情報テーブル記憶部22及び近似部23を1つの装置内で構成(この場合は、撮像装置に対応する)し、画像保存部18、表示部19及び画素データ復元部20は1つ又は複数の装置で構成しても良い。後者の場合は、撮像装置と、画像保存部18、表示部19及び画素データ復元部20とは、有線又は無線で接続する。また、後者の場合に、差分情報テーブル記憶部22を別々に有する構成としても良い。
In addition, each of the above-described components may be configured so as to be entirely included in one device (in this case, an imaging device = an imaging system), or the
次に、図15に基づき、近似部23における第1の明るさ近似処理の流れを説明する。なお、第1の明るさ近似処理は、プロセッサによって、ROM等の記憶媒体に記憶された専用のプログラムを実行することで実現される処理である。
ここで、図15は、第1の明るさ近似処理を示すフローチャートである。
第1の明るさ近似処理が開始されると、図15に示すように、まずステップS100に移行し、近似部23において、暫定ガンマに対応する変数γTに「0.1」を代入して、ステップS102に移行する。
Next, the flow of the first brightness approximation process in the
Here, FIG. 15 is a flowchart showing the first brightness approximation process.
When the first brightness approximation process is started, as shown in FIG. 15, first, the process proceeds to step S100, and the
ステップS102では、近似部23において、最小値に対応する変数minに、最小値のとり得る最大値(最大階調値×画素数)よりも大きい値を代入して、ステップS104に移行する。
ステップS104では、近似部23において、復元対象画像の画像データに対する、ガンマ調整後の復元対象の画素値に対応する変数S’(x,y)に、ガンマ調整前の復元対象の画素値S(x,y)をγT乗した値(SγT)を代入して、ステップS106に移行する。
In step S102, the
In step S104, the
ステップS106では、近似部23において、復元対象画像の画像データに対する、ガンマ調整後の復元対象の画素値に対応した変数S’(x,y)の値と、合成後画素データP(x,y)との差分値の絶対値の合計値を算出し、該算出値を差分量に対応する変数dqに代入して、ステップS108に移行する。
ステップS108では、近似部23において、差分量に対応する変数dqの値が、変数minの値よりも小さいか否かを判定し、小さいと判定したときは、ステップS110に移行し、そうでない場合(No)は、ステップS114に移行する。
In step S106, in the
In step S108, the
ステップS110に移行した場合は、近似部23において、変数minに変数dqの値を代入して、ステップS112に移行する。
ステップS112では、近似部23において、ガンマに対応する変数γに、暫定ガンマに対応する変数γTの値を代入して、ステップS114に移行する。
ステップS114では、近似部23において、変数γTの値が「10」になったか否かを判定し、「10」になったと判定したときは、ステップS116に移行し、そうでない場合(No)は、ステップS118に移行する。
When the process proceeds to step S110, the
In step S112, the
In step S114, the approximating
ステップS116に移行した場合は、近似部23において、ガンマ調整後の復元対象の画素値に対応する変数S’(x,y)に、ガンマ調整前の復元対象の画素値S(x,y)の値を変数γの値乗した値(Sγ)を代入して、処理を終了する。
一方、ステップS118に移行した場合は、近似部23において、変数γTに、現在のγTの値に0.1を加算した値を代入して、ステップS104に移行する。
When the process proceeds to step S116, the
On the other hand, when the process proceeds to step S118, the
次に、図16に基づき、近似部23における第2の明るさ近似処理の流れを説明する。なお、第2の明るさ近似処理は、プロセッサによって、ROM等の記憶媒体に記憶された専用のプログラムを実行することで実現される処理である。
ここで、図16は、第2の明るさ近似処理を示すフローチャートである。
第2の明るさ近似処理が開始されると、図16に示すように、まずステップS200に移行し、近似部23において、暫定ゲインに対応する変数GTに「0.1」を代入して、ステップS202に移行する。
Next, the flow of the second brightness approximation process in the
FIG. 16 is a flowchart showing the second brightness approximation process.
When the second brightness approximation process is started, as shown in FIG. 16, the process first proceeds to step S200, and the
ステップS202では、近似部23において、最小値に対応する変数minに、最小値のとり得る最大値(最大階調値×画素数)よりも大きい値を代入して、ステップS204に移行する。
ステップS204では、近似部23において、復元対象画像の画像データに対する、ガンマ調整後の復元対象の画素値に対応する変数S’(x,y)に、ゲイン調整前の復元対象の画素値S(x,y)に変数GTの値を乗じた値(S×GT)を代入して、ステップS206に移行する。
In step S202, the approximating
In step S204, the
ステップS206では、近似部23において、復元対象画像の画像データに対する、ゲイン調整後の復元対象の画素値に対応した変数S’(x,y)の値と、合成後画素データP(x,y)との差分値の絶対値の合計値を算出し、該算出値を差分量に対応する変数dqに代入して、ステップS208に移行する。
ステップS208では、近似部23において、変数dqの値が、変数minの値よりも小さいか否かを判定し、小さいと判定したときは、ステップS210に移行し、そうでない場合(No)は、ステップS214に移行する。
In step S206, in the
In step S208, the approximating
ステップS210に移行した場合は、近似部23において、変数minに変数dqの値を代入して、ステップS212に移行する。
ステップS212では、近似部23において、ゲインに対応する変数Gに、暫定ゲインに対応する変数GTの値を代入して、ステップS214に移行する。
ステップS214では、近似部23において、変数GTの値が「10」になったか否かを判定し、「10」になったと判定したときは、ステップS216に移行し、そうでない場合(No)は、ステップS218に移行する。
When the process proceeds to step S210, the
In step S212, the
In step S214, the approximating
ステップS216に移行した場合は、近似部23において、ゲイン調整後の復元対象の画素値に対応する変数S’(x,y)に、ゲイン調整前の復元対象の画素値S(x,y)の値にゲインに対応する変数Gの値を乗じた値(S×G)を代入して、処理を終了する。
一方、ステップS218に移行した場合は、近似部23において、変数GTに、現在のGTの値に0.1を加算した値を代入して、ステップS204に移行する。
When the process proceeds to step S216, the
On the other hand, when the process proceeds to step S218, the
次に、図17に基づき、本実施の形態の動作を説明する。
ここで、図17は、明るさ近似処理を前提にした差分情報テーブルの一例を示す図である。
ここで、復元対象画像選択部16までの動作は、上記第1の実施の形態と同様となるので説明を省略する。
Next, the operation of the present embodiment will be described based on FIG.
Here, FIG. 17 is a diagram illustrating an example of the difference information table based on the brightness approximation process.
Here, since the operation up to the restoration target
以下、近似部23の動作から説明する。
まず、第1の近似処理の実際の動作を説明する。
ここでは、画素データが8ビットの階調値(0〜255)を有することとする。
近似部23は、画素データ合成部15から合成後画素データが入力され、復元対象画像選択部16から復元対象画素データが入力されると、暫定ガンマに対応する変数γTに初期値「0.1」を代入し(ステップS100)、最小値に対応する変数minに、初期値として、ここでは「255×復元対象画像の画素数」よりも大きな値を代入する(ステップS102)。
Hereinafter, the operation of the approximating
First, the actual operation of the first approximation process will be described.
Here, it is assumed that the pixel data has an 8-bit gradation value (0 to 255).
When the synthesized pixel data is input from the pixel
次に、復元対象画像の各復元対象画素データS(x,y)の値(輝度値)をγTの値乗した値(255×(S(x,y)/255)0.1)を算出し、該算出値を、ガンマ調整後の復元対象画素データに対応する変数S’(x,y)に代入する(ステップS104)。この処理は、復元対象画像の全画素に対して行う。
復元対象画像の全画素に対する現在の暫定ガンマによる調整後の画素値が算出されると、次に、復元対象画像のガンマ調整後の復元対象画素データS’(x,y)の値と、合成後画素データP(x,y)の値との差分値を算出する。具体的に、同じ画素位置の両者の画素値の差分値(S’(x,y)−P(x,y))を全画素分算出する。そして、これら全画素分の差分値の絶対値の総和(合計)を算出し、該算出値を差分量として変数dqに代入する(ステップS106)。
Next, a value (255 × (S (x, y) / 255) 0.1 ) obtained by multiplying the value (luminance value) of each restoration target pixel data S (x, y) of the restoration target image by the value of γT is calculated. The calculated value is substituted into a variable S ′ (x, y) corresponding to restoration target pixel data after gamma adjustment (step S104). This process is performed for all the pixels of the restoration target image.
Once the pixel values after adjustment by the current provisional gamma for all the pixels of the restoration target image are calculated, next, the values of the restoration target pixel data S ′ (x, y) after the gamma adjustment of the restoration target image are combined. A difference value from the value of the rear pixel data P (x, y) is calculated. Specifically, a difference value (S ′ (x, y) −P (x, y)) between both pixel values at the same pixel position is calculated for all pixels. Then, the sum (absolute) of the absolute values of the difference values for all the pixels is calculated, and the calculated value is substituted into the variable dq as the difference amount (step S106).
そして、変数dqの値が、変数minの値よりも小さいか否かを判定する(ステップS108)。現時点では、変数minに初期値が代入されているので、必ず変数dqの値が小さくなる(ステップS108の「Yes」の分岐)。従って、変数minに、変数dqの値を代入し(ステップS110)、変数γに現在の変数γTの値「0.1」を代入する(ステップS112)。 Then, it is determined whether or not the value of the variable dq is smaller than the value of the variable min (step S108). At present, since the initial value is assigned to the variable min, the value of the variable dq is always small (the branch of “Yes” in step S108). Accordingly, the value of the variable dq is substituted for the variable min (step S110), and the current value of the variable γT “0.1” is substituted for the variable γ (step S112).
次に、変数γTの値が「10」になったか否かを判定する(ステップS114)。現時点では、変数γTの値は「0.1」となっているので(ステップS114の「No」の分岐)、変数γTの値を0.1増やす(ステップS118)。この時点で、変数γの値は「0.1」、変数γTの値は「0.2」となる。
上記一連の処理を繰り返し行うことで、1回前の差分量(変数minの値)と、今回のガンマ調整後の差分量(変数dqの値)との大小比較が繰り返し行われ、今回の差分量の方が小さい間は変数minの値が今回の差分量の値に更新されると共に、変数γの値が変数γTの値に更新される。一方、今回の差分量が1回前の差分量以上となった場合は、更新処理を行わずに、変数γTの値が10になるまでループを繰り返し、変数γTの値が10になると、変数S’(x,y)に、復元対象画素データS(x,y)の値を変数γの値乗した値(S(x,y)γ)を代入して処理を終了する(ステップS116)。
Next, it is determined whether or not the value of the variable γT has become “10” (step S114). At the present time, the value of the variable γT is “0.1” (the branch of “No” in step S114), so the value of the variable γT is increased by 0.1 (step S118). At this time, the value of the variable γ is “0.1”, and the value of the variable γT is “0.2”.
By repeating the above series of processing, the difference between the previous difference amount (value of the variable min) and the difference amount after the current gamma adjustment (value of the variable dq) is repeatedly performed. While the amount is smaller, the value of the variable min is updated to the current difference value, and the value of the variable γ is updated to the value of the variable γT. On the other hand, if the current difference amount is equal to or greater than the previous difference amount, the updating process is not performed and the loop is repeated until the value of the variable γT becomes 10, and when the value of the variable γT becomes 10, A value (S (x, y) γ ) obtained by multiplying the value of the restoration target pixel data S (x, y) by the value of the variable γ (S (x, y) γ ) is substituted for S ′ (x, y) (step S116). .
これにより、復元対象画像の全画素に対応する復元対象画素データが、調整後のガンマ値で補正される。
つまり、上記一連の処理を繰り返し行うことによって、ガンマ値を、復元対象画像の輝度値と合成画像の輝度値との差分値の絶対値の合計が最小値(できるだけ小さい値)となる値に調整し、この調整後のガンマ値で復元対象画素データを補正することで、復元対象画像の明るさを合成画像の明るさに近似させる。
As a result, the restoration target pixel data corresponding to all the pixels of the restoration target image is corrected with the adjusted gamma value.
In other words, by repeating the above series of processing, the gamma value is adjusted to a value in which the sum of absolute values of the difference values between the luminance value of the restoration target image and the luminance value of the composite image becomes the minimum value (as small as possible). Then, by correcting the restoration target pixel data with the adjusted gamma value, the brightness of the restoration target image is approximated to the brightness of the synthesized image.
次に、第2の近似処理の動作について説明する。
近似部23は、画素データ合成部15から合成後画素データが入力され、復元対象画像選択部16から復元対象画素データが入力されると、暫定ゲインに対応する変数GTに初期値「0.1」を代入し(ステップS200)、最小値に対応する変数minに、初期値として、ここでは「255×復元対象画像の画素数」よりも大きな値を代入する(ステップS202)。
Next, the operation of the second approximation process will be described.
When the synthesized pixel data is input from the pixel
次に、復元対象画像の各復元対象画素データS(x,y)の値(輝度値)を変数GTの値で乗じた値(S(x,y)×0.1)を算出し、該算出値を、ゲイン調整後の復元対象画素データに対応する変数S’(x,y)に代入する(ステップS204)。この処理は、復元対象画像の全画素に対して行う。
復元対象画像の全画素に対する現在の暫定ゲインによる調整後の画素値が算出されると、次に、復元対象画像のゲイン調整後の復元対象画素データS’(x,y)の値と、合成後画素データP(x,y)の値との差分値を算出する。そして、全画素分の差分値の絶対値の総和(合計)を算出し、該算出値を差分量として変数dqに代入する(ステップS206)。
Next, a value (S (x, y) × 0.1) obtained by multiplying the value (luminance value) of each restoration target pixel data S (x, y) of the restoration target image by the value of the variable GT is calculated. The calculated value is substituted into a variable S ′ (x, y) corresponding to the restoration target pixel data after gain adjustment (step S204). This process is performed for all the pixels of the restoration target image.
Once the pixel values after adjustment with the current provisional gain for all the pixels of the restoration target image are calculated, the value of the restoration target pixel data S ′ (x, y) after gain adjustment of the restoration target image is then combined with A difference value from the value of the rear pixel data P (x, y) is calculated. Then, the sum (absolute) of the absolute values of the difference values for all pixels is calculated, and the calculated value is substituted into the variable dq as the difference amount (step S206).
そして、変数dqの値が、変数minの値よりも小さいか否かを判定する(ステップS208)。現時点では、変数minに初期値が代入されているので、必ず変数dqの値が小さくなる(ステップS208の「Yes」の分岐)。従って、変数minに、変数dqの値を代入し(ステップS210)、変数Gに現在の変数GTの値「0.1」を代入する(ステップS212)。 Then, it is determined whether or not the value of the variable dq is smaller than the value of the variable min (step S208). At this time, since the initial value is assigned to the variable min, the value of the variable dq is always small (the “Yes” branch in step S208). Therefore, the value of the variable dq is substituted for the variable min (step S210), and the current value “0.1” of the variable GT is substituted for the variable G (step S212).
次に、変数GTの値が「10」になったか否かを判定する(ステップS214)。現時点では、変数GTの値は「0.1」となっているので(ステップS214の「No」の分岐)、変数GTの値を0.1増やす(ステップS218)。この時点で、変数Gの値は「0.1」、変数GTの値は「0.2」となる。
上記一連の処理を繰り返し行うことで、1回前の差分量(変数minの値)と、今回のゲイン調整後の差分量(変数dqの値)との大小比較が繰り返し行われ、今回の差分量の方が小さい間は変数minの値が今回の差分量の値に更新される共に、変数Gの値が変数GTの値に更新される。一方、今回の差分量が1回前の差分量以上となった場合は、更新処理を行わずに、変数GTの値が10になるまでループを繰り返し、変数GTの値が10になると、変数S’(x,y)に、復元対象画素データS(x,y)の値を変数Gの値で乗じた値(S(x,y)×G)を代入して処理を終了する(ステップS216)。
Next, it is determined whether or not the value of the variable GT has become “10” (step S214). At this time, since the value of the variable GT is “0.1” (the branch of “No” in Step S214), the value of the variable GT is increased by 0.1 (Step S218). At this time, the value of the variable G is “0.1”, and the value of the variable GT is “0.2”.
By repeating the above series of processing, the difference between the previous difference amount (value of the variable min) and the difference amount after the current gain adjustment (value of the variable dq) is repeatedly performed. While the amount is smaller, the value of the variable min is updated to the current difference value, and the value of the variable G is updated to the value of the variable GT. On the other hand, if the current difference amount is equal to or greater than the previous difference amount, the update process is not performed and the loop is repeated until the value of the variable GT becomes 10. When the value of the variable GT becomes 10, A value (S (x, y) × G) obtained by multiplying the value of the restoration target pixel data S (x, y) by the value of the variable G is substituted for S ′ (x, y) (step S4). S216).
これにより、復元対象画像の全画素に対応する復元対象画素データが、調整後のゲインで補正される。
つまり、上記一連の処理を繰り返し行うことによって、ゲインを、復元対象画像の輝度値と合成画像の輝度値との差分値の絶対値の合計が最小値(できるだけ小さい値)となる値に調整し、この調整後のゲインで復元対象画素データを補正することで、復元対象画像の明るさを合成画像の明るさに近似させる。
Thereby, the restoration target pixel data corresponding to all the pixels of the restoration target image is corrected with the adjusted gain.
That is, by repeating the above series of processing, the gain is adjusted to a value at which the sum of absolute values of the difference values between the luminance value of the restoration target image and the luminance value of the composite image is the minimum value (as small as possible). By correcting the restoration target pixel data with the adjusted gain, the brightness of the restoration target image is approximated to the brightness of the composite image.
上記第1の近似処理又は第2の近似処理のいずれかによって、復元対象画像の明るさを合成画像の明るさに近似させる前処理を実行することで、この復元対象画素データS’と合成後画素データPとの差分値(S’−P)は、前処理をしない場合の差分値と比較して小さな値となる。従って、差分情報テーブルの値を、図17に示すように、上記第2の実施の形態における図13に示す値よりも細かく(各値を小さく)することができる。 By performing pre-processing for approximating the brightness of the restoration target image to the brightness of the synthesized image by either the first approximation process or the second approximation process, after the synthesis with the restoration target pixel data S ′ The difference value (S′−P) with respect to the pixel data P is a smaller value than the difference value when the preprocessing is not performed. Therefore, as shown in FIG. 17, the value of the difference information table can be made finer (each value is smaller) than the value shown in FIG. 13 in the second embodiment.
例えば、合成後画素データPの画素値が「140」、復元対象画素データSの画素値が「85」であったとすると、上記前処理を行わない場合は、絶対差分量αは「α=85−140=−55」となり、相対差分量βは「β=85/140≒61[%]」となる。
一方、上記前処理によって、調整後のガンマ値が「0.6」になったとすると、復元対象画素データSの画素値「85」は、「S’=255×(85/255)0.6≒132」と補正されることになる。従って、絶対差分量αは「α=132−140=−8」となり、相対差分量βは「β=132/140≒94[%]」となる。
For example, if the pixel value of the post-combination pixel data P is “140” and the pixel value of the restoration target pixel data S is “85”, the absolute difference amount α is “α = 85” when the preprocessing is not performed. −140 = −55 ”, and the relative difference amount β is“ β = 85 / 140≈61 [%] ”.
On the other hand, if the adjusted gamma value becomes “0.6” by the pre-processing, the pixel value “85” of the restoration target pixel data S is “S ′ = 255 × (85/255) 0.6 ≈132. Will be corrected. Therefore, the absolute difference amount α is “α = 132−140 = −8”, and the relative difference amount β is “β = 132 / 140≈94 [%]”.
従って、復元情報生成部21aは、差分情報を絶対差分量αにした場合は、図17に示す値を有する差分情報テーブルから、絶対差分量α「−8」に最も近い「0」に対応する検出ビット列「011」を取得する。
また、差分情報を相対差分量βにした場合は、図17に示す値を有する差分情報テーブルから、相対差分量β「94[%]」と同じ値の「94[%]」に対応する検出ビット列「100」を取得する。
Therefore, when the difference information is set to the absolute difference amount α, the restoration information generating unit 21a corresponds to “0” closest to the absolute difference amount α “−8” from the difference information table having the value illustrated in FIG. The detection bit string “011” is acquired.
When the difference information is set to the relative difference amount β, the detection corresponding to “94 [%]” having the same value as the relative difference amount β “94 [%]” from the difference information table having the values shown in FIG. The bit string “100” is acquired.
以降の処理は、上記第2の実施の形態と同様となるので説明を省略する。
以上より、本変形例の撮像システム200’は、近似部23において、復元対象画素データから生成される復元対象画像の明るさを、合成後画素データから生成される合成画像の明るさに近似することができる。
また、明るさ近似処理に対応する差分情報テーブルの値を用いて、復元情報の生成及び付与を行うことができる。
Since the subsequent processing is the same as that of the second embodiment, description thereof is omitted.
As described above, in the
In addition, it is possible to generate and assign restoration information using the values in the difference information table corresponding to the brightness approximation process.
これにより、復元対象画素データと合成後画素データとの差を小さくできるので、差分情報テーブルの値を細かい値にすることができると共に、テーブルの値同士の差も小さくできるので、より高精度に復元対象画像の復元をすることができる差分情報が得られる復元情報を付与することができる。
上記第2の実施の形態の変形例において、近似部23は、形態9、10及び11のいずれか1に記載の近似手段に対応する。
Thereby, the difference between the restoration target pixel data and the post-combination pixel data can be reduced, so that the value of the difference information table can be set to a fine value and the difference between the values of the table can also be reduced. Restoration information from which difference information that can restore the restoration target image can be obtained can be added.
In the modification of the second embodiment, the approximating
なお、上記各実施の形態並びに各変形例においては、撮像部10を、CCDイメージセンサを有する構成としたが、これに限らず、各画素がCMOS素子で構成されるCMOSイメージセンサを有する構成など他の構成としても良い。CMOSイメージセンサを有する構成であれば、各画素から非破壊で画素信号を読み出すことができるので、1フレームの期間において、複数種類の露光時間に対応する画素信号を読み出すことができる。これにより、例えば、ローリングシャッタ方式の電子シャッタ機能を有するものであれば、画像のライン単位で順次露光時間の異なる画素信号を読み出すことができるようになるため、各露光時間の画素データを全画素分取得してから処理を行うのと比較して、上記各処理を高速に行うことができる。
In each of the above-described embodiments and modifications, the
また、上記第1の実施の形態の変形例2においては、各画素データの周波数成分として、エッジ量を抽出する構成としたが、これに限らず、FFTを用いて周波数成分を抽出するなど他の構成としても良い。
また、上記各実施の形態並びに各変形例においては、輝度ヒストグラムや周波数成分に基づき、復元対象の画素データを選択する構成としたが、これに限らず、予め決められた露光時間に対応する画素データを復元対象として選択する構成としても良いし、全ての露光時間に対応する画素データを復元対象として選択する構成としても良い。
In the second modification of the first embodiment, the edge amount is extracted as the frequency component of each pixel data. However, the present invention is not limited to this, and the frequency component is extracted using FFT. It is good also as a structure of.
In each of the above embodiments and modifications, the pixel data to be restored is selected based on the luminance histogram and frequency components. However, the present invention is not limited to this, and pixels corresponding to a predetermined exposure time are used. Data may be selected as a restoration target, or pixel data corresponding to all exposure times may be selected as a restoration target.
また、上記各実施の形態並びに各変形例においては、露光時間T1、T2、T3を、それぞれ15H、100H、500Hとしたが、これに限らず、T1<T2<T3の関係が保たれれば、他の露光時間としても良い。また、この露光時間の設定をユーザが任意に設定できる構成としても良いし、被写体の種類や撮像環境に応じて動的に変化させる構成としても良い。 In each of the above embodiments and modifications, the exposure times T1, T2, and T3 are set to 15H, 100H, and 500H, respectively. However, the present invention is not limited to this, and the relationship of T1 <T2 <T3 can be maintained. Other exposure times may be used. The exposure time may be arbitrarily set by the user, or may be dynamically changed according to the type of subject and the imaging environment.
100,200,200’…撮像システム、10…撮像部、11…SW、12…第1メモリ、13…第2メモリ、14…第3メモリ、15…画素データ合成部、16,16’…復元対象画像選択部、17,21…復元情報付与部、18…画像保存部、19…表示部、20…画素データ復元部、22…差分情報テーブル記憶部、23…近似部、16a…ヒストグラム生成部、16b,16e…比較部、16c…画素データ選択部、17a,21a…復元情報生成部、17b,21b…復元情報埋込部
DESCRIPTION OF SYMBOLS 100,200,200 '... Imaging system, 10 ... Imaging part, 11 ... SW, 12 ... 1st memory, 13 ... 2nd memory, 14 ... 3rd memory, 15 ... Pixel data composition part, 16, 16' ... Restoration Target image selection unit, 17, 21 ... restoration information adding unit, 18 ... image storage unit, 19 ... display unit, 20 ... pixel data restoration unit, 22 ... difference information table storage unit, 23 ... approximation unit, 16a ...
Claims (15)
前記光電変換素子の構成する各画素から、複数種類の露光時間で露光された時の前記複数種類の露光時間に対応する画素信号を読み出す画素信号読出手段と、
前記画素信号読出手段で読み出した、前記複数種類の露光時間に対応する画素信号のデータである画素データを前記画素毎に合成する画素データ合成手段と、
前記画素データ合成手段で合成後の画素データに、前記複数種類の露光時間における所定の露光時間に対応する前記合成前の画素データを復元する際に用いる復元情報を付与する復元情報付与手段と、を備えることを特徴とする撮像装置。 An imaging apparatus comprising: a photoelectric conversion unit having a configuration in which a plurality of photoelectric conversion elements that convert received light into electric charges and store them are arranged in a matrix; and a function of controlling an exposure time of the photoelectric conversion elements,
Pixel signal reading means for reading out pixel signals corresponding to the plurality of types of exposure times when exposed at a plurality of types of exposure times from each pixel constituting the photoelectric conversion element;
Pixel data synthesizing means for synthesizing pixel data, which is pixel data corresponding to the plurality of types of exposure times, read by the pixel signal reading means for each pixel;
Restoration information giving means for giving restoration information used when restoring the pre-combination pixel data corresponding to predetermined exposure times in the plurality of types of exposure times to the pixel data after the pixel data synthesis means has been combined; An imaging apparatus comprising:
前記復元情報付与手段は、前記合成後の画素データの下位側のLビットを、前記差分情報テーブルにおける、前記合成前の画素データの前記復元情報に最も近い差分値の情報に対応付けられたビット列に入れ替えることを特徴とする請求項3に記載の撮像装置。 In correspondence with each bit string represented by a bit number L smaller than the number of bits of the pixel data, a difference information table storing information of the difference values of different numerical values, respectively,
The restoration information providing means is a bit string in which L bits on the lower side of the combined pixel data are associated with information on difference values closest to the restoration information of the pixel data before combining in the difference information table The imaging apparatus according to claim 3, wherein the imaging apparatus is replaced with
前記復元情報付与手段は、前記復元画像選択手段で決定された前記復元対象の画素データの復元情報を、前記合成後の画素データに付与することを特徴とする請求項1乃至請求項11のいずれか1項に記載の撮像装置。 Based on the pixel data corresponding to the plurality of types of exposure time, comprising restored image selection means for selecting pixel data of the exposure time to be restored from among the pixel data corresponding to the plurality of types of exposure time,
12. The restoration information adding unit adds the restoration information of the restoration target pixel data determined by the restoration image selection unit to the combined pixel data. The imaging apparatus of Claim 1.
前記合成後の画素データに付与された復元情報に基づき、前記合成前の画素データを復元する画素データ復元手段と、を備えることを特徴とする撮像システム。 The imaging device according to any one of claims 1 to 14,
An imaging system comprising: pixel data restoring means for restoring the pixel data before synthesis based on restoration information given to the pixel data after synthesis.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007178139A JP2009017336A (en) | 2007-07-06 | 2007-07-06 | Imaging device and imaging system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007178139A JP2009017336A (en) | 2007-07-06 | 2007-07-06 | Imaging device and imaging system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009017336A true JP2009017336A (en) | 2009-01-22 |
Family
ID=40357648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007178139A Pending JP2009017336A (en) | 2007-07-06 | 2007-07-06 | Imaging device and imaging system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009017336A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011114450A (en) * | 2009-11-25 | 2011-06-09 | Olympus Imaging Corp | Photographing device and control method of photographing device |
CN104113698A (en) * | 2014-08-06 | 2014-10-22 | 北京北纬通信科技股份有限公司 | Blurred image processing method and system applied to image capturing device |
JP2015012567A (en) * | 2013-07-02 | 2015-01-19 | キヤノン株式会社 | Image processor, image processing method, image processing program and imaging device |
WO2021157261A1 (en) * | 2020-02-05 | 2021-08-12 | パナソニックIpマネジメント株式会社 | Imaging device and image processing method |
-
2007
- 2007-07-06 JP JP2007178139A patent/JP2009017336A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2011114450A (en) * | 2009-11-25 | 2011-06-09 | Olympus Imaging Corp | Photographing device and control method of photographing device |
US8648926B2 (en) | 2009-11-25 | 2014-02-11 | Olympus Imaging Corp. | Imaging device and imaging device control method |
JP2015012567A (en) * | 2013-07-02 | 2015-01-19 | キヤノン株式会社 | Image processor, image processing method, image processing program and imaging device |
CN104113698A (en) * | 2014-08-06 | 2014-10-22 | 北京北纬通信科技股份有限公司 | Blurred image processing method and system applied to image capturing device |
WO2021157261A1 (en) * | 2020-02-05 | 2021-08-12 | パナソニックIpマネジメント株式会社 | Imaging device and image processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5713752B2 (en) | Image processing apparatus and control method thereof | |
KR101388130B1 (en) | Image processing apparatus and image processing method | |
JP5012333B2 (en) | Image processing apparatus, image processing method, and imaging apparatus | |
JP5743696B2 (en) | Image processing apparatus, image processing method, and program | |
JP5672796B2 (en) | Image processing apparatus and image processing method | |
CN109416831B (en) | Low cost color expansion module for expanding colors of an image | |
JP6624889B2 (en) | Video processing apparatus, video processing method, and video processing program | |
JP6083974B2 (en) | Image processing apparatus, image processing method, and program | |
KR101309008B1 (en) | Image processing method and image processing apparatus | |
JP5804856B2 (en) | Image processing apparatus, image processing method, and program | |
US10600170B2 (en) | Method and device for producing a digital image | |
JP2004102903A (en) | Filtering | |
JP6887853B2 (en) | Imaging device, its control method, program | |
JP2009017336A (en) | Imaging device and imaging system | |
JP6423668B2 (en) | Image processing apparatus, control method therefor, and program | |
JP2007180851A (en) | Gray scale transformation device, program and method for raw image, and electronic camera | |
US10387999B2 (en) | Image processing apparatus, non-transitory computer-readable medium storing computer program, and image processing method | |
JP6514504B2 (en) | IMAGE PROCESSING APPARATUS, CONTROL METHOD THEREOF, AND PROGRAM | |
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 | |
JP6826472B2 (en) | Image processing device and its control method | |
JP6786273B2 (en) | Image processing equipment, image processing methods, and programs | |
JP6570311B2 (en) | Image processing apparatus and image processing method | |
JP2019016893A (en) | Image processing apparatus, control method therefor, and program | |
KR20160070659A (en) | Image processing apparatus and image processing method | |
JP5483949B2 (en) | Image processing apparatus, image processing method, and program |