JP2007081905A - Image processing apparatus - Google Patents

Image processing apparatus Download PDF

Info

Publication number
JP2007081905A
JP2007081905A JP2005267906A JP2005267906A JP2007081905A JP 2007081905 A JP2007081905 A JP 2007081905A JP 2005267906 A JP2005267906 A JP 2005267906A JP 2005267906 A JP2005267906 A JP 2005267906A JP 2007081905 A JP2007081905 A JP 2007081905A
Authority
JP
Japan
Prior art keywords
data
image
reduced
original image
restoration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2005267906A
Other languages
Japanese (ja)
Inventor
Fuminori Takahashi
史紀 高橋
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 JP2005267906A priority Critical patent/JP2007081905A/en
Priority to CN2006800415164A priority patent/CN101305598B/en
Priority to PCT/JP2006/314596 priority patent/WO2007032148A1/en
Publication of JP2007081905A publication Critical patent/JP2007081905A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of displaying images approximating completely restored images, in a short time after photographing, and then confirming contents of the image to be processed, such as recording, thereafter in a short period of time. <P>SOLUTION: The image processing apparatus, including a processing section for applying restoration processing to an image before being changed from an original image being a processing object, or an image having to be substantially photographed, or an approximate image (original image) to them, obtains original image reduction data resulting from reducing number of pixels from the original image (step S201), restores reduced restoration data approximate to a reduced original image, before being changed on the basis of the original image reproduction data (step S202), and displays the reproduction restoration data to a display section. Furthermore, the image processing apparatus preferably carries out processes (steps S203, S204, S205) of restoring the original image, by utilizing the data obtained at restoration. Further, the display section is, e.g. a monitor or the like of a camera. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、画像処理装置に関する。   The present invention relates to an image processing apparatus.

従来から、カメラ等の画像処理装置で被写体を撮影すると、記録される画像には時々劣化が生ずることが知られている。画像劣化の要因としては撮影時の手ぶれ等がある。手ぶれによる画像の劣化を補正する第1の方式には、回路処理方式がある。この回路処理方式は、撮影画像の劣化状態を表す伝達関数を取得し、撮影画像に対し、取得した伝達関数の逆変換を行い、撮影画像を補正するものである(特許文献1参照)。   Conventionally, it is known that when a subject is photographed by an image processing apparatus such as a camera, the recorded image sometimes deteriorates. As a factor of image deterioration, there is camera shake at the time of photographing. There is a circuit processing method as a first method for correcting image deterioration due to camera shake. In this circuit processing method, a transfer function representing a deterioration state of a captured image is acquired, and the acquired transfer function is inversely transformed for the captured image to correct the captured image (see Patent Document 1).

また手ぶれによる画像の劣化を補正する第2の方式には、レンズを動かす方式がある。たとえば、レンズを動かす方式としては、カメラの手ぶれを検出し、所定のレンズを、その検出した手ぶれに合わせて動かすことで補正する方式が知られている(特許文献2参照)。   As a second method for correcting image degradation due to camera shake, there is a method of moving a lens. For example, as a method for moving a lens, a method is known in which camera shake is detected and a predetermined lens is moved in accordance with the detected camera shake (see Patent Document 2).

特開平11−24122号公報(要約書参照)Japanese Patent Laid-Open No. 11-24122 (see abstract) 特開平6−317824号公報(要約書参照)JP-A-6-317824 (see abstract)

第1の方式を採用すると、補正に要する時間が短くて済む利点があるが、次の不利な点もある。すなわち取得する伝達関数は、ノイズやブレ情報誤差等に非常に弱く、これらのわずかな変動により、値が大きく変動する。このため、逆変換で得られる補正画像は、手ぶれがない状態で撮影した画像とはほど遠いものとなり、実際上は利用できない。また、ノイズ等を考慮した逆変換を行う場合、連立方程式の解の特異値分解等で解を推定する方法も採用できるが、その推定のための計算値が天文学的な大きさになり、実際的には解くことができなくなるリスクが高い。また第2の方式を採用したカメラは、モータ等、レンズを駆動するハードウェアのスペースが必要となり大型化してしまう。また、そのようなハードウェア自体やそのハードウェアを動かす駆動回路が必要となり、コストアップとなってしまう。   Employing the first method has the advantage that the time required for correction can be shortened, but has the following disadvantages. That is, the transfer function to be acquired is very weak against noise, blur information error, etc., and the value fluctuates greatly due to these slight fluctuations. For this reason, the corrected image obtained by the inverse transformation is far from an image photographed with no camera shake, and cannot be used in practice. In addition, when performing inverse transformation considering noise etc., a method of estimating the solution by singular value decomposition etc. of the solution of simultaneous equations can also be adopted, but the calculated value for the estimation becomes astronomical size and actually There is a high risk that it will not be solved. Further, the camera adopting the second method requires a hardware space for driving a lens such as a motor, and thus becomes large. In addition, such hardware itself and a drive circuit for operating the hardware are necessary, which increases costs.

一方、カメラ等を操作する者は、撮影直後にデジタルカメラ等が有する表示部(モニタ)にて、どのように撮影画像が記録されているかを撮影直後に確認したい場合がある。その理由は、撮影直後であれば、そのモニタで確認できる画像が劣悪な場合には、その劣悪さの修正を考慮した撮り直しができる可能性が高いためである。   On the other hand, there are cases where a person who operates a camera or the like wants to check immediately after shooting how a shot image is recorded on a display unit (monitor) of the digital camera or the like immediately after shooting. The reason is that, if the image that can be confirmed on the monitor is inferior immediately after photographing, there is a high possibility that re-taking can be performed in consideration of correction of the inferiority.

そこで本発明が解決しようとする課題は、撮影後、短時間で完全に補正された画像に近似する画像を表示し、記録等その後に処理される画像の内容を短時間で確認できるようにした画像処理装置を提供することである。   Therefore, the problem to be solved by the present invention is to display an image that approximates an image that has been completely corrected in a short time after shooting, and to be able to confirm the content of the image that is processed later, such as recording, in a short time. An image processing apparatus is provided.

上述した課題を解決するために、本発明の画像処理装置は、処理対象となる原画像から変化する前の画像もしくは本来撮影されるべきであった画像またはそれらの近似画像(以下、元画像という)を復元する処理を行う処理部を有する画像処理装置において、処理部は、原画像から画素数を減じた原画像縮小データを得、その原画像縮小データに基づいて変化する前の縮小元画像に近似する縮小復元データを復元し、表示部に当該縮小復元データを表示する処理を行うものとしている。   In order to solve the above-described problem, the image processing apparatus of the present invention is an image before changing from an original image to be processed, an image that should have been originally taken, or an approximate image thereof (hereinafter referred to as an original image). In the image processing apparatus having a processing unit that performs processing for restoring the original image, the processing unit obtains original image reduced data obtained by subtracting the number of pixels from the original image, and a reduced original image before changing based on the original image reduced data It is assumed that the reduced restoration data approximate to is restored, and the reduced restoration data is displayed on the display unit.

この発明によれば、原画像から画素数を減じることにより、補正すべき画像データ量が少なくなる。よって、手ぶれ補正等復元に要する時間を短縮でき、撮影後短時間で復元を終了させることができる。そしてその復元後の縮小復元データを表示部へ表示することにより、撮影後短時間で、記録等その後に処理される画像の内容を確認できる。   According to the present invention, the amount of image data to be corrected is reduced by subtracting the number of pixels from the original image. Therefore, the time required for restoration such as camera shake correction can be shortened, and restoration can be completed in a short time after photographing. By displaying the reduced and restored data after the restoration on the display unit, it is possible to confirm the contents of the image processed thereafter such as recording in a short time after photographing.

なお、表示部がモニタであると、非常に好適となる。これは、表示部に表示される復元後の縮小復元データは、画素数を減じた分だけ元画像に比べると小さい画像となる。しかし、たとえばデジタルカメラやデジタルビデオカメラ等が有するモニタは、通常、実際に記録される撮影画像よりも画素数が少なく、表示部面積も小さい。よって、各種のカメラのモニタにて、撮影した画像がどのようなもので、どのように記録されているかを確認するときに好ましいものとなる。 In addition, it will become very suitable when a display part is a monitor. This is because the restored reduced / restored data displayed on the display unit is smaller than the original image by the number of pixels. However, for example, a monitor included in a digital camera, a digital video camera, or the like usually has a smaller number of pixels and a smaller display area than a captured image that is actually recorded. Therefore, it is preferable when checking what kind of captured images are recorded on various camera monitors.

他の発明は、上述の発明に加え、処理部は、縮小復元データを復元する際に得られたデータを利用して、元画像を復元する処理を行うこととしている。原画像から元画像への復元の過程において、原画像縮小データから縮小復元データへの復元の過程で得られたデータを利用すると、原画像から元画像への復元が効率的に行えることとなる。   In another invention, in addition to the above-described invention, the processing unit performs processing to restore the original image using data obtained when restoring the reduced restoration data. In the process of restoring from the original image to the original image, if the data obtained in the process of restoring from the original image reduced data to the reduced restored data is used, the restoration from the original image to the original image can be performed efficiently. .

さらに、他の発明は、上述の発明に加え、処理部は、縮小復元データを復元する処理として、画像変化の要因となる変化要因情報のデータを利用して、所定の画像のデータから比較用データを生成し、この比較用データと、原画像縮小データと、を比較し、得られた差分のデータを利用して縮小復元データを生成し、この縮小復元データを所定の画像のデータの代わりに使用し、以後、得られた縮小復元データを前回の縮小復元データに置き換えて同様の処理を繰り返す処理を行うこととしている。   Further, according to another invention, in addition to the above-described invention, the processing unit uses the data of the change factor information that causes the image change as a process of restoring the reduced restoration data, and uses the data of the predetermined image for comparison. Data is generated, the comparison data is compared with the original image reduced data, and reduced restoration data is generated using the obtained difference data. The reduced restoration data is used instead of the data of a predetermined image. Thereafter, the obtained reduced / restored data is replaced with the previous reduced / restored data, and the same processing is repeated.

この発明によれば、画像変化の要因情報を利用して、所定のデータを生成することだけで元画像に近似する縮小復元データを生成しているので、ハードウェア的な増加はほとんど無く、装置が大型化しない。また、縮小復元データから比較用データを作り、その比較用データと処理対象の原画像縮小データを比較するという処理を繰り返し、徐々に縮小元画像に近い縮小復元データを得るので、現実的な復元作業となる。このため、画像の復元に当たって、現実性のある回路処理方式を有する画像処理装置とすることができる。   According to the present invention, the reduced and restored data that approximates the original image is generated only by generating predetermined data using the factor information of the image change, so that there is almost no increase in hardware, and the device Does not increase in size. Also, comparison data is created from the reduced and restored data, and the process of comparing the comparison data and the original image reduced data to be processed is repeated to gradually obtain reduced and restored data that is close to the reduced original image. It becomes work. For this reason, when restoring an image, an image processing apparatus having a realistic circuit processing method can be obtained.

なお、処理部は、繰り返しの処理の際、差分のデータが所定値以下または所定値より小さくなったら、停止させる処理を行なうようにしても良い。この構成を採用した場合、差分が「0」にならなくても処理を停止させるので、処理の長時間化を防止することができる。また、所定値以下としているので、近似する縮小復元データは原画像の元となる変化前(劣化等する前)の縮小元画像により近いものとなる。さらに、ノイズなどがあった場合、差分が「0」になることが現実的にはあり得ない状況が生じがちであるが、そのような場合であっても無限に処理を繰り返すことにはならない。   Note that the processing unit may perform a process of stopping when the difference data becomes equal to or smaller than a predetermined value or smaller than a predetermined value during the repeated processing. When this configuration is adopted, the processing is stopped even if the difference does not become “0”, so that it is possible to prevent a long processing time. Further, since it is set to a predetermined value or less, the approximated reduced / restored data is closer to the reduced original image before the change (before deterioration or the like) that is the original of the original image. Furthermore, when there is noise or the like, there is a tendency that the difference cannot be “0” in reality. However, even in such a case, the processing is not repeated infinitely. .

さらに、処理部は、繰り返しの処理の際、繰り返しの回数が所定回数となったら停止させる処理を行うようにしても良い。この構成を採用した場合、差分が「0」になってもならなくても処理を停止させるので、処理の長時間化を防止することができる。また、所定回数まで処理を継続させているので、近似する縮小復元データは原画像の元となる劣化等する前の縮小元画像により近いものとなる。さらに、ノイズなどがあった場合、差分が「0」にならない状況が現実的には生じがちであるが、そのような場合であっても所定回数で終了させているので、無限に処理を繰り返すことにはならない。   Furthermore, the processing unit may perform a process of stopping when the number of repetitions reaches a predetermined number during the repetition process. When this configuration is adopted, the processing is stopped regardless of whether the difference becomes “0”, so that it is possible to prevent the processing from taking a long time. Further, since the processing is continued up to a predetermined number of times, the approximated reduced / restored data is closer to the original reduced image before the deterioration of the original image. Furthermore, when there is noise or the like, a situation in which the difference does not become “0” tends to occur in reality, but even in such a case, since the process is terminated a predetermined number of times, the process is repeated infinitely. It doesn't matter.

さらに、処理部は、繰り返しの処理の際、繰り返しの回数が所定回数に到達したときの差分のデータが所定値以下または所定値より小さい場合は停止し、所定値より超えるまたは所定値以上の場合は、さらに所定回数繰り返す処理を行うようにしても良い。この構成を採用すると、処理の回数と、差分の値とを組み合わせて行うようにしているので、単に処理回数に制限を加える場合や差分の値に制限を行う場合に比較して、画像の良さと処理時間の短さのバランスが取れた処理とすることができる。   Furthermore, the processing unit stops when the number of repetitions reaches a predetermined number, and stops when the difference data is less than or equal to a predetermined value or less than a predetermined value. May be further repeated a predetermined number of times. When this configuration is adopted, the number of processes and the difference value are combined, so the image quality is better than when the number of processes is simply limited or when the difference value is limited. And a process that balances the shortness of the processing time.

また、他の発明は、上述の発明の画像処理装置に加え、処理部は、縮小復元データを復元する処理として、画像変化の要因となる変化要因情報のデータを利用して、所定の画像のデータから比較用データを生成し、この比較用データと、原画像縮小データと、を比較し、得られた差分のデータが所定値より大きいまたは所定値以上の場合は、差分のデータを利用して縮小復元データを生成し、この縮小復元データを所定の画像に置き換え、以後、得られた縮小復元データを前回の縮小復元データに置き換えて同様の処理を繰り返す処理を行い、原画像縮小データへ変化する前の縮小元画像に近似する縮小復元データを生成する処理を行い、差分のデータが所定値以下または所定値より小さい場合は処理を停止する処理を行うこととしている。   In another aspect of the invention, in addition to the image processing apparatus of the above-described invention, the processing unit uses the data of the change factor information that causes the change of the image as the process of restoring the reduced restoration data. Data for comparison is generated from the data, the comparison data is compared with the original image reduced data, and if the obtained difference data is greater than or equal to a predetermined value, the difference data is used. Reduced restoration data is generated, and the reduced restoration data is replaced with a predetermined image. Thereafter, the obtained reduced restoration data is replaced with the previous reduced restoration data, and the same processing is repeated to obtain the original image reduced data. A process for generating reduced restoration data that approximates the original reduced image before the change is performed, and when the difference data is equal to or smaller than a predetermined value or smaller than a predetermined value, a process for stopping the process is performed.

この発明によれば、画像変化の要因情報を利用して、所定のデータを生成することだけで元画像に近似する縮小復元データを生成しているので、ハードウェア的な増加はほとんど無く、装置が大型化しない。また、縮小復元データから比較用データを作り、その比較用データと処理対象の原画像縮小データを比較するという処理を繰り返し、徐々に縮小元画像に近い縮小復元データを得るので、現実的な復元作業となる。このため、画像の復元に当たって、現実性のある回路処理方式を有する画像処理装置とすることができる。また、差分のデータが小さくなったら処理を停止しているので、ある程度の処理回数で処理を停止させることが可能となる。   According to the present invention, the reduced and restored data that approximates the original image is generated only by generating predetermined data using the factor information of the image change, so that there is almost no increase in hardware, and the device Does not increase in size. Also, comparison data is created from the reduced and restored data, and the process of comparing the comparison data and the original image reduced data to be processed is repeated to gradually obtain reduced and restored data that is close to the reduced original image. It becomes work. For this reason, when restoring an image, an image processing apparatus having a realistic circuit processing method can be obtained. Further, since the processing is stopped when the difference data becomes small, the processing can be stopped after a certain number of processing times.

なお、処理部は、繰り返しの処理の際、繰り返しの回数が所定回数となったら停止させる処理を行うようにしても良い。この構成を採用した場合、差分が「0」になってもならなくても処理を停止させるので、処理の長時間化を防止することができる。また、所定回数まで処理を継続させているので、近似する縮小復元データは原画像縮小データの元となる変化前の縮小元画像により近いものとなる。さらに、ノイズなどがあった場合、差分が「0」にならない状況が現実的には生じがちであるが、そのような場合、無限に処理を繰り返すことになってしまうが、この構成を採用すると、そのような問題が生じない。   Note that the processing unit may perform a process of stopping when the number of repetitions reaches a predetermined number during the repetition process. When this configuration is adopted, the processing is stopped regardless of whether the difference becomes “0”, so that it is possible to prevent the processing from taking a long time. Further, since the processing is continued up to a predetermined number of times, the approximated reduced / restored data is closer to the reduced original image before the change, which is the original of the original image reduced data. Furthermore, when there is noise or the like, a situation where the difference does not become “0” tends to occur in reality, but in such a case, the process is repeated infinitely, but if this configuration is adopted , No such problem occurs.

さらに、他の発明は、上述の発明に加え、縮小復元データの復元の際に、原画像の劣化状態を表す伝達関数を取得し、原画像に対し、取得した伝達関数の逆変換を行っている。この発明によれば、妥当な伝達関数に基づいた元画像の復元の迅速化が可能となる。また、縮小復元データを得るための繰り返し処理と、伝達関数を利用したデコンボリューション処理とを組み合わせることとなるため、装置が大型化せず、また現実的な復元作業となるのに加え、処理が高速化される。   Furthermore, in addition to the above-described invention, another invention obtains a transfer function representing the degradation state of the original image when restoring the reduced restoration data, and performs inverse transformation of the obtained transfer function on the original image. Yes. According to the present invention, it is possible to speed up restoration of an original image based on an appropriate transfer function. In addition, since the iterative process for obtaining the reduced restoration data and the deconvolution process using the transfer function are combined, the apparatus does not increase in size and becomes a realistic restoration work. Speeded up.

他の発明は、上述の発明に加え、原画像縮小データと縮小復元データとから伝達関数を求め、その伝達関数を利用して原画像へ変化する前の元画像を生成する処理を行っている。この構成を採用することにより、適正な伝達関数に基づいた元画像の復元の迅速化が可能となる。また、縮小復元データを得るための繰り返し処理と、伝達関数を利用したデコンボリューション処理とを組み合わせることとなるため、装置が大型化せず、また現実的な復元作業となるのに加え、処理が高速化される。   In another invention, in addition to the above-described invention, a transfer function is obtained from the original image reduced data and the reduced / restored data, and processing for generating an original image before changing to the original image is performed using the transfer function. . By adopting this configuration, it is possible to speed up restoration of the original image based on an appropriate transfer function. In addition, since the iterative process for obtaining the reduced restoration data and the deconvolution process using the transfer function are combined, the apparatus does not increase in size and becomes a realistic restoration work. Speeded up.

さらに他の発明は、上述の発明に加え、原画像縮小データは、原画像のデータを間引くことで形成されたものであり、処理部は、伝達関数を、原画像縮小データの原画像からの縮小率の逆数倍にし、かつ拡大された間を補間して新伝達関数を得、その新伝達関数を使用して元画像に近似する復元データを生成している。この構成を採用すると、全体像に対応した伝達関数を得られることとなる。   Furthermore, in addition to the above-mentioned invention, the original image reduced data is formed by thinning out the original image data, and the processing unit determines the transfer function from the original image of the original image reduced data. A new transfer function is obtained by reciprocal times the reduction ratio and interpolated between the enlarged images, and restored data that approximates the original image is generated using the new transfer function. When this configuration is adopted, a transfer function corresponding to the whole image can be obtained.

また、他の発明は、上述の発明に加え、原画像縮小データは、原画像のデータから一部の領域をそのまま取り出すことで形成されたものとしている。この構成を採用すると、部分的な領域に対応し、かつ全体画像にも適用できる伝達関数が得られることとなる。   In another invention, in addition to the above-described invention, the original image reduced data is formed by extracting a part of the area from the original image data as it is. When this configuration is adopted, a transfer function corresponding to a partial region and applicable to the entire image can be obtained.

さらに他の発明は、上述の発明に加え、元画像の復元処理を、(1)表示部に縮小復元データを表示する処理と並行して、(2)撮影用の電源がオフされている時に、または(3)表示部に縮小復元データを表示する処理を行った後に、行っている。   Furthermore, in addition to the above-described invention, in another aspect of the invention, the restoration process of the original image is performed in parallel with (1) the process of displaying the reduced restoration data on the display unit, and (2) when the imaging power is turned off. Or (3) after the process of displaying the reduced and restored data on the display unit.

上述の(1)の発明によれば、できる限り早く元画像の復元処理を実行した場合に好ましいものとなる。また、上述の(2)、(3)の発明によれば、元画像の復元処理に長時間を要する場合であっても、原画像縮小データの復元処理期間以外の期間に元画像の復元処理を実行することによって、画像処理装置の負担を軽減することができる。なお、このように元画像の復元処理の実行時期を遅らせる処理をしたとしても、表示部に表示される画像は、撮影後短時間で縮小復元データとして表示できるため、画像処理装置、特にカメラ等の撮影機能を有する画像処理装置を操作する者にとって不都合や弊害はない。   According to the above invention (1), it is preferable when the original image restoration process is executed as soon as possible. Further, according to the inventions of (2) and (3) described above, even when the restoration process of the original image takes a long time, the restoration process of the original image is performed in a period other than the restoration process period of the original image reduced data. By executing this, it is possible to reduce the burden on the image processing apparatus. Even if processing for delaying the execution timing of the original image restoration processing is performed in this way, the image displayed on the display unit can be displayed as reduced restoration data in a short time after shooting, so that an image processing apparatus, particularly a camera, etc. There is no inconvenience or adverse effect for those who operate the image processing apparatus having the above photographing function.

さらに他の発明は、上述の発明に加え、処理部は、画像変化の要因となる変化要因情報の値によって、表示部に、縮小復元データを表示する場合と、原画像縮小データをそのまま表示する場合とに分ける処理を行っている。この発明によれば、劣化等変化が著しい画像の場合は、復元作業を行った画像を表示部に表示し、劣化等が無い画像の場合は、復元作業がなされず、縮小画像そのままが表示される。このため、必要なときのみ復元作業が行われることとなり、処理負荷を軽減することができる。   Furthermore, in addition to the above-described invention, the processing unit displays the reduced / restored data on the display unit and the original image reduced data as it is based on the value of the change factor information that causes the image change. Processing is divided into cases. According to the present invention, in the case of an image having a remarkable change such as deterioration, the restored image is displayed on the display unit, and in the case of an image having no deterioration, the restoration work is not performed and the reduced image is displayed as it is. The Therefore, the restoration work is performed only when necessary, and the processing load can be reduced.

本発明によれば、撮影後、短時間で完全に補正された画像に近似する画像を表示し、記録等その後に処理される画像の内容を短時間で確認できるようにした画像処理装置を得ることができる。   According to the present invention, an image processing apparatus is provided that displays an image that approximates an image that has been completely corrected in a short time after shooting, and that allows the content of an image to be processed thereafter, such as recording, to be confirmed in a short time. be able to.

以下、本発明の第1の実施の形態に係る画像処理装置1について図を参照しながら説明する。なお、この画像処理装置1は、民生用のカメラとしているが、監視用カメラ、テレビ用カメラ、内視鏡カメラ、等他の用途のカメラとしたり、顕微鏡、双眼鏡、さらにはNMR撮影等の画像診断装置等、カメラ以外の機器にも適用できる。   Hereinafter, an image processing apparatus 1 according to a first 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 monitoring camera, a television camera, an endoscopic camera, or an image such as a microscope, binoculars, or NMR imaging. It can also be applied to devices other than cameras, such as diagnostic devices.

画像処理装置1は、人物等の映像を撮影する撮影部2と、その撮影部2を駆動する制御系部3と、撮影部2で撮影された画像を処理する処理部4と、を有している。また、この実施の形態に係る画像処理装置1は、さらに処理部4で処理された画像を記録する記録部5と、角速度センサ等からなり、画像劣化など変化の要因となる変化要因情報を検知する検出部6と、画像劣化などを生じさせる既知の変化要因情報を保存する要因情報保存部7と、モニタとなる表示部8を有する。   The image processing apparatus 1 includes a photographing unit 2 that shoots a video 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 display unit 8 serving as a monitor. The detection unit 6 includes a factor information storage unit 7 that stores known change factor information that causes image degradation and the like.

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

処理部4は、画像処理プロセサで構成されており、ASIC(Application Specific Integrated Circuit)のようなハードウェアで構成されている。この処理部4には、後述する比較用データを生成する際の元となる画像が保管されることもある。処理部4は、ASICのようなハードウェアとして構成されたものではなく、ソフトウェアで処理する構成としても良い。記録部5は、半導体メモリで構成されているが、ハードディスクドライブ等の磁気記録手段や、DVD(Digital Versatile Disk)等を使用する光記録手段等を採用しても良い。   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 store an image serving as a base when generating comparison data described later. The processing unit 4 is not configured as hardware such as an ASIC, but may be configured to process with software. The recording unit 5 is composed of a semiconductor memory, but may employ magnetic recording means such as a hard disk drive, optical recording means using a DVD (Digital Versatile Disk), or the like.

検出部6は、図2に示すように、画像処理装置1の光軸であるZ軸に対して垂直方向となるX軸、Y軸の回りの速度を検出する2つの角速度センサを備えるものである。ところで、カメラで撮影する際の手ぶれは、X方向、Y方向、Z方向の各方向への移動やZ軸回りの回動も生ずるが、各変動により最も大きな影響を受けるのは、Y軸回りの回転とX軸回りの回転である。これら2つの変動は、ほんのわずかに変動しただけで、その撮影された画像は大きくぼける。このため、この実施の形態では、図2のX軸回りとY軸回りの2つの角速度センサのみを配置している。しかし、より完全を期すためZ軸回りの角速度センサをさらに付加したり、X方向やY方向への移動を検出するセンサを付加しても良い。また、使用するセンサとしては、角速度センサではなく、角加速度センサとしても良い。   As shown in FIG. 2, the 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. 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 about the Z axis. 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. The sensor used may be an angular acceleration sensor instead of an angular velocity sensor.

要因情報保存部7は、既知の劣化要因情報などの変化要因情報、たとえば光学系の収差等を保存しておく記録部である。なお、この実施の形態では、要因情報保存部7には、光学系の収差やレンズのひずみの情報が保存されているが、後述する手ぶれのぼけの復元の際にはそれらの情報は、利用していない。表示部8は、撮影された画像から画素数を減じた画像の補正後(復元後)の画像データである縮小復元データを記録部5より取得し、その縮小復元データを縮小元画像として表示する。この表示部8は、図2に示すように撮影部2の反対側の面に配置されることが多いが、撮影部2と同一側の面や、側方側の面に配置しても良い。   The factor information storage unit 7 is a recording unit that stores change factor information such as known deterioration factor information, such as aberrations of the optical system. 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 used. Not done. The display unit 8 acquires the reduced / restored data, which is image data after correction (after restoration) of the image obtained by subtracting the number of pixels from the captured image, from the recording unit 5 and displays the reduced / restored data as a reduced original image. . As shown in FIG. 2, the display unit 8 is often arranged on the surface opposite to the imaging unit 2, but may be arranged on the same side as the imaging unit 2 or on the side surface. .

次に、以上のように構成された画像処理装置1の処理部4の処理方法の概要を、図3に基づいて説明する。   Next, an outline of the 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中、「Io」は、任意の初期画像であって、処理部4の記録部に予め保存されている画像のデータである。「Io′」は、その初期画像のデータのIoの劣化画像のデータを示し、比較のための比較用データである。「G」は、検出部6で検出された変化要因情報(=劣化要因情報(点像関数))のデータで、処理部4の記録部に保存されるものである。「Img′」は、撮影された画像、すなわち劣化画像のデータを指し、この処理において処理対象となる原画像のデータである。   In FIG. 3, “Io” is an arbitrary initial image and is image data stored in advance in the recording unit of the processing unit 4. “Io ′” indicates data of a degraded image of Io 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 ′” refers to captured image data, that is, data of a degraded image, and is data of an original image to be processed in this processing.

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

Img′=Img×G …(1)     Img ′ = Img × G (1)

なお、差分のデータδは、対応する画素の単純な差分でも良い場合もあるが、一般的には、変化要因情報のデータ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)     δ = f (Img ′, Img, G) (2)

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

次に、ステップS104で、この差分のデータδが所定値以上であるか否かを判断し、所定値以上であれば、ステップS105で新たな復元画像のデータ(=復元データ)を生成する処理を行う。すなわち、差分のデータδを変化要因情報のデータGに基づいて、任意の画像のデータIoに配分し、新たな復元データIo+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 Io based on the change factor information data G to generate new restored data Io + n. Thereafter, steps S102, S103, and S104 are repeated.

ステップS104において、差分のデータδが所定値より小さい場合、処理を終了する(ステップS106)。そして、処理を終了した時点での復元データIo+nを正しい画像、すなわち劣化のない画像のデータImgと推定し、そのデータを記録部5に記録する。なお、記録部5には、初期画像のデータIoや変化要因情報のデータGを記録しておき、必要により処理部4に渡すようにしても良い。ここで、原画像もしくは本来撮影されるべきであった正しい画像またはそれらの近似画像を「元画像」と呼ぶこととする。よってデータImgや復元データIo+nは、「元画像」のデータとなる。   If the difference data δ is smaller than the predetermined value in step S104, the process is terminated (step S106). Then, the restored data Io + n at the time when the processing is completed is estimated as data Img of a correct image, that is, an image without deterioration, and the data is recorded in the recording unit 5. The initial image data Io and change factor information data G may be recorded in the recording unit 5 and transferred to the processing unit 4 as necessary. Here, an original image, a correct image that should have been originally taken, or an approximate image thereof is referred to as an “original image”. Therefore, the data Img and the restored data Io + n are “original image” data.

以上の処理方法の考え方をまとめると以下のようになる。すなわち、この処理方法においては、処理の解を逆問題としては解かず、合理的な解を求める最適化問題として解くのである。逆問題として解く場合、特許文献2の記載にもあるように、理論上は可能であるが、現実問題としては困難である。   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 as described in Patent Document 2, 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′と近似である比較用データIo′(Io+n′)を生成できれば、その生成の元データとなる初期画像のデータIoまたは復元データIo+nは、原画像のデータImg′の元となる正しい画像のデータImgに近似したものとなる。   In other words, as shown in FIGS. 4A and 4B, if comparison data Io ′ (Io + n ′) that is approximate to data Img ′ of the original image that is the captured image can be generated, The initial image data Io or the restored data Io + n, which is the original data for generation, is approximate to the correct image data Img that is the original of the original image data Img ′.

なお、この実施の形態では、角速度検出センサは5μsec毎に角速度を検出している。また、差分のデータδの判定基準となる値は、各データを8ビット(0〜255)で現した場合に、この実施の形態では「6」としている。すなわち、6より小さい、つまり5以下の時は、処理を終了している。また、角速度検出センサで検出したブレの生データは、センサ自体の校正が不十分なときは、実際のブレとは対応しない。よって実際のブレに対応させるため、センサが校正されていないときは、センサで検出した生データに所定の倍率をかけたりする補正が必要とされる。   In this embodiment, the angular velocity detection sensor detects the angular velocity every 5 μsec. 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. In addition, the raw shake data detected by the angular velocity detection sensor does not correspond to the actual shake when the sensor itself is insufficiently calibrated. Therefore, in order to cope with actual blurring, when the sensor is not calibrated, correction is required to multiply the raw data detected by the sensor by a predetermined magnification.

次に、図3および図4に示す処理方法の詳細を、図5,図6,図7,図8,図9,図10,図11および図12に基づいて説明する。   Next, details of the processing method shown in FIGS. 3 and 4 will be described based on FIGS. 5, 6, 7, 8, 9, 10, 11, and 12.

(手ぶれの復元アルゴリズム)
手ぶれが無いとき、所定の画素に対応する光エネルギーは、露光時間中、その画素に集中する。また、手ぶれがある場合、光エネルギーは、露光時間中にぶれた画素に分散する。さらに、露光時間中のブレがわかれば、露光時間中のエネルギーの分散の仕方がわかるため、ぶれた画像からブレの無い画像を作ることが可能となる。
(Image restoration algorithm)
When there is no camera shake, the light energy corresponding to a given pixel is concentrated on that pixel during the exposure time. In addition, when there is camera shake, light energy is dispersed to pixels that are shaken during the exposure time. Further, if the blur during the exposure time is known, it is possible to know how the energy is dispersed during the exposure time, so that it is possible to create a blur-free image from the blurred image.

以下、簡単のため、横一次元で説明する。画素を左から順に、n-1,n,n+1,n+2,n+3,…,とし、ある画素nに注目する。ブレが無いとき、露光時間中のエネルギーは、その画素に集中するため、エネルギーの集中度は「1.0」である。この状態を図5に示す。このときの撮影結果を、図6の表に示す。図6に示すものが、劣化しなかった場合の正しい画像データImgとなる。なお、各データは、8ビット(0〜255)のデータで現している。   Hereinafter, for the sake of simplicity, the description will be made in one horizontal dimension. From the left, the pixels are set to n-1, n, n + 1, n + 2, n + 3,. 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となる。   It is assumed that there is blurring during the exposure time, 50% of the exposure time is blurred to the nth pixel, 30% of time is shifted to the n + 1th pixel, and 20% of time is shifted to the n + 2th pixel. . The way of energy dispersion is as shown in the table of FIG. This 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, assuming that there is no upper blur (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 correct image data Img, and the data shown as “blurred image” is the taken degraded 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” that is the pixel data of “n−2” is distributed as “30” in “n−2”, “18” in “n−1”, and “12” in “n”. From this deteriorated image data Img ′ and the change factor information data G shown in FIG.

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

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

図11に示すように、この復元データIo+1がステップS102の入力画像のデータ(=初期画像のデータIo)になり、ステップS102が実行され、ステップS103へと移行し、新しい差分のデータδを得る。その新しい差分のデータδの大きさをステップS104で判断し、所定値より大きい場合、ステップS105で新しい差分のデータδを前回の復元データIo+1に配分し、新しい復元データIo+2を生成する(図12参照)。その後、ステップS102の遂行により、復元データIo+2から新しい比較用データIo+2′が生成される。このように、ステップS102,S103が実行された後、ステップS104へ行き、そこでの判断によりステップS105へ移行したり、ステップS106へ移行する。このような処理を繰り返す。   As shown in FIG. 11, the restored data Io + 1 becomes the input image data (= initial image data Io) in step S102, step S102 is executed, and the process proceeds to step S103 to obtain new difference data δ. . 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 Io + 1 in step S105 to generate new restored data Io + 2 (FIG. 12). reference). Thereafter, new comparison data Io + 2 ′ is generated from the restored data Io + 2 by performing step S102. As described above, after steps S102 and S103 are executed, the process goes to step S104, whereupon the process proceeds to step S105 or the process proceeds to step S106. 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 judgment reference 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 of the previous example (FIG. 3), it is preferable to perform processing by combining blur information and optical aberration information as one deterioration factor. You may make it correct | amend with the information of an optical aberration after it complete | finishes. 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の基本構成と復元処理の基本ルーチンについて説明したが、以下では、この画像処理装置1を使用した例または変形例について説明する。   The basic configuration of the image processing apparatus 1 and the basic routine of the restoration process according to the embodiment of the present invention have been described above. Hereinafter, an example or a modification using the image processing apparatus 1 will be described.

たとえば、復元データIo+nを生成するとき、配分比kを使用せず、対応する画素の差分のデータδをそのまま前回の復元データIo+n−1の対応する画素に加えたり、対応する画素の差分のデータδを変倍した後に加えたり、また差分のデータδが割り振られた後のデータkδ(図10、図12中の「更新量」として示される値)を変倍して、前回の復元データIo+n−1に加えるようにしても良い。これらの処理方法をうまく活用すると、処理速度が速くなる。   For example, when generating the restoration data Io + n, the distribution ratio k is not used, and the corresponding pixel difference data δ is directly added to the corresponding pixel of the previous restoration data Io + n−1, or the corresponding pixel difference data is generated. δ is added after scaling, or the data kδ (value shown as “update amount” in FIGS. 10 and 12) after the difference data δ is allocated is scaled, and the previous restored data Io + n You may make it add to -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 deteriorated 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 positioned. 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の内容によって自動的に上述した各処理方法を選択させるようにすることもできる。すなわち、処理部4は、変化要因情報のデータGを複数の種類の内のいずれかに分類付けし、その分類毎に違う処理を行わせることができる。たとえば、処理方法として、(1)図5〜図12に示したように、配分比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. That is, the processing unit 4 can classify the data G of the change factor information into any one of a plurality of types, and perform different processing for each classification. For example, as a processing method, (1) a method of allocating difference data δ using an allocation ratio k as shown in FIGS. 5 to 12 (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.

この画像処理装置1では、表示部8に復元された画像を表示するようにしている。しかし、撮影した劣化画像をそのまま復元しようとすると、処理時間が長くなり、表示部8に撮影直後に表示することができなくなる。そこで、復元処理の高速化を図っている。以下、この高速化について説明する。   In the image processing apparatus 1, the restored image is displayed on the display unit 8. However, if it is attempted to restore the captured degraded image as it is, the processing time becomes long, and the display unit 8 cannot display the image immediately after shooting. Therefore, the restoration process is speeded up. Hereinafter, this speeding up will be described.

復元処理の高速化を図る意味で、逆問題と組み合わせる方法が存在する。すなわち、縮小データで反復処理を行い、縮小した原画像から縮小した復元データへの伝達関数を算出する。そして算出された伝達関数を拡大、補間し、その拡大、補間された伝達関数を使って原画像の復元データを得る。この処理方法は大きな画像の処理に有利となる。   In order to speed up the restoration process, there is a method combined with the inverse problem. That is, iterative processing is performed on the reduced data, and a transfer function from the reduced original image to the reduced restored data is calculated. Then, the calculated transfer function is enlarged and interpolated, and the 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.

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

反復処理だけでは、どうしても収束に時間がかかってしまう。この欠点は、大きな画像の場合、顕著となる。一方、周波数空間でのデコンボリューションは、高速フーリエ変換(Fast Fourier Transform:FFT)を利用して高速計算ができるため、非常に魅力的である。ここでいう光学的なデコンボリューションとは、歪みやぼけなどにより劣化等した画像からその歪みなどを除去して、劣化等していない元画像を復元することをいう。   Iterative processing alone 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)は、周波数空間で、
0(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,
0 (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, Equation (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, jn (x) where ou (x) + α (x) = ∫in (t) g (x−t) dt + α (x) ≈∫jn (t) g (x−t) dt is used as an iterative method. The process flow of FIG. 3 described above is obtained by converging using.
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は、データを間引くことで縮小されたデータとする方法である。この方法を、図3に示す処理方法を利用した第2の処理方法として説明する。データを間引く場合、たとえば、図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 data by thinning out data. This method will be described as a second processing method using the processing method shown in FIG. When thinning out data, for example, as shown in FIG. 15, the original image data Img ′ is composed of pixels 11-16, 21-26, 31-36, 41-46, 51-56, 61-66. When every other pixel is thinned out, the original image reduced data ISmg ′ having a quarter size composed of the pixels 11, 13, 15, 31, 33, 35, 51, 53, and 55 is generated. is there.

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

この縮小された近似する縮小復元データISo+nを原画像縮小データISmg′へ変化する前の縮小元画像ISmg、すなわち正しい画像Imgの縮小した画像と推定する。そして、原画像縮小データISmg′は、縮小復元データISo+nと伝達関数g(x)のコンボリューション積分と考え、得られた縮小復元データISo+nと既知の原画像縮小データISmg′から未知の伝達関数g1(x)を得ることができる。   The reduced approximate restoration 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 processing 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.

画像処理装置1では、イ)の繰り返し処理で得られた縮小復元データISo+nを表示部8に撮影直後に表示し、伝達関数を利用したその後の処理を画像処理装置1が操作されていない時、たとえば撮影部2の電源がオフされている時に実行している。そして、復元された元画像を記録部5に記録している。   In the image processing apparatus 1, the reduced and restored data ISo + n obtained by the iterative process of (a) is displayed on the display unit 8 immediately after shooting, and the subsequent processing using the transfer function is performed when the image processing apparatus 1 is not operated. For example, it is executed when the power of the photographing unit 2 is turned off. The restored original image is recorded in the recording unit 5.

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

縮小されたデータを利用する方法の第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からなる領域を取り出し、原画像縮小データISmg′を生成する方法である。   A second method of using the reduced data is a method for obtaining original image reduced data ISmg ′ by extracting data of a part 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, This is a method of taking out an area composed 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 any 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 used as a transfer function g ′ (x) for the original image Img, and this transfer function g1 ′ (x) (= g ′ (x)) and known original image data are used. Using Img ′, the original image Img is obtained by inverse calculation. Note that the obtained data is actually original 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. The obtained transfer function g1 ′ (x) may be corrected using the change factor information data G without using the transfer function g ′ (x) as it is.

この画像処理装置1の処理部4では、イ)の繰り返し処理で得られた縮小復元データISo+nを表示部8に撮影直後に表示し、伝達関数を使用した逆計算で元画像を復元する処理を表示処理と並行して行っている。そして復元された元画像を記録部5に保存している。なお、繰り返しの処理に続く伝達関数を利用した処理を、表示処理後におこなったり、画像処理装置1が操作されていない時におこなうにしても良い。   The processing unit 4 of the image processing apparatus 1 displays the reduced restoration data ISo + n obtained by the iterative process (a) on the display unit 8 immediately after shooting, and restores the original image by inverse calculation using a transfer function. It is performed in parallel with the display process. The restored original image is stored in the recording unit 5. Note that the process using the transfer function following the repeated process may be performed after the display process or when the image processing apparatus 1 is not operated.

このように、上述した高速化のための第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. The function g1 ′ (x) is obtained, and the entire image is restored by using the transfer function g1 ′ (x) itself or a modification (enlargement etc.) of the function g1 ′ (x). 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. The original original reduced image may be obtained by repeatedly processing each of the four original image reduced data ISmg ′, which is a small area, restoring each of the four divided areas, and combining the four restored divided images into one. . 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に示す処理方法による復元の反復処理を使用し、元の画像に近似したものを得ようとすると、反復数が非常に多くなると共に多くの回数の処理を行った後も、元の被写体に近似する復元データIo+nを生成できない。そこで、撮影された原画像(ブレ画像)のデータImg′に、既知の画像のデータBから撮影時の変化要因情報のデータGを用いてブレ画像のデータB’を生成し、そのデータB’を重ね合わせ、「Img′+B’」を作る。その後、重ね合わせた画像を図3に示す処理にて復元処理し、その復元データIo+nとなる結果データCから既知の加えた場像のデータBを取り去り、求めたい復元画像のデータImgを取り出す。   The method is as follows. That is, for an object with a sharp change in contrast, if the iterative process of restoration by the processing method shown in FIG. 3 is used to obtain an object that approximates the original image, the number of iterations becomes very large and many Even after the number of processings, the restoration data Io + n that approximates the original subject cannot be generated. Therefore, blur data B ′ is generated using data G of the change factor information at the time of shooting from data B of the known image as data Img ′ of the shot original image (blur image). And “Img ′ + B ′” is created. After that, the superimposed image is restored by the process shown in FIG. 3, and the known added field image data B is removed from the result data C as the restored data Io + n, and the restored image data Img to be obtained is taken out.

この方法を、前述した縮小画像に適用し、コントラストの急激な変化のある被写体に際しても、撮影直後に表示部8に復元された縮小画像を表示する。一方、大きな原画像の処理は、表示処理がなされた後に処理部4によってこの処理から求められた伝達関数を利用して復元処理が実行される。復元された元画像は、その後、記録部5に保存される。なお、この方法では、正しい画像のデータImgは急激なコントラスト変化を含んでいるが、既知の画像のデータBを加えることで、この急激なコントラスト変化を軽減することができ、復元処理の反復数を低減する事ができる。   This method is applied to the above-mentioned reduced image, and the restored reduced image is displayed on the display unit 8 immediately after shooting even for a subject with a sharp change in contrast. On the other hand, in the process of a large original image, a restoration process is performed by using the transfer function obtained from this process by the processing unit 4 after the display process. The restored original image is then stored in the recording unit 5. In this method, the correct image data Img includes an abrupt contrast change, but by adding the known image data B, the abrupt contrast change can be reduced, and the number of iterations of the restoration process Can be reduced.

また、復元の困難な被写体の処理方法および高速な処理方法として、他の処理方法も採用できる。たとえば、復元処理の反復数を多くすれば良好な復元画像により近づけることができるが、処理に時間がかかる。そこで、ある程度の反復処理数で得られた画像を用いて、そこに含まれる誤差成分を算出し、誤差を含む復元画像から、算出した誤差を取り去ることで良好な復元画像すなわち復元データIo+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 therein is calculated, and a good restored image, that is, restored data Io + n is obtained by removing the calculated error from the restored image including the error. be able to.

この方法を具体的に以下に説明する。求めたい正しい画像をAとし、撮影した原画像をA’とし、原画像A’から復元した画像をA+γとし、その復元データから生成したブレた比較用データをA’+γ’とする。この「A’+γ’」に、撮影した原画像「A’」を付加し、それを復元処理すると、「A+γ+A+γ+γ」となり、これは「2A+3γ」であり、また、「2(A+γ)+」である。「A+γ」は前回の復元処理で求まっているので、「2(A+γ)+γ−2(A+γ)」が計算でき、「γ」が求まる。よって「A+γ」から「γ」を取り去ることで、求めたい正しい画像Aが得られる。この方法を上述と同様に縮小画像に適用し、復元された原画像縮小データを表示部8に表示し、得られた伝達関数を利用して大きな元画像を復元し、記録部5に保存する。これらの制御や処理は処理部4が実行する。   This method will be specifically described below. The correct 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 image A to be obtained can be obtained. This method is applied to the reduced image in the same manner as described above, the restored original image reduced data is displayed on the display unit 8, the large original image is restored using the obtained transfer function, and stored in the recording unit 5. . These controls and processes are executed by the processing unit 4.

以上、本発明の好適な実施の形態について説明したが、本発明はその要旨を変更しない限り種々変更できる。たとえば、処理部4で行った処理は、ソフトウエアで構成しているが、それぞれ、一部の処理を分担して行うようにした部品からなるハードウェアで構成しても良い。   Although the preferred embodiments of the present invention have been described above, the present invention can be variously modified without changing the gist thereof. 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 photographed image, the original image to be processed may be a photographed image subjected to processing such as color correction or Fourier transform. 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.

さらに、反復処理中に、差分のデータδが発散してきたら、すなわち大きくなっていったら処理を中止させるようにても良い。発散しているか否かは、たとえば差分のデータδの平均値を見てその平均値が前回より大きくなったら発散していると判断する方法を採用できる。また、発散が1回生じたら、処理を即中止させても良いが、発散が2回続けて生じたら中止させる方法としたり、発散が所定回数続いたら処理を中止させる方法を採用しても良い。   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, if the divergence occurs once, the process may be stopped immediately. However, if the divergence occurs twice, the method may be stopped, or the process may be stopped if the divergence continues for a predetermined number of times. .

また、反復処理中に、入力を異常な値に変更しようとしたときには、処理を中止させるようにしても良い。たとえば8ビットの場合、変更されるようとする値が255を超える値であるときには、処理を中止させる。また、反復処理中、新たなデータである入力を異常な値に変更しようとしたとき、その値を使用せず、正常な値とするようにしても良い。たとえば、8ビットの0〜255の中で、255を超える値を入力データとしようとした際は、マックスの値である255として処理するようにする。すなわち、復元データ中に許容される数値(上述の例では、0〜255)以外の異常数値(上述の例では、255を超える値)が含まれるときは、その処理を中止したり、復元データ中に許容される数値以外の異常数値が含まれるときは、その異常数値を許容される数値に変更して処理を継続させたりすることができる。   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 exceeds 255, the process 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. That is, if the restored data includes an abnormal value (a value exceeding 255 in the above example) other than an allowable value (0 to 255 in the above example), the process is stopped or the restored data When an abnormal numerical value other than the allowable numerical value is included, the abnormal numerical value can be changed to an allowable numerical value and the processing can be continued.

また、出力画像となる復元データを生成する際、変化要因情報のデータGによっては、復元させようとする画像の領域外へ出てしまうようなデータが発生する場合がある。このような場合、領域外へはみ出るデータは反対側へ入れる。また、領域外から入ってくるべきデータがある場合は、そのデータは反対側から持ってくるようにするのが好ましい。たとえば、領域内の最も下に位置する画素XN1(N行1列)のデータから、さらに下の画素に割り振られるデータが発生した場合、その位置は領域外になる。そこで、そのデータは画素XN1の真上で最も上に位置する画素X11(1行1列)に割り振られる処理をする。画素XN1の隣の画素XN2(N行2列)についても同様に真上で最上欄の画素X12(=画素X11の隣りで1行2列))に割り振ることとなる。このように、復元データを生成する際、復元対象領域外となるデータが発生するときは、そのデータの発生位置の縦、横、または斜めのいずれか1つの方向の反対側の位置の復元対象領域内に配置するようにすると、復元しようとする対象領域について、確実な復元が可能となる。   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 (N rows and 1 column) located at the bottom in the area, the position is outside the area. Therefore, the data is processed to be allocated to the pixel X11 (one row and one column) located directly above the pixel XN1. Similarly, the pixel XN2 (N rows and 2 columns) adjacent to the pixel XN1 is assigned to the pixel X12 in the uppermost column directly above (= 1 row and 2 columns adjacent to the pixel X11). In this way, when data that is outside the restoration target area is generated when the restoration data is generated, the restoration target at a position opposite to one of the vertical, horizontal, and diagonal directions of the data generation position is generated. If it is arranged within the area, it is possible to reliably restore the target area to be restored.

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

たとえば、縮小画像の繰り返し処理にあっては、(4)(5)((1)を利用)のみならず、(2)(3)(6)(7)を利用してすばやく復元し、表示部8に表示し、原画像から元画像への復元処理に、(4)(5)の伝達関数処理や、(2)(3)(6)(7)で得られた縮小画像から伝達関数を得て、その伝達関数を利用しての処理や、その伝達関数を利用して得られた画像を再度繰り返し処理する方法が採用され得る。また、原画像から元画像への復元は、伝達関数を利用しつつ、もしくは利用しないで、復元処理をゆっくり実行するようにしても良い。すなわち表示処理とは別に、元画像の復元は、上述の(1)(2)(3)(6)(7)のいずれかを利用して、原画像から直接元画像を得るようにしても良い。   For example, in the repetitive processing of a reduced image, not only (4) (5) (using (1)) but also (2) (3) (6) (7) is used for quick restoration and display. In the restoration process from the original image to the original image, the transfer function processing of (4) (5) and the transfer function from the reduced images obtained in (2) (3) (6) (7) Thus, a process using the transfer function or a method of repeatedly processing an image obtained using the transfer function again may be employed. Further, the restoration from the original image to the original image may be performed slowly with or without using the transfer function. That is, apart from the display processing, the original image is restored by directly obtaining the original image from the original image using any one of the above (1), (2), (3), (6), and (7). good.

なお、元画像の復元処理は、表示部8に縮小復元データを表示する処理を並行して行ったり、撮影部2の電源がオフされ、撮影がなされない時に行ったり、表示部8への表示処理が行われた後に行う等、種々の方法を採用することができる。また復元された元画像は、記録部5に保存されるが、この保存と共に、または保存に代えてインターネット等の通信回線を利用して、他のサーバ等に送信するようにしても良い。   The restoration process of the original image is performed in parallel with the process of displaying the reduced restoration data on the display unit 8 or when the photographing unit 2 is turned off and no photographing is performed, or displayed on the display unit 8. Various methods can be employed, for example, after the processing is performed. The restored original image is stored in the recording unit 5, but may be transmitted to another server or the like using a communication line such as the Internet together with or instead of the storage.

また、処理部4は、変化要因情報のデータGを複数の種類の内のいずれかに分類付けし、その分類毎に違う処理(上述した各方法のいずれか1つ)を行うようにしたり、また、その分類毎に、繰り返しの回数を異ならせるようにしても良い。また、処理部4の処理において、変化要因情報のデータGの値によって、表示画像を復元処理したものにするか否かを分けるようにするのが好ましい。たとえば、劣化が著しいと判断されるときのみ表示部8へ表示する画像の復元処理を行い、劣化がそれほど無いときは、単なる縮小画像をそのまま、または若干の補正をした画像を表示するようにするのが好ましい。これによって、処理部4の負荷が軽減される。   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. Further, in the processing of the processing unit 4, it is preferable to determine whether or not to restore the display image according to the value of the data G of the change factor information. For example, an image displayed on the display unit 8 is restored only when it is determined that the deterioration is significant, and when there is not much deterioration, a mere reduced image is displayed as it is or a slightly corrected image is displayed. Is preferred. As a result, the load on the processing unit 4 is reduced.

また、これら(1)〜(7)のいずれか複数を処理部4に保存しておき、使用者の選択または画像の種類に応じて自動的に、処理方法を選択できるようにしても良い。また、これら7つの方法のうちいずれか複数を選択し、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. Also, select any one of these seven methods and use them alternately or in sequence for each 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(Compact Disc)、DVD、USB(Universal Serial Bus)メモリに入れられ、コンピュータによって読みとり可能とされても良い。この場合、画像処理装置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 (Compact Disc), a DVD, or a USB (Universal Serial Bus) 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.

本発明の実施の形態に係る画像処理装置の主要構成を示すブロック図である。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 method (processing routine) 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 by taking hand shake as an example, and is a table showing energy concentration when there is no hand 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. The situation in which the comparison data is compared with the blurred original image to be processed to generate difference data. It is a figure for demonstrating. 図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 restored data is generated by allocating difference data and adding it to an arbitrary image. . 図3に示す処理方法を、手ぶれを例にして具体的に説明するための図で、生成された復元データから新たな比較用データを生成し、そのデータと処理対象となるぶれた原画像とを比較して差分のデータを生成する状況を説明するための図である。FIG. 3 is a diagram for specifically explaining the processing method shown in FIG. 3 by taking an example of camera shake, in which new comparison data is generated from the generated restored data, the 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 restoration data is generated. is there. 図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の処理方法で、高速化を図る方法の第1を説明するための図で、(A)は処理対象となる原画像のデータを示し、(B)は(A)のデータを間引いたデータを示す図である。FIG. 4 is a diagram for explaining a first of the methods for speeding up the second processing method using the processing method shown in FIG. 3, wherein (A) shows data of an original image to be processed, and (B) FIG. 4 is a diagram showing data obtained by thinning out the data of (A). 図15に示す第2の処理方法のフローチャート図である。It is a flowchart figure of the 2nd processing method shown in FIG. 図3に示す処理方法を利用した第3の処理方法で、高速化を図る方法の第2を説明するための図で、(A)は処理対象となる原画像のデータを示し、(B)は(A)のデータの一部を取り出したデータを示す図である。FIG. 6 is a diagram for explaining a second processing method for speeding up the third processing method using the processing method shown in FIG. 3, in which (A) shows data of an original image to be processed, and (B) FIG. 4 is a diagram showing data obtained by extracting a part of the data of (A). 図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 要因情報保存部
8 表示部
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 8 Display 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 (12)

処理対象となる原画像から変化する前の画像もしくは本来撮影されるべきであった画像またはそれらの近似画像(以下、元画像という)を復元する処理を行う処理部を有する画像処理装置において、
上記処理部は、上記原画像から画素数を減じた原画像縮小データを得、その原画像縮小データに基づいて変化する前の縮小元画像に近似する縮小復元データを復元し、表示部に当該縮小復元データを表示する処理を行うことを特徴とする画像処理装置。
In an image processing apparatus having a processing unit that performs processing for restoring an image before change from an original image to be processed, an image that should have been originally taken, or an approximate image thereof (hereinafter referred to as an original image),
The processing unit obtains original image reduced data obtained by subtracting the number of pixels from the original image, restores reduced restoration data that approximates the original reduced image before the change based on the original image reduced data, and An image processing apparatus that performs processing for displaying reduced restoration data.
前記処理部は、前記縮小復元データを復元する際に得られたデータを利用して、前記元画像を復元する処理を行うことを特徴とする請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the processing unit performs processing to restore the original image using data obtained when restoring the reduced restoration data. 前記処理部は、前記縮小復元データを復元する処理として、画像変化の要因となる変化要因情報のデータを利用して、所定の画像のデータから比較用データを生成し、この比較用データと、前記原画像縮小データと、を比較し、得られた差分のデータを利用して縮小復元データを生成し、この縮小復元データを上記所定の画像のデータの代わりに使用し、以後、得られた上記縮小復元データを前回の縮小復元データに置き換えて同様の処理を繰り返す処理を行うことを特徴とする請求項1または2記載の画像処理装置。   The processing unit generates data for comparison from data of a predetermined image using data of change factor information that causes image change as a process of restoring the reduced restoration data, and the comparison data, The original image reduced data is compared with each other, and reduced restoration data is generated using the obtained difference data. The reduced / restored data is used instead of the predetermined image data. 3. The image processing apparatus according to claim 1, wherein the reduced restoration data is replaced with the previous reduced restoration data, and the same processing is repeated. 前記処理部は、前記縮小復元データを復元する処理として、画像変化の要因となる変化要因情報のデータを利用して、所定の画像のデータから比較用データを生成し、この比較用データと、前記原画像縮小データと、を比較し、得られた差分のデータが所定値より大きいまたは所定値以上の場合は、上記差分のデータを利用して縮小復元データを生成し、この縮小復元データを上記所定の画像に置き換え、以後、得られた上記縮小復元データを前回の縮小復元データに置き換えて同様の処理を繰り返す処理を行い、前記原画像縮小データへ変化する前の前記縮小元画像に近似する前記縮小復元データを生成する処理を行い、上記差分のデータが所定値以下または所定値より小さい場合は処理を停止する処理を行うことを特徴とする請求項1または2記載の画像処理装置。   The processing unit generates data for comparison from data of a predetermined image using data of change factor information that causes image change as a process of restoring the reduced restoration data, and the comparison data, The original image reduced data is compared, and if the obtained difference data is larger than a predetermined value or greater than a predetermined value, reduced restoration data is generated using the difference data, and the reduced restoration data is Replaced with the predetermined image, and thereafter, the obtained reduced / restored data is replaced with the previous reduced / restored data and the same processing is repeated, approximating the reduced original image before changing to the original image reduced data. 2. A process for generating the reduced restoration data to be performed, and a process for stopping the process when the difference data is equal to or smaller than a predetermined value or smaller than a predetermined value. The image processing apparatus 2 described. 前記縮小復元データの復元の際に、前記原画像の劣化状態を表す伝達関数を取得し、前記原画像に対し、取得した伝達関数の逆変換を行うことを特徴とする請求項3または4記載の画像処理装置。   5. The transfer function representing a degradation state of the original image is acquired when the reduced restoration data is restored, and the acquired transfer function is inversely transformed with respect to the original image. Image processing apparatus. 前記原画像縮小データと前記縮小復元データとから伝達関数を求め、その伝達関数を利用して前記原画像へ変化する前の前記元画像を生成する処理を行うことを特徴とする請求項3または4記載の画像処理装置。   4. A process for obtaining a transfer function from the original image reduced data and the reduced and restored data and generating the original image before changing to the original image using the transfer function. 4. The image processing apparatus according to 4. 前記原画像縮小データは、前記原画像のデータを間引くことで形成されたものであり、前記処理部は、前記伝達関数を、前記原画像縮小データの前記原画像からの縮小率の逆数倍にし、かつ拡大された間を補間して新伝達関数を得、その新伝達関数を使用して前記元画像を生成することを特徴とする請求項5または6記載の画像処理装置。   The original image reduction data is formed by thinning out the data of the original image, and the processing unit sets the transfer function to an inverse multiple of the reduction rate of the original image reduction data from the original image. 7. The image processing apparatus according to claim 5, wherein a new transfer function is obtained by interpolating between the enlarged portions and the original image is generated using the new transfer function. 前記原画像縮小データは、前記原画像のデータから一部の領域をそのまま取り出すことで形成されたものであることを特徴とする請求項5または6記載の画像処理装置。   7. The image processing apparatus according to claim 5, wherein the original image reduced data is formed by extracting a partial area from the original image data as it is. 前記元画像の復元処理は、前記表示部に前記縮小復元データを表示する処理と並行して行うことを特徴とする請求項1から8のいずれか1項記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the restoration process of the original image is performed in parallel with a process of displaying the reduced restoration data on the display unit. 前記元画像の復元処理は、撮影用の電源がオフされている時に行うことを特徴とする請求項1から8のいずれか1項記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the restoration process of the original image is performed when a photographing power is turned off. 前記元画像の復元処理は、前記表示部に前記縮小復元データを表示する処理を行った後に行うことを特徴とする請求項1から8のいずれか1項記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the restoration process of the original image is performed after performing the process of displaying the reduced restoration data on the display unit. 前記処理部は、画像変化の要因となる変化要因情報の値によって、前記表示部に、前記縮小復元データを表示する場合と、前記原画像縮小データをそのまま表示する場合とに分ける処理を行うことを特徴とする請求項1から11のいずれか1項記載の画像処理装置。   The processing unit performs a process of dividing the case where the reduced / restored data is displayed on the display unit and the case where the original image reduced data is displayed as it is based on the value of the change factor information that causes the image change. The image processing apparatus according to claim 1, wherein:
JP2005267906A 2005-09-15 2005-09-15 Image processing apparatus Pending JP2007081905A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2005267906A JP2007081905A (en) 2005-09-15 2005-09-15 Image processing apparatus
CN2006800415164A CN101305598B (en) 2005-09-15 2006-07-24 Image processing apparatus and method
PCT/JP2006/314596 WO2007032148A1 (en) 2005-09-15 2006-07-24 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005267906A JP2007081905A (en) 2005-09-15 2005-09-15 Image processing apparatus

Publications (1)

Publication Number Publication Date
JP2007081905A true JP2007081905A (en) 2007-03-29

Family

ID=37864748

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005267906A Pending JP2007081905A (en) 2005-09-15 2005-09-15 Image processing apparatus

Country Status (3)

Country Link
JP (1) JP2007081905A (en)
CN (1) CN101305598B (en)
WO (1) WO2007032148A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011233138A (en) * 2011-01-25 2011-11-17 Casio Comput Co Ltd Image display device, picture tone conversion service system, terminal, server and image display method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011130061A (en) * 2009-12-16 2011-06-30 Fujifilm Corp Method and device for adjusting positional relation between photographic lens and imaging device, and method and device for manufacturing camera module

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002290811A (en) * 2001-03-23 2002-10-04 Minolta Co Ltd Imaging device, method and program for image processing, and information recording medium
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
JP2006186763A (en) * 2004-12-28 2006-07-13 Seiko Epson Corp Imaging apparatus, and mobile apparatus and mobile phone provided with the same
JP2006186764A (en) * 2004-12-28 2006-07-13 Seiko Epson Corp Imaging apparatus, and mobile apparatus and mobile phone provided with the same

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020014456A (en) * 2000-08-18 2002-02-25 윤병이 A method and system of revision for 3-dimensional image
JP2004343483A (en) * 2003-05-16 2004-12-02 Acutelogic Corp Device and method for correcting camera-shake and device for detecting camera shake

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002290811A (en) * 2001-03-23 2002-10-04 Minolta Co Ltd Imaging device, method and program for image processing, and information recording medium
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
JP2006186763A (en) * 2004-12-28 2006-07-13 Seiko Epson Corp Imaging apparatus, and mobile apparatus and mobile phone provided with the same
JP2006186764A (en) * 2004-12-28 2006-07-13 Seiko Epson Corp Imaging apparatus, and mobile apparatus and mobile phone provided with the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011233138A (en) * 2011-01-25 2011-11-17 Casio Comput Co Ltd Image display device, picture tone conversion service system, terminal, server and image display method

Also Published As

Publication number Publication date
CN101305598B (en) 2011-04-06
WO2007032148A1 (en) 2007-03-22
CN101305598A (en) 2008-11-12

Similar Documents

Publication Publication Date Title
JP5007241B2 (en) Image processing device
JP3895357B2 (en) Signal processing device
JP4885150B2 (en) Image processing device
JP4602860B2 (en) Image processing device
JP4965179B2 (en) Image processing device
JP4926450B2 (en) Image processing device
JP2007081905A (en) Image processing apparatus
JP4598623B2 (en) Image processing device
JP5133070B2 (en) Signal processing device
JP4763415B2 (en) Image processing device
JP4975644B2 (en) Image processing device
JP5007234B2 (en) Image processing device
JP4629622B2 (en) Image processing device
JP4606976B2 (en) Image processing device
JP4629537B2 (en) Image processing device
JP4718618B2 (en) Signal processing device
JP4763419B2 (en) Image processing device
JP5007245B2 (en) Signal processing device
JP2008116671A (en) Signal processing device and signal processing method
JP5005553B2 (en) Signal processing device
JP4982484B2 (en) Signal processing device
WO2006137309A1 (en) Image processing apparatus
JP5057665B2 (en) Image processing device
JPWO2008090858A1 (en) Image processing apparatus and image processing method
JP2008199305A (en) Image processor and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080812

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110405

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20111004