JP4763415B2 - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP4763415B2
JP4763415B2 JP2005304267A JP2005304267A JP4763415B2 JP 4763415 B2 JP4763415 B2 JP 4763415B2 JP 2005304267 A JP2005304267 A JP 2005304267A JP 2005304267 A JP2005304267 A JP 2005304267A JP 4763415 B2 JP4763415 B2 JP 4763415B2
Authority
JP
Japan
Prior art keywords
data
image
original image
processing
image data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005304267A
Other languages
Japanese (ja)
Other versions
JP2007116332A (en
Inventor
史紀 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nitto Optical Co Ltd
Original Assignee
Nitto Optical Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nitto Optical Co Ltd filed Critical Nitto Optical Co Ltd
Priority to JP2005304267A priority Critical patent/JP4763415B2/en
Publication of JP2007116332A publication Critical patent/JP2007116332A/en
Application granted granted Critical
Publication of JP4763415B2 publication Critical patent/JP4763415B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus for efficiently applying restoration processing to a deteriorated image due to a camera shake. <P>SOLUTION: The image processing apparatus includes a processing section 4 that restores a preceding image before being changed from an original image of a processing object, or an image having to be substantially photographed, or an image closer to the images. The processing section 4 utilizes vibration data configuring causes to image deterioration to carry out the restoration processing and the vibration data utilized for the restoration processing are data with a frequency range in excess of a frequency of 0 Hz and up to F Hz (20&le;F&le;120). Moreover, the image processing apparatus includes a detection section 6 for detecting the vibration data and preferably adopts its sampling frequency used for the detection to be any frequency from 60 to 240 Hz. Further, the vibration data are preferably limited to a frequency band from several Hz to several tens of Hz in a frequency space. <P>COPYRIGHT: (C)2007,JPO&amp;INPIT

Description

本発明は、デジタルカメラやデジタルビデオカメラ等の画像処理装置に関する。   The present invention relates to an image processing apparatus such as a digital camera or a digital video camera.

従来から、カメラ等の画像処理装置で被写体を撮影すると、撮影される画像には時々劣化が生ずることが知られている。画像劣化の要因としては撮影時の手ブレ等がある。そこで、手ブレに起因する劣化画像の補正のための周波数特性を、撮影装置のユーザー(撮影者)用に事前に把握し、当該撮影者用にカスタマイズした後、撮影装置を販売する技術が提案されている(特許文献1参照)。   Conventionally, it is known that when a subject is photographed by an image processing apparatus such as a camera, the photographed image sometimes deteriorates. As a factor of image deterioration, there is camera shake at the time of photographing. Therefore, a technique is proposed in which the frequency characteristics for correcting degraded images caused by camera shake are known in advance for the user (photographer) of the photographic device, customized for the shooter, and then sold. (See Patent Document 1).

特開2001−346094号公報JP 2001-346094 A

特許文献1の技術を採用すると、一旦販売された撮影装置を他人に貸し与え、又は譲渡した場合、ブレ補正は適切なものとはならず、補正された画像は、きれいな画像とはならない。ブレを適切に補正しようとすると、最初に、そして借りた人や譲り受けた人が再度、撮影前に周波数特性テーブルを作る必要がある。   When the technique of Patent Document 1 is adopted, when a photographic device once sold is lent or transferred to another person, the blur correction is not appropriate, and the corrected image is not a beautiful image. In order to correct the blur appropriately, first, the borrower or the transferred person needs to make the frequency characteristic table again before photographing.

そこで上記した問題点を解消すべく、本発明が解決しようとする課題は、手ブレによる劣化を効率的に復元処理する画像処理装置を提供することである。   Accordingly, in order to solve the above-described problems, the problem to be solved by the present invention is to provide an image processing apparatus that efficiently restores deterioration due to camera shake.

上記課題を解決するため、本発明の画像処理装置は、撮像素子を備える撮像部と、撮像部による撮像により生成された原画像から変化する前の画像もしくは本来撮影されるべきであった画像またはそれらの近似画像(以下、元画像という)を、原画像の撮像時における画素に対応する光エネルギーの分散を示す変化要因情報を利用するデータ処理によって復元処理する処理部と、を有し、処理部は、所定の画像データから、原画像の撮像時における変化要因情報が示す分散の仕方に応じて光エネルギーを分散させた比較用データを生成し、原画像のデータと比較用データとの差分データが所定値より大きいまたは所定値以上の場合、変化要因情報が示す光エネルギーの分散の仕方に応じて、所定の画像データに差分データを配分することで復元データを生成する第1の処理を実行し、復元データを第1の処理における所定の画像データの代わりに使用して新たな復元データを生成する処理を繰り返し実行し、差分データが、所定値以下または所定値より小さくなる復元データを生成する第2の処理を実行するものであり、処理部は、原画像のデータとは別の画像データから撮影時の変化要因情報を用いた画像データを生成し、その作成した画像データと原画像のデータとを重ね合わせた画像データを所定の画像データとして用いて第1の処理および第2の処理を実行し、その実行によって求められた、差分データが所定値以下または所定値より小さくなった復元データの元となった復元データから、別の画像データを取り去ったものを元画像のデータとしている。 To solve the above problem, images processing device of the present invention was to be the previous image or original shooting changing an imaging unit having an imaging device, from the original image generated by the imaging by the imaging unit images Or a processing unit that restores these approximate images (hereinafter referred to as original images) by data processing using change factor information indicating dispersion of light energy corresponding to pixels at the time of capturing the original image, The processing unit generates, from predetermined image data, comparison data in which light energy is dispersed according to a dispersion method indicated by change factor information at the time of capturing the original image, and the original image data and the comparison data are generated. When the difference data is larger than the predetermined value or greater than the predetermined value, the difference data is distributed to the predetermined image data according to the way of dispersion of the light energy indicated by the change factor information. The first process of generating data is executed, the process of generating new restored data using the restored data instead of the predetermined image data in the first process is repeatedly executed, and the difference data is less than or equal to the predetermined value Alternatively, the second process of generating restoration data smaller than a predetermined value is executed, and the processing unit generates image data using change factor information at the time of shooting from image data different from the original image data. Then, the first process and the second process are executed by using the image data obtained by superimposing the created image data and the original image data as predetermined image data, and the difference data obtained by the execution is obtained. The original image data is obtained by removing other image data from the restored data that is the basis of the restored data that is equal to or less than the predetermined value or smaller than the predetermined value .

この発明によれば、画像変化の要因情報を利用して、所定のデータを生成することだけで元画像を生成しているので、ハードウェア的な増加はほとんど無く、装置が大型化しない。また、復元データから比較用データを作り、その比較用データと処理対象の原画像のデータを比較するという処理を繰り返し、徐々に元画像を得るので、現実的な復元作業となる。このため、画像の復元に当たって、現実性のある回路処理方式を有する画像処理装置とすることができる。また、この発明によれば画像劣化等の変化要因情報を利用して、比較用データを生成し、原画像との比較をし、差が小さいときのみ元画像を生成しているので、ハードウェア的な増加はほとんど無く、装置が大型化しない。また、復元データから比較用データを作り、その比較用データと処理対象の原画像のデータを比較するという処理を繰り返し、徐々に元画像を得るので、現実的な復元作業となる。このため、画像の復元に当たって、現実性のある回路処理方式を有する画像処理装置とすることができる。また、この発明によれば、復元対象となる画像データが急激なコントラスト変化を含んでいる場合、別の画像のデータを加えることで、この急激なコントラスト変化を軽減することができ、復元処理の反復数を低減することができる。 According to the present invention, since the original image is generated only by generating the predetermined data using the factor information of the image change, there is almost no increase in hardware and the apparatus is not enlarged. Also, the process of creating comparison data from the restored data and comparing the comparison data with the original image data to be processed is repeated, and the original image is gradually obtained, which is a realistic restoration work. For this reason, when restoring an image, an image processing apparatus having a realistic circuit processing method can be obtained. Further, according to the present invention, since the comparison data is generated using the change factor information such as the image deterioration and the comparison is made with the original image, and the original image is generated only when the difference is small, the hardware There is almost no increase, and the device does not become large. Also, the process of creating comparison data from the restored data and comparing the comparison data with the original image data to be processed is repeated, and the original image is gradually obtained, which is a realistic restoration work. For this reason, when restoring an image, an image processing apparatus having a realistic circuit processing method can be obtained. Further, according to the present invention, when the image data to be restored includes a sudden contrast change, the sudden contrast change can be reduced by adding another image data, and the restoration process can be performed. The number of iterations can be reduced.

本発明の画像処理装置により、手ブレによる劣化を効率的に復元処理する画像処理装置を提供することができる。   The image processing apparatus of the present invention can provide an image processing apparatus that efficiently restores deterioration due to camera shake.

以下、本発明の実施の形態に係る画像処理装置1について図を参照しながら説明する。なお、この画像処理装置1は、民生用のカメラとしているが、監視用カメラ、テレビ用カメラ、ハンディタイプのビデオカメラ、内視鏡カメラ、等他の用途のカメラとしたり、顕微鏡、双眼鏡、さらにはNMR撮影等の画像診断装置等、カメラ以外の機器にも適用できる。   Hereinafter, an image processing apparatus 1 according to an embodiment of the present invention will be described with reference to the drawings. The image processing apparatus 1 is a consumer camera. However, the image processing apparatus 1 may be a camera for other uses such as a surveillance camera, a television camera, a handheld video camera, an endoscope camera, a microscope, a binocular, Can also be applied to devices other than cameras, such as diagnostic imaging apparatuses such as NMR imaging.

図1には画像処理装置1の構成の概要を示している。画像処理装置1は、人物等の画像を撮影する撮影部2と、その撮影部2を駆動する制御系部3と、撮影部2で撮影された画像を処理する処理部4と、を有している。また、この実施の形態に係る画像処理装置1は、さらに処理部4で処理された画像を記録する記録部5と、角速度センサ等からなり、画像劣化など変化の要因となる変化要因情報を検知する検出部6と、画像劣化等を生じさせる既知の変化要因情報を保存する要因情報保存部7を有する。   FIG. 1 shows an outline of the configuration of the image processing apparatus 1. The image processing apparatus 1 includes a photographing unit 2 that photographs an image of a person, the like, a control system unit 3 that drives the photographing unit 2, and a processing unit 4 that processes an image photographed by the photographing unit 2. ing. The image processing apparatus 1 according to this embodiment further includes a recording unit 5 that records an image processed by the processing unit 4 and an angular velocity sensor, and detects change factor information that causes a change such as image degradation. And a factor information storage unit 7 for storing known change factor information that causes image degradation and the like.

撮影部2は、レンズを有する撮影光学系やレンズを通過した光を電気信号に変換するCCDやC−MOS等の撮影素子を備える部分である。制御系部3は、撮影部2,処理部4,記録部5,検出部6,及び要因情報保存部7等、画像処理装置内の各部を制御するものである。   The photographing unit 2 includes a photographing optical system having a lens and a photographing element such as a CCD or C-MOS that converts light passing through the lens into an electric signal. The control system unit 3 controls each unit in the image processing apparatus, such as the photographing unit 2, the processing unit 4, the recording unit 5, the detection unit 6, and the factor information storage unit 7.

処理部4は、画像処理プロセサで構成されており、ASIC(Application Specific Integrated Circuit)のようなハードウェアで構成されている。処理部4では、撮影部2で撮影された画像の画素数を減じる処理が行われることがある。処理部4は、検出する手ブレ等の振動検出のためのサンプリング周波数を発生させていると共にそのサンプリング周波数を検出部6に供給している。また処理部4は、振動検出の開始と終了を制御している。振動検出期間は、処理部4に配置されるタイマー等で制御される。   The processing unit 4 is configured by an image processing processor, and is configured by hardware such as an ASIC (Application Specific Integrated Circuit). The processing unit 4 may perform processing for reducing the number of pixels of the image captured by the imaging unit 2. The processing unit 4 generates a sampling frequency for detecting vibrations such as camera shake to be detected and supplies the sampling frequency to the detection unit 6. The processing unit 4 controls the start and end of vibration detection. The vibration detection period is controlled by a timer or the like disposed in the processing unit 4.

また、この処理部4には、後述する比較用データを生成する際の元となる画像が保管されることもある。さらに処理部4は、ASICのようなハードウェアとして構成されるのではなく、ソフトウェアで処理する構成としても良い。記録部5は、半導体メモリで構成されているが、ハードディスクドライブ等の磁気記録手段や、DVD等を使用する光記録手段等を採用しても良い。   In addition, the processing unit 4 may store an image serving as a base when generating comparison data to be described later. Further, the processing unit 4 is not configured as hardware such as an ASIC, but may be configured to perform processing by software. The recording unit 5 is composed of a semiconductor memory. However, a magnetic recording unit such as a hard disk drive, an optical recording unit using a DVD, or the like may be employed.

検出部6は、図2に示すように、画像処理装置1の光軸であるZ軸に対して垂直方向となるX軸、Y軸の回りの速度を検出する2つの角速度センサを備えるものである。またこの検出部6に、撮影者と画像処理装置1との接触の有無を認識して、振動データ検出開始時期を決定する手段を、必要に応じて備えさせてもよい。その手段とは、たとえば撮影者が撮影のためにカメラを持って構える時に、ほぼ必ず接触するであろうカメラの位置(これはカメラの形状によって異なるため一概に言うことができないが、たとえばシャッター等の撮影開始用ボタンまたはその周辺部等)に配置した押圧センサや接触センサ等である。   As shown in FIG. 2, the detection unit 6 includes two angular velocity sensors that detect the speeds around the X axis and the Y axis that are perpendicular to the Z axis that is the optical axis of the image processing apparatus 1. is there. Further, the detection unit 6 may be provided with means for recognizing the presence or absence of contact between the photographer and the image processing apparatus 1 and determining the vibration data detection start time as necessary. The means is, for example, the position of the camera that the photographer will almost always touch when holding the camera for taking a picture (this is different depending on the shape of the camera, but cannot be generally stated, for example, shutter etc. A button for starting shooting or a peripheral portion thereof), a press sensor, a contact sensor, and the like.

ところで、カメラで撮影する際の手ブレは、X方向、Y方向、Z方向の各方向への移動やZ軸回りの回動も生ずるが、各変動により最も大きな影響を受けるのは、Y軸回りの回転とX軸回りの回転である。これら2つの変動は、ほんのわずかに変動しただけで、その撮影された画像は大きくぼける。このため、この実施の形態では、図2のX軸回りとY軸回りの2つの角速度センサのみを配置している。しかし、より完全を期すためZ軸回りの角速度センサをさらに付加したり、X方向やY方向への移動を検出するセンサを付加しても良い。特に、撮影者が発する手ブレ等の振動を撮影(露光)時よりも前又は後にも検出する場合には、撮影時とは無関係なあらゆる方向の振動を想定する場合があるため、Z軸回りの角速度センサをさらに付加することが好ましい。また、使用するセンサとしては、角速度センサではなく、角加速度センサとしても良い。   By the way, camera shake at the time of shooting with a camera may cause movement in each direction of the X direction, Y direction, and Z direction, and rotation around the Z axis, but it is Y axis that is most affected by each variation. Rotation around the X axis. These two variations are only slightly varied, and the captured image is greatly blurred. For this reason, in this embodiment, only two angular velocity sensors around the X axis and the Y axis in FIG. 2 are arranged. However, for the sake of completeness, an angular velocity sensor around the Z axis may be further added, or a sensor for detecting movement in the X direction or the Y direction may be added. In particular, when vibrations such as camera shake generated by a photographer are detected before or after shooting (exposure), vibrations in all directions unrelated to shooting may be assumed. It is preferable to further add an angular velocity sensor. The sensor used may be an angular acceleration sensor instead of an angular velocity sensor.

また、検出部6では、検出する振動の周波数を、0Hzを超え120Hzの範囲としている。ここで、検出する振動は、周波数0Hzを超えFHzの範囲(20≦F≦120)内で変更できる。よって、検出する振動の周波数は、0Hzを超え60Hz、3Hzから60Hz、5Hzから60Hz、1Hzから45Hz、4Hzから30Hz、または2Hzから15Hz等に設定することができる。検出する振動の最大周波数に対してサンプリング周波数は、1.5から10倍程度とするのが、検出を正確にする意味で好ましく、2から8倍とするのが、より好ましい。ここで、8倍を越える周波数のサンプリングをしても、検出の正確さは8倍のときと変わらない場合が多い。よって、たとえば、想定される検出対象振動の最大周波数が15Hz、すなわち、手ブレ周波数の上限を10数Hzとしたとき、15Hzの振動が測定できれば良いので、この15Hzの場合には、30から120Hzの範囲内のいずれかとするのが好適である。この下限である30Hzを、正確性を高めるために40Hzとしても良い。なお、検出部6では、すべての振動を検出し、処理部4において利用するデータを、0Hzを超えFHzまでの範囲内のいずれかのデータに限定するようにしても良い。   Moreover, in the detection part 6, the frequency of the vibration to detect is made into the range exceeding 0 Hz and 120 Hz. Here, the vibration to be detected can be changed within a frequency range of 0 Hz and FHz (20 ≦ F ≦ 120). Therefore, the frequency of vibration to be detected can be set to over 60 Hz, 60 Hz, 3 Hz to 60 Hz, 5 Hz to 60 Hz, 1 Hz to 45 Hz, 4 Hz to 30 Hz, 2 Hz to 15 Hz, or the like. The sampling frequency is preferably about 1.5 to 10 times the maximum frequency of vibration to be detected, in terms of accurate detection, and more preferably 2 to 8 times. Here, even if sampling is performed at a frequency exceeding 8 times, the detection accuracy is often the same as when it is 8 times. Therefore, for example, when the maximum frequency of the vibration to be detected that is assumed is 15 Hz, that is, when the upper limit of the camera shake frequency is 10 and several Hz, it is only necessary to measure the vibration of 15 Hz. It is preferable to set it within one of these ranges. The lower limit of 30 Hz may be set to 40 Hz in order to improve accuracy. Note that the detection unit 6 may detect all vibrations and limit the data used in the processing unit 4 to any data within the range from 0 Hz to FHz.

ここで、一般に、0Hzを超え20Hzまでの周波数範囲は、無意識な状態で人体が発する振動の周波数範囲に概ね合致する。しかし、敢えて検出する振動の周波数を0Hzを超え120Hzと、その検出可能範囲を広げている第1の理由は、20Hzを越えることがあり得る、人間が発する振動の検出に万全を期するためである。また、第2の理由は、人体以外が発する20Hzを越える振動をも検出対象として、画像変化に影響を与え得る振動を妥当な範囲で検出するためである。ここで、人体以外が発する振動は、たとえば撮影者が自動車等の乗り物に乗っている場合の、その乗り物が発する振動等である。但し、センシングコストやぶれの情報量を節約し、画像処理装置の復元処理負担を軽減することを優先して製品設計する際には、検出する振動の周波数を数Hz(たとえば1,2,3,4または5Hz)から十数Hz(たとえば12,13,14,15,16または17Hz)や、20,30,40,50または60Hzまでに制限する等の構成を採用することが好ましい。   Here, in general, the frequency range from 0 Hz to 20 Hz substantially matches the frequency range of vibrations generated by the human body in an unconscious state. However, the first reason for expanding the detectable range of the vibration frequency to be detected exceeding 0 Hz to 120 Hz is to ensure the detection of human-generated vibration that can exceed 20 Hz. is there. The second reason is to detect vibrations exceeding 20 Hz generated by other than the human body as detection targets, and to detect vibrations that can affect image changes within a reasonable range. Here, the vibration generated by a person other than the human body is, for example, a vibration generated by the vehicle when the photographer is riding a vehicle such as an automobile. However, when designing a product with priority given to saving the sensing cost and the amount of blur information and reducing the restoration processing burden of the image processing apparatus, the frequency of vibration to be detected is several Hz (eg, 1, 2, 3, etc.). It is preferable to employ a configuration such as limiting from 4 or 5 Hz to a few dozen Hz (for example, 12, 13, 14, 15, 16 or 17 Hz), 20, 30, 40, 50 or 60 Hz.

要因情報保存部7は、既知の劣化要因情報などの変化要因情報、たとえば光学系の収差や検出された振動に基づいて算出された点像関数等を保存しておく記録部である。当該点像関数の記録に際し、撮影者が発する振動を撮影開始時よりも前、および/または撮影終了時よりも後にも検出部6が振動を検出する場合には、たとえばその検出期間の全てに検出された振動データの中から、利用するデータを手ブレ周波数帯域に制限させ、その露光期間のデータを利用して算出された点像関数等を記録する。振動検出範囲を上述のように低周波域に限定した場合、手ブレ周波数帯域への制限は不要としても良いが、測定誤差の軽減や、処理時間を早めるうえで、いずれにしても手ブレ周波数と言われている数Hzから十数Hzの周波数のみに制限させるのが好ましい。なお、撮影者が乗物等に乗っている状況の場合は、手ブレの周波数帯域に制限する処理を行わないようにするのが好ましい。手ブレ周波数帯域への制限処理は、画像処理装置1にオンオフのスイッチを設ける等して撮影者が操作するのが好ましい。   The factor information storage unit 7 is a recording unit that stores change factor information such as known deterioration factor information, such as a point spread function calculated based on aberrations of the optical system or detected vibrations. When recording the point spread function, if the detection unit 6 detects vibrations before and / or after the end of shooting, the vibration generated by the photographer is detected, for example, during the entire detection period. Of the detected vibration data, the data to be used is limited to the camera shake frequency band, and a point spread function or the like calculated using the data of the exposure period is recorded. When the vibration detection range is limited to the low frequency range as described above, it is not necessary to limit the camera shake frequency band. However, in order to reduce measurement errors and speed up the processing time, the camera shake frequency is anyway. It is preferable to limit the frequency to only a few Hz to a few dozen Hz. In a situation where the photographer is on a vehicle or the like, it is preferable not to perform the process of limiting to the frequency band of camera shake. The camera shake frequency band limiting process is preferably operated by the photographer by providing an on / off switch in the image processing apparatus 1.

要因情報保存部7で記録された点像関数は、たとえばその算出後の直近に撮影された原画像の復元処理の際に、処理部4で用いられる。そして次回の撮影の際には、前回の撮影終了後から当該次回の撮影終了までの期間、または次回の撮影開始前から当該次回の撮影終了後所定期間経過するまでの期間のデータから、同様に算出され記録された点像関数を、原画像の復元処理の際に用いる。ここで、原画像の復元処理を実行する時期は、撮影用の電源がオフされている時、処理部4が稼働していない時、処理部4の稼働率が低い時等、原画像を撮影した時期から遅らせた時期とすることができる。その場合には、記録部5に保存された原画像データおよび、要因情報保存部7に保存された、その原画像についての点像関数等の変化要因情報が、それぞれが関連づけられた状態で長期間に亘り保存される。このように、原画像の復元処理を実行する時期を、原画像を撮影した時期から遅らせる利点は、種々の処理を伴う撮影時の処理部4の負担を軽減できることである。   The point spread function recorded by the factor information storage unit 7 is used by the processing unit 4 in, for example, the restoration process of the original image taken most recently after the calculation. In the next shooting, the data from the end of the previous shooting to the end of the next shooting or from the data of the period from the start of the next shooting to the elapse of a predetermined period after the end of the next shooting is similarly used. The calculated and recorded point spread function is used in the original image restoration process. Here, when the original image restoration process is executed, the original image is taken when the imaging power is turned off, when the processing unit 4 is not operating, or when the operating rate of the processing unit 4 is low. It can be a period delayed from In that case, the original image data stored in the recording unit 5 and the change factor information such as the point spread function for the original image stored in the factor information storage unit 7 are long in a state where they are associated with each other. Stored for a period of time. As described above, the advantage of delaying the time for executing the restoration process of the original image from the time of shooting the original image is that the burden on the processing unit 4 at the time of shooting involving various processes can be reduced.

この点像関数を算出するに際し、検出部6にて撮影者の振動を検出する期間は、撮影(露光)開始1秒前から撮影終了1秒後の範囲内の一定値に予め固定して設定しておくことができる。ここで「範囲内」であるから、その検出期間は、たとえば撮影開始20ミリ秒前から撮影終了20ミリ秒後の範囲や、撮影開始20ミリ秒前から撮影終了時の範囲や、撮影開始時から撮影終了20ミリ秒後の範囲等とすることができる。このように振動の検出期間に、少なくとも撮影開始時から撮影終了時までの撮影期間(露光期間)を含ませることは、現実に撮影した期間における振動を振動データに反映して、点像関数等を要因情報保存部7に記録できることから、好ましい。ここで、検出期間に撮影開始時から撮影期間内の一部を含ませると、ある程度撮影期間内全体の振動データを予測できるため、撮影期間内全体を検出期間に含ませるのと同様に好ましい。よって、検出期間を撮影開始前から撮影期間内の一部までとすることもできる。   When calculating this point spread function, the period during which the detection unit 6 detects the photographer's vibration is fixed and set in advance within a range from 1 second before the start of shooting (exposure) to 1 second after the end of shooting. Can be kept. Here, since it is “within range”, the detection period is, for example, a range from 20 milliseconds before the start of shooting to 20 milliseconds after the end of shooting, a range from 20 milliseconds before the start of shooting to the end of shooting, or at the start of shooting. Or the like after 20 milliseconds from the end of shooting. Thus, including at least the shooting period (exposure period) from the start of shooting to the end of shooting in the vibration detection period reflects the vibration during the actual shooting period in the vibration data, and so on. Can be recorded in the factor information storage unit 7. Here, if a part of the shooting period from the start of shooting is included in the detection period, vibration data in the entire shooting period can be predicted to some extent, so that it is preferable to include the entire shooting period in the detection period. Therefore, the detection period can be from before the start of shooting to a part of the shooting period.

ここで、撮影者の振動を検出する期間を、撮影開始1秒前から撮影終了1秒後の範囲内の期間とする構成とした場合について詳述する。   Here, a detailed description will be given of a case where the period for detecting the vibration of the photographer is set to be a period within a range from 1 second before the start of shooting to 1 second after the end of shooting.

画像処理装置1の撮影期間内は、撮影者が画像処理装置1へ与える手ブレ振動を意識的に抑えようとしている。そして、その意識は撮影開始前から撮影終了後にも、概ねはたらいている。一方、撮影開始前から撮影終了後以外の期間は撮影者の振動が手ブレ以外の、手ブレよりも大きな動作(たとえば、画像処理装置1を持ったまま歩行する動作等)を伴う場合が多い。よって、この構成を採用することにより、そのような動作や振動を検出対象から除外して、人体が発する手ブレ振動として、妥当な振動を多く含む振動を検出できる。また、その振動データを用いて、点像関数等を算出して要因情報保存部7に記録するため、復元処理精度が向上し得る。   During the shooting period of the image processing apparatus 1, camera shake vibration given to the image processing apparatus 1 by the photographer is consciously suppressed. And that consciousness generally works from the start of shooting to the end of shooting. On the other hand, in a period other than before the end of shooting after the start of shooting, the photographer's vibration is often accompanied by an action other than camera shake, such as an action of walking while holding the image processing apparatus 1. . Therefore, by adopting this configuration, such movements and vibrations can be excluded from detection targets, and vibrations that include a lot of appropriate vibrations can be detected as camera shake vibrations generated by the human body. Further, since the point data function or the like is calculated and recorded in the factor information storage unit 7 using the vibration data, the restoration processing accuracy can be improved.

一方、画像処理装置1の側からみると、振動の検出開始直後には、検出開始前から継続して発せられる振動を検知することとなる。ここで、どんなに高性能な角速度センサまたは角加速度センサでも、若干の応答遅れがあるため、検出部6は検出開始直後には、その振動に追従して振動を検知することが難しい。よって、仮に振動の検出時期と撮影(露光)開始時期とを一致させると、撮影開始直後の振動データは不正確になる。そこで、撮影開始1秒前からの振動を検出しておくことで、撮影開始直後の振動データを正確にすることができる。そして、撮影開始1秒前から撮影終了1秒後までの振動データのうち、撮影期間中に相当する期間のみの振動データを使用すると、より正確な点像関数を算出することができる。さらに、撮影期間及び撮影期間以外の振動データを収集することで、振動データが多くなり、より正確な振動データとなることから、復元画像の精度が高まる。   On the other hand, when viewed from the image processing apparatus 1 side, immediately after the start of vibration detection, vibration generated continuously before the start of detection is detected. Here, any high-performance angular velocity sensor or angular acceleration sensor has a slight response delay, so it is difficult for the detection unit 6 to detect the vibration following the vibration immediately after the start of detection. Therefore, if the vibration detection timing coincides with the shooting (exposure) start timing, the vibration data immediately after the start of shooting becomes inaccurate. Thus, by detecting vibration from one second before the start of shooting, vibration data immediately after the start of shooting can be made accurate. Then, using vibration data for only a period corresponding to the shooting period among vibration data from 1 second before the start of shooting to 1 second after the end of shooting, a more accurate point spread function can be calculated. Furthermore, by collecting vibration data other than the shooting period and the shooting period, the vibration data is increased and more accurate vibration data is obtained, so that the accuracy of the restored image is increased.

ここで、振動を検出する期間は、任意に設定できることは言うまでもない。もちろん、振動検出開始から撮影開始までの期間と、撮影終了から振動検出終了までの期間とを異ならせることができる。またこの構成を採用する場合には、撮影者が振動検出撮影期間を、調整して設定できるようにすることが好ましい。その理由は、個々の撮影者に特有な動作等を考慮した画像復元処理が可能となるためである。   Here, it goes without saying that the period for detecting the vibration can be arbitrarily set. Of course, the period from the start of vibration detection to the start of shooting can be made different from the period from the end of shooting to the end of vibration detection. When this configuration is adopted, it is preferable that the photographer can adjust and set the vibration detection photographing period. The reason is that image restoration processing can be performed in consideration of operations peculiar to individual photographers.

なお、上述のように時間で制御するのではなく、シャッター等が半押し状態となったら振動データを検出したり、撮影用の電源がオンとなったら振動データを常時記録し、常に最新の数秒間のデータを保存し、シャッターが押されたら露光前所定時間分と露光終了後の所定時間分の振動データを、露光中の振動データに加えて利用するようにしても良い。   Instead of controlling by time as described above, vibration data is detected when the shutter or the like is half-pressed, or vibration data is always recorded when the photographing power is turned on, and the latest number is always updated. Second-time data may be stored, and vibration data for a predetermined time before exposure and for a predetermined time after completion of exposure may be used in addition to vibration data during exposure when the shutter is pressed.

なお、この実施の形態では、要因情報保存部7には、光学系の収差やレンズのひずみの情報が保存されているが、後述する手ブレのぼけの復元の際にはそれらの情報は、利用していない。   In this embodiment, the factor information storage unit 7 stores information on aberrations of the optical system and lens distortion. However, when restoring blurring of camera shake described later, the information is Not used.

次に、以上のように構成された画像処理装置1の処理部4の画像復元処理方法の概要を、図3に基づいて説明する。   Next, an outline of the image restoration processing method of the processing unit 4 of the image processing apparatus 1 configured as described above will be described with reference to FIG.

図3中、「I」は、任意の初期画像であって、処理部4の記録部に予め保存されている画像のデータである。「I’」は、その初期画像のデータのIの劣化画像のデータを示し、比較のための比較用データである。「G」は、検出部6で検出された変化要因情報(=劣化要因情報(点像関数))のデータで、処理部4の記録部に保存されるものである。「Img’」は、撮影された画像、すなわち劣化画像のデータを指し、この処理において処理対象となる原画像のデータである。 In FIG. 3, “I 0 ” is an arbitrary initial image and is image data stored in advance in the recording unit of the processing unit 4. “I 0 ′” indicates data of a degraded image of I 0 of the initial image data, and is comparison data for comparison. “G” is data of change factor information (= deterioration factor information (point image function)) detected by the detection unit 6 and is stored in the recording unit of the processing unit 4. “Img ′” indicates captured image data, that is, degraded image data, and is data of an original image to be processed in this processing.

「δ」は、原画像のデータImg’と、比較用データI’との差分のデータである。「k」は、変化要因情報のデータに基づく配分比である。「I+n」は、初期画像のデータIに、差分のデータδを変化要因情報のデータに基づいて配分して新たに生成した復元画像のデータ(復元データ)である。「Img」は、元画像のデータである。ここで、ImgとImg’の関係は、次の(1)式で現されるとする。
Img’=Img×G …(1)
“Δ” is difference data between the original image data Img ′ and the comparison data I 0 ′. “K” is an allocation ratio based on the data of the change factor information. “I 0 + n” is restored image data (restored data) newly generated by allocating the difference data δ to the initial image data I 0 based on the data of the change factor information. “Img” is data of the original image. Here, it is assumed that the relationship between Img and Img ′ is expressed by the following equation (1).
Img ′ = Img × G (1)

なお、差分のデータδは、対応する画素の単純な差分でも良い場合もあるが、一般的には、変化要因情報のデータGにより異なり、次の(2)式で現される。
δ=f(Img’,Img,×G) …(2)
The difference data δ may be a simple difference between the corresponding pixels, but generally differs depending on the data G of the change factor information and is expressed by the following equation (2).
δ = f (Img ′, Img, × G) (2)

処理部4の処理ルーチンは、まず、任意の画像データIを用意することから始まる(ステップS101)。この初期画像のデータIとしては、劣化している原画像のデータImg’を用いても良く、また、黒ベタ、白ベタ、灰色ベタ、市松模様等どのような画像のデータを用いても良い。ステップS102で、(1)式のImgの代わりに初期画像となる任意の画像のデータIを入れ、劣化画像である比較用データI’を求める。次に、劣化画像である原画像のデータImg’と比較用データI’と比較し、差分のデータδを算出する(ステップS103)。 Processing routine of the processing unit 4 first begins to prepare any image data I 0 (step S101). As the initial image data I 0 , the deteriorated original image data Img ′ may be used, and any image data such as black solid, white solid, gray solid, or checkered pattern may be used. good. In step S102, data I 0 of an arbitrary image that is an initial image is inserted instead of Img in equation (1), and comparison data I 0 ′ that is a degraded image is obtained. Next, the original image data Img ′, which is a deteriorated image, is compared with the comparison data I 0 ′, and difference data δ is calculated (step S103).

次に、ステップS104で、この差分のデータδが所定値以上であるか否かを判断し、所定値以上であれば、ステップS105で新たな復元画像のデータ(=復元データ)を生成する処理を行う。すなわち、差分のデータδを変化要因情報のデータGに基づいて、任意の画像データIに配分し、新たな復元データI+nを生成する。その後、ステップS102,S103,S104を繰り返す。 Next, in step S104, it is determined whether or not the difference data δ is equal to or larger than a predetermined value. If the difference data δ is equal to or larger than the predetermined value, a process for generating new restored image data (= restored data) in step S105. I do. That is, the difference data δ is distributed to arbitrary image data I 0 based on the data G of the change factor information, and new restored data I 0 + n is generated. Thereafter, steps S102, S103, and S104 are repeated.

ステップS104において、差分のデータδが所定値より小さい場合、処理を終了する(ステップS106)。そして、処理を終了した時点での復元データI+nを元画像のデータImgと推定し、そのデータを記録部5に記録する。なお、記録部5には、初期画像のデータIや変化要因情報のデータGを記録しておき、必要により処理部4に渡すようにしても良い。 If the difference data δ is smaller than the predetermined value in step S104, the process is terminated (step S106). Then, the restored data I 0 + n at the time when the processing is completed is estimated as the original image data Img and the data is recorded in the recording unit 5. The initial image data I 0 and change factor information data G may be recorded in the recording unit 5 and transferred to the processing unit 4 as necessary.

以上の処理方法の考え方をまとめると以下のようになる。すなわち、この処理方法においては、処理の解を逆問題としては解かず、合理的な解を求める最適化問題として解くのである。逆問題として解く場合、理論上は可能であるが、現実問題としては困難である。   The concept of the above processing method is summarized as follows. That is, in this processing method, the processing solution is not solved as an inverse problem, but is solved as an optimization problem for obtaining a rational solution. When solving as an inverse problem, it is theoretically possible, but it is difficult as a real problem.

最適化問題として解くということは、次の条件を前提としている。
すなわち、
(1)入力に対する出力は、一意に決まる。
(2)出力が同じであれば、入力は同じである。
(3)出力が同じになるように、入力を更新しながら反復処理することにより、解を収束させていく。
Solving as an optimization problem assumes the following conditions.
That is,
(1) The output corresponding to 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 outputs are the same.

このことを換言すれば、図4(A)(B)に示すように、原画像のデータImg’と近似である比較用データI’(I+n’)を生成できれば、その生成の元データとなる初期画像のデータIまたは復元データI+nは、元画像のデータImgに近似したものとなる。 In other words, as shown in FIGS. 4A and 4B, if comparison data I 0 ′ (I 0 + n ′) that is approximate to the original image data Img ′ can be generated, The data I 0 or the restored data I 0 + n of the initial image as data is approximate to the data Img of the original image.

なお、この実施の形態では、角速度検出センサのサンプリング周波数を60Hzから240Hz内としているが、高周波数を検出できるように5μsec毎に角速度を検出してもよい。また、差分のデータδの判定基準となる値は、各データを8ビット(0〜255)で現した場合に、この実施の形態では「6」としている。すなわち、6より小さい、つまり5以下の時は、処理を終了している。   In this embodiment, the sampling rate of the angular velocity detection sensor is set within 60 Hz to 240 Hz. However, the angular velocity may be detected every 5 μsec so that a high frequency can be detected. In addition, in this embodiment, the value serving as a determination criterion for the difference data δ is “6” when each data is represented by 8 bits (0 to 255). That is, when it is less than 6, that is, 5 or less, the processing is finished.

次に、図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 blurred 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 designated as 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 no deterioration occurs. Each data is represented by 8 bits (0 to 255).

露光時間中にブレがあり、露光時間中の50%の時間はn番目の画素に、30%の時間はn+1番目の画素に、20%の時間はn+2番目の画素にそれぞれぶれていたとする。エネルギーの分散の仕方は、図7に示す表のとおりとなる。これが変化要因情報のデータGとなる。   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. Suppose that The way of energy dispersion is as shown in the table of FIG. This becomes the data G of the change factor information.

ブレは、全ての画素で一様であるので、上ブレ(縦ぶれ)が無いとすると、ブレの状況は、図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, if there is no upper blurring (vertical blurring), the blurring situation is as shown in the table of FIG. The data shown as “imaging result” in FIG. 8 is the original image data Img, and the data shown as “blurred image” is the degraded original image data Img ′. Specifically, for example, “120” of the pixel “n−3” is in accordance with the distribution ratio of “0.5”, “0.3”, and “0.2” of the data G of the change factor information that is the blur information. It is distributed such that “60” is distributed to “n-3” pixels, “36” is distributed to “n-2” pixels, and “24” is distributed to “n-1” pixels. Similarly, “60” which is pixel data of “n−2” is distributed as “30” in “n−2”, “18” in “n−1”, and “12” in “n”. The original image is calculated from the deteriorated original image data Img 'and the change factor information data G shown in FIG.

ステップS101に示す任意の画像データIとしては、どのようなものでも採用できるが、この説明に当たっては、原画像のデータにImg’を用いる。すなわち、I=Img’として処理を開始する。図9の表中に「入力」とされたものが初期画像のデータIに相当する。このデータIすなわちImg’に、ステップS102で変化要因情報のデータGをかける。すなわち、たとえば、初期画像のデータIの「n−3」の画素の「60」は、n−3の画素に「30」が、「n−2」の画素に「18」が、「n−1」の画素に「12」がそれぞれ割り振られる。他の画素についても同様に配分され、「出力I’」として示される比較用データI’が生成される。このため、ステップS103の差分のデータδは、図9の最下欄に示すようになる。 The arbitrary image data I 0 shown in step S101, can be adopted also What, When this description, use of Img 'to data of the original image. That is, the process starts with I 0 = Img ′. In the table of FIG. 9, “input” corresponds to the initial image data I 0 . The data I 0, that is, Img ′ is multiplied by the change factor information data G in step S102. That is, for example, “60” of the “n-3” pixel of the data I 0 of the initial image is “30” for the n-3 pixel, “18” for the “n-2” pixel, “12” is assigned to each pixel of “−1”. The other pixels are similarly distributed, and comparison data I 0 ′ shown as “output I 0 ′” is generated. Therefore, the difference data δ in step S103 is as shown in the bottom column of FIG.

この後、ステップS104にて差分のデータδの大きさを判断する。具体的には、差分のデータδが全て絶対値で5以下となった場合に処理を終了するが、図9に示す差分のデータδは、この条件に合わないため、ステップS105に進む。すなわち、差分のデータδを変化要因情報のデータGを使用して、任意の画像のデータIに配分して、図10中の「次回入力」として示される復元データI+nを生成する。この場合、第1回目であるため、図10では、I+1と現している。 Thereafter, the size of the difference data δ is determined in step S104. Specifically, the processing is terminated when all the difference data δ is 5 or less in absolute value, but the difference data δ shown in FIG. 9 does not meet this condition, so the process proceeds to step S105. That is, the difference data δ is distributed to arbitrary image data I 0 using the data G of the change factor information to generate restored data I 0 + n shown as “next input” in FIG. In this case, since this is the first time, it is expressed 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」となり、この値を初期画像のデータI(ここでは原画像のデータImg’を使用)にプラスして、復元データI+1を生成している。 The distribution of the difference data δ is, for example, “15” obtained by multiplying the pixel data “30” of “n−3” by 0.5, which is the distribution ratio of own place (= “n-3” pixel). “4” which is distributed to the pixel of “n−3” and multiplied by 0.3 which is the distribution ratio which should have come to the pixel of “n−2” to the data “15” of the pixel of “n−2”. .5 ”, and the data“ 9.2 ”of the pixel“ n−1 ”is multiplied by 0.2 which is the distribution ratio that should have come to the pixel“ n−1 ”. 1.84 "is allocated. The total amount allocated to the “n−3” pixels is “21.34”, and this value is added to the initial image data I 0 (in this case, the original image data Img ′ is used) to restore the restored data I 0 +1 is generated.

図11に示すように、この復元データI+1がステップS102の入力画像のデータ(=初期画像のデータI)になり、ステップS102が実行され、ステップS103へと移行し、新しい差分のデータδを得る。その新しい差分のデータδの大きさをステップS104で判断し、所定値より大きい場合、ステップS105で新しい差分のデータδを前回の復元データI+1に配分し、新しい復元データI+2を生成する(図12参照)。その後、ステップS102の遂行により、復元データI+2から新しい比較用データI+2’が生成される。このように、ステップS102,S103が実行された後、ステップS104へ行き、そこでの判断によりステップS105へ行ったり、ステップS106へ移行する。このような処理を繰り返す。 As shown in FIG. 11, the restored data I 0 +1 becomes the input image data (= initial image data I 0 ) in step S102, step S102 is executed, and the process proceeds to step S103. Obtain δ. 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 data I 0 +1 in step S105 to generate new restored data I 0 +2. (See FIG. 12). After that, new comparison data I 0 +2 ′ is generated from the restored 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.

この画像処理装置1では、処理するに当たり、ステップS104において、事前に処理回数と、差分のデータδの判断基準値のいずれか一方または両者を設定できる。たとえば処理回数として20回、50回等任意の回数を設定できる。また、処理を停止させる差分のデータδの値を8ビット(0〜255)中の「5」と設定し、5以下になったら処理を終了させたり、「0.5」と設定し「0.5」以下になったら処理を終了させることができる。この設定値を任意に設定できる。処理回数と判断基準値の両者を入力した場合、いずれか一方が満足されたときは処理は停止される。なお、両者の設定を可能としたとき、判断基準値を優先し、所定の回数の処理では判断基準値内に入らなかった場合、更に所定回数の処理を繰り返すようにしても良い。   In this image processing apparatus 1, in processing, in step S <b> 104, one or both of the number of processes and the determination reference value of the difference data δ can be set in advance. For example, an arbitrary number such as 20 times or 50 times can be set as the number of times of processing. Further, the value of the difference data δ for stopping the processing is set to “5” in 8 bits (0 to 255), and when it becomes 5 or less, the processing is ended, or “0.5” is set to “0”. .5 "or less, the process can be terminated. This set value can be set arbitrarily. When both the number of processing times and the criterion value are input, the processing is stopped when either one is satisfied. When both settings are possible, the determination reference value may be given priority, and if the predetermined number of processes does not fall within the determination reference value, the predetermined number of processes may be repeated.

この実施の形態の説明の中では、要因情報保存部7に保存されている情報を利用しなかったが、ここに保存されている既知の劣化要因、たとえば光学収差やレンズのひずみなどのデータを使用するようにしても良い。その場合、たとえば、先の例(図3)の処理方法(反復処理)では、ブレの情報と光学収差の情報を合わせて1つの劣化要因として捉えて処理を行うのが好ましいが、ブレの情報での処理を終了した後に光学収差の情報での復元処理を行うようにしても良い。また、この要因情報保存部7を設置しないようにして、撮影時の動的要因、たとえばブレのみで画像を修正したり復元したりしても良い。   In the description of this embodiment, the information stored in the factor information storage unit 7 is not used, but known deterioration factors stored here, such as optical aberrations and lens distortions, are used. It may be used. In this case, for example, in the processing method (repetitive processing) of the previous example (FIG. 3), it is preferable to perform processing by combining blur information and optical aberration information as one deterioration factor. After the process in step S3 is completed, the restoration process using the optical aberration information may be performed. Further, the factor information storage unit 7 may not be installed, and the image may be corrected or restored only by dynamic factors at the time of shooting, for example, only blurring.

以上、本発明の実施の形態における画像処理装置1について説明したが、本発明の要旨を逸脱しない限り種々変更実施可能である。たとえば、処理部4で行った処理は、ソフトウェアで構成しているが、それぞれ、一部の処理を分担して行うようにした部品からなるハードウェアで構成しても良い。   The image processing apparatus 1 according to the embodiment of the present invention has been described above, but various modifications can be made without departing from the gist of the present invention. For example, the processing performed by the processing unit 4 is configured by software, but may be configured by hardware composed of parts that perform part of the processing.

また、処理対象となる画像としては原画像の他に、その原画像を色補正したり、フーリエ変換したり等、加工を施したものとしても良い。さらに、比較用データとしては、変化要因情報のデータGを使用して生成したデータ以外に、変化要因情報のデータGを使用して生成したものに色補正を加えたり、フーリエ変換したりしたデータとしても良い。また、変化要因情報のデータとしては、劣化要因情報のデータのみではなく、単に画像を変化させる情報や、劣化とは逆に、画像を良くする情報を含むものとする。   In addition to the original image, the image to be processed may be a processed image such as color-corrected or Fourier-transformed. In addition to the data generated using the change factor information data G, the comparison data includes data generated using the change factor information data G, color correction, or Fourier transform. It is also good. Further, the data of the change factor information includes not only the data of the deterioration factor information but also information that simply changes the image and information that improves the image contrary to the deterioration.

また、処理の反復回数が画像処理装置1側で自動的にまたは固定的に設定されている場合、その設定された回数を変化要因情報のデータGによって変更するようにしても良い。たとえば、ある画素のデータがブレにより多数の画素に分散している場合は、反復回数を多くし、分散が少ない場合は反復回数を少なくするようにしても良い。   When the number of processing iterations is set automatically or fixedly on the image processing apparatus 1 side, the set number of times may be changed by the data G of the change factor information. For example, when the data of a certain pixel is distributed over many pixels due to blurring, the number of iterations may be increased, and when the variance is small, the number of iterations may be decreased.

さらに、反復処理中に、差分のデータδが発散してきたら、すなわち大きくなっていったら処理を中止させるようにしても良い。発散しているか否かは、たとえば差分のデータδの平均値を見てその平均値が前回より大きくなったら発散していると判断する方法を採用できる。また、反復処理中に、入力を異常な値に変更しようとしたときには、処理を中止させるようにしても良い。たとえば8ビットの場合、変更されようとする値が255を超える値であるときには、処理を中止させる。また、反復処理中、新たなデータである入力を異常な値に変更しようとしたとき、その値を使用せず、正常な値とするようにしても良い。たとえば、8ビットの0〜255の中で、255を超える値を入力データとしようとした際は、マックスの値である255として処理するようにする。   Furthermore, when the difference data δ diverges during the iterative process, that is, when the difference data δ becomes larger, the process may be stopped. For example, it is possible to adopt a method of determining whether or not the light is diverging by observing the average value of the difference data δ and determining that the light is diverging if the average value is larger than the previous value. In addition, during an iterative process, if an input is to be changed to an abnormal value, the process may be stopped. For example, in the case of 8 bits, if the value to be changed is a value exceeding 255, the processing is stopped. Further, during an iterative process, when an input that is new data is to be changed to an abnormal value, the value may not be used but may be set to a normal value. For example, when a value exceeding 255 within the 8-bit range of 0 to 255 is used as input data, it is processed as a maximum value of 255.

また、出力画像となる復元データを生成する際、変化要因情報のデータGによっては、復元させようとする画像の領域外へ出てしまうようなデータが発生する場合がある。このような場合、領域外へはみ出るデータは反対側へ入れる。また、領域外から入ってくるべきデータがある場合は、そのデータは反対側から持ってくるようにするのが好ましい。たとえば、領域内の最も下に位置する画素XN1のデータから、さらに下の画素に割り振られるデータが発生した場合、その位置は領域外になる。そこで、そのデータは画素XN1の真上で最も上に位置する画素X11に割り振られる処理をする。画素XN1の隣の画素N2についても同様に真上で最上覧の画素X12(=画素X11の隣り)に割り振ることとなる。   In addition, when generating restoration data to be an output image, depending on the data G of the change factor information, there may be data that goes out of the area of the image to be restored. In such a case, data that protrudes outside the area is input to the opposite side. Also, if there is data that should come from outside the area, it is preferable to bring that data from the opposite side. For example, when data allocated to a lower pixel is generated from the data of the pixel XN1 positioned at the bottom in the area, the position is outside the area. Therefore, the data is processed to be allocated to the pixel X11 located at the top right above the pixel XN1. Similarly, the pixel N2 adjacent to the pixel XN1 is assigned to the topmost pixel X12 (= next to the pixel X11) directly above.

また、復元データI+nを生成するとき、配分比kを使用せず、対応する画素の差分のデータδをそのまま前回の復元データI+n−1の対応する画素に加えたり、対応する画素の差分のデータδを変倍した後に加えたり、また差分のデータδが割り振られた後のデータkδ(図10、図12中の「更新量」として示される値)を変倍して、前回の復元データI+n−1に加えるようにしても良い。これらの処理方法をうまく活用すると、処理速度が速くなる。 Further, when generating the restoration data I 0 + n, the distribution ratio k is not used, and the difference data δ of the corresponding pixel is added to the corresponding pixel of the previous restoration data I 0 + n−1 or the corresponding pixel The difference data δ is added after scaling, or the data kδ (value indicated as “update amount” in FIGS. 10 and 12) after the difference data δ is allocated is scaled, May be added to the restored data I 0 + n−1. If these processing methods are used well, the processing speed is increased.

また、復元データIo+nを生成するとき、劣化等の変化要因の重心を算出し、その重心のみの差分、またはその差分の変倍を前回の復元データIo+n−1に加えるようにしても良い。この考え方、すなわち、変化要因の重心を利用した処理方法を、図3に示す処理方法を利用した第1の処理方法として、図13および図14に基づいて以下に説明する。   Further, when the restoration data Io + n is generated, the center of gravity of a change factor such as deterioration may be calculated, and the difference of only the center of gravity or the scaling of the difference may be added to the previous restoration data Io + n-1. This concept, that is, the processing method using the center of gravity of the change factor will be described below as a first processing method using the processing method shown in FIG. 3 with reference to FIGS.

図13に示すように、正しい画像のデータImgが画素11〜15,21〜25,31〜35,41〜45,51〜55で構成されているとき、図13(A)に示すように、画素33に注目する。手ブレなどにより画素33が画素33,43,53,52の位置へと動いていくと、劣化した画像である原画像のデータImg’では、図13(B)に示すように、画素33,43,52,53に初めの画素33の影響が出る。   As shown in FIG. 13, when correct image data Img is composed of pixels 11 to 15, 21 to 25, 31 to 35, 41 to 45, and 51 to 55, as shown in FIG. Attention is paid to the pixel 33. When the pixel 33 moves to the positions of the pixels 33, 43, 53, and 52 due to camera shake or the like, in the original image data Img ′ that is a degraded image, as shown in FIG. 43, 52, and 53 are affected by the first pixel 33.

このような劣化の場合、画素33が移動する際、画素43の位置に最も長時間位置していたとすると、劣化、すなわち変化の要因の重心は、正しい画像のデータImg中の画素33に関しては原画像のデータImg’では画素43の位置にくる。これにより、差分のデータδは、図14に示すように、原画像のデータImg’と比較用データIo’のそれぞれの画素43の差として計算する。その差分のデータδは、初期画像のデータIoや復元データIo+nの画素33に加えられる。   In the case of such deterioration, if the pixel 33 moves and is located at the position of the pixel 43 for the longest time, the center of deterioration, that is, the change factor is the original pixel 33 in the correct image data Img. In the image data Img ′, the pixel 43 is located. As a result, the difference data δ is calculated as the difference between the respective pixels 43 of the original image data Img ′ and the comparison data Io ′, as shown in FIG. The difference data δ is added to the pixels 33 of the initial image data Io and the restored data Io + n.

また、先の例で言えば、「0.5」「0.3」「0.2」の3つの重心は、最も値が大きい「0.5」の位置であり、自分の位置となる。よって「0.3」や「0.2」の割り振りを考慮せず、差分のデータδの「0.5」または0.5の変倍分のみ自己の位置に割り振るようにすることとなる。このような処理は、ブレのエネルギーが集中している場合に好適となる。   In the above example, the three centroids of “0.5”, “0.3”, and “0.2” are the positions of “0.5” having the largest value, and are their own positions. Therefore, the allocation of “0.3” or “0.2” is not considered, and only “0.5” or 0.5 magnification of the difference data δ is allocated to its own position. Such a process is suitable when the blur energy is concentrated.

さらに、変化要因情報のデータGの内容によって自動的に上述した各処理方法を選択させるようにすることもできる。たとえば、処理方法として、図5〜図12に示したように、(1)配分比kを使用して差分のデータδを配分する方法(実施例方式)、(2)対応する画素の差分、または差分のデータδを変倍する方法(対応画素方式)、(3)劣化要因の重心を検出してその重心部分のデータを利用する方法(重心方法)の3方法を実行できるプログラムを処理部4内に保存しておき、劣化要因の状況を分析し、その分析結果に基づき、その3つの方法のいずれか1つを選択するようにする。また、3つの方法のうちいずれか複数を選択し、1ルーチンの度に交互に利用したり、最初の数回はある方式で処理し、その後は他の方式で処理するようにしても良い。   Furthermore, each processing method described above can be automatically selected according to the contents of the data G of the change factor information. For example, as a processing method, as shown in FIGS. 5 to 12, (1) a method of allocating difference data δ using the distribution ratio k (example method), (2) a difference between corresponding pixels, Alternatively, a program that can execute three methods: a method of scaling the difference data δ (corresponding pixel method) and (3) a method of detecting the centroid of the deterioration factor and using the data of the centroid (centroid method) 4 is stored, the state of the deterioration factor is analyzed, and one of the three methods is selected based on the analysis result. Alternatively, any one of the three methods may be selected and used alternately every routine, or may be processed by a certain method for the first several times, and then processed by another method.

また、復元処理の高速化を図る意味で、逆問題と組み合わせる方法が存在する。すなわち、たとえば原画像の画像データから画素数を減じた縮小データで反復処理を行い、縮小した原画像から縮小した復元データへの伝達関数を算出する。そして算出された伝達関数を拡大、補間し、その拡大、補間された伝達関数を使って元画像の復元データを得る。この処理方法は大きな画像(画素数の多い画像)の処理に有利となる。   In addition, there is a method combined with the inverse problem in order to speed up the restoration process. That is, for example, iterative processing is performed with reduced data obtained by subtracting the number of pixels from image data of an original image, and a transfer function from the reduced original image to reduced restored data is calculated. Then, the calculated transfer function is enlarged and interpolated, and restored data of the original image is obtained using the enlarged and interpolated transfer function. This processing method is advantageous for processing a large image (an image having a large number of pixels).

以下に、大きな画像の復元に有利な高速処理化の基本的な考え方について説明する。   The basic concept of high-speed processing that is advantageous for restoring a large image will be described below.

反復処理だけでは、どうしても収束に時間がかかってしまう。この欠点は、大きな画像の場合、顕著となる。一方、周波数空間でのデコンボリューションは、高速フーリエ変換(Fast Fourier Transform:FFT)を利用して高速計算ができるため、非常に魅力的である。ここでいう光学的なデコンボリューションとは、歪みやぼけなどにより劣化等した画像からその歪みなどを除去して、劣化等していない元画像を復元することをいう。   Only iterative processing will inevitably take time to converge. This drawback becomes noticeable for large images. On the other hand, deconvolution in the frequency space is very attractive because high-speed calculation can be performed using Fast Fourier Transform (FFT). The optical deconvolution referred to here is to restore the original image which is not deteriorated by removing the distortion or the like from the image deteriorated due to distortion or blur.

画像の場合、入力をin(x)、出力をou(x)、伝達関数をg(x)としたとき、理想状態では、出力ou(x)はコンボリューション積分となり、
ou(x)=∫in(t)g(x−t)dt…(3)
となる。なお、「∫」は積分の記号である。この式(3)は、周波数空間で、
O(u)=I(u)G(u)…(4)
となる。この既知の出力ou(x)から、伝達関数g(x)または未知の入力in(x)を求めるのがデコンボリューションであり、この目的のため、周波数空間で、I(u)=O(u)/G(u)が求められれば、これを実空間に戻すことで、未知の入力in(x)を求めることができる。
In the case of an image, when the input is in (x), the output is ou (x), and the transfer function is g (x), in the ideal state, the output ou (x) is a convolution integral,
ou (x) = ∫in (t) g (x−t) dt (3)
It becomes. “∫” is an integral symbol. This equation (3) is a frequency space,
O (u) = I (u) G (u) (4)
It becomes. Deconvolution is to determine the transfer function g (x) or the unknown input in (x) from this known output ou (x). For this purpose, I (u) = O (u ) / G (u) is obtained, the unknown input in (x) can be obtained by returning it to the real space.

しかし、実際はノイズ等より、式(3)は、「ou(x)+α(x)=∫in(t)g(x−t)dt+α(x)」となる。ここで、「ou(x)+α(x)」は既知だが、ou(x)とα(x)のそれぞれは未知である。これを、たとえ近似的に逆問題として解いたとしても、充分満足できる解を得ることは現実的には難しい。そこで、ou(x)+α(x)=∫in(t)g(x−t)dt+α(x)≒∫jn(t)g(x−t)dtとなる、jn(x)を、反復処理法を用いて収束させていき、得るのが上述した図3の処理フローである。
ここで、「α(x)≪ou(x)」であれば、jn(x)≒in(x)と考えられる。
However, in reality, due to noise or the like, Expression (3) becomes “ou (x) + α (x) = ∫in (t) g (x−t) dt + α (x)”. Here, “ou (x) + α (x)” is known, but ou (x) and α (x) are unknown. Even if this is approximated as an inverse problem, it is practically difficult to obtain a sufficiently satisfactory solution. Therefore, iterative processing is performed on jn (x) where ou (x) + α (x) = ∫in (t) g (x−t) dt + α (x) ≈∫jn (t) g (x−t) dt. The process flow of FIG. 3 described above is obtained by converging using the method.
Here, if “α (x) << ou (x)”, it is considered that jn (x) ≈in (x).

しかしながら、この方法は全データ領域内での計算を反復、収束させるため、充分満足な解は得られるが、データ数が多くなると時間がかかるのが欠点である。一方、ノイズの無い理想的状態では、周波数空間でのデコンボリューション計算で高速に解を求めることができる。そこで、この2つの処理を組み合わせることで、充分満足な解を高速で得ることができる。   However, since this method iterates and converges the calculation in the entire data area, a sufficiently satisfactory solution can be obtained, but it takes a long time if the number of data increases. On the other hand, in an ideal state without noise, a solution can be obtained at high speed by deconvolution calculation in a frequency space. Thus, by combining these two processes, a sufficiently satisfactory solution can be obtained at high speed.

このような処理方法としては、2つの方法が考えられる。第1は、データを間引く画素数を減じる方法である。間引く場合、たとえば、図15に示すように原画像のデータImg’が、画素11〜16,21〜26,31〜36,41〜46,51〜56,61〜66で構成されているとき、1つおきに画素を間引き、画素11,13,15,31,33,35,51,53,55からなる4分の1の大きさの原画像縮小データISmg’を生成する方法がある。   As such a processing method, two methods are conceivable. The first is a method of reducing the number of pixels from which data is thinned out. When thinning out, for example, as shown in FIG. 15, when the original image data Img ′ is composed of pixels 11 to 16, 21 to 26, 31 to 36, 41 to 46, 51 to 56, 61 to 66, There is a method in which every other pixel is thinned out, and the original image reduced data ISmg ′ having a size of a quarter composed of the pixels 11, 13, 15, 31, 33, 35, 51, 53, and 55 is generated.

このように、原画像のデータImg’と変化要因情報データGとを間引き、間引かれた原画像縮小データISmg’と縮小された変化要因情報のデータGSを生成し、原画像縮小データISmg’と縮小された変化要因情報のデータGSを用いて、図3に示す反復処理を行い、原画像縮小データISmg’へ変化する前の縮小元画像ISmgに近似する充分満足な間引かれた近似した縮小復元データISo+nを得る。   In this manner, the original image data Img ′ and the change factor information data G are thinned out to generate the thinned original image reduced data ISmg ′ and the reduced change factor information data GS, and the original image reduced data ISmg ′. Using the reduced change factor information data GS, the iterative process shown in FIG. 3 is performed, and a sufficiently satisfactory thinned approximation to approximate the reduced original image ISmg before changing to the original image reduced data ISmg ′ is performed. Reduced restoration data ISo + n is obtained.

この縮小された近似する縮小復元データISo+nを原画像縮小データISmg’へ変化する前の縮小元画像ISmg、すなわち正しい画像Imgの縮小した画像と推定する。そして、原画像縮小データISmg’は、縮小復元データISo+nと伝達関数g(x)のコンボリューション積分と考え、得られた縮小復元データISo+nと既知の原画像縮小データISmg’から未知の伝達関数g1(x)を得ることができる。   The reduced approximate restored data ISo + n is estimated as a reduced original image ISmg before changing to the original image reduced data ISmg ', that is, a reduced image of the correct image Img. The original image reduced data ISmg ′ is considered as a convolution integral of the reduced restoration data ISo + n and the transfer function g (x), and an unknown transfer function g1 is obtained from the obtained reduced restoration data ISo + n and the known original image reduced data ISmg ′. (X) can be obtained.

縮小復元データISo+nは充分満足なデータではあるが、あくまで近似である。したがって、本来の復元データIo+nと原画像のデータImg’の伝達関数g(x)は、縮小されたデータでの反復処理で得られた伝達関数g1(x)ではない。そこで、縮小復元データISo+nと縮小した原画像のデータである原画像縮小データISmg’から伝達関数g1(x)を算出し、算出した伝達関数g1(x)を拡大し、拡大した間を補間して、修正することで得られた新伝達関数g2(x)を、元データとなる原画像のデータImg’に対する伝達関数g(x)とする。新伝達関数g2(x)は、得られた伝達関数g1(x)に対して原画像縮小データの縮小率の逆数倍にし、その後、拡大した間の値を線形補間やスプライン補間等の補間処理をすることで得られる。たとえば、図15のように縦横共に1/2に間引いた場合、1/4の縮小率となるため、逆数倍としては4倍となる。   The reduced and restored data ISo + n is sufficiently satisfactory, but is only an approximation. Therefore, the transfer function g (x) of the original restoration data Io + n and the original image data Img ′ is not the transfer function g1 (x) obtained by the iterative process with the reduced data. Therefore, the transfer function g1 (x) is calculated from the reduced restoration data ISo + n and the original image reduced data ISmg ′ which is the reduced original image data, the calculated transfer function g1 (x) is enlarged, and the enlarged portion is interpolated. Then, the new transfer function g2 (x) obtained by the correction is set as a transfer function g (x) for the original image data Img ′ as the original data. The new transfer function g2 (x) is obtained by multiplying the obtained transfer function g1 (x) by the reciprocal of the reduction ratio of the original image reduction data, and thereafter, the enlarged value is interpolated such as linear interpolation or spline interpolation. It is obtained by processing. For example, as shown in FIG. 15, when the length and width are both halved, the reduction ratio is ¼, so that the reciprocal number is four times.

そして、その修正した新伝達関数g2(x)(=g(x))を使用し、周波数空間でデコンボリューション計算(ボケを含む画像群から計算によってボケを除去する計算)を行い、全体画像の完全な復元データIo+nを得て、それを劣化していない元の正しい画像Img(元画像)と推定する。   Then, using the modified new transfer function g2 (x) (= g (x)), deconvolution calculation (calculation for removing blur by calculation from a group of images including blur) is performed in the frequency space, Obtain complete restoration data Io + n and estimate it as the original correct image Img (original image) that has not been degraded.

以上の処理の流れを、図16に示すフローチャート図で示す。   The above processing flow is shown in the flowchart of FIG.

ステップS201では、原画像のデータImg’と変化要因情報のデータGを1/Mに縮小する。図15の例では1/4に縮小される。得られた原画像縮小データISmg’と、縮小変化要因情報のデータGSと、任意の画像(所定の画像)のデータIoとを使用し、図3に示すステップS102〜ステップS105を繰り返す。そして、差分のデータδが小さくなる画像、すなわち原画像縮小データISmg’へ変化する前の縮小元画像ISmgに近似する縮小復元データISo+nを得る(ステップS202)。このとき、図3に示す「G,Img’,Io+n」は、「GS,ISmg’,ISo+n」に置き換えられる。   In step S201, the original image data Img 'and the change factor information data G are reduced to 1 / M. In the example of FIG. 15, it is reduced to ¼. Steps S102 to S105 shown in FIG. 3 are repeated using the obtained original image reduction data ISmg ', reduction change factor information data GS, and arbitrary image (predetermined image) data Io. Then, the reduced restoration data ISo + n approximate to the reduced original image ISmg before changing to the original image reduced data ISmg 'is obtained (step S202). At this time, “G, Img ′, Io + n” shown in FIG. 3 is replaced with “GS, ISmg ′, ISo + n”.

得られた縮小復元データISo+nと既知の原画像縮小データISmg’とから、原画像縮小データISmg’から縮小復元データISo+nへの伝達関数g1(x)を算出する(ステップS203)。その後、ステップS204では、得られた伝達関数g1(x)をM倍(図15の例では4倍)して拡大し、拡大されたその間を線形補間等の補間手法にて補間し、新伝達関数g2(x)を得る。この新伝達関数g2(x)を元画像に対しての伝達関数g(x)と推定する。   A transfer function g1 (x) from the original image reduced data ISmg 'to the reduced restored data ISo + n is calculated from the obtained reduced / restored data ISo + n and the known original image reduced data ISmg' (step S203). After that, in step S204, the obtained transfer function g1 (x) is enlarged by M times (4 times in the example of FIG. 15), and the enlarged portion is interpolated by an interpolation method such as linear interpolation to obtain a new transfer. The function g2 (x) is obtained. The new transfer function g2 (x) is estimated as the transfer function g (x) for the original image.

次に、算出した新伝達関数g2(x)と原画像のデータImg’からデコンボリューションを行い、復元データIo+nを求める。この復元データIo+nを元画像とする(ステップS205)。以上のように、イ)反復処理と、ロ)伝達関数g1(x),g2(x)を求め、その求められた新伝達関数g2(x)を使用した処理と、を併用することで、復元処理の高速化が図れる。   Next, deconvolution is performed from the calculated new transfer function g2 (x) and original image data Img 'to obtain restored data Io + n. The restored data Io + n is used as an original image (step S205). As described above, a) iterative processing and b) determining transfer functions g1 (x) and g2 (x) and using the calculated new transfer function g2 (x) together, The restoration process can be speeded up.

なお、この処理の場合、得られた正しい画像と推定された復元データIo+nを図3に示す処理の初期画像のデータIoとして使用し、変化要因情報のデータGと劣化した原画像のデータImg’とを用い、さらに反復処理を実行するようにしても良い。   In the case of this process, the obtained correct image and the restored data Io + n estimated are used as the initial image data Io of the process shown in FIG. 3, and the change factor information data G and the deteriorated original image data Img ′ Further, iterative processing may be executed using

縮小されたデータを利用する方法の第2は、原画像のデータImg’の一部の領域のデータを取り出すことで原画像縮小データISmg’とする方法である。この方法を、図3に示す処理方法を利用した第3の処理方法として説明する。たとえば、図17に示すように、原画像のデータImg’が、画素11〜16,21〜26,31〜36,41〜46,51〜56,61〜66で構成されているとき、その中央の領域である、画素32,33,34,42,43,44からなる6分の1の大きさの領域を取り出し、原画像縮小データISmg’を生成する方法である。   A second method of using the reduced data is a method for obtaining original image reduced data ISmg 'by extracting data of a partial area of the original image data Img'. This method will be described as a third processing method using the processing method shown in FIG. For example, as shown in FIG. 17, when the original image data Img ′ is composed of pixels 11 to 16, 21 to 26, 31 to 36, 41 to 46, 51 to 56, 61 to 66, the center This is a method of taking out an area having a size of 1/6 consisting of pixels 32, 33, 34, 42, 43, and 44, and generating original image reduced data ISmg ′.

この第2の方法を図18のフローチャートを用いて詳細に説明する。   This second method will be described in detail with reference to the flowchart of FIG.

第2の方法では、まずステップS301で上述のように原画像縮小データISmg’を得る。次に、この原画像縮小データISmg’と、変化要因情報データGと、任意の画像データで原画像縮小データISmg’と同じ大きさ(=同じ画素数)の初期画像のデータIoを使用し、図3に示すステップS102〜ステップS105の処理を繰り返し、縮小復元データISo+nを得る(ステップS302)。この処理では、図3中の「Img’」を「ISmg’」に、「Io+n」を「ISo+n」にそれぞれ置き換えられる。   In the second method, first, in step S301, the original image reduced data ISmg 'is obtained as described above. Next, the original image reduced data ISmg ′, the change factor information data G, and the initial image data Io having the same size (= the same number of pixels) as the original image reduced data ISmg ′ in arbitrary image data are used. The processing in steps S102 to S105 shown in FIG. 3 is repeated to obtain reduced restoration data ISo + n (step S302). In this process, “Img ′” in FIG. 3 is replaced with “ISmg ′”, and “Io + n” is replaced with “ISo + n”.

得られた縮小復元データISo+nと既知の原画像縮小データISmg’とから、縮小復元データISo+nから原画像縮小データISmg’への伝達関数g1’(x)を算出する(ステップS303)。次に、算出された伝達関数g1’(x)を元画像Imgに対する伝達関数g’(x)とし、この伝達関数g1’(x)(=g’(x))と既知の原画像のデータImg’を用いて、元画像Imgを逆計算により求める。なお、求められたものは、実際は、元画像Imgに近似する画像のデータとなる。   A transfer function g1 '(x) from the reduced / restored data ISo + n to the original image reduced data ISmg' is calculated from the obtained reduced / restored data ISo + n and the known original image reduced data ISmg '(step S303). Next, the calculated transfer function g1 ′ (x) is set as a transfer function g ′ (x) for the original image Img, and this transfer function g1 ′ (x) (= g ′ (x)) and the data of the known original image Using Img ′, the original image Img is obtained by inverse calculation. Note that the obtained data is actually image data that approximates the original image Img.

以上のように、イ)反復処理と、ロ)伝達関数g1’(x)を求め、その求められた伝達関数g1’(x)を使用した処理と、を併用することで、復元処理の高速化が図れる。なお、求められた伝達関数g1’(x)をそのまま全体の伝達関数g’(x)とせず、変化要因情報データGを利用して修正するようにしても良い。   As described above, it is possible to speed up the restoration process by using a) iterative processing and b) obtaining the transfer function g1 ′ (x) and using the obtained transfer function g1 ′ (x). Can be achieved. Note that the obtained transfer function g1 '(x) may be corrected using the change factor information data G without using the entire transfer function g' (x) as it is.

このように、上述した高速化のための第2の方法では、画像領域全体を反復処理で復元せず、領域の一部分を反復処理し良好な復元画像を求め、それを使ってその部分に対する伝達関数g1’(x)を求め、その伝達関数g1’(x)自体またはそれを修正(拡大など)したものを用いて画像全体の復元を行うものである。ただし、取り出してくる領域は、変動領域よりも充分大きな領域とする必要がある。図5等に示した先の例では、3画素に渡って変動しているので、3画素以上の領域を取り出してくる必要がある。   Thus, in the second method for speeding up described above, the entire image area is not restored by iterative processing, but a part of the area is iteratively processed to obtain a good restored image, which is used to transmit to that part. A function g1 ′ (x) is obtained, and the entire image is restored using the transfer function g1 ′ (x) itself or a modification (enlarged or the like) thereof. However, the area to be extracted needs to be an area sufficiently larger than the fluctuation area. In the previous example shown in FIG. 5 and the like, since it fluctuates over 3 pixels, it is necessary to extract an area of 3 pixels or more.

なお、図17、図18に示す縮小領域を取り出してくる方法の場合、原画像のデータImg’を、たとえば図19に示すように、4分割し、各分割領域から一部の領域を取り出し、小さい領域である4つの原画像縮小データISmg’をそれぞれ反復処理し、4分割された分割区域をそれぞれ復元し、復元された4つの分割画像を一つにすることで元の全体画像としても良い。なお、複数に分割する際、必ず複数領域に渡って重なる領域(オーバーラップ領域)を持つようにするのが好ましい。また、各復元された画像のオーバーラップ領域は、平均値を使ったり、オーバーラップ領域で滑らかにつなぐなどの処理を行うようにするのが好ましい。   In the method of extracting the reduced area shown in FIGS. 17 and 18, the original image data Img ′ is divided into four parts as shown in FIG. 19, for example, and a part of the area is extracted from each divided area. Four original image reduction data ISmg ′, which are small areas, are iteratively processed, each of the four divided areas is restored, and the restored four divided images are combined into a single original image. . In addition, when dividing into a plurality of areas, it is preferable to always have an overlapping area (overlapping area) over a plurality of areas. Further, it is preferable to perform processing such as using an average value or smoothly connecting the overlap regions of the restored images in the overlap regions.

さらに、実際に図3の処理方法を採用した場合、コントラストの急激な変化のある画像等については、良好な近似の復元画像への収束が遅いことが判明した。このように、元の画像である被写体の性質によっては、反復処理の収束スピードが遅く、反復回数を多くしなければならない場合がある。このような被写体の場合、次のような処理方法を採用すると、この問題を解決できると推定される。   Further, when the processing method of FIG. 3 is actually adopted, it has been found that convergence of an image with a sharp change in contrast to a good approximate restored image is slow. Thus, depending on the nature of the subject that is the original image, the convergence speed of the iterative process may be slow and the number of iterations may have to be increased. In the case of such a subject, it is estimated that this problem can be solved by adopting the following processing method.

その方法とは以下のとおりである。すなわち、コントラストの急激な変化のある被写体は、図3に示す処理方法による復元の復元処理を使用し、元の画像に近似したものを得ようとすると、反復数が非常に多くなると共に多くの回数の処理を行った後も、元の被写体に近似する復元データI+nを生成できない。そこで、撮影された原画像(ブレ画像)のデータImg’に、既知の画像のデータBから撮影時の変化要因情報のデータGを用いてブレ画像のデータB’を生成し、そのデータB’を重ね合わせ、「Img’+B’」を作る。その後、重ね合わせた画像を図3に示す処理にて復元処理し、その復元データI+nとなる結果データCから既知の加えた画像のデータBを取り去り、求めたい復元画像のデータImgを取り出す。 The method is as follows. That is, for a subject with a sharp change in contrast, if the restoration process by the restoration method shown in FIG. 3 is used to obtain an approximation to the original image, the number of iterations increases and many Even after the number of processes has been performed, the restoration data I 0 + n that approximates the original subject cannot be generated. Therefore, blur data B ′ is generated by using the data G of the change factor information at the time of photographing from the data B of the known image as data Img ′ of the photographed original image (blurred image). To create “Img ′ + B ′”. Thereafter, the superimposed image is restored by the processing shown in FIG. 3, and the data B of the added image that has been added is removed from the result data C that becomes the restored data I 0 + n, and the restored image data Img to be obtained is taken out. .

この方法では、正しい画像のデータImgは急激なコントラスト変化を含んでいるが、既知の画像のデータBを加えることで、この急激なコントラスト変化を軽減することができ、復元処理の反復数を低減することができる。   In this method, the correct image data Img includes a sharp contrast change, but by adding the known image data B, this sharp contrast change can be reduced and the number of iterations of the restoration process is reduced. can do.

また、復元の困難な被写体の処理方法および高速な処理方法として、他の処理方法も採用できる。たとえば、復元処理の反復数を多くすれば良好な復元画像により近づけることができるが、処理に時間がかかる。そこで、ある程度の反復処理数で得られた画像を用いて、そこに含まれる誤差成分を算出し、誤差を含む復元画像から、算出した誤差を取り去ることで良好な復元画像すなわち復元データI+nを得ることができる。 Also, other processing methods can be adopted as a processing method for a subject that is difficult to restore and a high-speed processing method. For example, if the number of iterations of the restoration process is increased, it can be brought closer to a good restored image, but the process takes time. Therefore, by using an image obtained by a certain number of iterations, an error component included in the image is calculated, and a good restored image, that is, restored data I 0 + n is obtained by removing the calculated error from the restored image including the error. Can be obtained.

この方法を具体的に以下に説明する。求めたい正しい原画像をAとし、撮影した原画像をA’とし、原画像A’から復元した画像をA+γとし、その復元データから生成したブレた比較用データをA’+γ’とする。この「A’+γ’」に、撮影した原画像「A’」を付加し、それを復元処理すると、「A+γ+A+γ+γ」となり、これは「2A+3γ」であり、また、「2(A+γ)+γ」である。「A+γ」は前回の復元処理で求まっているので、「2(A+γ)+γ−2(A+γ)」が計算でき、「γ」が求まる。よって「A+γ」から「γ」を取り去ることで、求めたい正しい原画像Aが得られる。   This method will be specifically described below. The correct original image to be obtained is A, the captured original image is A ′, the image restored from the original image A ′ is A + γ, and the blurred comparison data generated from the restored data is A ′ + γ ′. When the captured original image “A ′” is added to “A ′ + γ ′” and restored, it becomes “A + γ + A + γ + γ”, which is “2A + 3γ”, and “2 (A + γ) + γ”. is there. Since “A + γ” is obtained in the previous restoration process, “2 (A + γ) + γ−2 (A + γ)” can be calculated, and “γ” is obtained. Therefore, by removing “γ” from “A + γ”, the correct original image A to be obtained can be obtained.

以上説明した各処理方法、すなわち、(1)配分比kを使用して差分のデータδを配分する方法(実施例方式)、(2)対応する画素の差分、または差分のデータδを変倍する方法(対応画素方式)、(3)劣化要因の重心を検出してその重心部分のデータを利用する方法(重心方法)、(4)データを間引き、逆問題と組み合わせる方法(逆問題間引き方法)、(5)縮小領域を取り出し、逆問題と組み合わせる方法(逆問題領域取り出し方法)、(6)所定の画像を重ね合わせて反復処理し、その後、その所定の画像を取り去る方法(苦手画像対策重ね合わせ方法)、(7)誤差を含む復元画像から、算出した誤差を取り去る方法(誤差取り出し方法)の各処理方法のプログラムを処理部4に保存しておき、使用者の選択または画像の種類に応じて自動的に、処理方法を選択できるようにしても良い。   Each processing method described above, that is, (1) a method of allocating difference data δ using the distribution ratio k (a method according to the embodiment), (2) a corresponding pixel difference, or scaling of the difference data δ Method (corresponding pixel method), (3) a method of detecting the centroid of the deterioration factor and using the data of the centroid part (centroid method), (4) a method of thinning out the data and combining with the inverse problem (inverse problem decimating method) ), (5) A method for extracting a reduced area and combining it with an inverse problem (inverse problem area extraction method), (6) A method for repeatedly processing a predetermined image by overlaying, and then removing the predetermined image (measures for poor images) A program for each processing method (superposition method) and (7) a method of removing the calculated error from the restored image including the error (error extraction method) is stored in the processing unit 4 and selected by the user or the type of image The processing method may be automatically selected according to the process.

また、処理部4は、変化要因情報のデータGを複数の種類の内のいずれかに分類付けし、その分類毎に違う処理(上述した各方法のいずれか1つ)を行うようにしたり、また、その分類毎に、繰り返しの回数を異ならせるようにしても良い。   Further, the processing unit 4 classifies the data G of the change factor information into any of a plurality of types, and performs different processing (any one of the above-described methods) for each classification, Further, the number of repetitions may be varied for each classification.

また、これら(1)〜(7)のいずれか複数を処理部4に保存しておき、使用者の選択または画像の種類に応じて自動的に、処理方法を選択できるようにしても良い。また、これら5つの方法のうちいずれか複数を選択し、1ルーチンの度に交互または順番に利用したり、最初の数回はある方式で処理し、その後は他の方式で処理するようにしても良い。なお、画像処理装置1は、上述した(1)〜(7)のいずれか1つまたは複数の他に、それらとは異なる処理方法をも有するようにしても良い。   Alternatively, any one of (1) to (7) may be stored in the processing unit 4 so that the processing method can be automatically selected according to the user's selection or the type of image. In addition, select any one of these five methods and use them alternately or in sequence every routine, or process them in one method for the first few times, and then process them in another method. Also good. Note that the image processing apparatus 1 may have a different processing method in addition to any one or a plurality of (1) to (7) described above.

また、上述した各処理方法は、プログラム化されても良い。また、プログラム化されたものが記憶媒体、たとえばCD、DVD、USBメモリに入れられ、コンピュータによって読みとり可能とされても良い。この場合、画像処理装置1は、その記憶媒体内のプログラムを読み込む読み込み手段を持つこととなる。さらには、そのプログラム化されたものが画像処理装置1の外部サーバに入れられ、必要によりダウンロードされ、使用されるようにしても良い。この場合、画像処理装置1は、その記憶媒体内のプログラムをダウンロードする通信手段を持つこととなる。   Moreover, each processing method mentioned above may be programmed. Alternatively, the program may be stored in a storage medium, such as a CD, DVD, or USB memory, and read by a computer. In this case, the image processing apparatus 1 has reading means for reading a program in the storage medium. Further, the program may be stored in an external server of the image processing apparatus 1, downloaded as necessary, and used. In this case, the image processing apparatus 1 has communication means for downloading a program in the storage medium.

なお、三脚に画像処理装置1を固定して被写体を撮影した場合であっても、振動に起因して原画像が劣化する場合がある。その場合の振動は、三脚が設置されている近くで自動車や人間が移動する際に、地面及び当該三脚を介して画像処理装置1に伝搬する振動等である。この場合の振動は、比較的固い地盤を伝搬してくるものであるため、手ブレなどの振動に比べて高い周波数となることもある。そこで、画像処理装置1に三脚を取り付けた場合には、振動の検出を、周波数0Hzを越え240Hzの範囲内で行い、画像処理装置1に三脚を取り付けない場合には、振動の検出を、周波数0Hzを越えFHzの範囲(20≦F≦120)で行い、それらの振動データを利用して反復処理等の画像復元処理を行うことが好ましい。その構成を採用する場合には、三脚の取り付けの有無を検知し、自動的に振動の検出周波数が切り替わる構成とすることが、撮影者の負担を軽減できるためさらに好ましい。   Even when the subject is photographed with the image processing apparatus 1 fixed to a tripod, the original image may be deteriorated due to vibration. The vibration in that case is vibration that propagates to the image processing apparatus 1 through the ground and the tripod when a car or a person moves near the tripod. Since the vibration in this case propagates on a relatively hard ground, it may have a higher frequency than vibrations such as camera shake. Therefore, when a tripod is attached to the image processing apparatus 1, the vibration is detected within a frequency range from 0 Hz to 240 Hz. When the tripod is not attached to the image processing apparatus 1, the vibration is detected using the frequency. It is preferable to perform the image restoration process such as an iterative process using the vibration data in the range of 0 Hz to FHz (20 ≦ F ≦ 120). When adopting such a configuration, it is more preferable to detect the presence or absence of a tripod and automatically switch the vibration detection frequency because the burden on the photographer can be reduced.

また上述した、振動の検出期間を、撮影開始前および/または撮影終了後の時間を含むこととする構成は、元画像を復元する処理部を有する画像処理装置であって、処理部は、画像劣化要因を構成する振動データを利用して復元処理を行うと共に、復元処理に利用する上記振動データは、周波数0Hzを超えFHzの範囲(20≦F≦120)内のデータとした画像処理装置にのみ有効な構成ではない。復元機能を有する、他の画像処理装置、たとえば振動の検出を0Hzを超え数kHz等広い範囲に亘って検出している画像処理装置にこの構成を付加しても、画像処理装置の撮影(露光)期間に限らず、長期間に亘り発生している撮影者の振動を検出し、その振動データを用いて、点像関数等を算出することができるため、復元処理精度が向上し得る有利な効果を得ることができることは言うまでもない。   The above-described configuration in which the vibration detection period includes the time before the start of shooting and / or the time after the end of shooting is an image processing apparatus having a processing unit that restores an original image. The restoration processing is performed by using the vibration data constituting the deterioration factor, and the vibration data used for the restoration processing is stored in the image processing apparatus in which the frequency exceeds 0 Hz and is in the range of FHz (20 ≦ F ≦ 120). It is not the only valid configuration. Even if this configuration is added to another image processing apparatus having a restoration function, for example, an image processing apparatus that detects vibrations over a wide range such as more than 0 Hz and several kHz, exposure (exposure) of the image processing apparatus ) Not only the period but also the vibration of the photographer that occurs over a long period of time can be detected, and the point spread function and the like can be calculated using the vibration data, which can advantageously improve the restoration processing accuracy. Needless to say, an effect can be obtained.

また、上述の各例では、得られた振動データを周波数空間で手ブレ周波数帯域に近似制限しているが、周波数空間で制限させることなく、得られた振動データを実空間でそのまま利用することができる。また、手ブレ周波数帯域のみに検出データを制限するに当っては、振動データの中に手ブレ周波数とは異なる周波数が存在するときは,処理部4が自動的に利用する検出データを手ブレ周波数帯域に制限するようにしても良いが、予め、検出データそのものを手ブレ周波数帯域のみとするように処理部4を構成しても良い。   In each of the above-described examples, the obtained vibration data is approximately restricted to the camera shake frequency band in the frequency space, but the obtained vibration data is used as it is in the real space without being restricted in the frequency space. Can do. Further, when limiting the detection data to only the camera shake frequency band, if there is a frequency different from the camera shake frequency in the vibration data, the detection data automatically used by the processing unit 4 is subjected to the camera shake. Although the frequency band may be limited, the processing unit 4 may be configured in advance so that the detection data itself is limited to the camera shake frequency band.

なお、撮影が終了してから所定の時間分振動を検出するようにするには、露光終了からタイマーを働かせるのが好ましいが、露光開始からタイマーを働かせたり、シャッターが戻るのを検出し、その検出時点から所定時間としたり等、種々の方法が採用され得る。   In order to detect vibration for a predetermined time after shooting is completed, it is preferable to operate a timer from the end of exposure. Various methods such as a predetermined time from the time of detection may be employed.

本発明の実施の形態に係る画像処理装置の主要構成を示すブロック図である。It is a block diagram which shows the main structures of the image processing apparatus which concerns on embodiment of this invention. 図1に示す画像処理装置の概要を示す外観斜視図で、角速度センサの配置位置を説明するための図である。It is an external appearance perspective view which shows the outline | summary of the image processing apparatus shown in FIG. 1, and is a figure for demonstrating the arrangement position of an angular velocity sensor. 図1に示す画像処理装置の処理部で行う画像復元処理方法(反復処理)に係る処理ルーチンを説明するための処理フロー図である。FIG. 2 is a processing flowchart for explaining a processing routine related to an image restoration processing method (repetitive processing) performed by a processing unit of the image processing apparatus shown in FIG. 1. 図3に示す処理方法の概念を説明するための図である。It is a figure for demonstrating the concept of the processing method shown in FIG. 図3に示す処理方法を、手ブレを例にして具体的に説明するための図で、手ブレのないときのエネルギーの集中を示す表である。FIG. 4 is a diagram for specifically explaining the processing method shown in FIG. 3 using camera shake as an example, and is a table showing energy concentration when there is no camera shake. 図3に示す処理方法を、手ブレを例にして具体的に説明するための図で、手ブレのないときの画像データを示す図である。It is a figure for demonstrating concretely the processing method shown in FIG. 3 taking an example of camera shake, and is a figure which shows image data when there is no camera shake. 図3に示す処理方法を、手ブレを例にして具体的に説明するための図で、手ブレが生じたときのエネルギーの分散を示す図である。It is a figure for demonstrating concretely the processing method shown in FIG. 3 taking an example of camera shake, and is a figure which shows dispersion | distribution of energy when camera shake occurs. 図3に示す処理方法を、手ブレを例にして具体的に説明するための図で、任意の画像から比較用データを生成する状況を説明するための図である。FIG. 4 is a diagram for specifically explaining the processing method shown in FIG. 3 using camera shake as an example, and is a diagram for explaining a situation in which comparison data is generated from an arbitrary image. 図3に示す処理方法を、手ブレを例にして具体的に説明するための図で、比較用データと、処理対象となるぶれた原画像とを比較して、差分のデータを生成する状況を説明するための図である。FIG. 3 is a diagram for specifically explaining the processing method shown in FIG. 3 using camera shake as an example, in which the comparison data and the blurred original image to be processed are compared to generate difference data It is a figure for demonstrating. 図3に示す処理方法を、手ブレを例にして具体的に説明するための図で、差分のデータを配分し任意の画像に加えることで復元データを生成する状況を説明するための図である。FIG. 3 is a diagram for specifically explaining the processing method shown in FIG. 3 using camera shake as an example, and a diagram for explaining a situation in which restored data is generated by allocating difference data and adding it to an arbitrary image. is there. 図3に示す処理方法を、手ブレを例にして具体的に説明するための図で、生成された復元データから新たな比較用データを生成し、そのデータと処理対象となるぶれた原画像とを比較して差分のデータを生成する状況を説明するための図である。FIG. 3 is a diagram for specifically explaining the processing method shown in FIG. 3 using camera shake as an example, and generating new comparison data from the generated restored data, and the blurred original image to be processed It is a figure for demonstrating the condition which produces | generates the data of a difference by comparing. 図3に示す処理方法を、手ブレを例にして具体的に説明するための図で、新たに生成された差分のデータを配分し、新たな復元データを生成する状況を説明するための図である。FIG. 3 is a diagram for specifically explaining the processing method shown in FIG. 3 using camera shake as an example, and a diagram for explaining a situation in which newly generated difference data is allocated and new restored data is generated. It is. 図3に示す処理方法を利用した第1の処理方法である変化要因の重心を利用した処理を説明するための図で、(A)は正しい画像のデータ中の1つの画素に注目する状態を示す図で、(B)は原画像のデータを示す図中で、注目した画素のデータが拡がる状態を示す図である。FIG. 4 is a diagram for explaining processing using the center of gravity of a change factor, which is a first processing method using the processing method shown in FIG. 3, and (A) shows a state in which attention is paid to one pixel in correct image data. FIG. 4B is a diagram illustrating a state in which the data of the pixel of interest is expanded in the diagram illustrating the data of the original image. 図13に示す第1の処理方法である変化要因の重心を利用した処理を、具体的に説明するための図である。It is a figure for demonstrating concretely the process using the gravity center of the change factor which is the 1st processing method shown in FIG. 図3に示す処理方法を利用した第2の処理方法を説明するための図で、(A)は処理対象となる原画像のデータを示し、(B)は(A)のデータを間引いたデータを示す図である。FIG. 4 is a diagram for explaining a second processing method using the processing method shown in FIG. 3, in which (A) shows data of an original image to be processed, and (B) shows data obtained by thinning out the data of (A). FIG. 図15に示す第2の処理方法のフローチャート図である。It is a flowchart figure of the 2nd processing method shown in FIG. 図3に示す処理方法を利用した第3の処理方法を説明するための図で、(A)は処理対象となる原画像のデータを示し、(B)は(A)のデータの一部を取り出したデータを示す図である。FIG. 4 is a diagram for explaining a third processing method using the processing method shown in FIG. 3, (A) shows data of an original image to be processed, and (B) shows a part of the data of (A). It is a figure which shows the taken-out data. 図17に示す第3の処理方法のフローチャート図である。It is a flowchart figure of the 3rd processing method shown in FIG. 図17、図18に示す第3の処理方法の変形例を説明するための図で、原画像のデータを4分割し、各分割領域から、反復処理するための一部の領域を取り出すことを示す図である。FIG. 17 is a diagram for explaining a modification of the third processing method shown in FIGS. 17 and 18 in which the original image data is divided into four parts, and a part of the area for repeated processing is extracted from each divided area. FIG.

符号の説明Explanation of symbols

1 画像処理装置
2 撮影部
3 制御系部
4 処理部
5 記録部
6 検出部
7 要因情報保存部
Io 初期画像のデータ(任意の画像のデータ)
Io’比較用データ
G 変化要因情報のデータ(劣化要因情報のデータ)
GS 縮小された変化要因情報のデータ
Img’ 原画像のデータ(撮影された画像)
ISmg’ 原画像縮小データ
δ 差分のデータ
k 配分比
Io+n 復元データ(復元画像のデータ)
ISo+n 縮小復元データ
Img 劣化のない本来の正しい画像のデータ(元画像)
ISmg 縮小元画像
g(x),g’(x),g2(x) 伝達関数(大きい画像を復元するための伝達関数)
g1(x),g1’(x) 伝達関数(縮小されたデータから得られた伝達関数)
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Image pick-up part 3 Control system part 4 Processing part 5 Recording part 6 Detection part 7 Factor information preservation | save part Io Initial image data (data of arbitrary images)
Io 'comparison data G Change factor information data (degradation factor information data)
GS Reduced change factor information data Img 'Original image data (captured image)
ISmg 'Original image reduced data δ Difference data k Distribution ratio Io + n Restored data (Restored image data)
ISo + n Reduced restoration data Img Original correct image data without deterioration (original image)
ISmg Reduced original image
g (x), g ′ (x), g2 (x) transfer function (transfer function for restoring a large image)
g1 (x), g1 ′ (x) transfer function (transfer function obtained from reduced data)

Claims (1)

撮像素子を備える撮像部と、
上記撮像部による撮像により生成された原画像から変化する前の画像もしくは本来撮影されるべきであった画像またはそれらの近似画像(以下、元画像という)を、上記原画像の撮像時における画素に対応する光エネルギーの分散を示す変化要因情報を利用するデータ処理によって復元処理する処理部と、を有し、
上記処理部は、
所定の画像データから、上記原画像の撮像時における上記変化要因情報が示す分散の仕方に応じて光エネルギーを分散させた比較用データを生成し、上記原画像のデータと上記比較用データとの差分データが所定値より大きいまたは所定値以上の場合、上記変化要因情報が示す光エネルギーの分散の仕方に応じて、上記所定の画像データに上記差分データを配分することで復元データを生成する第1の処理を実行し、
上記復元データを上記第1の処理における所定の画像データの代わりに使用して新たな復元データを生成する処理を繰り返し実行し、上記差分データが、所定値以下または所定値より小さくなる復元データを生成する第2の処理を実行するものであり、
上記処理部は、上記原画像のデータとは別の画像データから撮影時の変化要因情報を用いた画像データを生成し、その作成した画像データと上記原画像のデータとを重ね合わせた画像データを上記所定の画像データとして用いて上記第1の処理および上記第2の処理を実行し、その実行によって求められた、上記差分データが所定値以下または所定値より小さくなった復元データの元となった復元データから、上記別の画像データを取り去ったものを上記元画像のデータとする、
ことを特徴とする画像処理装置。
An imaging unit comprising an imaging element;
An image before changing from an original image generated by imaging by the imaging unit, an image that should have been originally captured, or an approximate image thereof (hereinafter referred to as an original image) is used as a pixel when the original image is captured. A processing unit that performs restoration processing by data processing using change factor information indicating dispersion of corresponding light energy, and
The processing unit
From the predetermined image data, comparison data in which light energy is dispersed according to the manner of dispersion indicated by the change factor information at the time of capturing the original image is generated, and the original image data and the comparison data are When the difference data is greater than or equal to a predetermined value, the restoration data is generated by allocating the difference data to the predetermined image data in accordance with the light energy distribution indicated by the change factor information. 1 process is executed,
The restoration data is used in place of the predetermined image data in the first process, and a process for generating new restoration data is repeatedly executed, and the difference data is reduced to a predetermined value or less or smaller than a predetermined value. The second process to be generated is executed,
The processing unit generates image data using change factor information at the time of shooting from image data different from the original image data, and image data obtained by superimposing the created image data and the original image data Is used as the predetermined image data, and the first process and the second process are executed, and the difference data obtained by the execution is the original of the restored data whose difference data is equal to or less than a predetermined value or smaller than the predetermined value. The original image data is obtained by removing the other image data from the restored data.
An image processing apparatus.
JP2005304267A 2005-10-19 2005-10-19 Image processing device Expired - Fee Related JP4763415B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005304267A JP4763415B2 (en) 2005-10-19 2005-10-19 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005304267A JP4763415B2 (en) 2005-10-19 2005-10-19 Image processing device

Publications (2)

Publication Number Publication Date
JP2007116332A JP2007116332A (en) 2007-05-10
JP4763415B2 true JP4763415B2 (en) 2011-08-31

Family

ID=38098140

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005304267A Expired - Fee Related JP4763415B2 (en) 2005-10-19 2005-10-19 Image processing device

Country Status (1)

Country Link
JP (1) JP4763415B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8983221B2 (en) 2011-08-29 2015-03-17 Panasonic Intellectual Property Management Co., Ltd. Image processing apparatus, imaging apparatus, and image processing method
JP6304619B2 (en) * 2013-12-26 2018-04-04 住友ゴム工業株式会社 Image stabilization system, program, and method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1124122A (en) * 1997-07-03 1999-01-29 Ricoh Co Ltd Method and device for correcting camera shake image, and recording medium with recorded program for executing the same method by computer and capable of being read by computer
JP2002099014A (en) * 2000-09-22 2002-04-05 Nikon Corp Signal predicting apparatus and camera provided with the same
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
JP4598623B2 (en) * 2005-06-21 2010-12-15 日東光学株式会社 Image processing device

Also Published As

Publication number Publication date
JP2007116332A (en) 2007-05-10

Similar Documents

Publication Publication Date Title
JP5906493B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP5331816B2 (en) Image correction apparatus and image correction method
JP5499050B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JPWO2007074687A1 (en) Image processing device
JP2007243335A (en) Camera shake correction method, camera shake correction apparatus, and imaging apparatus
JP4926450B2 (en) Image processing device
JP2007048257A (en) Signal processor
JP4885150B2 (en) Image processing device
JP4763415B2 (en) Image processing device
JP2008032883A (en) Image processor
JP2014021901A (en) Object detection device, object detection method and program
JP4602860B2 (en) Image processing device
JP5133070B2 (en) Signal processing device
JP4598623B2 (en) Image processing device
JP5005319B2 (en) Signal processing apparatus and signal processing method
JP4975644B2 (en) Image processing device
JP4718618B2 (en) Signal processing device
JP2007081905A (en) Image processing apparatus
JP4629537B2 (en) Image processing device
JP4763419B2 (en) Image processing device
JP4449777B2 (en) Imaging apparatus, image processing apparatus and method, recording medium, and program
JP5007245B2 (en) Signal processing device
JP4982484B2 (en) Signal processing device
JP5005553B2 (en) Signal processing device
JP2007048276A (en) Image processor

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: 20100817

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: 20101101

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: 20110524

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: 20110609

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140617

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4763415

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees