JP2007226520A - Image processing program and computer readable recording medium with the same recorded thereon, and image processor - Google Patents

Image processing program and computer readable recording medium with the same recorded thereon, and image processor Download PDF

Info

Publication number
JP2007226520A
JP2007226520A JP2006046621A JP2006046621A JP2007226520A JP 2007226520 A JP2007226520 A JP 2007226520A JP 2006046621 A JP2006046621 A JP 2006046621A JP 2006046621 A JP2006046621 A JP 2006046621A JP 2007226520 A JP2007226520 A JP 2007226520A
Authority
JP
Japan
Prior art keywords
image
subject
image sensor
predetermined
image processing
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
JP2006046621A
Other languages
Japanese (ja)
Inventor
Shunichi Yanagida
俊一 柳田
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.)
NIPPON COMP SYSTEM CO Ltd
NIPPON COMPUTER SYSTEM CO Ltd
Original Assignee
NIPPON COMP SYSTEM CO Ltd
NIPPON COMPUTER SYSTEM 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 NIPPON COMP SYSTEM CO Ltd, NIPPON COMPUTER SYSTEM CO Ltd filed Critical NIPPON COMP SYSTEM CO Ltd
Priority to JP2006046621A priority Critical patent/JP2007226520A/en
Priority to PCT/JP2006/315677 priority patent/WO2007097054A1/en
Publication of JP2007226520A publication Critical patent/JP2007226520A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • G06T5/73

Abstract

<P>PROBLEM TO BE SOLVED: To provide a means for performing highly accurate sharpening processing at high speed by using a common algorithm irrespective of whether a blur in an image is caused by out of focus or a camera-shake blur. <P>SOLUTION: An image processing program 6 is characterized in that a total quantity of light which is emitted from a subject H and received by a prescribed imaging device (x, y) positioned on the imaging device surface S of a camera is approximated to be equal to a total sum of a quantity of light received by the prescribed imaging device (x, y) out of lights which are emitted from the prescribed part of the subject H and reach the imaging device surface S and a total quantity of light received by other imaging devices except for the prescribed imaging device (x, y) among the imaging devices included in a diffusion range of lights emitted from the prescribed part of the subject H, and thus a computer executes processing for generating a new image on the basis of original image data. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、ピンボケ画像や手ブレ画像を先鋭な画像に修正する画像処理プログラム及び画像処理装置に関し、特に、同じアルゴリズムでピンボケと手ブレの双方を、短い処理時間で且つ高い精度で修正可能な画像処理プログラム及びこれが記録されたコンピュータ読み取り可能な記録媒体、ならびに画像処理装置画像処理装置に関する。   The present invention relates to an image processing program and an image processing apparatus for correcting a defocused image or a camera shake image into a sharp image, and in particular, it is possible to correct both a defocused image and a camera shake with high accuracy with a short processing time using the same algorithm. The present invention relates to an image processing program, a computer-readable recording medium on which the image processing program is recorded, and an image processing apparatus.

デジタルカメラ等を用いて被写体を撮影した場合、写真画像にボケが生じる場合がある。このボケとしては、焦点距離のズレに起因するピンボケと、撮像者の手のぶれに起因する手ブレボケと、被写体が動くことに起因する被写体ブレボケとが挙げられる。このようなボケ画像を先鋭化すなわちくっきりとした画像に修正する方法として、いわゆるアンシャープマスクやラプラシアンフィルタによる処理が従来用いられている(例えば特許文献1及び特許文献2参照)。アンシャープマスクによる処理は、ボケが生じた原画像を更にぼかしたボカシ画像を生成し、このボカシ画像と原画像との差分を原画像に上乗せすることによりボケを修正するものである。一方、ラプラシアンフィルタによる処理は、原画像の二次微分値を調べることにより、明暗や色合いが急激に変化している境界を見つけ、それを原画像に上乗せすることによりボケを修正するものである。   When a subject is photographed using a digital camera or the like, the photographic image may be blurred. Examples of the blur include a blur caused by a shift in focal length, a blur caused by camera shake of the photographer, and a subject blur caused by movement of the subject. As a method for correcting such a blurred image into a sharpened image, that is, a sharp image, processing using a so-called unsharp mask or a Laplacian filter has been conventionally used (see, for example, Patent Document 1 and Patent Document 2). The process using the unsharp mask is to correct a blur by generating a blur image in which the original image in which the blur has occurred is further blurred and adding the difference between the blur image and the original image to the original image. On the other hand, the processing by the Laplacian filter is to correct the blur by finding the boundary where the light and darkness or the hue changes rapidly by examining the second derivative value of the original image and adding it to the original image. .

特開2006−031195号公報JP 2006-031195 A 特開2006−011619号公報JP 2006-011619 A

しかし、アンシャープマスクやラプラシアンフィルタを用いて先鋭化処理を行う従来の画像処理プログラムや画像処理装置では、ピンボケと手ブレボケの双方を包括的に先鋭化することができないため、画像に生じたボケに応じてアンシャープマスクやラプラシアンフィルタ等を適宜使い分ける必要があって処理が煩雑になり、また、ピンボケと手ブレボケの双方が複合的に発生した画像に対しては有効な先鋭化を行うことが難しいという問題があった。   However, conventional image processing programs and image processing apparatuses that perform sharpening processing using an unsharp mask or a Laplacian filter cannot comprehensively sharpen both out-of-focus and hand-blurring. Therefore, it is necessary to use an unsharp mask, Laplacian filter, etc. appropriately, and the processing becomes complicated, and effective sharpening can be performed for images in which both out-of-focus and blurring occur. There was a problem that was difficult.

本発明は、このような問題に鑑みてなされたものであり、画像に生じたボケがピンボケであるか手ブレボケであるかによらず、共通のアルゴリズムを用いて、高速かつ高精度の先鋭化処理を行う手段を提供する。   The present invention has been made in view of such a problem, and sharpening at high speed and high accuracy using a common algorithm regardless of whether blurring generated in an image is out of focus or hand blurring. Provide a means for processing.

上記目的を達成するための請求項1記載の画像処理プログラムは、ピンボケや手ブレボケが生じた原画像に対する先鋭化処理をコンピュータに実行させる画像処理プログラムにおいて、被写体から発せられてカメラの撮像素子面上に位置する所定の撮像素子によって受け止められる光の総量が、前記被写体の所定部分から発せられて前記撮像素子面に到達した光のうち前記所定の撮像素子によって受け止められる光量と、前記被写体の所定部分から発せられた光の拡散範囲内に含まれる撮像素子のうち前記所定の撮像素子を除く他の撮像素子によって受け止められる光の総量との合計に等しいと近似して、前記被写体の所定部分から発せられて前記撮像素子面に到達した光量を算出することにより、原画像データに基づいて新たな画像を生成する処理をコンピュータに実行させるものである。   The image processing program according to claim 1 for achieving the above object is an image processing program for causing a computer to perform sharpening processing on an original image in which out-of-focus or hand-blurring occurs. The total amount of light received by the predetermined image sensor located above is the amount of light emitted from the predetermined portion of the subject and reaching the image sensor surface, and the amount of light received by the predetermined image sensor and the predetermined amount of the subject. Approximating to be equal to the sum of the total amount of light received by other imaging elements other than the predetermined imaging element among the imaging elements included in the diffusion range of the light emitted from the part, from the predetermined part of the subject Generate a new image based on the original image data by calculating the amount of light emitted and reaching the image sensor surface It is intended to execute that process to the computer.

請求項2記載のコンピュータ読み取り可能な記録媒体は、請求項1記載の画像処理プログラムが記録されたものである。   A computer-readable recording medium according to a second aspect stores the image processing program according to the first aspect.

請求項3記載の画像処理装置は、ピンボケや手ブレボケが生じた原画像に先鋭化処理を実行する画像処理装置において、原画像の画像データを入力するための原画像入力手段と、被写体から発せられてカメラの撮像素子面上に位置する所定の撮像素子によって受け止められる光の総量が、前記被写体の所定部分から発せられて前記撮像素子面に到達した光のうち前記所定の撮像素子によって受け止められる光量と、前記被写体の所定部分から発せられた光の拡散範囲内に含まれる撮像素子のうち前記所定の撮像素子を除く他の撮像素子によって受け止められる光の総量との合計に等しいと近似して、前記被写体の所定部分から発せられて前記撮像素子面に到達した光量を算出する近似的理想像算出手段と、該近似的理想像算出手段の算出結果に基づいて新たな画像を生成する新画像生成手段と、を備えるものである。   The image processing apparatus according to claim 3 is an image processing apparatus that performs sharpening processing on an original image in which out-of-focus or hand-blurring occurs, and an original image input means for inputting image data of the original image, The total amount of light received by the predetermined image sensor positioned on the image sensor surface of the camera is received by the predetermined image sensor out of the light emitted from the predetermined portion of the subject and reaching the image sensor surface. Approximate to be equal to the sum of the amount of light and the total amount of light received by other imaging elements other than the predetermined imaging element among imaging elements included in the diffusion range of light emitted from the predetermined part of the subject Approximate ideal image calculation means for calculating the amount of light emitted from a predetermined portion of the subject and reaching the image sensor surface, and the calculation result of the approximate ideal image calculation means And new image generation means for generating a new image based on, but with a.

本発明の請求項1に係る画像処理プログラムによれば、膨大な変数を含んだ連立方程式を解くことなく、焦点距離のズレや撮影者の手ブレが全くない場合の被写体の理想像を近似的に算出することにより、高速且つ高精度の先鋭化処理が可能となる。また、光の拡散率を適宜調整することによって、ピンボケと手ブレボケの双方が複合的に発生した画像であっても、有効な先鋭化処理を行うことができる。   According to the image processing program of the first aspect of the present invention, an ideal image of a subject in the case where there is no shift in focal length or camera shake at all without approximating the simultaneous equations including enormous variables can be approximated. By calculating the above, sharpening processing can be performed at high speed and with high accuracy. Further, by appropriately adjusting the light diffusivity, an effective sharpening process can be performed even for an image in which both out-of-focus and hand-blurring occur.

本発明の請求項2に係るコンピュータ読み取り可能な記録媒体によれば、請求項1記載の画像処理プログラムを持ち運んで所望の場所で使用することができる。   According to the computer-readable recording medium of the second aspect of the present invention, the image processing program according to the first aspect can be carried and used at a desired place.

また、本発明の請求項3に係る画像処理装置によれば、膨大な変数を含んだ連立方程式を解くことなく、焦点距離のズレや撮影者の手ブレが全くない場合の被写体の理想像を近似的に算出することにより、高速且つ高精度の先鋭化処理が可能となる。また、光の拡散率を適宜調整することによって、ピンボケと手ブレボケの双方が複合的に発生した画像であっても、有効な先鋭化処理を行うことができる。   According to the image processing apparatus of the third aspect of the present invention, an ideal image of a subject in the case where there is no shift in focal length or camera shake of a photographer without solving simultaneous equations including a large number of variables. By calculating approximately, sharpening processing with high speed and high accuracy is possible. Further, by appropriately adjusting the light diffusivity, an effective sharpening process can be performed even for an image in which both out-of-focus and hand-blurring occur.

以下、本発明の実施例に係る画像処理装置及び画像処理プログラムについて図面に基づいて説明する。図1は、本実施例に係る画像処理装置1の構成を示すブロック図である。本画像処理装置1は、修正すべき原画像の画像データを入力するためのメディアリーダ(原画像入力手段)2と入力された原画像に基づいてこれを先鋭化した新画像を生成するコンピュータ3と、生成された新画像をプリントアウトするための写真プリンタ4と、を備えてなるものである。   Hereinafter, an image processing apparatus and an image processing program according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration of an image processing apparatus 1 according to the present embodiment. The image processing apparatus 1 includes a media reader (original image input means) 2 for inputting image data of an original image to be corrected, and a computer 3 that generates a new image sharpened based on the input original image. And a photographic printer 4 for printing out the generated new image.

メディアリーダ2は、メモリカード,CD等の各種記憶媒体に記憶された原画像データを読み取ってコンピュータ3に入力するためのものである。もちろん、本発明にかかる原画像入力手段として、本実施例のメディアリーダ2に代えて従来公知のイメージスキャナ等を用いることにより、プリント済みの写真画像から画像データを読み取ることも可能である。   The media reader 2 is for reading original image data stored in various storage media such as a memory card and a CD and inputting them to the computer 3. Of course, by using a conventionally known image scanner or the like instead of the media reader 2 of the present embodiment as the original image input means according to the present invention, it is also possible to read image data from a printed photographic image.

コンピュータ3は、メディアリーダ2から入力された原画像データを記憶する画像メモリ5と、画像先鋭化のための画像処理プログラム6を格納するハードディスク7と、該ハードディスク7から読み出された画像処理プログラム6を一時記憶するRAM(Randaom Access Memory)8と、この画像処理プログラム6に従って原画像データを先鋭化処理するCPU(Central Processing Unit)9と、原画像や先鋭化処理後の画像を表示するための表示部10と、マウスやキーボード等で構成される操作部11と、がシステムバス12を介して接続されてなるものである。   The computer 3 includes an image memory 5 that stores original image data input from the media reader 2, a hard disk 7 that stores an image processing program 6 for sharpening the image, and an image processing program that is read from the hard disk 7. In order to display a RAM (Random Access Memory) 8 that temporarily stores 6, a CPU (Central Processing Unit) 9 that sharpens the original image data according to the image processing program 6, and an original image and an image after the sharpening process The display unit 10 and an operation unit 11 configured with a mouse, a keyboard, and the like are connected via a system bus 12.

以下、本発明に係る画像処理プログラム6のアルゴリズムについて説明する。本画像処理プログラム6は、種々のプログラミング言語を用いて作成され、原画像データに基づいてピントずれや手ブレがまったく発生しない時の理想像を近似的に算出するものである。   The algorithm of the image processing program 6 according to the present invention will be described below. The image processing program 6 is created using various programming languages, and approximately calculates an ideal image when no focus shift or camera shake occurs based on original image data.

画像処理プログラム6のアルゴリズムの説明に先立って、まず、デジタルカメラにおけるピンボケや手ブレボケの発生メカニズムについて説明する。一般に、デジタルカメラの内部には、光を受けると電気的に反応する素子(以下、「撮像素子」という)が設けられており、撮影しようとする物体(以下、「被写体」という)の表面から発せられた光の粒である光子が、デジタルカメラのシャッターが開いている間に、カメラ内部の撮像素子に到達することより、被写体に応じた像が形成される。これにより、デジタルカメラによる被写体の撮影が可能となっている。本発明では、図2に示すように、被写体Hの表面を格子状に分割して、各格子内に位置する被写体Hの所定部分を被写体(x,y)と表し、被写体(x,y)の部分から発せられた全ての光子のうち、デジタルカメラの撮像素子面Sまで到達した光子の数すなわち光の量を、出力光量_被写体(x,y)と表すこととする。一方、デジタルカメラの撮像素子面Sは、被写体の分割数と同数の撮像素子が整列してできたものとし、撮像素子の所定部分を撮像素子(x,y)と表し、撮像素子(x,y)の部分が受け取った光子の数すなわち光の量を、入力光量_撮像素子(x,y)と表すこととする。   Prior to the description of the algorithm of the image processing program 6, first, a mechanism of occurrence of out-of-focus or camera shake in a digital camera will be described. Generally, an element that reacts electrically when receiving light (hereinafter referred to as an “imaging element”) is provided inside a digital camera, and the surface of an object to be photographed (hereinafter referred to as an “subject”). The photons that are the emitted light particles reach the image sensor inside the camera while the shutter of the digital camera is open, so that an image corresponding to the subject is formed. This makes it possible to shoot a subject with a digital camera. In the present invention, as shown in FIG. 2, the surface of the subject H is divided into a grid, and a predetermined portion of the subject H positioned in each grid is represented as a subject (x, y), and the subject (x, y) The number of photons that have reached the image pickup device surface S of the digital camera, that is, the amount of light among all the photons emitted from the portion is expressed as output light quantity_subject (x, y). On the other hand, the image pickup device surface S of the digital camera is formed by arranging the same number of image pickup devices as the number of divisions of the subject, and a predetermined portion of the image pickup device is represented as an image pickup device (x, y). The number of photons received by the portion y), that is, the amount of light, is expressed as input light quantity_imaging element (x, y).

ここで、下記の式(1)のような理想的な条件が完全に整った時、すなわち、被写体(x,y)から発せられてデジタルカメラの撮像素子面Sまで到達した光子の全てが唯1個の撮像素子(x,y)によって受け止められ、それ以外の撮像素子によって受け止められた光子が1個もない時、撮像素子面Sには被写体Hと全く同一の像が形成され、ピンボケ・手ブレボケが全く発生しないピンボケ及び手ブレボケ・ゼロ状態の写真を撮ることができる。

Figure 2007226520
Here, when ideal conditions such as the following formula (1) are completely satisfied, that is, all photons emitted from the subject (x, y) and reaching the image pickup device surface S of the digital camera are all unique. When there is no photon received by one image sensor (x, y) and other image sensors, the same image as the subject H is formed on the image sensor surface S. It is possible to take a picture of out-of-focus and hand-blurred zero with no hand-blurring.
Figure 2007226520

しかし、現実の写真撮影においては、レンズの性能限界や、シャッターが開いている間に撮影者がカメラを動かしてしまったり(手ブレ)、被写体Hに焦点距離が合っていない(ピンボケ)等の事情により、式(1)が完全に成り立つことはなく、被写体(x,y)から発せられてデジタルカメラの撮像素子面Sまで到達した光子の一部は、撮像素子(x,y)以外の撮像素子によって受け止められる。例えば、手ブレが生じた場合、図3に示すように、撮像素子まで到達した光子の一部は、撮像素子(x,y)に対して手ブレ方向とは逆方向に位置する撮像素子によって受け止められ、これにより手ブレボケが発生する。また、被写体Hに焦点距離が合っていない場合、図4に示すように、撮像素子まで到達した光子の一部は、四方八方に拡散して撮像素子(x,y)の周囲の撮像素子によって受け止められ、これによりピンボケが発生する。   However, in actual photography, the lens performance limit, the photographer moves the camera while the shutter is open (camera shake), the subject H is out of focus (out of focus), etc. Due to circumstances, Equation (1) does not hold completely, and some of the photons emitted from the subject (x, y) and reaching the image sensor surface S of the digital camera are other than the image sensor (x, y). It is received by the image sensor. For example, when camera shake occurs, as shown in FIG. 3, some of the photons that have reached the image sensor are caused by the image sensor located in the direction opposite to the camera shake direction with respect to the image sensor (x, y). As a result, camera shake occurs. In addition, when the focal length does not match the subject H, as shown in FIG. 4, some of the photons that have reached the image sensor are diffused in all directions and are captured by the image sensor around the image sensor (x, y). It is received and this causes blurring.

このようにしてピンボケ・手ブレボケが生じた原画像からボケのない理想像を求めるべく、本発明に係る画像処理プログラム6では、光子の拡散率が適宜設定されている。表1は、光子の拡散率の一例を示すテーブルである。この場合、被写体(x,y)から撮像素子面Sまで到達した光子のうち、約40%が撮像素子(x,y)によって受け止められ、約10%が撮像素子(x,y−1),撮像素子(x,y+1),撮像素子(x−1,y),撮像素子(x+1,y)によってそれぞれ受け止められ、約5%が撮像素子(x−1,y−1),撮像素子(x−1,y+1),撮像素子(x+1,y−1),撮像素子(x+1,y+1)によって受け止められることを意味している。すなわち、被写体(x,y)から発せられた光子が拡散する範囲は、撮像素子(x,y)とこれを包囲するようにして隣接する計9個の撮像素子の範囲に限られ、それより外側の撮像素子の範囲へは拡散しないことを意味している。

Figure 2007226520
In this way, in the image processing program 6 according to the present invention, the diffusivity of photons is appropriately set in order to obtain an ideal image without blur from the original image in which out-of-focus / blurred blur occurs. Table 1 is a table showing an example of the photon diffusion rate. In this case, about 40% of the photons that have reached the imaging element surface S from the subject (x, y) are received by the imaging element (x, y), and about 10% are the imaging element (x, y−1), The image pickup element (x, y + 1), the image pickup element (x-1, y), and the image pickup element (x + 1, y) are received by the image pickup element (x-1, y-1) and the image pickup element (x −1, y + 1), the image sensor (x + 1, y−1), and the image sensor (x + 1, y + 1). That is, the range in which photons emitted from the subject (x, y) are diffused is limited to the range of a total of nine image sensors adjacent to the image sensor (x, y) so as to surround it. This means that it does not diffuse into the range of the outer image sensor.
Figure 2007226520

そして、光子の拡散率を表1に示すように設定した場合、図5に示すように、撮像素子(x,y)が受け止める光子の総数は、被写体(x,y)とこれを包囲するようにして隣接する計9個の被写体格子から発せられた光子の合計となり、次の式(2)が成立する。

Figure 2007226520
When the photon diffusivity is set as shown in Table 1, as shown in FIG. 5, the total number of photons received by the image sensor (x, y) surrounds the subject (x, y). Thus, the total of photons emitted from a total of nine adjacent object grids is obtained, and the following equation (2) is established.
Figure 2007226520

ここで、式(2)における入力光量_撮像素子(x,y)は、メディアリーダ2から入力された原画像データを参照することで全てのxとyについて得られる既知の値であるため、この既知の入力光量_撮像素子(x,y)に基づいて、被写体(x,y)から発せられた全ての光子のうちデジタルカメラの撮像素子面Sに到達した光子の総数である出力光量_被写体(x,y)を全てのxとyについて求めることにより、撮影した被写体Hの正確な像を得ることができる。すなわち、ボケが生じている原画像に基づいて、ボケのない被写体Hの正確な像を知ることができる。   Here, since the input light quantity_imaging element (x, y) in Expression (2) is a known value obtained for all x and y by referring to the original image data input from the media reader 2, Based on this known input light amount_output light amount that is the total number of photons that have reached the image sensor surface S of the digital camera among all photons emitted from the subject (x, y) based on the image sensor (x, y) By obtaining the subject (x, y) for all x and y, an accurate image of the photographed subject H can be obtained. That is, an accurate image of the subject H without blur can be known based on the original image with blur.

本画像処理プログラム6では、被写体Hや撮像素子面Sの分割数を多くした場合でも、式(2)において、膨大な変数を含んだ連立方程式を解くことなく、全てのxとyについて出力光量_被写体(x,y)を近似的に算出することを可能とすべく、出力光量_被写体(x−1,y)を入力光量_撮像素子(x−1,y)に、出力光量_被写体(x+1,y)を入力光量_撮像素子(x+1,y)に、出力光量_被写体(x,y−1)を入力光量_撮像素子(x,y−1)に、出力光量_被写体(x,y+1)を入力光量_撮像素子(x,y+1)に、出力光量_被写体(x−1,y−1)を入力光量_撮像素子(x−1,y−1)に、出力光量_被写体(x+1,y−1)を入力光量_撮像素子(x+1,y−1)に、出力光量_被写体(x−1,y+1)を入力光量_撮像素子(x−1,y+1)に、出力光量_被写体(x+1,y+1)を入力光量_撮像素子(x+1,y+1)に、それぞれ置換して導出した以下の式(3)を用いている。

Figure 2007226520
In this image processing program 6, even when the number of divisions of the subject H and the image sensor surface S is increased, the output light quantity for all x and y is not solved in Equation (2) without solving simultaneous equations including enormous variables. _Output light quantity_Subject (x-1, y) to input light quantity_Image sensor (x-1, y) and Output light quantity_Subject to enable approximate calculation of subject (x, y) (X + 1, y) is input light quantity_imaging element (x + 1, y), output light quantity_subject (x, y-1) is input light quantity_imaging element (x, y-1), output light quantity_subject (x , Y + 1) to input light quantity_imaging element (x, y + 1), output light quantity_subject (x-1, y-1) to input light quantity_imaging element (x-1, y-1), and output light quantity_subject. (X + 1, y-1) to input light quantity_imaging device (x + 1, y-1), output light quantity_subject ( −1, y + 1) is replaced with input light quantity_imaging element (x−1, y + 1), and output light quantity_subject (x + 1, y + 1) is replaced with input light quantity_image sensor (x + 1, y + 1). Formula (3) is used.
Figure 2007226520

ここで、下記の式(4)のように定義する光総量・周囲分なる値を新たに導入することにより式(3)を下記の式(5)のように書き直すことができる。

Figure 2007226520
Figure 2007226520
Here, formula (3) can be rewritten as the following formula (5) by newly introducing a value of the total amount of light and surroundings defined as the following formula (4).
Figure 2007226520
Figure 2007226520

そして、式(5)を変形することによって、下記の式(6)を導くことができる。

Figure 2007226520
ここで、前述のように、入力光量_撮像素子(x,y)と光総量・周囲分とは、共に入力された原画像データから得られる既知の値である。従って、前記CPU8は、この式(6)を用いて全てのxとyについて出力光量_被写体(x,y)を算出し、これに応じた画像を新たに生成する。このように、ボケている原画像を修正するのではなく、ボケている原画像データに基づいてボケがない状態での被写体Hの理想像を近似的に算出した上で、これに応じた新たな画像を生成することとしたので、膨大な数の変数を含んだ連立方程式を解く必要がない分、処理時間を短縮することができ、且つ、高い精度でボケを修正することができる。 Then, the following equation (6) can be derived by modifying the equation (5).
Figure 2007226520
Here, as described above, the input light amount_imaging device (x, y) and the total light amount / peripheral amount are known values obtained from the input original image data. Therefore, the CPU 8 calculates the output light quantity_subject (x, y) for all x and y using this equation (6), and newly generates an image corresponding to this. In this way, instead of correcting the blurred original image, the ideal image of the subject H in the absence of blur is approximately calculated based on the blurred original image data, and a new image corresponding to this is calculated. Therefore, since it is not necessary to solve simultaneous equations including a large number of variables, the processing time can be shortened and blurring can be corrected with high accuracy.

尚、光子の拡散率は表1に限定されず任意の設定に変更することが可能であり、拡散率の設定を変化させることにより、ボケの修正の度合いを強くし又は弱くするように調整することができる。また、本実施例では被写体(x,y)から発せられた光子が撮像素子(x,y)及びこれを包囲するように隣接する計9個の撮像素子の範囲に拡散し、それより外側の撮像素子の範囲には拡散しないものとして拡散率を設定したが、これに限られず、例えば撮像素子(x,y)の隣の隣の撮像素子、すなわち撮像素子(x,y)を中心として5×5=計25個あるいは7×7=計49個の撮像素子の範囲に光子が拡散するものとして拡散率を設定することも可能である。以下の表2と表3は、この場合の拡散率の設定例を示したものであり、表2はピンボケ修正の度合いを強めにした場合の設定例であって、表3は表2より修正の度合いを弱めにした場合の設定例を示している。

Figure 2007226520
Figure 2007226520
Note that the diffusion rate of photons is not limited to that shown in Table 1 and can be changed to an arbitrary setting. By changing the setting of the diffusion rate, the degree of blur correction is adjusted to be increased or decreased. be able to. Further, in this embodiment, photons emitted from the subject (x, y) are diffused to a range of a total of nine image sensors adjacent to the image sensor (x, y) so as to surround the image sensor (x, y). Although the diffusivity is set not to diffuse in the range of the image sensor, the present invention is not limited to this. For example, the image sensor adjacent to the image sensor (x, y), that is, the image sensor (x, y) is 5 It is also possible to set the diffusivity by assuming that photons diffuse in a range of x5 = 25 total or 7 × 7 = 49 total image sensors. Tables 2 and 3 below show examples of setting the spreading factor in this case. Table 2 shows a setting example when the degree of out-of-focus correction is increased. Table 3 is corrected from Table 2. The example of a setting when the degree of is weakened is shown.
Figure 2007226520
Figure 2007226520

また、光子の拡散の様相が2次元正規分布に従うということを前提として光子の拡散率を設定することも可能である。この場合、標準偏差という1個の数値をパラメータとして与えるだけで、ピンボケの修正度合いを強くし又は弱くするように自在に調整することができるので、操作が極めてシンプルになるという利点がある。尚、この場合の画像処理のアルゴリズムは、式(6)を用いて行う点で前述と同様であり、ここでは説明を省略する。   It is also possible to set the photon diffusion rate on the assumption that the aspect of photon diffusion follows a two-dimensional normal distribution. In this case, it is possible to freely adjust the degree of correction of defocusing by simply giving a single numerical value called standard deviation as a parameter, so that there is an advantage that the operation becomes extremely simple. Note that the image processing algorithm in this case is the same as described above in that it is performed using Expression (6), and the description thereof is omitted here.

一方、本画像処理プログラム6は、光子の拡散率の設定を、ピンボケ修正の場合と異なる設定とすることによって、手ブレボケの修正も行うことが可能となっている。表4は、手ブレボケ修正の場合の光子の拡散率の設定例であり、撮像素子(x,y)の他に、手ブレ方向とは逆方向に隣接する撮像素子(x−1,y)と、更にそれに隣接する撮像素子(x−2,y)とが光子を受け止めることを示している。

Figure 2007226520
この場合、前記式(5)と同様に下記の式(7)が成立し、これを変形することで式(8)に示すように出力光量_被写体(x,y)を算出することができる。これにより、手ブレボケした原画像データに基づいて手ブレがない状態での被写体Hの理想像を近似的に算出した上で、これに応じた新たな画像を生成することにより、手ブレボケを修正することができる。
Figure 2007226520
Figure 2007226520
On the other hand, the present image processing program 6 can also correct camera shake by setting the photon diffusivity to a setting different from that for correcting blur. Table 4 is a setting example of the photon diffusivity in the case of correcting camera shake blur, and in addition to the image sensor (x, y), the image sensor (x-1, y) adjacent in the direction opposite to the camera shake direction. In addition, the image sensor (x-2, y) adjacent thereto receives the photons.
Figure 2007226520
In this case, the following equation (7) is established as in the equation (5), and the output light quantity_subject (x, y) can be calculated by modifying this as shown in the equation (8). . As a result, the ideal image of the subject H in the absence of camera shake is approximately calculated based on the original image data that has been shaken, and a new image is generated accordingly, thereby correcting camera shake. can do.
Figure 2007226520
Figure 2007226520

このように、同じアルゴリズムを用いてピンボケと手ブレボケの双方を修正可能としたことにより、画像に生じたボケがピンボケか手ブレボケかによって修正のためのアルゴリズムを使い分ける必要がなく、処理が簡略化される。加えて、ピンボケと手ブレボケの双方が複合的に生じた画像でも、有効な先鋭化処理を行うことができるという利点がある。   In this way, by making it possible to correct both out-of-focus and hand-blurring using the same algorithm, there is no need to use different correction algorithms depending on whether out-of-focus or out-of-focus blur occurs in the image, simplifying processing. Is done. In addition, there is an advantage that an effective sharpening process can be performed even for an image in which both out-of-focus and hand-blurring occur.

また、多画素化が進む近年のデジタルカメラで撮影した画像であって、被写体Hから発せられた光子が撮像素子の広い範囲に渡って拡散することが想定される場合には、本発明の適用に当たり、以下のような応用的な手法を用いることも可能である。すなわち、修正すべき原画像上に、複数の画素を含んでなる所定大きさのメッシュを設定する。このメッシュの大きさは、原画像の横方向と縦方向のそれぞれにメッシュ個数が1000個を超えないような大きさとする。そして、光子の拡散率を表2に示すように設定する前提の下で式(6)を変更した式(9)を用いることにより、被写体Hの理想像を近似的に算出する。尚、式(9)中の{メッシュ中平均_入力光量_撮像素子(m,n)}とは、原画像中の横方向にm番目、縦方向にn番目に位置するメッシュ(m,n)に注目し、その内部に存在する全ての撮像素子(x,y)に対して{入力光量_撮像素子(x,y)}を調べ、それらの平均値を算出したものである。

Figure 2007226520
In addition, in the case of an image photographed by a recent digital camera in which the number of pixels is increasing and the photon emitted from the subject H is assumed to diffuse over a wide range of the image sensor, the application of the present invention is applied. In this case, the following applied method can be used. That is, a mesh having a predetermined size including a plurality of pixels is set on the original image to be corrected. The size of the mesh is set so that the number of meshes does not exceed 1000 in the horizontal and vertical directions of the original image. Then, an ideal image of the subject H is approximately calculated by using Equation (9) obtained by changing Equation (6) under the assumption that the diffusivity of photons is set as shown in Table 2. Note that {average in mesh_input light quantity_imaging element (m, n)} in equation (9) is the mesh (m, n) positioned in the mth in the horizontal direction and the nth in the vertical direction in the original image. ), {Input light quantity_imaging element (x, y)} is examined for all imaging elements (x, y) existing therein, and an average value thereof is calculated.
Figure 2007226520

本発明は、ピンボケ画像や手ブレ画像を先鋭な画像に修正する画像処理プログラム及び画像処理装置に適用可能である。   The present invention can be applied to an image processing program and an image processing apparatus that correct a out-of-focus image or a camera shake image into a sharp image.

本発明の実施例に係る画像処理装置1の構成を示すブロック図。1 is a block diagram showing a configuration of an image processing apparatus 1 according to an embodiment of the present invention. 被写体Hから発せられた光子が撮像素子面Sに到達する様子を説明するための説明図。FIG. 4 is an explanatory diagram for explaining a state in which photons emitted from a subject H reach an image sensor surface S. 手ブレボケの発生を説明するための説明図。Explanatory drawing for demonstrating generation | occurrence | production of camera shake blur. ピンボケの発生を説明するための説明図。Explanatory drawing for demonstrating out-of-focus. 撮像素子(x,y)が受け止める光子の総数を説明するための説明図。Explanatory drawing for demonstrating the total number of photons which an image pick-up element (x, y) receives.

符号の説明Explanation of symbols

1 画像処理装置
2 メディアリーダ
3 コンピュータ
6 画像処理プログラム
9 CPU
H 被写体
S 撮像素子面
DESCRIPTION OF SYMBOLS 1 Image processing apparatus 2 Media reader 3 Computer 6 Image processing program 9 CPU
H Subject S Image sensor surface

Claims (3)

ピンボケや手ブレボケが生じた原画像に対する先鋭化処理をコンピュータに実行させる画像処理プログラムにおいて、
被写体から発せられてカメラの撮像素子面上に位置する所定の撮像素子によって受け止められる光の総量が、前記被写体の所定部分から発せられて前記撮像素子面に到達した光のうち前記所定の撮像素子によって受け止められる光量と、前記被写体の所定部分から発せられた光の拡散範囲内に含まれる撮像素子のうち前記所定の撮像素子を除く他の撮像素子によって受け止められる光の総量との合計に等しいと近似して、前記被写体の所定部分から発せられて前記撮像素子面に到達した光量を算出することにより、原画像データに基づいて新たな画像を生成する処理をコンピュータに実行させることを特徴とする画像処理プログラム。
In an image processing program that causes a computer to perform sharpening processing on an original image in which out-of-focus or blurring occurs,
The total amount of light emitted from the subject and received by the predetermined image sensor located on the image sensor surface of the camera is the predetermined image sensor out of the light emitted from the predetermined portion of the subject and reaching the image sensor surface. And the total amount of light received by other imaging elements other than the predetermined imaging element out of the imaging elements included in the diffusion range of light emitted from the predetermined part of the subject. Approximating and calculating the amount of light emitted from a predetermined portion of the subject and reaching the image sensor surface, thereby causing a computer to execute a process of generating a new image based on original image data Image processing program.
請求項1記載の画像処理プログラムが記録されたコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the image processing program according to claim 1 is recorded. ピンボケや手ブレボケが生じた原画像に先鋭化処理を実行する画像処理装置において、
原画像の画像データを入力するための原画像入力手段と、被写体から発せられてカメラの撮像素子面上に位置する所定の撮像素子によって受け止められる光の総量が、前記被写体の所定部分から発せられて前記撮像素子面に到達した光のうち前記所定の撮像素子によって受け止められる光量と、前記被写体の所定部分から発せられた光の拡散範囲内に含まれる撮像素子のうち前記所定の撮像素子を除く他の撮像素子によって受け止められる光の総量との合計に等しいと近似して、前記被写体の所定部分から発せられて前記撮像素子面に到達した光量を算出する近似的理想像算出手段と、該近似的理想像算出手段の算出結果に基づいて新たな画像を生成する新画像生成手段と、を備えることを特徴とする画像処理装置。
In an image processing apparatus that performs sharpening processing on an original image in which defocusing or blurring has occurred,
The total amount of light emitted from the subject and input from the subject and received by the predetermined image sensor located on the image sensor surface of the camera is emitted from a predetermined portion of the subject. The amount of light received by the predetermined image sensor out of the light reaching the surface of the image sensor and the image sensor included in the diffusion range of light emitted from the predetermined portion of the subject are excluded from the predetermined image sensor An approximate ideal image calculating means for calculating an amount of light emitted from a predetermined portion of the subject and reaching the surface of the image sensor, approximating it being equal to a total amount of light received by another image sensor, and the approximation An image processing apparatus comprising: a new image generation unit that generates a new image based on a calculation result of the target ideal image calculation unit.
JP2006046621A 2006-02-23 2006-02-23 Image processing program and computer readable recording medium with the same recorded thereon, and image processor Pending JP2007226520A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2006046621A JP2007226520A (en) 2006-02-23 2006-02-23 Image processing program and computer readable recording medium with the same recorded thereon, and image processor
PCT/JP2006/315677 WO2007097054A1 (en) 2006-02-23 2006-08-08 Image processing program, computer readable recording medium with the program recorded therein, and image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006046621A JP2007226520A (en) 2006-02-23 2006-02-23 Image processing program and computer readable recording medium with the same recorded thereon, and image processor

Publications (1)

Publication Number Publication Date
JP2007226520A true JP2007226520A (en) 2007-09-06

Family

ID=38437112

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006046621A Pending JP2007226520A (en) 2006-02-23 2006-02-23 Image processing program and computer readable recording medium with the same recorded thereon, and image processor

Country Status (2)

Country Link
JP (1) JP2007226520A (en)
WO (1) WO2007097054A1 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001186353A (en) * 1999-12-27 2001-07-06 Noritsu Koki Co Ltd Picture processing method and medium recording picture processing program
JP4423536B2 (en) * 2003-06-27 2010-03-03 ソニー株式会社 Signal processing apparatus, signal processing method, program, and recording medium
JP4609879B2 (en) * 2004-06-08 2011-01-12 オムロン株式会社 Image high resolution method, image high resolution device, and image recognition device

Also Published As

Publication number Publication date
WO2007097054A1 (en) 2007-08-30

Similar Documents

Publication Publication Date Title
JP4799428B2 (en) Image processing apparatus and method
JP5596138B2 (en) Imaging apparatus, image processing apparatus, image processing method, and image processing program
US20060279639A1 (en) Method and system for deblurring an image based on motion tracking
US9100559B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and image processing program using compound kernel
JP2007201533A (en) Blur conversion apparatus and method
CN101568908A (en) Image blurring
JP2011166588A (en) Imaging apparatus and imaging method, and image processing method for the imaging apparatus
JP4885150B2 (en) Image processing device
JP2010016470A (en) Image restoration method, image restoration program and image restoration apparatus
JP2006050070A (en) Image processing method, apparatus and program thereof
JP2020030569A (en) Image processing method, image processing device, imaging device, lens device, program, and storage medium
US9652832B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium which perform image restoration processing
JP2007226520A (en) Image processing program and computer readable recording medium with the same recorded thereon, and image processor
US10304168B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for correcting deterioration of image
US10339637B2 (en) Image processing apparatus, image pickup apparatus, image processing method, and non-transitory computer-readable storage medium for correcting deterioration of image
JP2008245033A (en) Method of controlling depth of field, image processing device, program, and recording medium
JP2011003124A (en) Image processor and image processing program
JP6468751B2 (en) Image processing apparatus, image processing method, and program
JP6555881B2 (en) Image processing apparatus, imaging apparatus, image processing method, image processing program, and storage medium
JP5760495B2 (en) Image sharpening device, image output device, image sharpening program, image processing device, and image processing program
JP3915037B1 (en) Image processing program, computer-readable recording medium recorded with the same, and image processing apparatus
JP2017173920A (en) Image processor, image processing method, image processing program, and record medium
US9262814B2 (en) Image processing device and method for sharpening a blurred image
JP2007074348A (en) Image processing apparatus
JP2008059462A (en) Image repair method, image repair program and image repair device