JP2007124198A - Image processing apparatus - Google Patents
Image processing apparatus Download PDFInfo
- Publication number
- JP2007124198A JP2007124198A JP2005312521A JP2005312521A JP2007124198A JP 2007124198 A JP2007124198 A JP 2007124198A JP 2005312521 A JP2005312521 A JP 2005312521A JP 2005312521 A JP2005312521 A JP 2005312521A JP 2007124198 A JP2007124198 A JP 2007124198A
- Authority
- JP
- Japan
- Prior art keywords
- image data
- processing
- pixel
- data
- partial area
- 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.)
- Granted
Links
- 238000012545 processing Methods 0.000 title claims abstract description 239
- 238000000034 method Methods 0.000 claims description 34
- 238000012546 transfer Methods 0.000 claims description 26
- 238000003384 imaging method Methods 0.000 description 21
- 238000003672 processing method Methods 0.000 description 21
- 238000010586 diagram Methods 0.000 description 12
- 230000003287 optical effect Effects 0.000 description 10
- 238000009826 distribution Methods 0.000 description 9
- 238000001514 detection method Methods 0.000 description 5
- 230000006866 deterioration Effects 0.000 description 5
- 239000007787 solid Substances 0.000 description 5
- 238000003860 storage Methods 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 230000015556 catabolic process Effects 0.000 description 4
- 238000006731 degradation reaction Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 230000004075 alteration Effects 0.000 description 3
- 230000010354 integration Effects 0.000 description 3
- 238000005457 optimization Methods 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000012937 correction Methods 0.000 description 2
- 239000006185 dispersion Substances 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000001131 transforming effect Effects 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
Images
Abstract
Description
本発明は、画像処理装置に関する。 The present invention relates to an image processing apparatus.
従来から、撮像部にCCD(Charge C0upied Devices)などの撮像素子を使用するカメラにより撮影を行った撮影画像は、撮影時の手ぶれ、撮影光学系の各種の収差、あるいは撮影光学系を構成するレンズの歪み等がある場合は、これが要因となり、撮影画像が劣化することが知られている。 Conventionally, a photographed image taken by a camera that uses an image sensor such as a CCD (Charge C 0 up Devices) in the imaging unit constitutes camera shake during shooting, various aberrations of the photographing optical system, or a photographing optical system. It is known that when there is distortion or the like of the lens to be taken, this is a factor and the captured image is deteriorated.
このような撮影画像の劣化を防ぐ手段として、撮影画像の劣化の要因のうち、撮影時の手ぶれに関しては、レンズを動かす方式と撮影した画像を回路処理する方式とが知られている。たとえば、レンズを動かす方式としては、カメラの手ぶれを検出し、撮影光学系の中の所定のレンズを、検出した手ぶれによるカメラの移動に合わせて動かすことにより、撮像素子上における結像位置の移動を抑制する方式が知られている(特許文献1参照)。 As means for preventing such deterioration of the photographed image, a method of moving the lens and a method of circuit processing the photographed image are known as camera shake during photographing among the causes of deterioration of the photographed image. For example, as a method of moving the lens, camera shake is detected, and a predetermined lens in the photographing optical system is moved in accordance with the movement of the camera due to the detected camera shake, thereby moving the imaging position on the image sensor. There is known a method for suppressing the above (see Patent Document 1).
また、回路処理する方式としては、カメラの撮影光学系の光軸の変動を角加速度センサ等により検出し、検出した角速度等から撮影時のぼけ状態を表す伝達関数を取得し、撮影画像に対し、取得した伝達関数の逆変換を行い、劣化のない画像を復元する方式が知られている(特許文献2参照)。 As a circuit processing method, a change in the optical axis of the photographing optical system of the camera is detected by an angular acceleration sensor or the like, and a transfer function representing a blurring state at the time of photographing is obtained from the detected angular velocity, etc. A method is known in which an acquired transfer function is inversely transformed to restore an image without deterioration (see Patent Document 2).
特許文献1記載の手ぶれ補正を採用したカメラは、モータ等のレンズを駆動するハードウェアのスペースが必要となり大型化してしまう。また、そのようなハードウェア自体やそのハードウェアを動かす駆動回路が必要となり、コストアップとなってしまう。
The camera employing the camera shake correction described in
また、特許文献2記載の手ぶれ補正の場合は、上述した問題点はなくなるものの、撮影画像のコントラストが低い場合には、伝達関数が不安定になり、結果的に画像の復元を行えないという問題がある。
In addition, in the case of camera shake correction described in
そこで、本発明の課題は、撮影画像のコントラストが低くても、画像の復元を行うことができる画像処理装置を提供することである。 Therefore, an object of the present invention is to provide an image processing apparatus that can restore an image even when the contrast of a captured image is low.
上記課題を解決するために、本発明の画像処理装置は、画像を処理する処理部を有する画像処理装置において、処理部は、互いに異なる複数の処理用画像データであって、これら各処理用画像データの互いに同じ画素位置にある画素のいずれか1つの画素画像データを、復元対象画像データの同じ画素位置の画素の画素画像データと同じとし、各処理用画像データの画素のうち、復元対象画像データの画素画像データを有しない画素の画素画像データを、コントラスト生成用画素画像データとし、復元対象画像データの画素画像データを有する画素とコントラスト生成用画素画像データを有する画素が交互に配列される処理用画像データを生成し、処理用画像データのそれぞれについて処理用原画像データを生成する処理用原画像データ生成処理を行い、処理用原画像データから、原画像データに近似する復元原画像データを生成する原画像データ復元処理を行うこととする。 In order to solve the above problems, an image processing apparatus according to the present invention is an image processing apparatus having a processing unit for processing an image, wherein the processing unit is a plurality of processing image data different from each other, and each of these processing images The pixel image data of any one of the pixels at the same pixel position of the data is the same as the pixel image data of the pixel at the same pixel position of the restoration target image data, and the restoration target image is out of the pixels of each processing image data The pixel image data of the pixels that do not have the pixel image data of the data is set as the pixel image data for contrast generation, and the pixels having the pixel image data of the restoration target image data and the pixels having the pixel image data for contrast generation are alternately arranged. Generate processing image data and generate processing original image data for each processing image data It performs management, from processing the original image data, and performing the original image data restoration processing for generating a restoration original image data that approximates the original image data.
この発明によれば、処理用画像データがコントラストの高い画像データとなるので、復元対象画像のコントラストが低くても、画像の復元を行うことができる。 According to this invention, since the processing image data is image data with high contrast, the image can be restored even if the contrast of the restoration target image is low.
また、他の発明は、上述の発明に加え、処理用原画像データ生成処理は、画像変化の要因となる変化要因情報のデータを利用して、任意の画像のデータから比較用データを生成し、その後、処理用画像データと比較用データとを比較し、得られた差分のデータを変化要因情報のデータを利用して任意の画像のデータに配分することで処理用復元画像データを生成し、その後、この処理用復元画像データを任意の画像データの代わりに使用し、同様の処理を繰り返すことで、処理用原画像データを生成する処理を行うこととする。 In another invention, in addition to the above-described invention, the processing original image data generation process generates comparison data from data of an arbitrary image by using data of change factor information that causes an image change. Then, the processing image data and the comparison data are compared, and the obtained difference data is distributed to arbitrary image data using the data of the change factor information, thereby generating the restored image data for processing. Thereafter, the processing restored image data is used in place of arbitrary image data, and the same processing is repeated to generate processing original image data.
この発明によれば、画像変化の要因情報を利用して、所定のデータを生成することにより処理用復元原画像データを生成しているので、ノイズやブレ情報誤差等に弱い伝達関数を用いることなく、処理用原画像データを求めることができる。 According to the present invention, since the restoration original image data for processing is generated by generating predetermined data using the image change factor information, a transfer function that is weak against noise, blur information error, and the like is used. The processing original image data can be obtained.
また、他の発明は、上述の発明に加え、複数の処理用画像データは、2つの処理用画像データであり、2つの各処理用画像データは、復元対象画像データの画素画像データを有する画素とコントラスト生成用画素画像データを有する画素とは、1画素毎に交互に配列されることとする。 In addition to the above-described invention, in another invention, the plurality of processing image data is two processing image data, and each of the two processing image data includes pixels having pixel image data of restoration target image data. The pixels having the contrast generating pixel image data are alternately arranged for each pixel.
このように構成することにより、各画素データの間に、コントラスト生成画素画像データが配置されることになり、処理用画像データをよりコントラストの高い画像データとすることができる。 With this configuration, contrast generation pixel image data is arranged between the pixel data, and the processing image data can be image data with higher contrast.
上記課題を解決するために、本発明の画像処理装置は、画像を処理する処理部を有する画像処理装置において、処理部は、復元対象画像データの一部の領域に対して生成する互いに異なる複数の一部領域処理用画像データであって、これら各一部領域処理用画像データの互いに同じ画素位置にある画素のいずれか1つの画素画像データを、復元対象画像データの一部の領域内の同じ画素位置の画素の画素画像データと同じとし、各一部領域処理用画像データの画素のうち、復元対象画像データの画素画像データを有しない画素の画素画像データを、コントラスト生成用画素画像データとし、復元対象画像データの画素画像データを有する画素とコントラスト生成用画素画像データを有する画素が交互に配列される一部領域処理用画像データを生成し、一部領域処理用画像データのそれぞれについて一部領域処理用原画像データを生成する一部領域処理用原画像データ生成処理を行い、一部領域処理用画像データと一部領域処理用原画像データとから、一部領域処理用画像データと一部領域処理用原画像データの間の一部領域伝達関数を求め、この一部領域伝達関数を利用して復元対象画像データの復元原画像データを生成する原画像データ復元処理を行うこととする。 In order to solve the above-described problems, an image processing apparatus according to the present invention includes an image processing apparatus having a processing unit that processes an image. Image data for partial area processing, and any one pixel image data of the pixels at the same pixel position of each partial area processing image data is stored in a partial area of the restoration target image data. It is the same as the pixel image data of the pixel at the same pixel position, and among the pixels of each partial region processing image data, the pixel image data of the pixel that does not have the pixel image data of the restoration target image data is used as the contrast generation pixel image data Image data for partial area processing in which pixels having pixel image data of restoration target image data and pixels having pixel image data for contrast generation are alternately arranged. And performing partial area processing original image data generation processing for generating partial area processing original image data for each of the partial area processing image data. From the original image data, a partial area transfer function between the partial area processing image data and the partial area processing original image data is obtained, and using this partial area transfer function, a restoration source of the restoration target image data is obtained. An original image data restoration process for generating image data is performed.
この発明によれば、一部の領域についての処理用原画像データを求めることとしているので、処理速度を高速にすることができる。 According to the present invention, since the processing original image data for a part of the area is obtained, the processing speed can be increased.
また、他の発明は、上述の発明に加え、一部領域処理用原画像データ生成処理は、画像変化の要因となる変化要因情報のデータを利用して、任意の画像のデータから比較用データを生成し、その後、一部領域処理用画像データと比較用データとを比較し、得られた差分のデータを変化要因情報のデータを利用して任意の画像のデータに配分することで一部領域処理用復元画像データを生成し、その後、この一部領域処理用復元画像データを任意の画像データの代わりに使用し、同様の処理を繰り返すことで、一部領域処理用原画像データを生成する処理を行うこととする。 In addition to the above-mentioned invention, the other image data generation process for partial region processing uses comparison factor information data that causes an image change, and compares the data for an arbitrary image with the comparison data. After that, the partial area processing image data and the comparison data are compared, and the obtained difference data is distributed to arbitrary image data using the change factor information data. Generate restored image data for region processing, then use the restored image data for partial region processing instead of arbitrary image data, and repeat the same process to generate original image data for partial region processing It is assumed that the process is performed.
この発明によれば、画像変化の要因情報を利用して、所定のデータを生成することにより一部領域処理用復元原画像データを生成しているので、ノイズやブレ情報誤差等に弱い伝達関数を用いることなく、一部領域処理用原画像データを求めることができる。 According to the present invention, the restoration original image data for partial area processing is generated by generating predetermined data using the factor information of the image change, so that the transfer function weak against noise, blur information error, etc. The partial region processing original image data can be obtained without using the.
また、他の発明は、上述の発明に加え、複数の一部領域処理用画像データは、2つの一部領域処理用画像データであり、2つの各一部領域処理用画像データは、復元対象画像データの画素画像データを有する画素とコントラスト生成用画素画像データを有する画素とは、1画素毎に交互に配列されることとする。 Further, in addition to the above-described invention, in another invention, the plurality of partial area processing image data are two partial area processing image data, and each of the two partial area processing image data is to be restored. The pixels having the pixel image data of the image data and the pixels having the pixel image data for contrast generation are alternately arranged for each pixel.
このように構成することにより、各画素データの間に、コントラスト生成画素画像データが配置されることになり、処理用画像データをよりコントラストの高い画像データとすることができる。 With this configuration, contrast generation pixel image data is arranged between the pixel data, and the processing image data can be image data with higher contrast.
また、他の発明は、上述の発明に加え、コントラスト生成画素画像データは、輝度が0または高輝度の画像データであることとする。 In addition to the above-described invention, in another invention, the contrast generation pixel image data is image data having a luminance of 0 or high luminance.
このように構成することにより、コントラスト生成画素画像データを、輝度が0または高輝度の画像データとすることにより、複数の画像データをコントラストの高い画像データとすることができる。 With this configuration, the contrast generation pixel image data is image data with zero or high luminance, so that a plurality of image data can be image data with high contrast.
本発明によれば、復元対象画像のコントラストが低くても、画像の復元を行うことができる。 According to the present invention, it is possible to restore an image even if the restoration target image has a low contrast.
以下、本発明の第1の実施の形態に係る画像処理装置1について図を参照しながら説明する。なお、この画像処理装置1は、撮像部にCCDを使用した民生用のいわゆるデジタルカメラとしているが、撮像部にCCD等の撮像素子を用いる監視用カメラ、テレビ用カメラ用、内視鏡用カメラ等、他の用途のカメラとしたり、顕微鏡用、双眼鏡用、さらにはNMR撮影用等の画像診断装置等、カメラ以外の機器にも適用できる。
Hereinafter, an
画像処理装置1は、人物等の被写体を撮影する撮像部2と、その撮像部2を駆動する制御系部3と、撮像部2で撮影された画像を処理する処理部4と、を有している。また、この実施の形態に係る画像処理装置1は、さらに処理部4で処理された画像を記録する記録部5と、角速度センサ等からなり、画像劣化等の変化の要因となる変化要因情報を検知する検出部6と、画像劣化等を生じさせる既知の変化要因情報を保存する要因情報保存部7を有する。
The
撮像部2は、レンズを有する撮影光学系やレンズを通過した光を電気信号に変換するCCDやC−MOS(Compiementary Metai Oxide Semiconductor)等の撮像素子を備える部分である。制御系部3は、撮像部2,処理部4、記録部5、検出部6および要因情報保存部7等、画像処理装置1内の各部を制御するものである。
The
処理部4は、画像処理プロセサで構成されており、ASIC(Appiication Specific Integrated Circuit)のようなハードウェアで構成されている。この処理部4は図示外の記録部を備え、この記録部に後述する処理用画像データにおける虚数部の高周波成分を有する画像データや、比較用画像データを生成する際の元となる任意の画像の画像データが保存されている。処理部4は、ASICのようなハードウェアとして構成されるのではなく、ソフトウェアで処理する構成としても良い。記録部5は、半導体メモリで構成されているが、ハードディスクドライブ等の磁気記録手段や、DVD(Digitai Versatiie Disk)等を使用する光記録手段等を採用しても良い。
The
検出部6は、図2に示すように、画像処理装置1の光軸であるZ軸に対して垂直方向となるX軸、Y軸の回りの速度を検出する2つの角速度センサを備えるものである。ところで、カメラで撮影する際の手ぶれは、X方向、Y方向、Z方向の各方向への移動やZ軸回りの回動も生ずるが、各変動により最も大きな影響を受けるのは、Y軸回りの回転とX軸回りの回転である。これら2つの変動は、ほんのわずかに変動しただけで、その撮影された画像は大きくぼける。このため、この実施の形態では、図2のX軸回りとY軸回りの2つの角速度センサのみを配置している。しかし、より完全を期すためZ軸回りの角速度センサをさらに付加したり、X方向やY方向への移動を検出するセンサを付加しても良い。また、使用するセンサとしては、角速度センサではなく、角加速度センサとしても良い。
As shown in FIG. 2, the
要因情報保存部7は、既知の劣化要因情報などの変化要因情報、たとえば撮影光学系の収差等を保存しておく記録部である。なお、この実施の形態では、要因情報保存部7には、撮影光学系の収差やレンズのひずみの情報が保存されているが、後述する手ぶれによる画像の劣化を補正する際にはそれらの情報は、利用していない。
The factor
次に、以上のように構成された画像処理装置1の処理部4の処理方法について説明する。
Next, a processing method of the
処理部4は、画像の復元を最適化問題として扱うことにより復元画像を求める処理手法を有している。そこで、先ず、この処理手法について説明する。
The
画像の復元を最適化問題として扱うということは、「(1)入力に対する出力は、一意に決まる。」、「(2)出力が同じであれば、入力は同じである。」、「(3)出力が同じになるように、入力を更新しながら反復処理することにより、解を収束させていく。」、という3の条件を前提に、画像の復元を行うことである。 Treating image restoration as an optimization problem means that “(1) the output for the input is uniquely determined”, “(2) If the output is the same, the input is the same”, “(3 The solution is converged by iteratively processing while updating the input so that the output becomes the same.
すなわち、図3(A)に示すように、原画像データ「img」が画像を変化させる要因となる変化要因情報データ「g」により変化させられて復元対象画像データとしての撮影画像データ「img’」(復元の対象の画像データ)に変化すると考えると、任意の画像データ「i0」を変化要因情報データ「g」により変化させた画像データ「i0’」が、撮影画像データ「img’」に近似するように、画像データ「i0」を「i0+n」(nは、1以上の整数)として反復して更新する。すなわち、画像データ「i0+n」が変化要因情報データ「g」により変化した画像データ「i0+n’」が、撮影画像データ「img’」に近似するような画像データ「i0+n」を生成する(求める)ことができれば、図3(B)に示すように、画像データ「i0’(=i0+n’)」の生成の元データとなる画像データ「i0(=i0+n)」は、変化前の原画像データ「img」に近似した復元された画像であると言える。 That is, as shown in FIG. 3A, the original image data “img” is changed by the change factor information data “g” that causes the image to change, and the captured image data “img ′” as the restoration target image data is changed. "Given the changes (image data of the restoration of the target), the image data is changed by any of the image data" i 0 "the change factor information data" g "," i 0 ' "is, captured image data"img' The image data “i 0 ” is iteratively updated as “i 0 + n ” (n is an integer equal to or greater than 1). That is, the image data which the image data "i 0 + n" is changed by the change factor information data "g", "i 0 + n '" is, captured image data "img' generates the image data" i 0 + n "so as to approximate the" ( if we ask) that, as shown in FIG. 3 (B), the image data "i 0 '(= i 0 + n') " image data "i 0 (= i 0 + n ) " as the original data for generating of change It can be said that this is a restored image approximated to the previous original image data “img”.
また、復元の対象である画像データ「img’」から復元画像の画像データ「i0(=i0+n)」への伝達関数「G」を、G=i0+n/img’として求めることができる。 Further, the transfer function “G” from the image data “img ′” to be restored to the image data “i 0 (= i 0 + n )” of the restored image can be obtained as G = i 0 + n / img ′.
なお、原画像データ「img」は、撮影画像データ「img’」の元となった原画像の画像データである。つまり、撮影画像データ「img’」が変化する前の画像、または正しく撮影されたなら得られたはずの本来の画像のことであり、例えば、撮影操作時に手ぶれ等による画像の劣化がない状態で撮影したと仮定したときの撮影画像のデータである。 The original image data “img” is image data of the original image that is the basis of the photographed image data “img ′”. That is, the image before the photographed image data “img ′” is changed, or the original image that should have been obtained if the photographed image was correctly photographed. This is data of a captured image when it is assumed that the image is captured.
上記の基本的な手法について、図4から図12に基づいてさらに詳しく説明する。 The basic method will be described in more detail with reference to FIGS.
図4中、「i0」は、処理部4の記録部に予め保存されている任意の初期画像データである。「g」は、検出部6で検出された変化要因情報(劣化要因情報(点像関数))のデータであり、処理部4の記録部に保存されるものである。「i0’」は、初期画像データ「i0」が変化要因情報データ「g」により変化した比較用画像データである。「img’」は、復元の対象となる変化した画像の画像データである。ここでは、撮像部2に撮像された撮影画像データとする。
In FIG. 4, “i 0 ” is arbitrary initial image data stored in advance in the recording unit of the
「δ」は、撮影画像データ「img’」と、比較用画像データ「i0’」との差分のデータである。「h」は、変化要因情報データ「g」に基づく配分比を表すフィードバック関数である。「i0+n」(nは、1以上の整数)は、初期画像データ「i0」に、差分のデータδを配分比「h」に従って配分して新たに生成した復元画像データである。 “Δ” is difference data between the captured image data “img ′” and the comparison image data “i 0 ′”. “H” is a feedback function representing a distribution ratio based on the change factor information data “g”. “I 0 + n ” (n is an integer greater than or equal to 1) is restored image data newly generated by distributing the difference data δ to the initial image data “i 0 ” according to the distribution ratio “h”.
ここで、「img」と「img’」の関係は、次の(1)式で表されるとする。
img’=img*g …(1)
「*」は、重畳積分を表わす演算子である。
なお、差分のデータ「δ」は、対応する画素の単純な差分でも良い場合もあるが、一般的には、変化要因情報データ「g」により異なり、次の(2)式で現される。
δ=f(img’,img,g)…(2)
Here, it is assumed that the relationship between “img” and “img ′” is expressed by the following equation (1).
img ′ = img * g (1)
“*” Is an operator representing a superposition integral.
Note that the difference data “δ” may be a simple difference between corresponding pixels, but generally differs depending on the change factor information data “g” and is expressed by the following equation (2).
δ = f (img ′, img, g) (2)
処理部4の処理ルーチンは、まず、初期画像データ「i0」を用意する(ステップS101)ことから始まる。この初期画像データ「i0」としては、撮影画像データ「img’」を用いても良く、また、黒ベタ、白ベタ、灰色ベタ、市松模様等どのような画像のデータを用いても良い。ステップS102で、(1)式の「img」の代わりに初期画像となる任意画像のデータ「i0」を入れ、劣化画像である比較用画像データ「i0’」を求める。次に、撮影画像データ「img’」と比較用画像データ「i0’」と比較し、差分のデータ「δ」を算出する(ステップS103)。
Processing routine of the
次に、ステップS104で、この差分のデータ「δ」が所定値以上であるか否かを判断し、所定値以上であれば、ステップS105で新たな復元画像データ(=復元画像データ)を生成する処理を行う。すなわち、差分のデータ「δ」を変化要因情報データ「g」に基づいて、任意の初期画像データ「i0」に配分し、新たな復元画像データ「i0+n」を生成する。その後、ステップS102,S103,S104,S105を繰り返す。 Next, in step S104, it is determined whether or not the difference data “δ” is greater than or equal to a predetermined value. If it is greater than or equal to the predetermined value, new restored image data (= restored image data) is generated in step S105. Perform the process. That is, the difference data “δ” is distributed to arbitrary initial image data “i 0 ” based on the change factor information data “g” to generate new restored image data “i 0 + n ”. Thereafter, steps S102, S103, S104, and S105 are repeated.
ステップS104において、差分のデータ「δ」が所定値より小さい場合、処理を終了する(ステップS106)。そして、処理を終了した時点での復元画像データ「i0+n」を原画像データ「img」と推定する。 If the difference data “δ” is smaller than the predetermined value in step S104, the process ends (step S106). Then, the restored image data “i 0 + n ” at the time when the processing is completed is estimated as the original image data “img”.
次に、図3および図4に示す処理方法の詳細を、図5,図6,図7,図8,図9,図10,図11および図12に基づいて説明する。 Next, details of the processing method shown in FIGS. 3 and 4 will be described based on FIGS. 5, 6, 7, 8, 9, 10, 11, and 12.
(手ぶれの復元アルゴリズム)
手ぶれが無いとき、所定の画素に対応する光エネルギーは、露光時間中、その画素に集中する。また、手ぶれがある場合、光エネルギーは、露光時間中にぶれた画素に分散する。さらに、露光時間中のブレがわかれば、露光時間中のエネルギーの分散の仕方がわかるため、ぶれた画像からブレの無い画像を作ることが可能となる。
(Image restoration algorithm)
When there is no camera shake, the light energy corresponding to a given pixel is concentrated on that pixel during the exposure time. In addition, when there is camera shake, light energy is dispersed to pixels that are shaken during the exposure time. Further, if the blur during the exposure time is known, it is possible to know how the energy is dispersed during the exposure time, so that it is possible to create a blur-free image from the blurred image.
以下、簡単のため、横一次元で説明する。画素を左から順に、n−1,n,n+1,n+2,n+3,…,とし、ある画素nに注目する。ブレが無いとき、露光時間中のエネルギーは、その画素に集中するため、エネルギーの集中度は「1.0」である。この状態を図5に示す。このときの撮影結果を、図6の表に示す。図6に示すものが、劣化しなかった場合の正しい画像データ「img」となる。なお、各データは、8ビット(0〜255)のデータで現している。 Hereinafter, for the sake of simplicity, the description will be made in one horizontal dimension. The pixels are set to n-1, n, n + 1, n + 2, n + 3,... In order from the left, and attention is paid to a certain pixel n. When there is no blur, the energy during the exposure time is concentrated on the pixel, so the energy concentration is “1.0”. This state is shown in FIG. The imaging results at this time are shown in the table of FIG. What is shown in FIG. 6 is the correct image data “img” when there is no deterioration. Each data is represented by 8 bits (0 to 255).
露光時間中にブレがあり、露光時間中の50%の時間はn番目の画素に、30%の時間はn+1番目の画素に、20%の時間はn+2番目の画素に、それぞれぶれていたとする。エネルギーの分散の仕方は、図7に示す表のとおりとなる。これが変化要因情報データ「g」となる。 It is assumed that there is blurring during the exposure time, 50% of the exposure time is blurred to the nth pixel, 30% of time is shifted to the n + 1th pixel, and 20% of time is shifted to the n + 2th pixel. . The way of energy dispersion is as shown in the table of FIG. This is the change factor information data “g”.
ブレは、全ての画素で一様であるので、上ぶれ(縦ぶれ)が無いとすると、ブレの状況は、図8に示す表のとおりとなる。図8中の「撮影結果」として示されるデータが、原画像データ「img」で、「ブレ画像」として示されるデータが、撮影画像データ「img’」となる。具体的には、たとえば「n−3」の画素の「120」は、ぶれ情報である変化要因情報データ「g」の「0.5」「0.3」「0.2」の配分比に従い、「n−3」の画素に「60」、「n−2」の画素に「36」、「n−1」の画素に「24」というように分散する。同様に、「n−2」の画素のデータである「60」は、「n−2」に「30」、「n−1」に「18」、「n」に「12」として分散する。この撮影画像データ「img’」と、図7に示す変化要因情報データ「g」からぶれの無い撮影結果を算出することとなる。 Since blurring is uniform for all pixels, assuming that there is no upper blur (vertical blurring), the blurring situation is as shown in the table of FIG. In FIG. 8, the data indicated as “imaging result” is the original image data “img”, and the data indicated as “blurred image” is the captured image data “img ′”. Specifically, for example, “120” of the pixel “n−3” follows the distribution ratio of “0.5”, “0.3”, and “0.2” of the change factor information data “g” that is the blur information. , "60" is distributed to "n-3" pixels, "36" is distributed to "n-2" pixels, and "24" is distributed to "n-1" pixels. Similarly, “60” that is the pixel data of “n−2” is distributed as “30” in “n−2”, “18” in “n−1”, and “12” in “n”. From this photographic image data “img ′” and the change factor information data “g” shown in FIG.
ステップS101に示す任意の初期画像データ「i0」としては、どのようなものでも採用できるが、この説明に当たっては、撮影画像データ「img’」を用いる。すなわち、i0=img’として処理を開始する。図9の表中に「入力」とされたものが初期画像データ「i0」に相当する。この初期画像データ「i0」すなわち「img’」に、ステップS102で変化要因情報データ「g」を作用させる。すなわち、たとえば、初期画像データ「i0」の「n−3」の画素の「60」は、「n−3」の画素に「30」が、「n−2」の画素に「18」が、「n−1」の画素に「12」がそれぞれ割り振られる。他の画素についても同様に配分され、出力「i0’」として示される比較用画像データ「i0’」が生成される。このため、ステップS103の差分のデータ「δ」は、図9の最下欄に示すようになる。 Any arbitrary initial image data “i 0 ” shown in step S 101 can be adopted, but in this description, the photographed image data “img ′” is used. That is, the process starts with i 0 = img ′. Those with "input" in the table of FIG. 9 corresponds to the initial image data "i 0". In step S102, the change factor information data “g” is applied to the initial image data “i 0 ”, that is, “img ′”. That is, for example, “60” of the “n-3” pixel of the initial image data “i 0 ” is “30” for the “n-3” pixel and “18” for the “n-2” pixel. , “12” is assigned to each pixel of “n−1”. Allocated similarly for the other pixels, the output "i 0 '" image data "i 0 for comparison shown as'" is generated. Therefore, the difference data “δ” in step S103 is as shown in the bottom column of FIG.
この後、ステップS104にて差分のデータ「δ」の大きさを判断する。具体的には、差分のデータ「δ」が全て絶対値で5以下となった場合に処理を終了するが、図9に示す差分のデータ「δ」は、この条件に合わないため、ステップS105に進む。すなわち、差分のデータ「δ」を変化要因情報データ「g」を使用して、任意の初期画像データ「i0」に配分して、図10中の「次回入力」として示される復元画像データ「i0+n」を生成する。この場合、第1回目であるため、図10では、「i0+1」と表している。 Thereafter, the size of the difference data “δ” is determined in step S104. Specifically, the process ends when all the difference data “δ” is 5 or less in absolute value, but the difference data “δ” shown in FIG. Proceed to That is, the difference data “δ” is distributed to arbitrary initial image data “i 0 ” using the change factor information data “g”, and the restored image data “ i 0 + n ”. In this case, since it is the first time, it is represented as “i 0 + 1 ” in FIG.
差分のデータ「δ」の配分は、たとえば「n−3」の画素のデータ「30」に自分の所(=「n−3」の画素)の配分比である0.5をかけた「15」を「n−3」の画素に配分し、また「n−2」の画素のデータ「15」にその「n−2」の画素にきているはずの配分比である「0.3」をかけた「4.5」を配分し、さらに、「n−1」の画素のデータ「9.2」に、その「n−1」の画素にきているはずの配分比である「0.2」をかけた「1.84」を配分する。「n−3」の画素に配分された総量は、「21.34」となり、この値を初期画像データ「i0」(ここでは撮影画像データ「img’」を使用)にプラスして、復元画像データ「i0+1」を生成している。 The distribution of the difference data “δ” is, for example, “15” obtained by multiplying the data “30” of the pixel “n−3” by 0.5, which is the distribution ratio of the place (= “n−3” pixel). ”Is distributed to the pixel“ n-3 ”, and“ 0.3 ”, which is the distribution ratio that should have come to the pixel“ n-2 ”in the data“ 15 ”of the pixel“ n-2 ”. “4.5” multiplied by the “n−1” pixel data “9.2”, and the distribution ratio “0” that should have come to the “n−1” pixel is “0”. Allocate “1.84” multiplied by “.2”. The total amount allocated to the “n−3” pixels is “21.34”, and this value is added to the initial image data “i 0 ” (here, the captured image data “img ′” is used) to be restored. Image data “i 0 + 1 ” is generated.
図11に示すように、この復元画像データ「i0+1」がステップS102の入力画像のデータ(=初期画像データ「i0」)になり、ステップS102が実行され、ステップS103へと移行し、新しい差分のデータ「δ」を得る。その新しい差分のデータ「δ」の大きさをステップS104で判断し、所定値より大きい場合、ステップS105で新しい差分のデータ「δ」を前回の復元画像データ「i0+1」に配分し、新しい復元画像データ「i0+2」を生成する(図12参照)。その後、ステップS102の遂行により、復元画像データ「i0+2」から新しい比較用画像データ「i0+2’」が生成される。このように、ステップS102,S103が実行された後、ステップS104へ行き、そこでの判断によりステップS105へ行ったり、ステップS106へ移行する。このような処理を繰り返す。 As shown in FIG. 11, this restored image data “i 0 + 1 ” becomes the input image data (= initial image data “i 0 ”) in step S102, step S102 is executed, the process proceeds to step S103, and a new The difference data “δ” is obtained. The size of the new difference data “δ” is determined in step S104. If it is larger than the predetermined value, the new difference data “δ” is distributed to the previous restored image data “i 0 + 1 ” in step S105, and a new restoration is performed. Image data “i 0 +2” is generated (see FIG. 12). Thereafter, new comparison image data “i 0 + 2 ′” is generated from the restored image data “i 0 + 2 ” by performing step S102. As described above, after steps S102 and S103 are executed, the process goes to step S104, and the process proceeds to step S105 or shifts to step S106 depending on the determination there. Such a process is repeated.
以上のようにして求めた復元画像データ「i0+n」と復元の対象である撮影画像データ「img’」とから、撮影画像データ「img’」から復元画像データ「i0+n」への伝達関数Gを、G=i0+n/img’として求めることができる。 'Since the photographed image data "img above manner obtained restored image data" i 0 + n "and the photographed image data is restored in the target" img "' transfer function G from" to restore the image data "i 0 + n" Can be determined as G = i 0 + n / img ′.
ところで、撮影画像データが、手ぶれ等により劣化し輪郭部がぼけたものとなっている場合には、画像データの高周波成分が失われてしまっている。この影響からか、上述の復元処理を行ってもそれほど良い復元原画像データを得ることができない。また、高周波成分が失われていることにより、伝達関数が不安定になると考えられる。そこで、以上に述べた処理手法を前提として、以下に説明する処理手法を採ることにより、よりよい復元原画像データを求めることができるとともに、安定した伝達関数を求めることができる。 By the way, when the photographed image data is deteriorated due to camera shake or the like and the outline portion is blurred, the high-frequency component of the image data is lost. Because of this influence, it is not possible to obtain so good restored original image data even if the above restoration processing is performed. Further, it is considered that the transfer function becomes unstable due to the loss of the high frequency component. Therefore, by taking the processing method described below on the premise of the processing method described above, it is possible to obtain better restored original image data and to obtain a stable transfer function.
図13に示すよう、撮影画像データ「img’」から、2つの処理用画像データ「img’(1)」,「img’(2)」を生成する。処理用画像データ「img’(1)」,「img’(2)」は、次のような考え方に基づいて生成される。 As shown in FIG. 13, two pieces of processing image data “img ′ (1)” and “img ′ (2)” are generated from the captured image data “img ′”. The processing image data “img ′ (1)” and “img ′ (2)” are generated based on the following concept.
撮影画像データ「img’」は、例えば、図13の(A)に示すように、1番から32番の画素位置の画素に、それぞれ、「aa」から「dh」までの画素画像データを有するものする。
The photographed image data “img ′” has pixel image data from “aa” to “dh”, respectively, in the pixels at the
この撮影画像データ「img’」に対して、処理用画像データ「img’(1)」を、図13の(B1)に示すように、画素番号「1,3,5,…,32」に、それぞれ、「aa」,「ac」,「ae」,…,「dh」の画素画像データを有し、これらの画素の間の画素にあたる画素番号「2,4,6,…,31」に、コントラスト生成用画素画像データとして輝度0の画素画像データ「z」を有するように生成する。輝度0の画素画像データとは、例えば、画素画像データの輝度を8ビットで暗い方から順に255段階で表したときの最も暗い、例えば、黒ベタのような明るさが無い画像データとする。 For this photographed image data “img ′”, the processing image data “img ′ (1)” is assigned to pixel numbers “1, 3, 5,..., 32” as shown in FIG. , Have pixel image data of “aa”, “ac”, “ae”,..., “Dh”, respectively, and pixel numbers “2, 4, 6,..., 31” corresponding to pixels between these pixels. The pixel image data for contrast generation is generated so as to have pixel image data “z” having a luminance of 0. The pixel image data with 0 brightness is, for example, image data having no brightness such as black solid when the brightness of the pixel image data is expressed in 255 steps in order from the darker with 8 bits.
また、処理用画像データ「img’(2)」を、図13の(B2)に示すように、画素番号「2,4,6,…,31」に、それぞれ、「ab」,「ad」,「af」,…,「dg」の画素画像データを有し、これらの画素の間の画素にあたる画素番号「1,3,5,…,32」に、画素画像データ「z」を有するように生成する。 Further, the processing image data “img ′ (2)” is assigned to pixel numbers “2, 4, 6,..., 31”, respectively, as shown in (B2) of FIG. , “Af”,..., “Dg”, and pixel number “1, 3, 5,..., 32” corresponding to pixels between these pixels has pixel image data “z”. To generate.
つまり、処理用画像データ「img’(1)」,「img’(2)」の互いに同じ画素位置にある画素のいずれか1つの画素画像データは、撮影画像データ「img’」の同じ画素位置の画素の画素画像データと同じになっている。また、各処理用画像データ「img’(1)」,「img’(2)」の撮影画像データ「img’」の画素画像データを有しない画素の画素画像データは、輝度0の画素画像データ「z」となっている。このように生成された処理用画像データ「img’(1)」,「img’(2)」は、コントラストの高い画像データとして生成されている。 That is, any one pixel image data of the pixels at the same pixel position in the processing image data “img ′ (1)” and “img ′ (2)” is the same pixel position in the captured image data “img ′”. This is the same as the pixel image data of the other pixel. In addition, pixel image data of pixels that do not have the pixel image data of the captured image data “img ′” of the respective processing image data “img ′ (1)” and “img ′ (2)” is pixel image data of 0 brightness. “Z”. The processing image data “img ′ (1)” and “img ′ (2)” generated in this way are generated as high-contrast image data.
なお、ここでは、コントラスト生成用画素画像データとして画素画像データ「z」を輝度0(輝度がない)のデータとしたが、必ずしも0に限らず、例えば、輝度の高いデータとして、輝度255としてもよい。コントラスト生成用画素画像データは、コントラスト生成用画素画像データを入れる画素に隣接する画素に対して、できるだけ多くの画素について、できるだけ高いコントラストを生ずるデータとすることが適切である。 Here, the pixel image data “z” is the data having the luminance 0 (no luminance) as the pixel image data for contrast generation. However, the pixel image data “z” is not necessarily 0, and for example, the luminance 255 may be the high luminance data. Good. It is appropriate that the contrast generation pixel image data is data that produces as high a contrast as possible for as many pixels as possible with respect to the pixels adjacent to the pixels into which the contrast generation pixel image data is to be input.
このような、処理用画像データ「img’(1)」に対して、図4で説明した処理を、撮影画像データ「img’」の代わりに行う。つまり、図4のステップS103における撮影画像データ「img’」の代わりに、処理用画像データ「img’(1)」を処理対象として処理を行い、処理用画像データ「img’(1)」と比較用画像データ「i0’」とを比較し、差分のデータ「δ」を算出する。 The processing described with reference to FIG. 4 is performed on the processing image data “img ′ (1)” instead of the captured image data “img ′”. That is, instead of the captured image data “img ′” in step S103 of FIG. 4, the processing image data “img ′ (1)” is processed as a processing target, and processing image data “img ′ (1)” is obtained. The comparison image data “i 0 ′” is compared, and difference data “δ” is calculated.
次いで、ステップS104で、この差分のデータ「δ」が所定値以上であるか否かを判断し、所定値以上であれば、ステップS105で新たな復元画像データとして処理用復元画像データを生成する処理を行う。すなわち、差分のデータ「δ」を変化要因情報データ「g」に基づいて、任意の初期画像データ「i0」に配分し、処理用復元画像データ「i0+n」を生成する。その後、ステップS102,S103,S104,S105を繰り返す。 Next, in step S104, it is determined whether or not the difference data “δ” is greater than or equal to a predetermined value. If it is greater than or equal to the predetermined value, processing restored image data is generated as new restored image data in step S105. Process. That is, based on the difference between the data "δ" in the change factor information data "g", allocated to an arbitrary initial image data "i 0", to generate a processing restored data "i 0 + n". Thereafter, steps S102, S103, S104, and S105 are repeated.
ステップS104において、差分のデータ「δ」が所定値より小さい場合、処理を終了する(ステップS106)。そして、処理を終了した時点での処理用復元画像データ「i0+n」を処理用原画像データ「i0+n(1)」とする。 If the difference data “δ” is smaller than the predetermined value in step S104, the process ends (step S106). Then, the processing restored image data “i 0 + n ” at the time when the processing is completed is set as the processing original image data “i 0 + n (1)”.
すなわち、処理用画像データ「img’(1)」に対して、図4で説明した処理を、撮影画像データ「img’」の代わりに行うことにより、処理用原画像データ「i0+n(1)」の生成処理を行っている。 That is, the processing image data “img ′ (1)” is subjected to the processing described in FIG. 4 in place of the captured image data “img ′”, whereby the processing original image data “i 0 + n (1)”. Is generated.
この処理用原画像データ「i0+n(1)」の概念を図13の(C1)に示す。つまり、処理用画像データ「img’(1)」の各画素画像データ「aa」,「z」,「ac」,「z」,「ae」,「z」,…,「z」,「dh」は、図4の処理により「aa’」,「z’」,「ac’」,「z’」,「ae’」,「z’」,…,「z’」,「dh’」のように復元される。なお、各「z’」は、互いに等しいとは限らない。この処理用原画像データ「i0+n(1)」は、変化要因情報データ「g」が作用すると処理用画像データ「img’(1)」となるものである。 The concept of the processing original image data “i 0 + n (1)” is shown in FIG. 13 (C1). That is, each pixel image data “aa”, “z”, “ac”, “z”, “ae”, “z”,..., “Z”, “dh” of the processing image data “img ′ (1)”. , “Aa ′”, “z ′”, “ac ′”, “z ′”, “ae ′”, “z ′”,..., “Z ′”, “dh ′” by the processing of FIG. To be restored. Each “z ′” is not necessarily equal to each other. This processing original image data “i 0 + n (1)” becomes processing image data “img ′ (1)” when the change factor information data “g” acts.
処理用画像データ「img’(2)」に対しても、処理用画像データ「img’(1)」と同じように、図4で説明した処理を行い、処理用原画像データ「i0+n(2)」を生成する。そして、この処理用原画像データ「i0+n(2)」の概念を図13の(C2)に示す。つまり、処理用画像データ「img’(2)」の各画素画像データ「z」,「ab」,「z」,「ad」,「z」,「af」,「z」,…,「z」,「dg」,「z」は、図4の処理により「z’」,「ab’」,「z’」,「ad’」,「z’」,「af’」,「z’」,…,「z’」,「dg’」,「z’」のように復元される。なお、各「z’」は、上記と同様に互いに等しいとは限らない。この処理用画像データ「img’(2)」についての処理用原画像データ「i0+n(2)」も、変化要因情報データ「g」が作用すると処理用画像データ「img’(2)」となるものである。 Similarly to the processing image data “img ′ (1)”, the processing described in FIG. 4 is performed on the processing image data “img ′ (2)”, and the processing original image data “i 0 + n ( 2) ". The concept of the processing original image data “i 0 + n (2)” is shown in (C2) of FIG. That is, each pixel image data “z”, “ab”, “z”, “ad”, “z”, “af”, “z”,..., “Z” of the processing image data “img ′ (2)”. , “Dg”, “z” are converted into “z ′”, “ab ′”, “z ′”, “ad ′”, “z ′”, “af ′”, “z ′” by the processing of FIG. ,..., “Z ′”, “dg ′”, “z ′”. Each “z ′” is not necessarily equal to each other as described above. The processing original image data “i 0 + n (2)” for the processing image data “img ′ (2)” is also changed to the processing image data “img ′ (2)” when the change factor information data “g” acts. It will be.
そして、処理用原画像データ「i0+n(1)」,「i0+n(2)」の、撮影画像データの画素画像に係る各画素画像データ、つまり、「aa’」,「ac’」,「ae’」,…,「dh’」と、「ab’」,「ad’」,「af’」,…,「dg’」は、それぞれ、原画像データ「img」の対応する画素位置の画素画像データに近似しているものと言える。したがって、処理用原画像データ「i0+n(1)」,「i0+n(2)」の「z’」以外の各画素画像データ(撮影画像データ「img’」の画素画像に係る各画素画像データ)に基づいて、図13の(D)に示す復元原画像データ「i0+n」を生成する。つまり、処理用原画像データ「i0+n(1)」と処理用原画像データ「i0+n(2)」とを各画素が重なるように加算し、各画素について「z’」を減ずることにより復元原画像データ「i0+n」を生成することができる。 Then, each pixel image data related to the pixel image of the captured image data of the processing original image data “i 0 + n (1)”, “i 0 + n (2)”, that is, “aa ′”, “ac ′”, “ “ae ′”,..., “dh ′” and “ab ′”, “ad ′”, “af ′”,..., “dg ′” are pixels at corresponding pixel positions of the original image data “img”. It can be said that it approximates the image data. Accordingly, each pixel image data other than “z ′” in the processing original image data “i 0 + n (1)” and “i 0 + n (2)” (each pixel image data related to the pixel image of the photographed image data “img ′”). ) To generate restored original image data “i 0 + n ” shown in FIG. 13D. In other words, the processing original image data “i 0 + n (1)” and the processing original image data “i 0 + n (2)” are added so that each pixel overlaps, and restoration is performed by reducing “z ′” for each pixel. Original image data “i 0 + n ” can be generated.
上述したように、処理用画像データ「img’(1)」,「img’(2)」をコントラストの高い画像データとすると、図4で基本的な処理手法として説明した撮影画像データ「img’」を直接処理対象とするよりも、原画像データ「img」に近い復元原画像復元原画像データ「i0+n」を生成することができる。すなわち、原画像によりちかい復元原画像を得ることができる。 As described above, if the processing image data “img ′ (1)” and “img ′ (2)” are high-contrast image data, the captured image data “img ′” described as the basic processing method in FIG. The original image data “i 0 + n ” that is closer to the original image data “img” can be generated than is directly processed. That is, a small restored original image can be obtained from the original image.
また、処理用画像データ「img’(1)」から処理用原画像データ「i0+n(1)」への伝達関数「G1」を、G1=i0+n(1)/img’(1)として求める場合において、処理用画像データ「img’(1)」が、コントラストの高い画像データであり高周波成分を十分に含んでいるため、安定した伝達関数G1を求めることができる。処理用画像データ「img’(2)」から処理用原画像データ「i0+n(2)」への伝達関数「G2」についても、同様に安定した伝達関数G2を求めることができる。 Further, the transfer function “G1” from the processing image data “img ′ (1)” to the processing original image data “i 0 + n (1)” is obtained as G1 = i 0 + n (1) / img ′ (1). In this case, since the processing image data “img ′ (1)” is image data with high contrast and sufficiently includes a high-frequency component, a stable transfer function G1 can be obtained. Similarly, a stable transfer function G2 can be obtained for the transfer function “G2” from the processing image data “img ′ (2)” to the processing original image data “i 0 + n (2)”.
なお、求めた各伝達関数「G1」,「G2」は撮影画像データ「img’」とともに記録部5に記録する。そして、後日改めて、撮影画像データ「img’」を再生する際に、撮影画像データ「img’」から処理用画像データ「img’(1)」,「img’(2)」を生成し、この処理用画像データ「img’(1)」,「img’(2)」に伝達関数G1,G2を作用させて、直ちに、処理用原画像データ「i0+n(1)」,「i0+n(2)」を生成し、撮影画像データ「img’」の復元原画像データ「i0+n」を求めることができる。つまり、図4の処理手法を経ることなく、短時間で撮影画像データ「img’」の復元原画像データ「i0+n」を求めることができる。
The obtained transfer functions “G1” and “G2” are recorded in the
ところで、図4の処理ルーチンに示す処理手法においては、ステップS104において、差分のデータ「δ」の大きさを判断する代わりに、S102からS105の処理ルーチンの処理回数を設定し、設定した回数の処理ルーチンを実行したときの復元画像データ「i0+n」を原画像データ「img」に近似したものとすることもできる。つまり、処理回数を、復元画像データ「i0+n」が原画像データ「img」に近似したと推定できる回数以上に設定することにより、差分のデータ「δ」の大きさの判断を行うことなく復元画像データ「i0+n」を求めることができる。 By the way, in the processing method shown in the processing routine of FIG. 4, instead of determining the size of the difference data “δ” in step S104, the number of processing routines in steps S102 to S105 is set. The restored image data “i 0 + n ” when the processing routine is executed can be approximated to the original image data “img”. In other words, by setting the number of processing times to be greater than or equal to the number of times that the restored image data “i 0 + n ” can be estimated to approximate the original image data “img”, the restoration is performed without determining the size of the difference data “δ”. Image data “i 0 + n ” can be obtained.
そして、このように設定した回数の処理ルーチンを実行したときの復元画像データ「i0+n」を原画像データ「img」に近似したものとする処理の考え方を数式で表現すると次のようになる。なお、図4は、処理部4の処理方法の考え方を簡便に判りやすく説明するものである。そのため、この図4では、1つの画素に着目して説明しているものであるが、撮像部2の全撮像領域における復元画像データを求めるには、撮像領域の全画素について図4の処理ルーチンを実行する必要がある。
Then, the concept of processing in which the restored image data “i 0 + n ” obtained when the processing routine of the set number of times is executed is approximated to the original image data “img” is expressed by the following formula. FIG. 4 explains the concept of the processing method of the
先ず、S101における初期画像データを「i0」とすると、S102において、比較用画像データ「i0′」は、初期画像データ「i0」と変化要因関数「g」の重畳積分として(1)式のように表される。
S103の差分のデータ「δ」は、(2)式のように表される。
S105の復元画像データ「i0+1」は、初期画像データ「i0」に差分のデータ「δ」をフィードバック関数「h」に基づいて配分したものとして(3)式のように表される。
そして次回の処理ルーチンでは、この(3)式の復元画像データ「i0+1」が、S102の「i0」の代わりに入り、比較用画像データ「i0+1′」が、(4)式に表される形で生成される。
そうして、S103において、差分のデータ「δ」が、(5)式で表される。
そうすると、S105の復元画像データ「i0+2」は、(6)式のように表される。
以下同様に、「i0+3」,…を計算していくと、復元画像データ「i0+n」は、(7)式のように表される。
つまり、上記(7)式を用いると、図4の処理ルーチンを実行することなく、所定の設定回数のルーチンを行ったときと同じ復元画像データを計算により求めることができる。例えば、(7)式において、k=20のときの計算値は、図4の処理ルーチンを20回繰り返したときの復元画像データと等しくなる。 That is, when the above equation (7) is used, the same restored image data as when the predetermined number of times of the routine is performed can be obtained by calculation without executing the processing routine of FIG. For example, in equation (7), the calculated value when k = 20 is equal to the restored image data when the processing routine of FIG. 4 is repeated 20 times.
図4の処理ルーチンの回数を多くすれば多くするほど、復元画像データ「i0+n」は、原画像データ「img」に近づくが、処理に時間が長くなる。一方、上記の(7)式においては「k」を大きくすることが、図4の処理ルーチンの回数を多くすることに相当することになる。しかしながら、「k」を大きくしても計算時間は、「k」に相当する回数の処理ルーチンを実行するのに比べて短いものとなる。 As the number of processing routines in FIG. 4 is increased, the restored image data “i 0 + n ” approaches the original image data “img”, but the processing time becomes longer. On the other hand, in the above equation (7), increasing “k” corresponds to increasing the number of processing routines in FIG. However, even if “k” is increased, the calculation time is shorter than when the processing routine corresponding to “k” is executed.
ところで、図4の処理ルーチンにおいて、初期画像データ「i0」を黒ベタの画像、つまり、画像データを入力しない状態で開始することは、(7)式において、「i0」を「0」にすることに相当する。 Incidentally, in the processing routine of FIG. 4, the initial image data "i 0" black solid image, that is, to start with no image data is input, in the equation (7), the "i 0", "0" Is equivalent to
つまり、(7)式において、「i0」=「0」とすると、(7)式は、(9)式のように表される。
つまり、上記(9)式を用いても、図4の処理ルーチンを実行することなく、所定の設定回数のルーチンを行ったときと同じ復元画像データを計算により求めることができる。 That is, even if the above equation (9) is used, the same restored image data as that obtained when the predetermined number of times of the routine is performed can be obtained by calculation without executing the processing routine of FIG.
なお、フィードバック関数「h」については、例えば、手ぶれによるカメラの移動軌跡が図13の線L(変化要因関数が「g(x,y)」)で表されるとしたときに、フィードバック関数「h」は、h(−x,−y)=g(x,y)となる関数とすると、効率よく差分のデータ「δ」を小さくすることができる。 As for the feedback function “h”, for example, when the camera movement trajectory due to camera shake is represented by the line L in FIG. 13 (the change factor function is “g (x, y)”), the feedback function “ If “h” is a function such that h (−x, −y) = g (x, y), the difference data “δ” can be efficiently reduced.
ところで、(7)式と(9)式をフーリエ変換すると、(7)式は、(10)式のように表され、また(9)式は、(11)式のように表される。
このように、(7)式、(9)式についてフーリエ変換を行った(10)式、(11)式を用いて周波数空間において計算をすることにより、(7)式、(9)式のような重畳積分を行うことなく、積算(掛け算)と加減算(加算と減算)により復元画像データ「I0+n」を算出することができる。このため、計算速度を先に示した重畳積分を行う場合に比べて早くすることができる。 Thus, by calculating in the frequency space using the equations (10) and (11) obtained by performing Fourier transform on the equations (7) and (9), the equations (7) and (9) Without performing such superposition integration, the restored image data “I 0 + n ” can be calculated by integration (multiplication) and addition / subtraction (addition and subtraction). For this reason, it is possible to increase the calculation speed as compared with the case of performing the superposition integration described above.
なお、(10)式あるいは(11)式により算出した復元画像データ「I0+n」については逆フーリエ変換により空間領域における画像データを求める。 For restored image data “I 0 + n ” calculated by equation (10) or equation (11), image data in the spatial domain is obtained by inverse Fourier transform.
以上に説明した(7)式、(9)式、(10)式あるいは(11)式を用いて、処理用画像データ「img’(1)」,「img’(2)」から、処理用原画像データ「i0+n(1)」,「i0+n(2)」を生成するようにしてもよい。 The processing image data “img ′ (1)”, “img ′ (2)” is used for processing by using the formulas (7), (9), (10), or (11) described above. The original image data “i 0 + n (1)”, “i 0 + n (2)” may be generated.
なお、処理用画像データは2つに限らず、3つ以上生成してもよい。例えば、図14に示すように、図14の(A)の撮影画像データ「img’」から、図14の(B1),(B2),(B3)に示す3つの処理用画像データ「img’(1)」,「img’(2)」,「img’(3)」を生成するようにしてもよい。 Note that the number of processing image data is not limited to two, and may be three or more. For example, as shown in FIG. 14, from the captured image data “img ′” of FIG. 14A, three processing image data “img ′” shown in (B1), (B2), and (B3) of FIG. (1) "," img '(2) "," img' (3) "may be generated.
また、図15に示すように、図15の(A)の撮影画像データ「img’」から、図15の(B1),(B2)に示す処理用画像データ「img’(1)」,「img’(2)」ように、2以上の画素に連続して撮影画像データ「img’」の画素画像データが入るようにしてもよい。例えば、図15(B)の1,2の画素には、連続して画素画像データ「aa」,「ab」が入っている。しかし、撮影画像データ「img’」の画素画像データとコントラスト生成用画素画像データ「z」を交互に配列するようにすると、コントラストが高い処理用画像データとすることができる。
Further, as shown in FIG. 15, the processing image data “img ′ (1)”, “B” shown in (B1) and (B2) of FIG. As in “img ′ (2)”, the pixel image data of the photographed image data “img ′” may be continuously input to two or more pixels. For example, pixel images “aa” and “ab” are continuously stored in the
また、コントラストの低下する方向が、一方向である場合は、この一方向のみに、撮影画像データの画素画像データとコントラスト生成用画素画像データが交互に配列されるようにし、コントラストが低下していない他方の方向については、撮影画像データの画素画像データの配列のままにしておくようにしてもよい。 When the direction in which the contrast decreases is one direction, the pixel image data of the captured image data and the pixel image data for contrast generation are arranged alternately in only one direction, and the contrast is decreased. For the other direction that is not present, the arrangement of the pixel image data of the captured image data may be left as it is.
ところで、以上に説明した伝達関数「G1」,「G2」を求める処理は、撮像部2の全撮像領域のうちの一部の領域、つまり、撮像画像データ「img’」の一部の領域を対象として、この一部の領域について行うのが処理の高速化を図る点で好適である。
By the way, the processing for obtaining the transfer functions “G1” and “G2” described above is performed on a part of the entire imaging area of the
例えば、図16の(A)に示す1から32の画素のうちから、4分の1の画素数にあたる1,2,3,4,5,9,10,11,12,13の画素番号の画素から構成される一部の領域について、図16の(B1),(B2)に示す一部領域処理用画像データ「img’(1s)」,「img’(2s)」を生成する。そして、図4の処理手法あるいは(7)式,(9)式,(10)式,(11)式により、一部領域処理用画像データ「img’(1s)」,「img’(2s)」のそれぞれについて、図16の(C1),(C2)に示す一部処理用原画像データ「i0+n(1s)」,「i0+n(2s)」生成すする。そうして、一部領域処理用画像データ「img’(1s)」,「img’(2s)」と一部領域処理用原画像データ「i0+n(1s)」,「i0+n(2s)」との間の伝達関数を一部領域伝達関数「G1s」,「G2s」として求める。
For example,
そして、一部の撮像領域について求めた一部領域伝達関数「G1s」,「G2s」を拡大、補間し、処理用画像データ「img’(1)」,「img’(2)」と処理用原画像データ「i0+n(1)」,「i0+n(2)」との間の伝達関数「G1」,「G2」として求める。このようにすることにより、図4に示す処理を一部の領域について行えば済むため、大きな画像の処理を行う際の処理速度の向上を図ることができる。 Then, the partial area transfer functions “G1s” and “G2s” obtained for a part of the imaging areas are enlarged and interpolated to process image data “img ′ (1)” and “img ′ (2)”. It is obtained as transfer functions “G1” and “G2” between the original image data “i 0 + n (1)” and “i 0 + n (2)”. In this way, since the process shown in FIG. 4 only needs to be performed for a part of the area, the processing speed when processing a large image can be improved.
求めた各伝達関数「G1」,「G2」は撮影画像データ「img’」とともに記録部5に記録する。そして、後日改めて、撮影画像データ「img’」を再生する際に、撮影画像データ「img’」から処理用画像データ「img’(1)」,「img’(2)」を生成し、この処理用画像データ「img’(1)」,「img’(2)」に伝達関数G1,G2を作用させて、直ちに、処理用原画像データ「i0+n(1)」,「i0+n(2)」を生成し、撮影画像データ「img’」の復元原画像データ「i0+n」を求める。
The obtained transfer functions “G1” and “G2” are recorded in the
1 画像処理装置
2 撮影部
3 制御系部
4 処理部
5 記録部
6 検出部
7 要因情報保存部
img 原画像のデータ
img’ 撮影画像データ
img’(1),img’(2),img’(3) 処理用画像データ
i0+n 復元原画像データ
i0+n(1),i0+n(2) 処理用原画像データ
img’(1s),img’(2s) 一部領域処理用画像データ
i0+n(1s),i0+n(2s) 一部領域処理用原画像データ
z コントラスト生成用画素画像データ
δR 差分のデータ
δi・i 差分のデータ
h フィードバック関数(配分比)
G1,G2 伝達関数
g 変化要因情報データ
DESCRIPTION OF
G1, G2 Transfer function g Change factor information data
Claims (7)
上記処理部は、
互いに異なる複数の処理用画像データであって、これら各処理用画像データの互いに同じ画素位置にある画素のいずれか1つの画素画像データを、復元対象画像データの同じ画素位置の画素の画素画像データと同じとし、上記各処理用画像データの画素のうち、上記復元対象画像データの画素画像データを有しない画素の画素画像データを、コントラスト生成用画素画像データとし、上記復元対象画像データの画素画像データを有する画素とコントラスト生成用画素画像データを有する画素が交互に配列される処理用画像データを生成し、
上記処理用画像データのそれぞれについて処理用原画像データを生成する処理用原画像データ生成処理を行い、
上記処理用原画像データから、原画像データに近似する復元原画像データを生成する原画像データ復元処理を行うことを特徴とする画像処理装置。 In an image processing apparatus having a processing unit for processing an image,
The processing unit
A plurality of processing image data different from each other, and any one pixel image data of the pixels at the same pixel position of each processing image data is converted into pixel image data of a pixel at the same pixel position of the restoration target image data. The pixel image data of the pixels that do not have the pixel image data of the restoration target image data among the pixels of the processing image data is the pixel image data for the contrast generation, and the pixel image of the restoration target image data Generating processing image data in which pixels having data and pixels having contrast generation pixel image data are alternately arranged;
Perform processing original image data generation processing for generating processing original image data for each of the processing image data,
An image processing apparatus for performing original image data restoration processing for generating restored original image data that approximates the original image data from the processing original image data.
画像変化の要因となる変化要因情報のデータを利用して、任意の画像のデータから比較用データを生成し、その後、前記処理用画像データと上記比較用データとを比較し、得られた差分のデータを上記変化要因情報のデータを利用して上記任意の画像のデータに配分することで処理用復元画像データを生成し、その後、この処理用復元画像データを上記任意の画像データの代わりに使用し、同様の処理を繰り返すことで、処理用原画像データを生成する処理を行うことを特徴とする請求項1に記載の画像処理装置。 The processing original image data generation process includes:
Using the data of the change factor information that causes the image change, the comparison data is generated from the data of any image, and then the processing image data and the comparison data are compared, and the obtained difference Is distributed to the data of the arbitrary image using the data of the change factor information, and then the restored image data for processing is generated, and then the restored image data for processing is used instead of the arbitrary image data. The image processing apparatus according to claim 1, wherein processing for generating original image data for processing is performed by repeating similar processing.
上記2つの各処理用画像データは、前記復元対象画像データの画素画像データを有する画素と前記コントラスト生成用画素画像データを有する画素とは、1画素毎に交互に配列されることを特徴とする請求項1または請求項2のいずれか1つに記載の画像処理装置。 The plurality of processing image data are two processing image data,
In each of the two processing image data, the pixel having the pixel image data of the restoration target image data and the pixel having the contrast generating pixel image data are alternately arranged for each pixel. The image processing apparatus according to claim 1.
上記処理部は、
復元対象画像データの一部の領域に対して生成する互いに異なる複数の一部領域処理用画像データであって、これら各一部領域処理用画像データの互いに同じ画素位置にある画素のいずれか1つの画素画像データを、上記復元対象画像データの一部の領域内の同じ画素位置の画素の画素画像データと同じとし、上記各一部領域処理用画像データの画素のうち、上記復元対象画像データの画素画像データを有しない画素の画素画像データを、コントラスト生成用画素画像データとし、上記復元対象画像データの画素画像データを有する画素とコントラスト生成用画素画像データを有する画素が交互に配列される一部領域処理用画像データを生成し、
上記一部領域処理用画像データのそれぞれについて一部領域処理用原画像データを生成する一部領域処理用原画像データ生成処理を行い、
上記一部領域処理用画像データと上記一部領域処理用原画像データとから、上記一部領域処理用画像データと上記一部領域処理用原画像データの間の一部領域伝達関数を求め、
この一部領域伝達関数を利用して上記復元対象画像データの復元原画像データを生成する原画像データ復元処理を行うことを特徴とする画像処理装置。 In an image processing apparatus having a processing unit for processing an image,
The processing unit
A plurality of different partial area processing image data generated for a partial area of the restoration target image data, and any one of the pixels at the same pixel position in each of the partial area processing image data One pixel image data is the same as the pixel image data of a pixel at the same pixel position in a partial area of the restoration target image data, and the restoration target image data among the pixels of the partial area processing image data The pixel image data of the pixels having no pixel image data is used as contrast generation pixel image data, and pixels having the pixel image data of the restoration target image data and pixels having the contrast generation pixel image data are alternately arranged. Generate image data for partial area processing,
Perform partial area processing original image data generation processing for generating partial area processing original image data for each of the partial area processing image data,
A partial area transfer function between the partial area processing image data and the partial area processing original image data is obtained from the partial area processing image data and the partial area processing original image data,
An image processing apparatus for performing original image data restoration processing for generating restored original image data of the restoration target image data using the partial area transfer function.
画像変化の要因となる変化要因情報のデータを利用して、任意の画像のデータから比較用データを生成し、その後、前記一部領域処理用画像データと上記比較用データとを比較し、得られた差分のデータを上記変化要因情報のデータを利用して上記任意の画像のデータに配分することで一部領域処理用復元画像データを生成し、その後、この一部領域処理用復元画像データを上記任意の画像データの代わりに使用し、同様の処理を繰り返すことで、一部領域処理用原画像データを生成する処理を行うことを特徴とする請求項4に記載の画像処理装置。 The partial area processing original image data generation process includes:
Using the data of the change factor information that causes the image change, the comparison data is generated from the data of an arbitrary image, and then the partial region processing image data is compared with the comparison data. The partial difference processing restored image data is generated by distributing the obtained difference data to the arbitrary image data using the change factor information data, and then the partial area processing restored image data. 5. The image processing apparatus according to claim 4, wherein a process for generating original image data for partial region processing is performed by repeating the same process using the image data instead of the arbitrary image data.
上記2つの各一部領域処理用画像データは、前記復元対象画像データの画素画像データを有する画素と前記コントラスト生成用画素画像データを有する画素とは、1画素毎に交互に配列されることを特徴とする請求項4または請求項5のいずれか1つに記載の画像処理装置。 The plurality of partial area processing image data are two partial area processing image data,
In each of the two partial area processing image data, the pixel having the pixel image data of the restoration target image data and the pixel having the contrast generating pixel image data are alternately arranged for each pixel. 6. The image processing apparatus according to claim 4, wherein the image processing apparatus is characterized in that:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005312521A JP5057665B2 (en) | 2005-10-27 | 2005-10-27 | Image processing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005312521A JP5057665B2 (en) | 2005-10-27 | 2005-10-27 | Image processing device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007124198A true JP2007124198A (en) | 2007-05-17 |
JP5057665B2 JP5057665B2 (en) | 2012-10-24 |
Family
ID=38147565
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005312521A Expired - Fee Related JP5057665B2 (en) | 2005-10-27 | 2005-10-27 | Image processing device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5057665B2 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002300459A (en) * | 2001-03-30 | 2002-10-11 | Minolta Co Ltd | Image restoring device through iteration method, image restoring method and its program, and recording medium |
JP2005095328A (en) * | 2003-09-24 | 2005-04-14 | Toshiba Corp | Superresolving apparatus and medical diagnostic imaging apparatus |
-
2005
- 2005-10-27 JP JP2005312521A patent/JP5057665B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002300459A (en) * | 2001-03-30 | 2002-10-11 | Minolta Co Ltd | Image restoring device through iteration method, image restoring method and its program, and recording medium |
JP2005095328A (en) * | 2003-09-24 | 2005-04-14 | Toshiba Corp | Superresolving apparatus and medical diagnostic imaging apparatus |
Also Published As
Publication number | Publication date |
---|---|
JP5057665B2 (en) | 2012-10-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5007241B2 (en) | Image processing device | |
JP2006295626A (en) | Fish-eye image processing apparatus, method thereof and fish-eye imaging apparatus | |
WO2007119680A1 (en) | Image pickup device | |
JP5184574B2 (en) | Imaging apparatus, image processing apparatus, and image processing method | |
JP2018207413A (en) | Imaging apparatus | |
JP4965179B2 (en) | Image processing device | |
JP4885150B2 (en) | Image processing device | |
JP2007048257A (en) | Signal processor | |
JP4606976B2 (en) | Image processing device | |
JP5057665B2 (en) | Image processing device | |
JP4602860B2 (en) | Image processing device | |
JP4975644B2 (en) | Image processing device | |
JP4499686B2 (en) | Image processing apparatus and method, recording medium, and program | |
JP2007129354A (en) | Image processing apparatus | |
JP4763419B2 (en) | Image processing device | |
JP4598623B2 (en) | Image processing device | |
JP5247169B2 (en) | Image processing apparatus, image processing method, and image processing program | |
JP2009153046A (en) | Blur correcting device and method, and imaging apparatus | |
JP4629537B2 (en) | Image processing device | |
JP4718618B2 (en) | Signal processing device | |
JP4449777B2 (en) | Imaging apparatus, image processing apparatus and method, recording medium, and program | |
JP2006304313A (en) | Image processor, image processing method, recording medium, and program | |
JP2007116332A (en) | Image processing apparatus | |
JP4629622B2 (en) | Image processing device | |
JP4853746B2 (en) | Imaging apparatus, image processing apparatus and method, recording medium, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20080922 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100824 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20100831 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101027 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110524 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110721 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120131 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20120315 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20120717 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20120731 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20150810 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |