JP4279775B2 - Optical distortion correction apparatus, optical distortion correction method, and imaging apparatus - Google Patents
Optical distortion correction apparatus, optical distortion correction method, and imaging apparatus Download PDFInfo
- Publication number
- JP4279775B2 JP4279775B2 JP2004358795A JP2004358795A JP4279775B2 JP 4279775 B2 JP4279775 B2 JP 4279775B2 JP 2004358795 A JP2004358795 A JP 2004358795A JP 2004358795 A JP2004358795 A JP 2004358795A JP 4279775 B2 JP4279775 B2 JP 4279775B2
- Authority
- JP
- Japan
- Prior art keywords
- strip
- optical distortion
- pixel
- image data
- predetermined direction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 230000003287 optical effect Effects 0.000 title claims description 295
- 238000012937 correction Methods 0.000 title claims description 140
- 238000000034 method Methods 0.000 title claims description 48
- 238000003384 imaging method Methods 0.000 title claims description 12
- 238000011144 upstream manufacturing Methods 0.000 claims description 13
- 230000004075 alteration Effects 0.000 claims description 7
- 230000007423 decrease Effects 0.000 claims description 7
- 238000012545 processing Methods 0.000 description 99
- 239000000872 buffer Substances 0.000 description 27
- 238000010586 diagram Methods 0.000 description 19
- 241000226585 Antennaria plantaginifolia Species 0.000 description 16
- 238000012546 transfer Methods 0.000 description 14
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000004886 process control Methods 0.000 description 1
Images
Description
本発明は、光学歪み補正装置及び光学歪み補正方法に係り、特に、光学歪みを有する光学系を介して被写体を撮影することによって得られた画像データの光学歪みを補正する光学歪み補正装置、光学歪み補正方法、及び撮像装置に関する。 The present invention relates to an optical distortion correction apparatus and an optical distortion correction method, and more particularly, to an optical distortion correction apparatus and an optical distortion correction apparatus that correct optical distortion of image data obtained by photographing a subject via an optical system having optical distortion. The present invention relates to a distortion correction method and an imaging apparatus.
従来、撮像装置、特にデジタルカメラでは、撮像によって、光学系を介してCCD等の撮像素子に被写体像を結像させることによって、被写体像の画像データを得ている。このような撮像装置では、光学レンズの歪曲収差に起因する光学歪み(ディストーション)が発生することが知られている。光学歪みは、画像の角部が外側に伸びて表示される「糸巻き型」と、角部が縮むように表示される「たる型」の2種類に分けられ、何れも光学中心からの距離によって歪み量が決められている。 2. Description of the Related Art Conventionally, an imaging device, particularly a digital camera, obtains image data of a subject image by forming a subject image on an imaging element such as a CCD through an optical system by imaging. In such an imaging apparatus, it is known that optical distortion (distortion) due to distortion of the optical lens occurs. Optical distortion is divided into two types: “pincushion type” that displays the corners of the image extending outward, and “barrel type” that displays the corners shrinking, both of which are distorted depending on the distance from the optical center. The amount is determined.
このような光学歪みを補正する技術として、例えば特許文献1の技術では、撮影によって得られた、複数の画素が水平方向に配列された画素列を垂直方向に複数列配列して被写体像を表示する画像データを記憶し、この記憶された画像データの画像を、水平方向の幅が予め定めた所定の処理画素数となるように垂直方向に複数の短冊領域に分割し、分割された各短冊領域内の画素列毎に、各短冊領域内の垂直方向の各画素列各々について、先頭に位置する画素から各画素の画素値を各短冊領域内の前記所定方向の画素列毎に前記記憶手段から読み出し、読み出した各画素列の画素の画素値に基づいて、水平方向及び垂直方向双方の光学歪みを補正する技術が知られている。先頭の短冊領域に含まれる全ての各画素列の読出しが終了すると、次の短冊領域の各画素列の読出しを行うが、このとき、前回処理した短冊領域の各画素列の水平方向の先頭に位置する画素から、予め定めた所定画素数だけ水平方向に移動した位置を次の短冊領域の水平方向の先頭に設定し、次の短冊処理内の各画素列の画素の読出しを行なっている。光学歪みの補正は、水平方向をX軸方向、垂直方向をY軸方向とすると、光学歪みが無いとき(光学歪みが補正された後)の画像データの画像の座標(x,y)に対応する光学歪みの補正前の画像データの画像の座標(X,Y)を求めて、求めた座標(X,Y)に対応する光学歪みの補正前の画像データの画像の画素の画素値を光学歪みが補正された後の画像の座標(x,y)の画素の画素値とすることによって行われる。このとき、光学歪みを有する画像データの画像の座標(X,Y)に対応する画素が存在しない事が多く、実際には、光学歪みの補正前の画像の座標(X、Y)近傍のX軸方向及びY軸方向に隣接する画素の画素値から、最近傍補間法や線形補間法などを用いて補間することによって、画素値を求めている。
As a technique for correcting such an optical distortion, for example, in the technique disclosed in
このように、光学歪みの補正を行うためには、光学歪みの補正前の画像の座標(X、Y)近傍のX軸方向及びY軸方向に隣接する画素の画素値から最近傍補間法や線形補間法などを用いて補間することによって、光学歪み補正後の画像の座標(x,y)の画素値を求める必要があるので、1つの短冊処理内の画像データの光学歪み補正処理が終了して次の短冊処理の画像データの光学歪みの補正を行うときには、前回補正した短冊領域と、次に補正する短冊領域との間には、補正に必要な画素数分重なる領域を設けるように次の短冊領域を定めている。従来の技術では、前回処理した短冊領域の先頭画素から次の短冊領域の先頭画素への移動量を、一定とし、補正に必要な画素数として、画像データの所定方向の最大光学歪み量だけ各短冊領域が重なるように設定されるように、各短冊領域の先頭画素間の距離(移動量)として最小光学歪み量に相当するような少ない画素数を定めていた。
しかしながら、所定方向の光学歪み量が多いほどより所定方向に離れた位置の光学歪み補正前の画像の座標から、該座標に位置する画素の画素値を補正後の画像の座標の画素の画素値とするので、所定方向の光学歪み量が多い短冊領域では、前回補正処理した短冊領域に重複する領域を光学歪み量が少ない短冊領域に比べて多く必要とするが、所定方向の光学歪み量が少ない短冊領域では、光学歪み量が多い短冊領域に比べてより所定方向に近い位置の光学歪み補正前の画像の座標から、該座標に位置する画素の画素値を補正後の画像の座標の画素の画素値とするので、前回補正処理した短冊領域に重複する領域を多く必要としない。しかしながら、従来技術では、所定方向の光学歪み量に依存せず、画像上のどの位置の短冊領域においても、短冊領域間の所定方向の移動量を一定の値としているので、光学歪み量が少ない画像上の位置を含む短冊領域においても光学歪み量の大きい画像上の位置を含む短冊領域と同じ移動量で移動すると、より不要に重なる領域が多くなり、画像データの画像により多くの短冊領域を設定する必要があるので、画像データの高画素化が進むほど、光学歪み補正処理の処理速度の低下が発生する問題があった。 However, as the amount of optical distortion in the predetermined direction increases, the pixel value of the pixel at the coordinate of the image after correcting the pixel value of the pixel located at the coordinate from the coordinates of the image before the optical distortion correction at a position further away in the predetermined direction. Therefore, in the strip area where the amount of optical distortion in the predetermined direction is large, an area overlapping with the previously corrected strip area is required more than the strip area where the amount of optical distortion is small. In a small strip region, the pixel value of the pixel located at the coordinate is corrected from the coordinates of the image before the optical distortion correction at a position closer to the predetermined direction than the strip region having a large amount of optical distortion. Therefore, it is not necessary to have a large area overlapping the strip area corrected last time. However, in the prior art, the amount of optical distortion is small because the amount of movement in the predetermined direction between the strip regions is constant in any strip region at any position on the image without depending on the amount of optical distortion in the predetermined direction. Even in the strip area including the position on the image, if the same amount of movement as the strip area including the position on the image with a large amount of optical distortion is moved, more areas overlap more unnecessary, and more strip areas are added to the image of the image data. Since it is necessary to set, there is a problem that the processing speed of the optical distortion correction processing is reduced as the number of pixels of the image data is increased.
本発明は、上記問題点を解消するためになされたもので、効率良く光学歪み補正を行うことを可能とした光学歪み補正装置、光学歪み補正方法、及び撮像装置を提供することを目的とする。 The present invention has been made to solve the above-described problems, and an object thereof is to provide an optical distortion correction apparatus, an optical distortion correction method, and an imaging apparatus that can efficiently perform optical distortion correction. .
本発明の光学歪み補正装置は、収差を有する光学系を介して被写体を撮影することにより得られた画像データであって、複数の画素が所定方向に配列された画素列を前記所定方向と交差する方向に複数列配列して画像を表示する画像データを記憶した記憶手段と、前記記憶手段に記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正する補正手段と、前記補正手段によって前回処理した短冊領域内の画像データの前記所定方向の最大光学歪み量に基づいて、該最大光学歪み量が大きくなるほど小さくなるように前記移動量を各短冊領域毎に算出し、算出した移動量を前記補正手段へ入力する短冊領域毎移動量算出手段と、を含んで構成されている。 The optical distortion correction apparatus according to the present invention is image data obtained by photographing a subject through an optical system having aberration, and intersects a predetermined pixel row in which a plurality of pixels are arranged in a predetermined direction. A storage unit that stores image data for displaying an image arranged in a plurality of rows in the direction of the image, and a pixel at the upstream end in a predetermined direction of the pixel column from the image data stored in the storage unit. A strip area is set in a direction intersecting with the predetermined direction in the previous period so that the width in the predetermined direction is a predetermined number of pixels, and the number of pixels corresponding to the input movement amount is sequentially set in the predetermined direction. Moving the pixel value of each pixel in each strip area in the predetermined direction for each pixel column in each strip area, and correcting the optical distortion of the read image data; By Based on the maximum optical distortion amount in the predetermined direction of the image data in the strip area processed last time, the movement amount is calculated for each strip area so as to decrease as the maximum optical distortion amount increases, and the calculated movement amount And a moving amount calculating means for each strip area for inputting the value to the correcting means.
光学歪の補正において、光学歪み補正前の画像上の位置に位置する画素が存在しない場合には、この画素の画素値は、各短冊領域毎に読み出した画像データの各画素の内の、光学歪み補正前の画像上の位置の所定方向及び所定方向に交差する方向に隣接する画素の画素値から補間することにより求められる。このため、各短冊領域は、画像上の位置が異なる、すなわち画像中心からの距離が異なるため、各短冊領域毎に異なるX軸方向の最大光学歪み量を含んでいる。具体的には、中心位置に近い短冊領域ほど所定方向の最大光学歪み量は小さくなるので、各短冊領域の互いに重複する領域は、光学歪み量が大きくなるほど小さく設定しても、光学歪みの補正を行うために必要な画素を含むように短冊領域を設定することができる。 In the optical distortion correction, when there is no pixel located at the position on the image before the optical distortion correction, the pixel value of this pixel is the optical value of each pixel of the image data read for each strip area. It is obtained by interpolating from pixel values of pixels adjacent to the predetermined direction of the position on the image before distortion correction and the direction intersecting the predetermined direction. For this reason, each strip region has a different position on the image, that is, a different distance from the center of the image, and therefore includes a maximum amount of optical distortion in the X-axis direction that differs for each strip region. Specifically, the strip area closer to the center position has a smaller maximum optical distortion amount in a predetermined direction. Therefore, even if the overlapping area of each strip area is set to be smaller as the optical distortion amount is larger, the optical distortion is corrected. The strip area can be set so as to include pixels necessary for performing the above.
そこで、本発明の光学歪み補正装置の移動量算出手段では、前回処理した短冊領域内の画像データの前記所定方向の最大光学歪み量に基づいて、該最大光学歪み量が大きくなるほど小さくなるように前記移動量を各短冊領域毎に算出し、算出した移動量を前記補正手段へ入力する。補正手段は、補正対象となる短冊領域内の所定方向の最大光学歪み量が大きくなるほど、前回補正した短冊領域の先頭画素からの移動量が小さくなるように移動した位置を先頭画素とするように次の短冊領域を設定し、設定した短冊領域内の画像データの光学歪みを補正する。 Therefore, the movement amount calculation means of the optical distortion correction apparatus of the present invention reduces the larger the maximum optical distortion amount based on the maximum optical distortion amount in the predetermined direction of the image data in the strip area processed last time. The movement amount is calculated for each strip area, and the calculated movement amount is input to the correction unit. The correction means sets the position moved so that the movement amount from the first pixel of the strip area corrected last time becomes smaller as the maximum optical distortion amount in the predetermined direction in the strip area to be corrected becomes larger, as the first pixel. The next strip area is set, and optical distortion of the image data in the set strip area is corrected.
このように、各短冊領域毎の所定方向の最大光学歪み量に基づいて、次に処理する短冊領域への移動量を算出することができるので、記憶手段に記憶された画像データの画像に設定する短冊領域の数を、第1の発明の光学歪み補正装置に比べてさらに少なくすることができるので、記憶手段に記憶された画像データから読み出す画素数をさらに減少させることができ、効率よく光学歪み補正を行うことができる。 As described above, since the amount of movement to the strip area to be processed next can be calculated based on the maximum optical distortion amount in the predetermined direction for each strip area, it is set to the image of the image data stored in the storage means. Since the number of strip regions to be reduced can be further reduced as compared with the optical distortion correction apparatus of the first invention, the number of pixels read from the image data stored in the storage means can be further reduced, and the optical efficiency can be improved. Distortion correction can be performed.
本発明の光学歪み装置の短冊移動量毎移動量算出手段は、前回処理した短冊領域の所定方向下流側端部から該短冊領域の所定方向の最大光学歪み量に相当する画素数だけ所定方向上流側に移動した位置が、次に処理する短冊領域の所定方向先頭画素の位置となるように、前記移動量を算出するようにしてもよい。 The movement amount calculating means for each strip movement amount of the optical distortion device according to the present invention is upstream of a predetermined number of pixels corresponding to the maximum optical distortion amount in the predetermined direction of the strip area from the downstream end portion of the strip area in the predetermined direction. The movement amount may be calculated so that the position moved to the side becomes the position of the first pixel in the predetermined direction of the strip area to be processed next.
また、本発明の光学歪み補正装置の短冊移動量毎移動量算出手段は、前記光学系の中心に対応する前記画像の中心位置を含む中央短冊領域より所定方向上流側の短冊領域毎に算出した移動量を記憶する移動量記憶手段を含み、前記中央短冊領域より所定方向下流側の短冊領域が次に処理する短冊領域のときは、前記移動量記憶手段に記憶された対応する短冊領域の移動量を読み取ることによって移動量を算出することができる。 Further, the movement amount calculation means for each strip movement amount of the optical distortion correction apparatus of the present invention calculates for each strip region upstream in the predetermined direction from the central strip region including the center position of the image corresponding to the center of the optical system. When the strip area downstream of the central strip area in the predetermined direction is a strip area to be processed next, movement of the corresponding strip area stored in the movement amount storage means is included. The amount of movement can be calculated by reading the amount.
各短冊領域の画像データに含まれる光学歪み量は、画像中心を中心として所定方向に左右対称の同一の値となるため、画像中心より所定方向上流側の短冊領域毎に算出した移動量を移動量記憶手段に記憶し、画像中心より所定方向下流側の短冊領域の移動量算出時には、移動量記憶手段に記憶されている対応する位置の短冊領域の移動量を読み取るようにすれば、さらに効率よく光学歪み補正量を行うことができるとともに、高速に光学歪み補正処理を行うことができる。 The amount of optical distortion included in the image data of each strip area is the same value that is symmetrical in a predetermined direction about the center of the image, so the movement amount calculated for each strip area upstream of the image center in the predetermined direction is moved. If the movement amount of the strip area stored in the amount storage means and the strip area on the downstream side in the predetermined direction from the center of the image is calculated, the movement amount of the strip area at the corresponding position stored in the movement amount storage means is read. The optical distortion correction amount can be performed well, and the optical distortion correction process can be performed at high speed.
次の光学歪み方法によって、効率よく光学歪み補正を行うことができる。詳細には、第2の発明の光学歪み補正方法では、収差を有する光学系を介して被写体を撮影することにより得られた画像データであって、複数の画素が所定方向に配列された画素列を前記所定方向と交差する方向に複数列配列して画像を表示する画像データを記憶し、前記記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正し、前回補正した短冊領域内の画像データの前記所定方向の最大光学歪み量に基づいて、該最大光学歪み量が大きくなるほど小さくなるように前記移動量を各短冊領域毎に算出し、算出した移動量を前記補正手段へ入力する短冊移動量毎移動量算出する。 Optical distortion correction can be performed efficiently by the following optical distortion method. Specifically, in the optical distortion correction method according to the second aspect of the present invention, a pixel array in which a plurality of pixels are arranged in a predetermined direction, which is image data obtained by photographing a subject through an optical system having aberration. Are stored in a plurality of columns in a direction intersecting the predetermined direction, and image data for displaying an image is stored. From the stored image data, a pixel at an upstream end in a predetermined direction of the pixel column is set as a top pixel. A strip area is set in a direction intersecting with the predetermined direction in the previous period so that the width in the predetermined direction is a predetermined number of pixels, and the number of pixels corresponding to the input movement amount is sequentially set in the predetermined direction. The pixel value of each pixel in each strip region is read out in the predetermined direction for each pixel column in each strip region, optical distortion of the read image data is corrected, and the previously corrected strip region in the strip region is corrected. Of image data Based on the maximum optical distortion amount in the predetermined direction, the movement amount is calculated for each strip region so that the movement amount decreases as the maximum optical distortion amount increases, and the calculated movement amount is input to the correction unit. The amount of movement is calculated every time.
また、本発明の光学歪み補正装置を撮像装置に適用することによって、効率よく光学歪み補正を行うことができる撮像装置を提供することができる。詳細には、第2の発明の撮像装置は、収差を有する光学系を介して被写体を撮影することにより得られた画像データであって、複数の画素が所定方向に配列された画素列を前記所定方向と交差する方向に複数列配列して画像を表示する画像データを記憶した記憶手段と、前記記憶手段に記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正する補正手段と、前記補正手段によって前回処理した短冊領域内の画像データの前記所定方向の最大光学歪み量に基づいて、該最大光学歪み量が大きくなるほど小さくなるように前記移動量を各短冊領域毎に算出し、算出した移動量を前記補正手段へ入力する短冊移動量毎移動量算出手段と、を備えている。 Further, by applying the optical distortion correction apparatus of the present invention to an imaging apparatus, it is possible to provide an imaging apparatus that can perform optical distortion correction efficiently. Specifically, the imaging apparatus of the second invention is image data obtained by photographing a subject through an optical system having aberration, and the pixel array in which a plurality of pixels are arranged in a predetermined direction A storage unit storing image data for displaying an image arranged in a plurality of columns in a direction crossing a predetermined direction, and a pixel at the upstream end in the predetermined direction of the pixel column from the image data stored in the storage unit A strip area in a direction intersecting with the predetermined direction in the previous period is set so that the width in the predetermined direction is a predetermined number of pixels, and the number of pixels corresponding to the input movement amount of the strip area Correction means that sequentially moves in a predetermined direction, reads the pixel value of each pixel in each strip region in the predetermined direction for each pixel column in each strip region, and corrects optical distortion of the read image data; Said correction means Therefore, based on the maximum optical distortion amount in the predetermined direction of the image data in the strip area processed last time, the movement amount is calculated for each strip area so as to decrease as the maximum optical distortion amount increases. Movement amount calculation means for each strip movement amount for inputting the amount to the correction means.
上記に示したように、本発明の光学歪み補正装置、本発明の光学歪み方法、及び本発明の撮像装置によれば、各短冊領域毎の所定方向の最大光学歪み量に基づいて、次に処理する短冊領域への移動量を算出することができるので、記憶手段に記憶された画像データの画像に設定する短冊領域の数を、少なくすることができ、記憶手段に記憶された画像データから読み出す画素数をさらに減少させることができ、効率よく光学歪み補正を行うことができる、という効果を有する。 As indicated above, the optical distortion correction apparatus of the present invention, optical distortion method of the present invention, and according to the imaging apparatus of the present invention, based on the maximum optical distortion amount in a predetermined direction for each strip region, then Since the amount of movement to the strip area to be processed can be calculated, the number of strip areas to be set in the image of the image data stored in the storage means can be reduced, and from the image data stored in the storage means The number of pixels to be read can be further reduced, and optical distortion correction can be performed efficiently.
以下、本発明をデジタルカメラに適用した実施の形態を図面に基づき説明する。 Embodiments in which the present invention is applied to a digital camera will be described below with reference to the drawings.
図1に示すように、本実施の形態に係るデジタルカメラ10は、被写体像を結像させるための光学ユニット12、及び光学ユニット12の光軸後方に配設され光学ユニット12により得られる被写体からの反射光を、撮影画像を示すアナログ画像データに変換して出力するためのCCD(Charge Coupled Device)14を備えている。
As shown in FIG. 1, the
光学ユニット12は、光学歪みを有する光学ユニット12であって、図示を省略するズームレンズ群、フォーカスレンズ、こられのズームレンズ群及びフォーカスレンズ各々を光軸方向に移動させるレンズ移動機構を含んで構成され、焦点距離の変更(変倍)が可能なズームレンズとして構成されている。光学ユニット12は、A/F制御回路32と接続されており、A/F制御回路32の制御により所望のズーム倍率になるようにズームレンズ群が光軸方向に移動され、光学ユニット12を通過した被写体像を示す入射光がCCD14の受光面上に結像するようにフォーカスレンズが光軸方向に移動可能に構成されている。
The
また、デジタルカメラ10は、CCD14から出力された被写体像を示すアナログ画像データをデジタル画像データ(以下、画像データという)に変換して出力するためのA/D変換器16と、A/D変換器16から入力された画像データに対して、ホワイトバランス調整、ガンマ補正、シャープネス補正等の各種補正処理、及びRGBデータをYC信号に変換するYC変換処理等の所定のデジタル信号処理を施すための信号処理プロセッサ22と、信号処理プロセッサ22によって信号処理された画像データを格納するためのメインメモリ38と、を備えている。メインメモリ38には、例えばSRAMやSDRAMといった大容量のメモリを一般に用いることができる。
The
また、デジタルカメラ10は、光学歪みを有する光学ユニット12を介して被写体を撮影することにより得られた画像データの画像の光学歪みを補正するためのディストーション補正部24(詳細後述)と、各種情報や画像データの画像を表示するためのLCD18の表示制御を行うためのLCD制御部26と、スマートメディア、及びICカード等の光学歪みが補正された画像データを記憶するための外部記録メディア28に対する各種情報の読み書きを制御するためのメディア制御部30と、撮影を指示するときにユーザによって押圧操作されるレリーズボタンや電源スイッチ等の操作手段20に接続されたI/F(インタフェース)部34と、デジタルカメラ10の全体の制御を司るCPU36と、各種プログラム及び後述する処理ルーチン(図7参照)等を予め記憶したROM40と、を備えている。
In addition, the
上記信号処理プロセッサ22、ディストーション補正部24、LCD制御部26、メディア制御部30、A/F制御回路32、I/F部34、CPU36、メインメモリ38、及びROM40は、データバス等のバス42を介して各種データや信号の授受可能に接続されている。
The
図2に示すように、ディストーション補正部24は、メインメモリ38に格納されている画像データを読み出し、演算処理部54へDMA(Direct Memory Access)転送するための入力短冊処理制御部52と、入力短冊処理制御部52から転送された画像データについて画像の光学歪みを補正するための演算処理部54と、演算処理部54によって光学歪みが補正された補正後の画像データをメインメモリ38へ転送するための出力短冊処理制御部58と、を含んで構成されている。
As shown in FIG. 2, the
画像データは、複数の画素が所定方向としての水平方向(X軸方向)に配列された画素列を、この所定方向と交差する方向としての垂直方向(Y軸方向)に複数列配列することで、被写体像を示す画像を表示する画像データである。入力短冊処理制御部52は、図3に示すように、メインメモリ38に格納されている、複数の画素が水平方向(X軸方向)に配列された画素列を、垂直方向(Y軸方向)に配列することで撮影によって得られた被写体像を示す画像を表示可能な画像データ80を、X軸方向の幅が所定の処理単位の処理画素数となるように短冊状に区切って複数の短冊領域82に分割し、各短冊領域82毎の、短冊領域82内の1画素列(以下、画像全体における1画素列と区別するために「小画素列」と称する)84毎に演算処理部24へDMA転送する。入力短冊処理制御部52は、転送時には、1小画素列84分の画像データの、各画素の画素値を水平方向(X軸方向)にスキャンすることによって、順次各画素の画素値を読み出す。入力短冊処理制御部52には、次の処理対象となる短冊領域82を設定するとともに、次の処理対象となる短冊領域82のX軸方向の位置を設定するための処理対象短冊・入力開始位置設定部56が接続されている。入力短冊処理制御部52は、X軸方向に順次処理対象となる短冊領域82を移動させて、次の短冊領域82内の複数の小画素列84分の画像データを順次読出すとともに、1つの短冊領域82内の各小画素列84の画像データの転送が終了すると、処理対象短冊・入力開始位置設定部56によって設定された次の処理対象となる短冊領域82の入力開始位置を示す情報に基づいて、X軸方向に指示された入力開始位置を示す情報に基づいた画素数分X方向に移動した位置が、次の短冊領域82の1画素目の位置となるように設定して、設定した次の短冊領域82の各小画素列84の画像データを順次読出す処理を繰り返し実行する。このように、入力短冊処理制御部52は、各画素値を設定された各短冊領域82の小画素列84毎に読出すことによって、画像データ80の画像の一端(画像始点に位置する画素83)から対向する他端(画像終点に位置する画素85)まで、順次各画素を読出し可能に構成されている。
Image data is obtained by arranging a plurality of pixels in a horizontal direction (X-axis direction) as a predetermined direction in a vertical direction (Y-axis direction) as a direction intersecting the predetermined direction. This is image data for displaying an image showing a subject image. As shown in FIG. 3, the input strip
演算処理部54は、入力短冊処理制御部52から転送された1小画素列84分の画像データを格納するためのラインバッファ64を備え、ラインバッファ64に格納された1小画素列84分の画像データについて、水平方向の光学歪み補正を行うための水平方向ディストーション補正部60と、水平方向の光学歪みが補正された各小画素列84の画像データを、各小画素列84毎に各々格納するためのラインバッファ721〜723と、ラインバッファ721〜723各々に格納された複数の水平方向の光学歪み補正済みの小画素列84の画像データに基づいて、垂直方向の光学歪み補正を行うための垂直方向ディストーション補正部62と、を含んで構成されている。
The
なお、本実施の形態では、垂直方向ディストーション補正部62には、説明を簡略化するために3個のラインバッファ721〜723が設けられているが、複数のラインバッファが設けられれば良く、3個に限られるものではない。
In the present embodiment, the vertical
なお、上記各ラインバッファ70、及びラインバッファ721〜723各々は、本実施の形態では、1小画素列84分の画素数の画素値からなる画像データを記憶可能な容量を備えている。
In the present embodiment, each of the line buffers 70 and the line buffers 72 1 to 72 3 has a capacity capable of storing image data composed of pixel values corresponding to one
ここで、光学歪みとしては、図4(A)に示すように画像の角部が外側に伸びて表示される「糸巻き型」と、図4(B)に示すように角部が縮むように表示される「たる型」の2種類が知られており、何れも光学中心からの距離によって光学歪み量が決まる。光学歪み量は、図4(C)に示すように非線形カーブ(以下、ディストーションカーブという)で示され、正の光学歪み量の場合は、各画素は、光学歪みの無いときの位置から中心より遠ざかる位置にずれるので「糸巻き型」となり、負の光学歪み量の場合は、各画素は、光学歪みの無いときの位置から中心へ近づく位置になるので「たる型」となる。「糸巻き型」と「たる型」の何れの光学歪みを有するかは、光学ユニット12によって定まり、本実施の形態の光学ユニット12では、「たる型」の光学歪みが生ずる収差を有しているので、たる型を示す情報が予めROM40に記憶されている。
Here, as the optical distortion, a “pincushion type” in which a corner portion of an image is extended and displayed as shown in FIG. 4A, and a corner portion that is contracted as shown in FIG. 4B. There are two types of “taru type”, and the amount of optical distortion is determined by the distance from the optical center. The optical distortion amount is shown by a non-linear curve (hereinafter referred to as a distortion curve) as shown in FIG. 4C. In the case of a positive optical distortion amount, each pixel is positioned from the center when there is no optical distortion. Since it shifts away from the position, it becomes a “pincushion type”, and in the case of a negative optical distortion amount, each pixel becomes a position that approaches the center from the position when there is no optical distortion, and thus becomes a “ball type”. The
光学歪みの光学歪み量は、各画素の画像中心からの距離に対する多次関数で近似表現することができる。例えば、光学中心からの距離をdとしたときの、たる型の場合の光学歪み量Δdは、下記式(1)によって示される。 The optical distortion amount of the optical distortion can be approximated by a multi-order function with respect to the distance from the image center of each pixel. For example, when the distance from the optical center is d, the optical distortion amount Δd in the case of the barrel type is expressed by the following formula (1).
Δd=α×d+β×d2+γ×d3+…・ (1)
なお、dは、光学中心からの距離を示し、α、β、γは係数である。
Δd = α × d + β × d 2 + γ × d 3 + (1)
Here, d indicates the distance from the optical center, and α, β, and γ are coefficients.
光学歪みが無い状態、すなわち水平方向及び垂直方向の光学歪みが補正された画像データの画像における座標を(x,y)とした場合に(x,yは整数)、この座標(x,y)に対応する光学歪み補正前の画像の座標(X,Y)は、以下の式(2)で表される・
(X,Y)=(x×Δd,y×Δd)、d=(x2+y2)1/2 …(2)
このため、水平方向ディストーション補正部60は、上記式(1)及び式(2)に基づいて、水平方向及び垂直方向の、光学歪み補正後の画像の補正対象となる小画素列84の内の座標(x,y)に対応する、水平方向の光学歪み補正前の画像の座標(X,y)(以下、補正前座標という)を求める。次に、水平方向ディストーション補正部60は、補正前座標(X,y)に対応する画素の画素値(画素データ)を、ラインバッファ70に転送された小画素列84の画像データから求めて、求めた画素値を補正後の画像における座標(x,y)の水平方向の光学歪みのみが補正された画素値とすることで、水平方向の光学歪みを補正する。
When there is no optical distortion, that is, when the coordinates in the image of the image data in which the optical distortion in the horizontal direction and the vertical direction is corrected are (x, y) (x and y are integers), the coordinates (x, y) The coordinates (X, Y) of the image before optical distortion correction corresponding to are expressed by the following equation (2):
(X, Y) = (x × Δd, y × Δd), d = (x 2 + y 2 ) 1/2 (2)
For this reason, the horizontal
垂直方向ディストーション補正部62は、上記式(1)及び式(2)に基づいて、水平方向及び垂直方向のディストーション補正後の画像における座標(x,y)に対応する、垂直方向の、光学歪み補正前の画像の補正前座標(x,Y)を求める。次に、垂直方向ディストーション補正部62は、この補正前座標(x,Y)に対応する画素値を、ラインバッファ721〜723各々に転送された水平方向の光学歪みが補正されている複数の小画素列84の画像データから求めて、求めた画素値を補正後の画像における座標(x,y)の画素値とすることで垂直方向のディストーションを補正する。
The vertical
上記水平方向ディストーション補正部60及び垂直方向ディストーション補正部62によって、小画素列84の、画像データの水平方向及び垂直方向の光学歪みが補正される。
The horizontal
なお、通常、上記式(1)及び式(2)により求めた補正前座標(X,y)及び(x,Y)は整数値にはならず、補正前の画像には対応する画素が存在しないことが多い。このため、求めた補正前の画像の座標(X,y)に対応する画素の画素値は、補正前の画像の座標(X,y)近傍の水平方向に隣接する実在の画素の画素データから補間し、補正前の画像の座標(x,Y)に対応する画素の画素値は、補正前の画像の座標(x,Y)近傍の水平方向及び垂直方向に隣接する実在の画素の画素データから最近傍補間法や線形補間法等を用いて補間することによって求めるようにすればよい。 Usually, the coordinates (X, y) and (x, Y) before correction obtained by the above formulas (1) and (2) are not integer values, and there is a corresponding pixel in the image before correction. Often not. For this reason, the pixel value of the pixel corresponding to the obtained coordinates (X, y) of the image before correction is obtained from the pixel data of the actual pixels adjacent in the horizontal direction near the coordinates (X, y) of the image before correction. The pixel value of the pixel corresponding to the coordinates (x, Y) of the image before correction is interpolated and the pixel data of the actual pixels adjacent in the horizontal and vertical directions in the vicinity of the coordinates (x, Y) of the image before correction. From this, it is sufficient to obtain by interpolation using the nearest neighbor interpolation method, linear interpolation method or the like.
ここで、光学歪み量の発生方向は、図5(A)に示すように、たる型は、画像の角部が縮むように表示され、糸巻き型は、図5(B)に示すように、画像の角部が外側に伸びるように表示されるので、たる型の場合は、中心に近づく方向に発生し、糸巻き型の場合は、中心から遠ざかる方向に発生する。したがって、たる型の場合には、光学歪みを補正するためには、光学中心81から離れるほど、より光学中心81から遠ざかる方向に光学歪みを補正する必要があり、糸巻き型の場合には、光学中心81から離れるほど、より画像中心に近づく方向に、光学歪みを補正する必要がある。
Here, the direction in which the amount of optical distortion is generated is displayed as shown in FIG. 5 (A), the barrel type is displayed so that the corners of the image are contracted, and the pincushion type is shown in FIG. 5 (B). In the case of the barrel type, it is generated in a direction approaching the center, and in the case of the pincushion type, it is generated in a direction away from the center. Therefore, in the case of the barrel type, in order to correct the optical distortion, it is necessary to correct the optical distortion in a direction further away from the
つまり、図6に示すように、たる型の場合には、光学中心81を含む短冊領域82よりX軸方向マイナス側に短冊領域82が位置するときには、光学歪みの補正方向は、各短冊領域82のX軸方向のマイナス側となり、光学中心81を含む位置に短冊領域82が位置するときには、光学歪みの補正性方向は、短冊領域82のX軸方向のプラス側とマイナス側となり、光学中心81を含む短冊領域82よりX軸方向プラス側に短冊領域82が位置するときには、光学歪みの補正方向は、短冊領域82のX軸方向のプラス側となる。
That is, as shown in FIG. 6, in the case of the barrel type, when the
また、糸巻き型の場合には、光学中心81を含む短冊領域82よりX軸方向マイナス側に短冊領域82が位置するときには、光学歪みの補正方向は、各短冊領域82のX軸方向プラス側となり、光学中心81を含む位置に短冊領域82が位置するときには、光学歪みの補正は必要なく、光学中心81を含む短冊領域82よりX軸方向プラス側に短冊領域82が位置するときには、光学歪みの補正方向は、各短冊領域82のX軸方向マイナス側となる。
In the case of the pincushion type, when the
すなわち、たる型においては、画像データ80の画像の、X軸方向の光学中心81よりマイナス側(反読出方向側)では、各短冊領域82の反読出方向側に、補正に必要な画素(以下、のりしろ87という)を含むように短冊領域82を設定する必要があり、画像データ80の画像のX軸方向の光学中心81よりプラス側(読み出し方向側)では、各短冊領域82の読出方向側にのりしろ87を含むように短冊領域82設定する必要がある。また、光学中心81を含む短冊領域82では、短冊領域82のX軸方向両端部にのりしろ87を含むように、短冊領域を設定する必要がある。
That is, in the barrel type, on the negative side (the anti-reading direction side) of the image of the
一方、糸巻き型においては、反対に、画像データ80の画像の、X軸方向の光学中心81よりマイナス側(反読出方向側)では、各短冊領域82の読出方向側にのりしろ87を含むように短冊領域82を設定する必要があり、光学中心81よりプラス側(読出方向側)では、各短冊領域82の反読出方向側にのりしろ87を含むように短冊領域82を設定する必要がある。
On the other hand, in the pincushion type, on the opposite side of the image of the
処理対象短冊・入力開始位置設定部56は、入力短冊処理制御部52によって、次に読み出す対象となる短冊領域82が、中心位置を含む短冊領域82の次の処理対象となる短冊領域82ではないときには、前回補正した短冊領域82のX軸方向下流側(プラス側)端部から画像データのX軸方向の最大光学歪み量に相当する画素数だけ、X軸方向マイナス側の位置が、次の補正対象となる82短冊領域の先頭画素の位置となるように、次の短冊領域82の入力開始位置を定める。また、処理対象短冊・入力開始位置設定部56は、入力短冊処理制御部52によって、次に読み出す対象となる短冊領域82が、中心位置を含む短冊領域82の次の処理対象となる短冊領域82であるときには、光学中心81を含む短冊領域82のX軸方向下流側端部から、光学中心81を含む短冊領域82内の画像データの、X軸方向の最大光学歪み量に相当する画素数だけX軸方向マイナス側の位置が、次の補正対象となる82短冊領域の先頭画素の位置となるように、次の短冊領域82の入力開始位置を定める。
In the processing target strip / input start
したがって、光学歪み補正処理時には、入力短冊処理制御部52によって、図7(A)に示すように、各短冊領域82は、重複領域87を有するように開始位置が定められ、図7(B)に示すように重複領域87を有するように各短冊領域82の画像データが入力短冊処理制御部52から演算処理部54へ転送され、演算処理部54で水平方向および垂直方向の光学歪みが補正されて、結果的には、図7(C)に示すように、転送された各短冊領域82から全てののりしろ87を除くとともに光学歪みが補正された画像データが、メインメモリ38に出力される。
Therefore, at the time of optical distortion correction processing, the input strip
次に、上記実施の形態に係るデジタルカメラ10の作用を説明する。
Next, the operation of the
図8には、CPU36で実行されるディストーション補正処理を示す処理ルーチンを示した。被写体を撮影することによりメインメモリ38へ画像データが記憶されると、ステップ100では、ROM40に記憶されている光学ユニット12の光学歪みの種類を読み取ることによって、光学ユニット12が「たる型」及び「糸巻き型」の何れの光学歪みを有するかを読み取る。
FIG. 8 shows a processing routine showing distortion correction processing executed by the
次のステップ102では、前回処理した短冊領域82から次の短冊領域82への移動量を算出するように移動量算出指示信号を処理対象短冊・入力開始位置設定部56へ出力する。処理対象短冊・入力開始位置設定部56は、移動量算出指示信号が入力されると、光学歪みの種類に応じて、撮影によって得られた画像データの画像の、X軸方向の最大光学歪み量を移動量として算出する。
In the
次のステップ104では、処理対象短冊・入力開始位置設定部56は、次の補正対象となる短冊領域82として、画像データの画像の、X軸方向端部の画素を先頭画素とするような短冊領域82の設定を指示する。ステップ104の処理によって、処理対象短冊・入力開始位置設定部56は、画像データ80の画像のX軸方向端部に位置する画素を先頭画素、すなわち入力開始位置とするように短冊領域82を設定する。
In the
次のステップ106では、入力短冊処理制御部52へ、処理対象短冊・入力開始位置設定部56によって設定された短冊領域82内の各小画素列84毎に、各画素の画素値を順次読み取って演算処理部54へ転送することによって、1短冊領域82分の画像データを転送するように、入力短冊処理制御部52へ転送指示信号を出力する。ステップ106の処理によって転送指示信号が入力されると、入力短冊処理制御部52は、処理対象短冊・入力開始位置設定部56によって設定された入力開始位置を先頭画素とする、短冊領域82内の各小画素列84毎に、各小画素列84の画素の画素値をX軸方向に読み取るとともに、読み取った各小画素列84の画素の画素値を各小画素列84分の画像データとして、順次各小画素列84毎に、演算処理部54へ転送する。演算処理部54へ転送された画像データは、ラインバッファ64に格納される。
In the
次のステップ108では、水平方向ディストーション補正部60へ、上記ステップ106の処理によってラインバッファ64に格納された1小画素列84分の画像データについて、水平方向の光学歪みの補正を指示する光学歪み補正指示信号を出力する。光学歪み補正指示信号が入力されると、水平方向ディストーション補正部60では、ラインバッファ64に格納されている1小画素列84分の画像データについて、水平方向の光学歪みを補正する。水平方向の光学歪みが補正された1小画素列84分の画像データは、ラインバッファ721〜723内の、1小画素列84分の画像データが未格納のラインバッファ721〜723に順次格納される。
In the
次のステップ110では、複数のラインバッファ721〜723の全てに、異なる小画素列84分の画像データが格納されると、垂直方向ディストーション補正部62へ、複数のラインバッファ721〜723に格納された異なる複数の小画素列84分の、水平方向の光学歪みが補正された画像データに基づいて、垂直方向の光学歪み補正を指示する光学歪み指示信号を出力する。光学歪み指示信号が入力されると、垂直方向ディストーション補正部62では、複数のラインバッファ721〜723に格納された異なる複数の小画素列84分の、水平方向の光学歪みが補正された画像データに基づいて、各画像データの垂直方向の光学歪みを補正する。
In the
次のステップ112では、出力短冊処理制御部58へ、水平方向及び垂直方向双方の光学歪みが補正された各小画素列84分の画像データをDMA転送するためのDMA転送指示信号を出力する。出力短冊処理制御部58は、DMA転送指示信号が入力されると、水平方向ディストーション補正部60によって水平方向の光学歪みが補正されると共に、垂直方向ディストーション補正部62によって垂直方向の光学歪みが補正された各小画素列84分の画像データを、光学歪みが補正された各小画素列84分の画像データとしてメインメモリ38へ転送する。
In the
次のステップ113では、短冊領域82内の、全ての小画素列84の読み出し及び光学歪み補正処理が終了したか否かを判別し、否定されると、上記ステップ106へ戻り、肯定されると、ステップ114へ進む。
In the
次のステップ114では、画像データ80の画像の、全ての光学歪み補正処理が終了したか否かを判別し、肯定されると、本ルーチンを終了し、否定されると、ステップ118へ進む。
In the
ステップ118では、次の処理対象となる短冊領域82は、光学中心81を含む短冊領域82の読み出し方向下流側に隣接する短冊領域82であるか否かを判別する。ステップ118の判断は、具体的には、前回処理した短冊領域82に光学中心81(座標(0.0))が含まれているか否かを判別することによって判断可能である。
In
ステップ118で否定され、次の処理対象短冊が、光学中心81を含む短冊領域82または光学中心81を含む短冊領域82よりX軸方向のマイナス側の短冊領域82である場合には、ステップ120へ進み、処理対象短冊・入力開始位置設定部56へ、前回処理した短冊領域82のX軸方向の読み出し方向上流側端部に位置する画素の位置から、上記ステップ102で算出した移動量だけX軸方向下流側に移動した位置を、次の処理対象となる短冊領域82の先頭画素の位置、すなわち次の短冊領域82の入力開始位置となるように設定指示信号を出力した後に、上記ステップ106へ戻る。ステップ106の処理によって、処理対象短冊・入力開始位置設定部56へ設定指示信号が入力されると、処理対象短冊・入力開始位置設定部56は、前回処理した短冊領域82の先頭画素の位置から、上記ステップ102の処理によって算出された移動量だけX軸方向に移動した位置に位置する画素が次の処理対象となる短冊領域82の先頭画素となるように、入力開始位置を設定する。
If the result in
一方、上記ステップ118で肯定されて、次の処理対象短冊領域82が、光学中心81を含む短冊領域82のX軸方向下流側に隣接する短冊領域82である場合には、ステップ122へ進み、処理対象短冊・入力開始位置設定部56へ、前回処理した光学中心81を含む短冊領域82のX軸方向下流側端部に位置する画素から、光学中心81を含む短冊領域82のX軸方向下流側ののりしろ87だけマイナス方向(反読出方向)へ移動した位置に位置する画素が、次の処理対象となる短冊領域82の先頭画素となるように、入力開始位置を設定した後に、上記ステップ106へ戻る。
On the other hand, if the result in
以上説明したように、短冊領域82をX軸方向に順次移動させて、各短冊領域82内の画像データの光学歪みを補正する光学歪み補正時において、補正対象となる前回補正した短冊領域82のX軸方向の先頭画素から次の短冊領域82のX軸方向の先頭画素への移動量を、光学系の中心に対応する画像の光学中心81を含む短冊領域82のX軸方向下流側に隣接する次に処理する短冊領域82の処理時にのみ変更し、次に補正する短冊領域82が光学中心81を含む短冊領域82のX軸方向に隣接する短冊領域82の場合には、移動量を、光学中心81を含む短冊領域82内の画像データのX軸方向の最大光学歪み量に相当する画素数所定方向上流側の位置、すなわち光学中心81を含む短冊領域82内ののりしろ87に相当する画素数だけX軸方向マイナス側に移動した位置を次の補正対象となる短冊領域82の所定方向の先頭画素の位置となるように変更することができるので、各短冊領域82の光学歪みの発生方向に応じた移動量を設定することができ、撮影によって得られた画像データの画像において、設定する短冊領域の数を、全ての短冊領域82の移動量を一定にする場合に比べて抑制することができるので、撮影によって画像データの画像から読み出す画素数を減少させることができ、効率よく光学歪み補正を行うことができる。
As described above, the
したがって、図9(A)に示すように、従来の短冊処理においては、すべての短冊処理の移動量を同一として処理していたが、本発明では、図9(B)に示すように、光学中心81を含む短冊領域82aの処理が終了すると、移動量を変更して、次に処理する短冊領域82a+1の入力開始位置を再設定し、光学中心81を含む短冊領域82aのX軸方向下流側ののりしろ87を差し引いた位置を入力開始位置として設定することができるので、補正のために読み出す短冊領域82の読み出し数を減らすことができるので、光学歪み補正処理における高速化を図ることができ、効率よくディスとーション処理を行うことができる。
Therefore, as shown in FIG. 9A, in the conventional strip processing, the amount of movement of all strip processing is the same, but in the present invention, as shown in FIG. When the processing of the
なお、上記図7の処理では、光学歪みの種類がたる型である場合を想定して説明したが、糸巻き型についても、同様の処理を行うことによって効率よくディストーション処理を行うことができる。 In the process of FIG. 7 described above, the case where the type of optical distortion is a barrel type has been described. However, the distortion process can be efficiently performed by performing the same process on the pincushion mold.
〔第2実施例〕
第1の実施例では、光学中心81を含む短冊領域82の次に処理する短冊領域82の移動量のみ、ほかの短冊領域82の移動量とは異なる値とする場合を説明したが、本実施の形態では、各短冊領域毎に前回処理した短冊領域からの移動量を算出する場合を説明する。
[Second Embodiment]
In the first embodiment, the case where only the movement amount of the
なお、本実施の形態の構成は、第一の実施の形態と同様の構成であるため、同一部分には同一符号を付与して詳細な説明を省略する。 In addition, since the structure of this Embodiment is a structure similar to 1st Embodiment, it attaches | subjects the same code | symbol to the same part, and abbreviate | omits detailed description.
図10に示すように、本実施の形態のディストーション補正部24は、第一の実施の形態の処理対象短冊・入力開始位置設定部56に変えて、次の処理対象となる短冊領域82を設定するとともに、設定した各処理短冊領域82毎に移動量を算出するための処理対象短冊・入力開始位置設定部57を含んで構成されている。
As shown in FIG. 10, the
メインメモリ38は、X軸方向への連続したアクセスは速いが、不連続なアドレスへのアクセスは遅いため、一般に、ディストーション補正部24によるメインメモリ38からの画像データの読み取りは、処理速度の高速化のためにX軸方向に並んだいくつかの画素データをまとめて行われている。
The
光学歪みは、光学中心からの距離によって歪み量が変化し、Y軸に近いほどX軸方向に対する歪み量は小さく、Y軸から離れるほど変位が大きくなる、このため、Y軸近辺であれば、1小画素列84内のどの部分でも補正に必要とされる補正画素数(以下、のりしろという)87は少なくてすむが、Y軸から離れるほど、のりしろ87量は増える。
The amount of optical distortion changes depending on the distance from the optical center. The closer to the Y axis, the smaller the amount of distortion in the X axis direction, and the greater the distance from the Y axis, the greater the displacement. The number of correction pixels (hereinafter referred to as margin) 87 required for correction in any portion in one
具体的には、図5に示すように、光学中心としての光学中心81からX軸方向の距離が大きくなるほど、光学歪み量は大きくなる。すなわち、複数の短冊領域82に区切って処理した場合に、光学中心81のX軸方向の距離が大きくなるほど、各短冊領域82内には、より多くののりしろ87領域を含む必要がある。なお、光学歪みがたる型の場合には、図5(A)に示すように、光学中心81を含む短冊領域82では、この短冊領域82のX軸方向両端側にのりしろ87領域が必要であるとともに、光学中心81からの距離が大きくなり、光学ひずみ量が大きくなるほど、短冊領域82に含まれるのりしろ87は大きくなる。光学歪みが糸巻き型の場合には、図5(B)に示すように、光学中心81を含む短冊領域82では、のりしろ87領域を必要とせず、光学歪み量が大きくなるほど、短冊領域82の光学中心81に近い方向に多量ののりしろ87領域が必要となる。
Specifically, as shown in FIG. 5, the amount of optical distortion increases as the distance in the X-axis direction from the
したがって、処理対象短冊・入力開始位置設定部56は、光学歪みの補正前の画像の、座標(X、Y)近傍のX軸方向及びY軸方向に隣接する画素の画素値から、最近傍補間法や線形補間法などを用いて補間することによって、画素値を求める必要があるので、次の短冊領域82を設定するときには、歪み量が大きくなるほど多くののりしろ87が必要となることから、前回処理した短冊領域82と重複するX軸方向の領域がより大きくなるように、次の処理対象となる短冊領域82の開始位置を定める。逆に、歪み量が小さくなるほど、必要なX軸方向ののりしろ87量は少なくなるので、前回処理した短冊領域82と重複する領域がより小さくなるように、次の処理対象となる短冊領域82の開始位置を定める。すなわち、処理対象短冊・入力開始位置設定部56は、前回処理した短冊領域82から次の短冊処理の対象となる短冊領域82への移動量を、光学中心81を含む短冊領域に近くなるほど光学歪み量が小さくなるので大きく設定し、光学中心81を含む短冊領域からの距離が大きくなるほど光学歪み量が大きくなるので、より重複領域が大きくなるように移動量を小さく設定可能に構成されている。
Therefore, the processing target strip / input start
次に、上記実施の形態に係るデジタルカメラ10の作用を説明する。なお、第一の実施の形態と同様の処理には同一番号を付与する。
Next, the operation of the
図11には、ステップ100では、ROM40に記憶されている光学ユニット12の光学歪みの種類を読み取ることによって、光学ユニット12が「たる型」及び「糸巻き型」の何れの光学歪みを有するかを読み取る。
In FIG. 11, in
次のステップ104では、処理対象短冊・入力開始位置設定部56は、次の補正対象となる短冊領域82として、画像データの画像の、X軸方向端部の画素を先頭画素とするような短冊領域82の設定を指示する。ステップ104の処理によって、処理対象短冊・入力開始位置設定部56は、画像データ80の画像のX軸方向端部に位置する画素を先頭画素、すなわち入力開始位置とするように短冊領域82を設定する。
In the
次のステップ106では、入力短冊処理制御部52へ、処理対象短冊・入力開始位置設定部56によって設定された短冊領域82内の各小画素列84毎に、各画素の画素値を順次読み取って演算処理部54へ転送することによって、1短冊領域82分の画像データを転送するように、入力短冊処理制御部52へ転送指示信号を出力する。ステップ106の処理によって転送指示信号が入力されると、入力短冊処理制御部52は、処理対象短冊・入力開始位置設定部56によって設定された入力開始位置を先頭画素とする、短冊領域82内の各小画素列84毎に、各小画素列84の画素の画素値をX軸方向に読み取るとともに、読み取った各小画素列84の画素の画素値を各小画素列84分の画像データとして、順次各小画素列84毎に、演算処理部54へ転送する。演算処理部54へ転送された画像データは、ラインバッファ64に格納される。
In the
次のステップ108では、水平方向ディストーション補正部60へ、上記ステップ106の処理によってラインバッファ64に格納された1小画素列84分の画像データについて、水平方向の光学歪みの補正を指示する光学歪み補正指示信号を出力する。光学歪み補正指示信号が入力されると、水平方向ディストーション補正部60では、ラインバッファ64に格納されている1小画素列84分の画像データについて、水平方向の光学歪みを補正する。水平方向の光学歪みが補正された1小画素列84分の画像データは、ラインバッファ721〜723内の、1小画素列84分の画像データが未格納のラインバッファ721〜723に順次格納される。
In the
次のステップ110では、複数のラインバッファ721〜723の全てに、異なる小画素列84分の画像データが格納されると、垂直方向ディストーション補正部62へ、複数のラインバッファ721〜723に格納された異なる複数の小画素列84分の、水平方向の光学歪みが補正された画像データに基づいて、垂直方向の光学歪み補正を指示する光学歪み指示信号を出力する。光学歪み指示信号が入力されると、垂直方向ディストーション補正部62では、複数のラインバッファ721〜723に格納された異なる複数の小画素列84分の、水平方向の光学歪みが補正された画像データに基づいて、各画像データの垂直方向の光学歪みを補正する。
In the
次のステップ112では、出力短冊処理制御部58へ、水平方向及び垂直方向双方の光学歪みが補正された各小画素列84分の画像データをDMA転送するためのDMA転送指示信号を出力する。出力短冊処理制御部58は、DMA転送指示信号が入力されると、水平方向ディストーション補正部60によって水平方向の光学歪みが補正されると共に、垂直方向ディストーション補正部62によって垂直方向の光学歪みが補正された各小画素列84分の画像データを、光学歪みが補正された各小画素列84分の画像データとしてメインメモリ38へ転送する。
In the
次のステップ113では、短冊領域82内の全ての小画素列84の読み出し及び光学歪み補正処理が終了したか否かを判別し、否定されると、上記ステップ106へ戻り、肯定されると、ステップ114へ進む。
In the
次のステップ114では、画像データ80の画像の全ての光学歪み補正処理が終了したか否かを判別し、肯定されると、本ルーチンを終了し、否定されると、ステップ200へ進む。
In the
ステップ200では、前回読み出した短冊領域82の読出方向(X軸方向)下流側(プラス側)端部からX軸方向ののりしろ87分反読出方向(マイナス側)へ移動した位置が、次の短冊領域82の先頭画素(次に処理する短冊領域82の入力開始位置)となるように、移動量を算出する。
In
次のステップ202では、処理対象短冊・入力開始位置設定部56へ、前回処理した短冊領域82のX軸方向の読み出し方向上流側端部に位置する画素の位置から、上記ステップ200で算出した移動量だけX軸方向下流側に移動した位置を、次の処理対象となる短冊領域82の先頭画素の位置となるように設定指示信号を出力した後に、上記ステップ106へ戻る。処理対象短冊・入力開始位置設定部56は、設定指示信号が入力されると、前回処理した短冊領域82の先頭画素の位置から、算出された移動量だけX軸方向に移動した位置に位置する画素が次の処理対象となる短冊領域82の先頭画素となるように、入力開始位置を設定した後に、上記ステップ106へ戻る。
In the
ステップ202の処理によって、短冊領域82内のX軸方向の最大歪み量が小さくなるほど、前回処理した短冊領域82の先頭画素から次の短冊領域82の先頭画素までの移動量が大きくなるような移動量を定めることができる。
As the maximum distortion amount in the X-axis direction in the
以上説明したように、本実施の形態では、各短冊領域82毎のX軸方向の最大光学歪み量に基づいて、次に処理する短冊領域82への移動量を算出することができるので、撮影によって得られた画像データの画像に設定する短冊領域82の数を、第1の実施の形態の光学歪み補正方法に比べて更に少なくすることができるので、メインメモリ38に記憶された画像データから読み出す画素数をさらに減少させることができ、効率よく光学歪み補正を行うことができる。
As described above, in the present embodiment, the movement amount to the
すなわち、図12(A)に示すように、従来の短冊処理においては、すべての短冊処理の移動量を同一として処理していたが、本発明では、図12(B)に示すように、各短冊領域82ごとに短冊領域内の画像データの画像の所定方向の最大歪み量が小さくなるほど、移動量が大きくなるように、移動量を定めることができるので、補正のために読み出す短冊領域82の数をさらに減らすことができるので、光学歪み補正処理における高速化を図ることができ、効率よく光学歪み補正処理を行うことができる。
That is, as shown in FIG. 12 (A), in the conventional strip processing, the amount of movement of all the strip processing is the same, but in the present invention, as shown in FIG. Since the amount of movement can be determined so that the amount of movement increases as the maximum distortion amount in the predetermined direction of the image data of the image data in the strip area decreases for each
なお、上記図7の処理フローでは、たる型の場合を説明したが、糸巻き型についても、同様の処理を行うことによって効率良く光学歪み補正処理を行うことができる。 In the processing flow of FIG. 7 described above, the case of the barrel mold has been described. However, the optical distortion correction process can be efficiently performed by performing the same process for the pincushion mold.
なお、光学歪み量は、光学中心81からの距離に応じて定まるので、各短冊領域82には、光学中心81を含む短冊領域82を中心としてX軸方向に左右対称となるように同一の光学歪み量を有する一対の短冊領域82が存在する。すなわち、光学中心81を含む短冊領域82を中心として、X軸方向マイナス側の短冊領域82各々ののりしろ87領域と同一ののりしろ87領域を含む短冊領域82が、X軸方向プラス側にも存在する。
Since the amount of optical distortion is determined according to the distance from the
したがって、上記実施の形態では、各短冊領域82毎に移動量を算出したが、光学中心81を含む短冊領域82よりX軸方向マイナス側に位置する短冊領域82各々に対応する算出した移動量をCPU36の図示を省略したメモリに記憶するようにし、対応する光学歪み量を有する短冊領域82各々の移動量算出は、図示を省略したメモリに記憶された対応する光学歪み量を有する短冊領域82の移動量を用いるようにすれば、さらに光学歪み補正処理を高速に行うことができる。
Therefore, in the above embodiment, the movement amount is calculated for each
12 光学ユニット
24 ディストーション補正部
38 メインメモリ
52 入力短冊処理制御部
54 演算処理部
56 処理対象短冊・入力開始位置設定部
57 処理対象短冊・入力開始位置設定部
DESCRIPTION OF
Claims (5)
前記記憶手段に記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正する補正手段と、 From the image data stored in the storage means, the pixel at the upstream end in the predetermined direction of the pixel row is the first pixel and intersects the predetermined direction in the previous period so that the predetermined direction has a predetermined number of pixels. The strip area is set in the direction to be moved, and the number of pixels corresponding to the input movement amount is sequentially moved in the predetermined direction so that the pixel value of each pixel in each strip area is set in each strip area. Correction means for reading out each pixel column in the predetermined direction and correcting optical distortion of the read image data;
前記補正手段によって前回処理した短冊領域内の画像データの前記所定方向の最大光学歪み量に基づいて、該最大光学歪み量が大きくなるほど小さくなるように前記移動量を各短冊領域毎に算出し、算出した移動量を前記補正手段へ入力する短冊移動量毎移動量算出手段と、 Based on the maximum optical distortion amount in the predetermined direction of the image data in the strip area previously processed by the correction means, the movement amount is calculated for each strip area so as to decrease as the maximum optical distortion amount increases. A movement amount calculation means for each strip movement amount that inputs the calculated movement amount to the correction means;
を含む光学歪み補正装置。 An optical distortion correction apparatus including:
前記記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正し、 From the stored image data, a pixel in a direction intersecting with the predetermined direction in the previous period such that the pixel at the upstream end in the predetermined direction of the pixel row is the first pixel and the width in the predetermined direction is a predetermined number of pixels. The strip area is set and the number of pixels corresponding to the input movement amount is sequentially moved in the predetermined direction so that the pixel value of each pixel in each strip area is changed to each pixel row in each strip area. Read in the predetermined direction every time, correct the optical distortion of the read image data,
前回補正した短冊領域内の画像データの前記所定方向の最大光学歪み量に基づいて、該最大光学歪み量が大きくなるほど小さくなるように前記移動量を各短冊領域毎に算出し、算出した移動量を前記補正手段へ入力する短冊移動量毎移動量算出する、 Based on the maximum optical distortion amount in the predetermined direction of the image data in the strip area corrected last time, the movement amount is calculated for each strip area so as to decrease as the maximum optical distortion amount increases, and the calculated movement amount Calculating the movement amount for each strip movement amount input to the correction means,
光学歪み補正方法。 Optical distortion correction method.
前記記憶手段に記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正する補正手段と、 From the image data stored in the storage means, the pixel at the upstream end in the predetermined direction of the pixel row is the first pixel and intersects the predetermined direction in the previous period so that the predetermined direction has a predetermined number of pixels. The strip area is set in the direction to be moved, and the number of pixels corresponding to the input movement amount is sequentially moved in the predetermined direction so that the pixel value of each pixel in each strip area is set in each strip area. Correction means for reading out each pixel column in the predetermined direction and correcting optical distortion of the read image data;
前記補正手段によって前回処理した短冊領域内の画像データの前記所定方向の最大光学歪み量に基づいて、該最大光学歪み量が大きくなるほど小さくなるように前記移動量を各短冊領域毎に算出し、算出した移動量を前記補正手段へ入力する短冊移動量毎移動量算出手段と、 Based on the maximum optical distortion amount in the predetermined direction of the image data in the strip area previously processed by the correction means, the movement amount is calculated for each strip area so as to decrease as the maximum optical distortion amount increases. A movement amount calculation means for each strip movement amount that inputs the calculated movement amount to the correction means;
を含む撮像装置。 An imaging apparatus including:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004358795A JP4279775B2 (en) | 2004-12-10 | 2004-12-10 | Optical distortion correction apparatus, optical distortion correction method, and imaging apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004358795A JP4279775B2 (en) | 2004-12-10 | 2004-12-10 | Optical distortion correction apparatus, optical distortion correction method, and imaging apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2006164187A JP2006164187A (en) | 2006-06-22 |
JP4279775B2 true JP4279775B2 (en) | 2009-06-17 |
Family
ID=36666104
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004358795A Expired - Fee Related JP4279775B2 (en) | 2004-12-10 | 2004-12-10 | Optical distortion correction apparatus, optical distortion correction method, and imaging apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4279775B2 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5231322B2 (en) * | 2009-05-08 | 2013-07-10 | オリンパス株式会社 | Image processing apparatus and imaging apparatus |
JP6136190B2 (en) * | 2012-10-23 | 2017-05-31 | 株式会社ソシオネクスト | Image processing apparatus and imaging apparatus |
JP6845173B2 (en) * | 2018-03-15 | 2021-03-17 | 株式会社東芝 | Image processing device and image processing method |
-
2004
- 2004-12-10 JP JP2004358795A patent/JP4279775B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2006164187A (en) | 2006-06-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7301565B2 (en) | Correction method, correction device and photographing device | |
US5905530A (en) | Image pickup apparatus | |
JP4781229B2 (en) | Distortion correction apparatus, imaging apparatus, and control method for distortion correction apparatus | |
US8335398B2 (en) | Zoom lens distortion correcting apparatus | |
JP2004336106A (en) | Image processing apparatus, image processing method, and imaging apparatus | |
JPWO2008139577A1 (en) | Image processing apparatus, imaging apparatus, and image distortion correction method | |
US7499082B2 (en) | Distortion correction circuit for generating distortion-corrected image using data for uncorrected image | |
JP2006270918A (en) | Image correction method, photographing apparatus, image correction apparatus, program and recording medium | |
JP4124096B2 (en) | Image processing method, image processing apparatus, and program | |
JP2013218654A (en) | Image processing device | |
JP4402230B2 (en) | Image processing device | |
JP4028306B2 (en) | Digital imaging device | |
JP5154361B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
JP2000069343A (en) | Digital image pickup device | |
JPH11252431A (en) | Digital image-pickup device provided with distortion correction function | |
JP2005286621A (en) | Exposure device | |
JPH11250239A (en) | Digital image pickup device for operating distortion correction by yuv data | |
JPH11275391A (en) | Digital image pickup device for selecting distortion correction | |
JPH11250238A (en) | Digital image pickup device for operating distortion correction by block unit | |
JP4279775B2 (en) | Optical distortion correction apparatus, optical distortion correction method, and imaging apparatus | |
JPH11250240A (en) | Digital image pickup device for operating distortion correction by yuv data | |
JP5676233B2 (en) | Image processing apparatus, image processing method, and imaging apparatus | |
JP2006139350A (en) | Apparatus and method for correcting optical distortion, and image pickup device | |
JP4983541B2 (en) | Program, image processing apparatus and camera | |
JP2007180898A (en) | Image processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20070221 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070302 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081201 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081224 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090217 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20090310 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20090312 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120319 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4279775 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120319 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130319 Year of fee payment: 4 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130319 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140319 Year of fee payment: 5 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |