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 PDF

Info

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
Application number
JP2004358795A
Other languages
Japanese (ja)
Other versions
JP2006164187A (en
Inventor
健太 角光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2004358795A priority Critical patent/JP4279775B2/en
Publication of JP2006164187A publication Critical patent/JP2006164187A/en
Application granted granted Critical
Publication of JP4279775B2 publication Critical patent/JP4279775B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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 Patent Document 1, a subject image is displayed by arranging a plurality of pixels arranged in a horizontal direction in a plurality of pixels arranged in a horizontal direction. The image data to be stored is stored, and the image of the stored image data is divided into a plurality of strip regions in the vertical direction so that the horizontal width becomes a predetermined number of processing pixels. For each pixel column in the region, for each pixel column in the vertical direction in each strip region, the pixel value of each pixel from the pixel located at the head is stored for each pixel column in the predetermined direction in each strip region A technique is known that corrects optical distortion in both the horizontal direction and the vertical direction based on the pixel values of the pixels in each pixel column read out from the pixel. When all the pixel columns included in the first strip area have been read, each pixel column in the next strip area is read out. At this time, at the top in the horizontal direction of each pixel column in the previously processed strip area. The position moved in the horizontal direction by a predetermined number of pixels from the positioned pixel is set at the top in the horizontal direction of the next strip area, and the pixels in each pixel column in the next strip process are read out. Optical distortion correction corresponds to the coordinates (x, y) of the image data when there is no optical distortion (after correcting the optical distortion) where the horizontal direction is the X-axis direction and the vertical direction is the Y-axis direction. The coordinates (X, Y) of the image data before the optical distortion correction is obtained, and the pixel value of the pixel of the image data before the optical distortion correction corresponding to the obtained coordinates (X, Y) is optically calculated. This is done by setting the pixel value of the pixel at the coordinates (x, y) of the image after distortion is corrected. At this time, there is often no pixel corresponding to the image coordinates (X, Y) of the image data having optical distortion, and in fact, X near the coordinates (X, Y) of the image before correction of the optical distortion. The pixel value is obtained by interpolating the pixel values of the pixels adjacent in the axial direction and the Y-axis direction using the nearest neighbor interpolation method, the linear interpolation method, or the like.

このように、光学歪みの補正を行うためには、光学歪みの補正前の画像の座標(X、Y)近傍のX軸方向及びY軸方向に隣接する画素の画素値から最近傍補間法や線形補間法などを用いて補間することによって、光学歪み補正後の画像の座標(x,y)の画素値を求める必要があるので、1つの短冊処理内の画像データの光学歪み補正処理が終了して次の短冊処理の画像データの光学歪みの補正を行うときには、前回補正した短冊領域と、次に補正する短冊領域との間には、補正に必要な画素数分重なる領域を設けるように次の短冊領域を定めている。従来の技術では、前回処理した短冊領域の先頭画素から次の短冊領域の先頭画素への移動量を、一定とし、補正に必要な画素数として、画像データの所定方向の最大光学歪み量だけ各短冊領域が重なるように設定されるように、各短冊領域の先頭画素間の距離(移動量)として最小光学歪み量に相当するような少ない画素数を定めていた。
特開2003―333588号公報
As described above, in order to correct the optical distortion, the nearest neighbor interpolation method or the like based on the pixel values of the pixels adjacent to the X-axis direction and the Y-axis direction in the vicinity of the coordinates (X, Y) of the image before the optical distortion correction, Since it is necessary to obtain the pixel value of the coordinate (x, y) of the image after optical distortion correction by interpolating using a linear interpolation method or the like, the optical distortion correction processing of the image data in one strip process is completed. Then, when correcting the optical distortion of the image data of the next strip processing, an area overlapping the number of pixels necessary for correction is provided between the strip area corrected last time and the strip area to be corrected next. The following strip area is defined. In the conventional technique, the amount of movement from the first pixel of the strip area processed last time to the first pixel of the next strip area is constant, and the number of pixels necessary for correction is the same as the maximum optical distortion amount in the predetermined direction of the image data. A small number of pixels corresponding to the minimum optical distortion amount is determined as a distance (amount of movement) between the leading pixels of each strip region so that the strip regions are set to overlap.
JP 2003-333588 A

しかしながら、所定方向の光学歪み量が多いほどより所定方向に離れた位置の光学歪み補正前の画像の座標から、該座標に位置する画素の画素値を補正後の画像の座標の画素の画素値とするので、所定方向の光学歪み量が多い短冊領域では、前回補正処理した短冊領域に重複する領域を光学歪み量が少ない短冊領域に比べて多く必要とするが、所定方向の光学歪み量が少ない短冊領域では、光学歪み量が多い短冊領域に比べてより所定方向に近い位置の光学歪み補正前の画像の座標から、該座標に位置する画素の画素値を補正後の画像の座標の画素の画素値とするので、前回補正処理した短冊領域に重複する領域を多く必要としない。しかしながら、従来技術では、所定方向の光学歪み量に依存せず、画像上のどの位置の短冊領域においても、短冊領域間の所定方向の移動量を一定の値としているので、光学歪み量が少ない画像上の位置を含む短冊領域においても光学歪み量の大きい画像上の位置を含む短冊領域と同じ移動量で移動すると、より不要に重なる領域が多くなり、画像データの画像により多くの短冊領域を設定する必要があるので、画像データの高画素化が進むほど、光学歪み補正処理の処理速度の低下が発生する問題があった。   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 digital camera 10 according to the present embodiment includes an optical unit 12 for forming a subject image, and a subject obtained by the optical unit 12 disposed behind the optical axis of the optical unit 12. CCD (Charge Coupled Device) 14 for converting the reflected light into analog image data indicating a photographed image and outputting it.

光学ユニット12は、光学歪みを有する光学ユニット12であって、図示を省略するズームレンズ群、フォーカスレンズ、こられのズームレンズ群及びフォーカスレンズ各々を光軸方向に移動させるレンズ移動機構を含んで構成され、焦点距離の変更(変倍)が可能なズームレンズとして構成されている。光学ユニット12は、A/F制御回路32と接続されており、A/F制御回路32の制御により所望のズーム倍率になるようにズームレンズ群が光軸方向に移動され、光学ユニット12を通過した被写体像を示す入射光がCCD14の受光面上に結像するようにフォーカスレンズが光軸方向に移動可能に構成されている。   The optical unit 12 is an optical unit 12 having optical distortion, and includes a zoom lens group, a focus lens (not shown), and a lens moving mechanism that moves each of the zoom lens group and the focus lens in the optical axis direction. It is configured as a zoom lens capable of changing the focal length (magnification). The optical unit 12 is connected to the A / F control circuit 32, and the zoom lens group is moved in the optical axis direction so as to obtain a desired zoom magnification under the control of the A / F control circuit 32, and passes through the optical unit 12. The focus lens is configured to be movable in the optical axis direction so that incident light indicating the subject image formed is formed on the light receiving surface of the CCD 14.

また、デジタルカメラ10は、CCD14から出力された被写体像を示すアナログ画像データをデジタル画像データ(以下、画像データという)に変換して出力するためのA/D変換器16と、A/D変換器16から入力された画像データに対して、ホワイトバランス調整、ガンマ補正、シャープネス補正等の各種補正処理、及びRGBデータをYC信号に変換するYC変換処理等の所定のデジタル信号処理を施すための信号処理プロセッサ22と、信号処理プロセッサ22によって信号処理された画像データを格納するためのメインメモリ38と、を備えている。メインメモリ38には、例えばSRAMやSDRAMといった大容量のメモリを一般に用いることができる。   The digital camera 10 also includes an A / D converter 16 for converting analog image data indicating the subject image output from the CCD 14 into digital image data (hereinafter referred to as image data), and A / D conversion. For performing various digital signal processing such as white balance adjustment, gamma correction, sharpness correction, and YC conversion processing for converting RGB data into YC signals. A signal processor 22 and a main memory 38 for storing image data signal-processed by the signal processor 22 are provided. For the main memory 38, a large-capacity memory such as SRAM or SDRAM can be generally used.

また、デジタルカメラ10は、光学歪みを有する光学ユニット12を介して被写体を撮影することにより得られた画像データの画像の光学歪みを補正するためのディストーション補正部24(詳細後述)と、各種情報や画像データの画像を表示するためのLCD18の表示制御を行うためのLCD制御部26と、スマートメディア、及びICカード等の光学歪みが補正された画像データを記憶するための外部記録メディア28に対する各種情報の読み書きを制御するためのメディア制御部30と、撮影を指示するときにユーザによって押圧操作されるレリーズボタンや電源スイッチ等の操作手段20に接続されたI/F(インタフェース)部34と、デジタルカメラ10の全体の制御を司るCPU36と、各種プログラム及び後述する処理ルーチン(図7参照)等を予め記憶したROM40と、を備えている。   In addition, the digital camera 10 includes a distortion correction unit 24 (details will be described later) for correcting optical distortion of an image of image data obtained by photographing a subject through an optical unit 12 having optical distortion, and various information. And an LCD control unit 26 for performing display control of the LCD 18 for displaying an image of image data, and an external recording medium 28 for storing optical media such as smart media and IC cards in which optical distortion is corrected. A media control unit 30 for controlling reading and writing of various information; an I / F (interface) unit 34 connected to an operation means 20 such as a release button or a power switch that is pressed by a user when instructing shooting; The CPU 36 that controls the entire digital camera 10, various programs, and processing routines to be described later Chin includes a ROM40 which previously stores (see FIG. 7) or the like, the.

上記信号処理プロセッサ22、ディストーション補正部24、LCD制御部26、メディア制御部30、A/F制御回路32、I/F部34、CPU36、メインメモリ38、及びROM40は、データバス等のバス42を介して各種データや信号の授受可能に接続されている。   The signal processor 22, the distortion correction unit 24, the LCD control unit 26, the media control unit 30, the A / F control circuit 32, the I / F unit 34, the CPU 36, the main memory 38, and the ROM 40 are a bus 42 such as a data bus. It is connected so that various data and signals can be exchanged via the network.

図2に示すように、ディストーション補正部24は、メインメモリ38に格納されている画像データを読み出し、演算処理部54へDMA(Direct Memory Access)転送するための入力短冊処理制御部52と、入力短冊処理制御部52から転送された画像データについて画像の光学歪みを補正するための演算処理部54と、演算処理部54によって光学歪みが補正された補正後の画像データをメインメモリ38へ転送するための出力短冊処理制御部58と、を含んで構成されている。   As shown in FIG. 2, the distortion correction unit 24 reads the image data stored in the main memory 38, and inputs an input strip processing control unit 52 for DMA (Direct Memory Access) transfer to the arithmetic processing unit 54. An arithmetic processing unit 54 for correcting the optical distortion of the image with respect to the image data transferred from the strip processing control unit 52, and the corrected image data whose optical distortion has been corrected by the arithmetic processing unit 54 are transferred to the main memory 38. And an output strip processing control unit 58.

画像データは、複数の画素が所定方向としての水平方向(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 processing control unit 52 converts a pixel row stored in the main memory 38 in a horizontal direction (X-axis direction) into a vertical direction (Y-axis direction). The image data 80 capable of displaying an image showing a subject image obtained by photographing in a plurality of strips is divided into strips so that the width in the X-axis direction is the number of processing pixels of a predetermined processing unit. The arithmetic processing unit 24 divides the region 82 into each pixel region 82 for each pixel region 82 (hereinafter, referred to as a “small pixel column” in order to distinguish it from one pixel column in the entire image). DMA transfer to At the time of transfer, the input strip processing control unit 52 sequentially reads out the pixel value of each pixel by scanning the pixel value of each pixel in the image data for one small pixel column 84 in the horizontal direction (X-axis direction). The input strip processing control unit 52 sets a strip region 82 to be processed next, and a processing target strip / input start position for setting the position of the strip region 82 to be processed next in the X-axis direction. A setting unit 56 is connected. The input strip processing control unit 52 sequentially moves the strip region 82 to be processed in the X-axis direction, sequentially reads image data for a plurality of small pixel columns 84 in the next strip region 82, and When the transfer of the image data of each small pixel row 84 in the strip area 82 is completed, information indicating the input start position of the strip area 82 to be processed next set by the processing target strip / input start position setting unit 56 is displayed. Based on the information indicating the input start position instructed in the X-axis direction, the position moved in the X direction by the number of pixels is set to be the position of the first pixel in the next strip area 82. The process of sequentially reading the image data of each small pixel column 84 in the next strip area 82 is repeatedly executed. In this way, the input strip processing control unit 52 reads out each pixel value for each small pixel column 84 of each set strip region 82, whereby one end of the image of the image data 80 (the pixel 83 located at the image start point). ) To the other end (pixel 85 located at the end point of the image) facing each other.

演算処理部54は、入力短冊処理制御部52から転送された1小画素列84分の画像データを格納するためのラインバッファ64を備え、ラインバッファ64に格納された1小画素列84分の画像データについて、水平方向の光学歪み補正を行うための水平方向ディストーション補正部60と、水平方向の光学歪みが補正された各小画素列84の画像データを、各小画素列84毎に各々格納するためのラインバッファ721〜723と、ラインバッファ721〜723各々に格納された複数の水平方向の光学歪み補正済みの小画素列84の画像データに基づいて、垂直方向の光学歪み補正を行うための垂直方向ディストーション補正部62と、を含んで構成されている。 The arithmetic processing unit 54 includes a line buffer 64 for storing the image data for one small pixel column 84 transferred from the input strip processing control unit 52, and the one small pixel column 84 stored in the line buffer 64. For the image data, a horizontal distortion correction unit 60 for correcting the optical distortion in the horizontal direction and the image data of each small pixel column 84 in which the horizontal optical distortion is corrected are stored for each small pixel column 84. Optical buffers in the vertical direction based on the image data of the line buffers 72 1 to 72 3 and the plurality of small pixel rows 84 that have been corrected in the horizontal direction and stored in the line buffers 72 1 to 72 3. And a vertical distortion correction unit 62 for performing correction.

なお、本実施の形態では、垂直方向ディストーション補正部62には、説明を簡略化するために3個のラインバッファ721〜723が設けられているが、複数のラインバッファが設けられれば良く、3個に限られるものではない。 In the present embodiment, the vertical distortion correction unit 62 is provided with three line buffers 72 1 to 72 3 for the sake of simplification of description. However, a plurality of line buffers may be provided. The number is not limited to three.

なお、上記各ラインバッファ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 small pixel column 84. .

ここで、光学歪みとしては、図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 optical unit 12 determines which optical distortion is “pincushion type” or “barrel type”, and the optical unit 12 of the present embodiment has an aberration that causes optical distortion of the “barrel type”. Therefore, information indicating the barrel type is stored in the ROM 40 in advance.

光学歪みの光学歪み量は、各画素の画像中心からの距離に対する多次関数で近似表現することができる。例えば、光学中心からの距離を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+y21/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 distortion correction unit 60 is based on the above formulas (1) and (2), and is included in the small pixel row 84 to be corrected in the image after optical distortion correction in the horizontal direction and the vertical direction. A coordinate (X, y) (hereinafter referred to as a pre-correction coordinate) of the image before optical distortion correction in the horizontal direction corresponding to the coordinate (x, y) is obtained. Next, the horizontal distortion correction unit 60 obtains the pixel value (pixel data) of the pixel corresponding to the pre-correction coordinates (X, y) from the image data of the small pixel row 84 transferred to the line buffer 70, and By using the obtained pixel value as a pixel value in which only the horizontal optical distortion of the coordinates (x, y) in the corrected image is corrected, the horizontal optical distortion is corrected.

垂直方向ディストーション補正部62は、上記式(1)及び式(2)に基づいて、水平方向及び垂直方向のディストーション補正後の画像における座標(x,y)に対応する、垂直方向の、光学歪み補正前の画像の補正前座標(x,Y)を求める。次に、垂直方向ディストーション補正部62は、この補正前座標(x,Y)に対応する画素値を、ラインバッファ721〜723各々に転送された水平方向の光学歪みが補正されている複数の小画素列84の画像データから求めて、求めた画素値を補正後の画像における座標(x,y)の画素値とすることで垂直方向のディストーションを補正する。 The vertical distortion correction unit 62 calculates the optical distortion in the vertical direction corresponding to the coordinates (x, y) in the image after the distortion correction in the horizontal direction and the vertical direction based on the expressions (1) and (2). The coordinates before correction (x, Y) of the image before correction are obtained. Next, the vertical distortion correction unit 62 corrects the horizontal optical distortion in which the pixel values corresponding to the coordinates (x, Y) before correction are transferred to the respective line buffers 72 1 to 72 3 . Is obtained from the image data of the small pixel column 84, and the obtained pixel value is used as the pixel value of the coordinate (x, y) in the corrected image, thereby correcting the distortion in the vertical direction.

上記水平方向ディストーション補正部60及び垂直方向ディストーション補正部62によって、小画素列84の、画像データの水平方向及び垂直方向の光学歪みが補正される。   The horizontal distortion correction unit 60 and the vertical distortion correction unit 62 correct the horizontal and vertical optical distortions of the image data in the small pixel array 84.

なお、通常、上記式(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 optical center 81 as the distance from the optical center 81 increases. As the distance from the center 81 increases, the optical distortion needs to be corrected in a direction closer to the image center.

つまり、図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 strip region 82 is positioned on the minus side in the X-axis direction from the strip region 82 including the optical center 81, the optical distortion correction direction is the strip region 82. When the strip region 82 is located at a position including the optical center 81 on the negative side of the X-axis direction, the optical distortion correction direction is on the positive side and the negative side of the strip region 82 in the X-axis direction. When the strip region 82 is positioned on the plus side in the X-axis direction from the strip region 82 including, the optical distortion correction direction is the plus side of the strip region 82 in the X-axis direction.

また、糸巻き型の場合には、光学中心81を含む短冊領域82よりX軸方向マイナス側に短冊領域82が位置するときには、光学歪みの補正方向は、各短冊領域82のX軸方向プラス側となり、光学中心81を含む位置に短冊領域82が位置するときには、光学歪みの補正は必要なく、光学中心81を含む短冊領域82よりX軸方向プラス側に短冊領域82が位置するときには、光学歪みの補正方向は、各短冊領域82のX軸方向マイナス側となる。   In the case of the pincushion type, when the strip region 82 is positioned on the minus side in the X-axis direction from the strip region 82 including the optical center 81, the optical distortion correction direction is on the plus side in the X-axis direction of each strip region 82. When the strip region 82 is located at a position including the optical center 81, optical distortion correction is not necessary. When the strip region 82 is positioned on the plus side in the X-axis direction from the strip region 82 including the optical center 81, the optical distortion is not corrected. The correction direction is the negative side of each strip region 82 in the X-axis direction.

すなわち、たる型においては、画像データ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 image data 80 from the optical center 81 in the X-axis direction, the pixels (hereinafter referred to as correction pixels) that are necessary for correction are located on the anti-reading direction side of each strip region 82. The strip area 82 needs to be set so as to include the margin 87), and on the plus side (reading direction side) of the optical center 81 in the X-axis direction of the image of the image data 80, the reading direction side of each strip area 82 is required. It is necessary to set the strip area 82 so as to include the margin 87. Further, in the strip region 82 including the optical center 81, it is necessary to set the strip region so as to include the margin 87 at both ends in the X-axis direction of the strip region 82.

一方、糸巻き型においては、反対に、画像データ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 image data 80 from the optical center 81 in the X-axis direction (on the side opposite to the reading direction), a margin 87 is included on the reading direction side of each strip region 82. The strip area 82 needs to be set, and on the plus side (reading direction side) from the optical center 81, the strip area 82 needs to be set so as to include the margin 87 on the side opposite to the reading direction of each strip area 82.

処理対象短冊・入力開始位置設定部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 position setting unit 56, the strip region 82 to be read next by the input strip processing control unit 52 is not the strip region 82 to be processed next to the strip region 82 including the center position. Sometimes, the position on the minus side in the X-axis direction is equal to the number of pixels corresponding to the maximum optical distortion amount in the X-axis direction of the image data from the downstream end (plus side) of the strip region 82 corrected last time. The input start position of the next strip area 82 is determined so as to be the position of the first pixel of the 82 strip area to be corrected. Further, the processing target strip / input start position setting unit 56 uses the input strip processing control unit 52 to make the strip region 82 to be read next the strip region 82 to be processed next to the strip region 82 including the center position. Is equal to the number of pixels corresponding to the maximum optical distortion amount in the X-axis direction of the image data in the strip area 82 including the optical center 81 from the downstream end in the X-axis direction of the strip area 82 including the optical center 81. The input start position of the next strip area 82 is determined so that the position on the minus side in the X-axis direction becomes the position of the first pixel of the 82 strip area to be corrected next.

したがって、光学歪み補正処理時には、入力短冊処理制御部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 processing control unit 52 determines the start position so that each strip region 82 has an overlapping region 87 as shown in FIG. 7A, and FIG. As shown in FIG. 5, the image data of each strip area 82 is transferred from the input strip processing control unit 52 to the arithmetic processing unit 54 so as to have an overlapping area 87, and the optical distortion in the horizontal and vertical directions is corrected by the arithmetic processing unit 54. As a result, as shown in FIG. 7C, image data in which all the margins 87 are removed from each transferred strip area 82 and the optical distortion is corrected is output to the main memory 38.

次に、上記実施の形態に係るデジタルカメラ10の作用を説明する。   Next, the operation of the digital camera 10 according to the above embodiment will be described.

図8には、CPU36で実行されるディストーション補正処理を示す処理ルーチンを示した。被写体を撮影することによりメインメモリ38へ画像データが記憶されると、ステップ100では、ROM40に記憶されている光学ユニット12の光学歪みの種類を読み取ることによって、光学ユニット12が「たる型」及び「糸巻き型」の何れの光学歪みを有するかを読み取る。   FIG. 8 shows a processing routine showing distortion correction processing executed by the CPU 36. When the image data is stored in the main memory 38 by shooting the subject, in step 100, the optical unit 12 reads the type of optical distortion of the optical unit 12 stored in the ROM 40, thereby causing the optical unit 12 to be a “barrel” and Which optical distortion of the “pincushion type” is read.

次のステップ102では、前回処理した短冊領域82から次の短冊領域82への移動量を算出するように移動量算出指示信号を処理対象短冊・入力開始位置設定部56へ出力する。処理対象短冊・入力開始位置設定部56は、移動量算出指示信号が入力されると、光学歪みの種類に応じて、撮影によって得られた画像データの画像の、X軸方向の最大光学歪み量を移動量として算出する。   In the next step 102, a movement amount calculation instruction signal is output to the processing target strip / input start position setting unit 56 so as to calculate the movement amount from the previously processed strip region 82 to the next strip region 82. When the movement amount calculation instruction signal is input, the processing target strip / input start position setting unit 56, according to the type of optical distortion, the maximum optical distortion amount in the X-axis direction of the image data obtained by photographing. Is calculated as a movement amount.

次のステップ104では、処理対象短冊・入力開始位置設定部56は、次の補正対象となる短冊領域82として、画像データの画像の、X軸方向端部の画素を先頭画素とするような短冊領域82の設定を指示する。ステップ104の処理によって、処理対象短冊・入力開始位置設定部56は、画像データ80の画像のX軸方向端部に位置する画素を先頭画素、すなわち入力開始位置とするように短冊領域82を設定する。   In the next step 104, the processing target strip / input start position setting unit 56 uses the pixel at the end in the X-axis direction of the image data as the first pixel as the strip region 82 to be corrected next. The setting of the area 82 is instructed. Through the processing in step 104, the processing target strip / input start position setting unit 56 sets the strip area 82 so that the pixel located at the X-axis direction end of the image of the image data 80 is the first pixel, that is, the input start position. To do.

次のステップ106では、入力短冊処理制御部52へ、処理対象短冊・入力開始位置設定部56によって設定された短冊領域82内の各小画素列84毎に、各画素の画素値を順次読み取って演算処理部54へ転送することによって、1短冊領域82分の画像データを転送するように、入力短冊処理制御部52へ転送指示信号を出力する。ステップ106の処理によって転送指示信号が入力されると、入力短冊処理制御部52は、処理対象短冊・入力開始位置設定部56によって設定された入力開始位置を先頭画素とする、短冊領域82内の各小画素列84毎に、各小画素列84の画素の画素値をX軸方向に読み取るとともに、読み取った各小画素列84の画素の画素値を各小画素列84分の画像データとして、順次各小画素列84毎に、演算処理部54へ転送する。演算処理部54へ転送された画像データは、ラインバッファ64に格納される。   In the next step 106, the pixel value of each pixel is sequentially read into the input strip processing control unit 52 for each small pixel column 84 in the strip area 82 set by the processing target strip / input start position setting unit 56. By transferring to the arithmetic processing unit 54, a transfer instruction signal is output to the input strip processing control unit 52 so that the image data for one strip area 82 is transferred. When the transfer instruction signal is input by the processing of step 106, the input strip processing control unit 52 has the input start position set by the processing target strip / input start position setting unit 56 as the first pixel in the strip region 82. For each small pixel column 84, the pixel values of the pixels of each small pixel column 84 are read in the X-axis direction, and the pixel values of the read pixels of each small pixel column 84 are used as image data for each small pixel column 84. The data is sequentially transferred to the arithmetic processing unit 54 for each small pixel column 84. The image data transferred to the arithmetic processing unit 54 is stored in the line buffer 64.

次のステップ108では、水平方向ディストーション補正部60へ、上記ステップ106の処理によってラインバッファ64に格納された1小画素列84分の画像データについて、水平方向の光学歪みの補正を指示する光学歪み補正指示信号を出力する。光学歪み補正指示信号が入力されると、水平方向ディストーション補正部60では、ラインバッファ64に格納されている1小画素列84分の画像データについて、水平方向の光学歪みを補正する。水平方向の光学歪みが補正された1小画素列84分の画像データは、ラインバッファ721〜723内の、1小画素列84分の画像データが未格納のラインバッファ721〜723に順次格納される。 In the next step 108, the optical distortion instructing the horizontal distortion correction unit 60 to correct the optical distortion in the horizontal direction for the image data for one small pixel column 84 stored in the line buffer 64 by the processing in step 106. A correction instruction signal is output. When the optical distortion correction instruction signal is input, the horizontal distortion correction unit 60 corrects the horizontal optical distortion of the image data for one small pixel row 84 stored in the line buffer 64. Image data of one subpixel rows 84 minute optical distortion in the horizontal direction is corrected, the line buffer 72 1 to 72 3, 1 small pixel columns 84 minutes image data is not yet stored line buffer 72 1 to 72 3 of the Are stored sequentially.

次のステップ110では、複数のラインバッファ721〜723の全てに、異なる小画素列84分の画像データが格納されると、垂直方向ディストーション補正部62へ、複数のラインバッファ721〜723に格納された異なる複数の小画素列84分の、水平方向の光学歪みが補正された画像データに基づいて、垂直方向の光学歪み補正を指示する光学歪み指示信号を出力する。光学歪み指示信号が入力されると、垂直方向ディストーション補正部62では、複数のラインバッファ721〜723に格納された異なる複数の小画素列84分の、水平方向の光学歪みが補正された画像データに基づいて、各画像データの垂直方向の光学歪みを補正する。 In the next step 110, all of the plurality of line buffers 72 1 to 72 3, different when the image data of the small pixel columns 84 minutes is stored, the vertical distortion correction unit 62, a plurality of line buffers 72 1 to 72 Based on the image data in which the horizontal optical distortion of the plurality of different small pixel columns 84 stored in 3 is corrected, an optical distortion instruction signal instructing the vertical optical distortion correction is output. When the optical distortion instruction signal is input, the vertical distortion correction unit 62 corrects the horizontal optical distortion of a plurality of different small pixel rows 84 stored in the plurality of line buffers 72 1 to 72 3 . Based on the image data, the optical distortion in the vertical direction of each image data is corrected.

次のステップ112では、出力短冊処理制御部58へ、水平方向及び垂直方向双方の光学歪みが補正された各小画素列84分の画像データをDMA転送するためのDMA転送指示信号を出力する。出力短冊処理制御部58は、DMA転送指示信号が入力されると、水平方向ディストーション補正部60によって水平方向の光学歪みが補正されると共に、垂直方向ディストーション補正部62によって垂直方向の光学歪みが補正された各小画素列84分の画像データを、光学歪みが補正された各小画素列84分の画像データとしてメインメモリ38へ転送する。   In the next step 112, a DMA transfer instruction signal is output to the output strip processing control unit 58 for DMA transfer of the image data for each of the small pixel columns 84 in which both the horizontal and vertical optical distortions are corrected. When the DMA transfer instruction signal is input, the output strip processing control unit 58 corrects the horizontal optical distortion by the horizontal distortion correction unit 60 and corrects the vertical optical distortion by the vertical distortion correction unit 62. The image data for each small pixel column 84 thus transferred is transferred to the main memory 38 as image data for each small pixel column 84 whose optical distortion has been corrected.

次のステップ113では、短冊領域82内の、全ての小画素列84の読み出し及び光学歪み補正処理が終了したか否かを判別し、否定されると、上記ステップ106へ戻り、肯定されると、ステップ114へ進む。   In the next step 113, it is determined whether or not the reading of all the small pixel rows 84 in the strip region 82 and the optical distortion correction processing have been completed. , Go to step 114.

次のステップ114では、画像データ80の画像の、全ての光学歪み補正処理が終了したか否かを判別し、肯定されると、本ルーチンを終了し、否定されると、ステップ118へ進む。   In the next step 114, it is determined whether or not all the optical distortion correction processes for the image of the image data 80 have been completed. If the determination is affirmative, this routine is ended. If the determination is negative, the routine proceeds to step 118.

ステップ118では、次の処理対象となる短冊領域82は、光学中心81を含む短冊領域82の読み出し方向下流側に隣接する短冊領域82であるか否かを判別する。ステップ118の判断は、具体的には、前回処理した短冊領域82に光学中心81(座標(0.0))が含まれているか否かを判別することによって判断可能である。   In step 118, it is determined whether or not the strip region 82 to be processed next is a strip region 82 adjacent to the downstream side in the reading direction of the strip region 82 including the optical center 81. Specifically, the determination in step 118 can be made by determining whether or not the optical center 81 (coordinate (0.0)) is included in the previously processed strip area 82.

ステップ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 Step 118 is negative and the next processing target strip is the strip region 82 including the optical center 81 or the strip region 82 on the minus side in the X-axis direction from the strip region 82 including the optical center 81, go to Step 120. The process proceeds to the processing target strip / input start position setting unit 56 from the position of the pixel located at the upstream end in the reading direction in the X-axis direction of the strip region 82 processed last time by the movement amount calculated in step 102 above. After outputting the setting instruction signal so that the position moved downstream in the direction becomes the position of the first pixel of the strip area 82 to be processed next, that is, the input start position of the next strip area 82, the process proceeds to step 106. Return. When a setting instruction signal is input to the processing target strip / input start position setting unit 56 by the processing of step 106, the processing target strip / input start position setting unit 56 starts from the position of the first pixel of the strip region 82 processed last time. The input start position is set so that the pixel located at the position moved in the X-axis direction by the amount of movement calculated by the processing of step 102 becomes the first pixel of the strip area 82 to be processed next.

一方、上記ステップ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 step 118 is affirmative and the next processing target strip region 82 is the strip region 82 adjacent to the downstream side of the strip region 82 including the optical center 81 in the X-axis direction, the process proceeds to step 122. From the pixel located at the downstream end of the strip area 82 including the optical center 81 processed last time to the processing target strip / input start position setting unit 56, the strip area 82 including the optical center 81 is downstream in the X axis direction. After the input start position is set so that the pixel located at the position moved in the minus direction (counter-reading direction) by the margin 87 on the side becomes the first pixel of the strip area 82 to be processed next, the above step 106 is performed. Return to.

以上説明したように、短冊領域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 strip region 82 is sequentially moved in the X-axis direction to correct the optical distortion of the image data in each strip region 82. At the time of optical distortion correction, the previously corrected strip region 82 to be corrected The amount of movement from the first pixel in the X axis direction to the first pixel in the X axis direction of the next strip area 82 is adjacent to the downstream side in the X axis direction of the strip area 82 including the optical center 81 of the image corresponding to the center of the optical system. In the case where the strip region 82 that is changed only during the processing of the strip region 82 to be processed next and the strip region 82 to be corrected next is the strip region 82 adjacent to the strip region 82 including the optical center 81 in the X-axis direction, The number of pixels corresponding to the maximum amount of optical distortion in the X-axis direction of the image data in the strip region 82 including the optical center 81, that is, the pixel corresponding to the margin 87 in the strip region 82 including the optical center 81. Number only Since the position moved to the minus side in the axial direction can be changed to be the position of the first pixel in the predetermined direction of the strip area 82 to be corrected next, it corresponds to the direction of occurrence of optical distortion in each strip area 82 Since the amount of movement can be set, the number of strip areas to be set in the image of the image data obtained by shooting can be suppressed as compared with the case where the amount of movement of all the strip areas 82 is constant. The number of pixels read from the image data can be reduced by photographing, and optical distortion correction can be performed efficiently.

したがって、図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 strip area 82 a including the center 81 is completed, the movement amount is changed, the input start position of the strip area 82 a + 1 to be processed next is reset, and the X of the strip area 82 a including the optical center 81 is reset. Since the position obtained by subtracting the margin 87 on the downstream side in the axial direction can be set as the input start position, it is possible to reduce the number of reading of the strip area 82 to be read for correction, so that the optical distortion correction processing can be speeded up. Therefore, the distortion process can be performed efficiently.

なお、上記図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 strip area 82 to be processed next to the strip area 82 including the optical center 81 is different from the movement amount of the other strip areas 82 has been described. In this embodiment, a case will be described in which the amount of movement from the previously processed strip area is calculated for each strip area.

なお、本実施の形態の構成は、第一の実施の形態と同様の構成であるため、同一部分には同一符号を付与して詳細な説明を省略する。   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 distortion correction unit 24 of the present embodiment sets a strip area 82 to be processed next, instead of the processing target strip / input start position setting unit 56 of the first embodiment. In addition, a processing target strip / input start position setting unit 57 for calculating a movement amount for each set processing strip area 82 is included.

メインメモリ38は、X軸方向への連続したアクセスは速いが、不連続なアドレスへのアクセスは遅いため、一般に、ディストーション補正部24によるメインメモリ38からの画像データの読み取りは、処理速度の高速化のためにX軸方向に並んだいくつかの画素データをまとめて行われている。   The main memory 38 is fast in continuous access in the X-axis direction, but is slow in accessing discontinuous addresses. Generally, reading of image data from the main memory 38 by the distortion correction unit 24 has a high processing speed. Some pixel data arranged in the X-axis direction are collectively collected for the purpose of conversion.

光学歪みは、光学中心からの距離によって歪み量が変化し、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 small pixel row 84 can be small, but the amount of margin 87 increases as the distance from the Y axis increases.

具体的には、図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 optical center 81 as the optical center increases. That is, when processing is performed by dividing into a plurality of strip regions 82, it is necessary to include more margin 87 regions in each strip region 82 as the distance in the X-axis direction of the optical center 81 increases. In the case of a mold with optical distortion, as shown in FIG. 5A, a strip area 82 including the optical center 81 requires a margin 87 area on both ends of the strip area 82 in the X-axis direction. At the same time, as the distance from the optical center 81 increases and the amount of optical distortion increases, the margin 87 included in the strip region 82 increases. When the optical distortion is a pincushion type, as shown in FIG. 5B, the strip area 82 including the optical center 81 does not require the margin 87 area, and the optical distortion of the strip area 82 increases as the amount of optical distortion increases. A large amount of the margin 87 area is required in the direction close to the center 81.

したがって、処理対象短冊・入力開始位置設定部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 position setting unit 56 calculates the nearest neighbor interpolation from the pixel values of the pixels adjacent to the coordinates (X, Y) in the X axis direction and the Y axis direction of the image before the optical distortion correction. Since it is necessary to obtain a pixel value by performing interpolation using a method or a linear interpolation method, when setting the next strip region 82, a larger amount of margin 87 is required as the amount of distortion increases. The starting position of the strip region 82 to be processed next is determined so that the region in the X-axis direction overlapping the processed strip region 82 becomes larger. Conversely, the smaller the amount of distortion, the smaller the required amount of margin 87 in the X-axis direction. Therefore, the area of the strip area 82 to be processed next is reduced so that the area overlapping with the previously processed strip area 82 becomes smaller. Define the starting position. That is, the processing target strip / input start position setting unit 56 increases the amount of movement from the previously processed strip region 82 to the strip region 82 to be processed in the next strip processing as the strip region including the optical center 81 becomes closer to the optical distortion. Since the amount is small, the amount is set to be large, and as the distance from the strip region including the optical center 81 is increased, the amount of optical distortion increases. Therefore, the amount of movement can be set to be small so that the overlapping region becomes larger.

次に、上記実施の形態に係るデジタルカメラ10の作用を説明する。なお、第一の実施の形態と同様の処理には同一番号を付与する。   Next, the operation of the digital camera 10 according to the above embodiment will be described. The same numbers are assigned to the same processes as those in the first embodiment.

図11には、ステップ100では、ROM40に記憶されている光学ユニット12の光学歪みの種類を読み取ることによって、光学ユニット12が「たる型」及び「糸巻き型」の何れの光学歪みを有するかを読み取る。   In FIG. 11, in step 100, by reading the type of optical distortion of the optical unit 12 stored in the ROM 40, it is determined whether the optical unit 12 has a “coil type” or a “pincushion type”. read.

次のステップ104では、処理対象短冊・入力開始位置設定部56は、次の補正対象となる短冊領域82として、画像データの画像の、X軸方向端部の画素を先頭画素とするような短冊領域82の設定を指示する。ステップ104の処理によって、処理対象短冊・入力開始位置設定部56は、画像データ80の画像のX軸方向端部に位置する画素を先頭画素、すなわち入力開始位置とするように短冊領域82を設定する。   In the next step 104, the processing target strip / input start position setting unit 56 uses the pixel at the end in the X-axis direction of the image data as the first pixel as the strip region 82 to be corrected next. The setting of the area 82 is instructed. Through the processing in step 104, the processing target strip / input start position setting unit 56 sets the strip area 82 so that the pixel located at the X-axis direction end of the image of the image data 80 is the first pixel, that is, the input start position. To do.

次のステップ106では、入力短冊処理制御部52へ、処理対象短冊・入力開始位置設定部56によって設定された短冊領域82内の各小画素列84毎に、各画素の画素値を順次読み取って演算処理部54へ転送することによって、1短冊領域82分の画像データを転送するように、入力短冊処理制御部52へ転送指示信号を出力する。ステップ106の処理によって転送指示信号が入力されると、入力短冊処理制御部52は、処理対象短冊・入力開始位置設定部56によって設定された入力開始位置を先頭画素とする、短冊領域82内の各小画素列84毎に、各小画素列84の画素の画素値をX軸方向に読み取るとともに、読み取った各小画素列84の画素の画素値を各小画素列84分の画像データとして、順次各小画素列84毎に、演算処理部54へ転送する。演算処理部54へ転送された画像データは、ラインバッファ64に格納される。   In the next step 106, the pixel value of each pixel is sequentially read into the input strip processing control unit 52 for each small pixel column 84 in the strip area 82 set by the processing target strip / input start position setting unit 56. By transferring to the arithmetic processing unit 54, a transfer instruction signal is output to the input strip processing control unit 52 so that the image data for one strip area 82 is transferred. When the transfer instruction signal is input by the processing of step 106, the input strip processing control unit 52 has the input start position set by the processing target strip / input start position setting unit 56 as the first pixel in the strip region 82. For each small pixel column 84, the pixel values of the pixels of each small pixel column 84 are read in the X-axis direction, and the pixel values of the read pixels of each small pixel column 84 are used as image data for each small pixel column 84. The data is sequentially transferred to the arithmetic processing unit 54 for each small pixel column 84. The image data transferred to the arithmetic processing unit 54 is stored in the line buffer 64.

次のステップ108では、水平方向ディストーション補正部60へ、上記ステップ106の処理によってラインバッファ64に格納された1小画素列84分の画像データについて、水平方向の光学歪みの補正を指示する光学歪み補正指示信号を出力する。光学歪み補正指示信号が入力されると、水平方向ディストーション補正部60では、ラインバッファ64に格納されている1小画素列84分の画像データについて、水平方向の光学歪みを補正する。水平方向の光学歪みが補正された1小画素列84分の画像データは、ラインバッファ721〜723内の、1小画素列84分の画像データが未格納のラインバッファ721〜723に順次格納される。 In the next step 108, the optical distortion instructing the horizontal distortion correction unit 60 to correct the optical distortion in the horizontal direction for the image data for one small pixel column 84 stored in the line buffer 64 by the processing in step 106. A correction instruction signal is output. When the optical distortion correction instruction signal is input, the horizontal distortion correction unit 60 corrects the horizontal optical distortion of the image data for one small pixel row 84 stored in the line buffer 64. Image data of one subpixel rows 84 minute optical distortion in the horizontal direction is corrected, the line buffer 72 1 to 72 3, 1 small pixel columns 84 minutes image data is not yet stored line buffer 72 1 to 72 3 of the Are stored sequentially.

次のステップ110では、複数のラインバッファ721〜723の全てに、異なる小画素列84分の画像データが格納されると、垂直方向ディストーション補正部62へ、複数のラインバッファ721〜723に格納された異なる複数の小画素列84分の、水平方向の光学歪みが補正された画像データに基づいて、垂直方向の光学歪み補正を指示する光学歪み指示信号を出力する。光学歪み指示信号が入力されると、垂直方向ディストーション補正部62では、複数のラインバッファ721〜723に格納された異なる複数の小画素列84分の、水平方向の光学歪みが補正された画像データに基づいて、各画像データの垂直方向の光学歪みを補正する。 In the next step 110, all of the plurality of line buffers 72 1 to 72 3, different when the image data of the small pixel columns 84 minutes is stored, the vertical distortion correction unit 62, a plurality of line buffers 72 1 to 72 Based on the image data in which the horizontal optical distortion of the plurality of different small pixel columns 84 stored in 3 is corrected, an optical distortion instruction signal instructing the vertical optical distortion correction is output. When the optical distortion instruction signal is input, the vertical distortion correction unit 62 corrects the horizontal optical distortion of a plurality of different small pixel rows 84 stored in the plurality of line buffers 72 1 to 72 3 . Based on the image data, the optical distortion in the vertical direction of each image data is corrected.

次のステップ112では、出力短冊処理制御部58へ、水平方向及び垂直方向双方の光学歪みが補正された各小画素列84分の画像データをDMA転送するためのDMA転送指示信号を出力する。出力短冊処理制御部58は、DMA転送指示信号が入力されると、水平方向ディストーション補正部60によって水平方向の光学歪みが補正されると共に、垂直方向ディストーション補正部62によって垂直方向の光学歪みが補正された各小画素列84分の画像データを、光学歪みが補正された各小画素列84分の画像データとしてメインメモリ38へ転送する。   In the next step 112, a DMA transfer instruction signal is output to the output strip processing control unit 58 for DMA transfer of the image data for each of the small pixel columns 84 in which both the horizontal and vertical optical distortions are corrected. When the DMA transfer instruction signal is input, the output strip processing control unit 58 corrects the horizontal optical distortion by the horizontal distortion correction unit 60 and corrects the vertical optical distortion by the vertical distortion correction unit 62. The image data for each small pixel column 84 thus transferred is transferred to the main memory 38 as image data for each small pixel column 84 whose optical distortion has been corrected.

次のステップ113では、短冊領域82内の全ての小画素列84の読み出し及び光学歪み補正処理が終了したか否かを判別し、否定されると、上記ステップ106へ戻り、肯定されると、ステップ114へ進む。   In the next step 113, it is determined whether or not the reading of all the small pixel rows 84 in the strip region 82 and the optical distortion correction processing have been completed, and if not, the process returns to step 106, and if affirmed, Proceed to step 114.

次のステップ114では、画像データ80の画像の全ての光学歪み補正処理が終了したか否かを判別し、肯定されると、本ルーチンを終了し、否定されると、ステップ200へ進む。   In the next step 114, it is determined whether or not all the optical distortion correction processes for the image of the image data 80 have been completed. If the determination is affirmative, the routine is terminated. If the determination is negative, the routine proceeds to step 200.

ステップ200では、前回読み出した短冊領域82の読出方向(X軸方向)下流側(プラス側)端部からX軸方向ののりしろ87分反読出方向(マイナス側)へ移動した位置が、次の短冊領域82の先頭画素(次に処理する短冊領域82の入力開始位置)となるように、移動量を算出する。   In step 200, the position of the strip area 82 read in the previous reading from the downstream end (plus side) in the reading direction (X axis direction) in the X axis direction by the margin 87 in the counter reading direction (minus side) is the next strip. The movement amount is calculated so as to be the first pixel of the area 82 (the input start position of the strip area 82 to be processed next).

次のステップ202では、処理対象短冊・入力開始位置設定部56へ、前回処理した短冊領域82のX軸方向の読み出し方向上流側端部に位置する画素の位置から、上記ステップ200で算出した移動量だけX軸方向下流側に移動した位置を、次の処理対象となる短冊領域82の先頭画素の位置となるように設定指示信号を出力した後に、上記ステップ106へ戻る。処理対象短冊・入力開始位置設定部56は、設定指示信号が入力されると、前回処理した短冊領域82の先頭画素の位置から、算出された移動量だけX軸方向に移動した位置に位置する画素が次の処理対象となる短冊領域82の先頭画素となるように、入力開始位置を設定した後に、上記ステップ106へ戻る。   In the next step 202, the movement calculated in the above step 200 from the position of the pixel located at the upstream end in the reading direction in the X-axis direction of the strip area 82 processed previously is transferred to the processing target strip / input start position setting unit 56. After outputting a setting instruction signal so that the position moved to the downstream side in the X-axis direction by the amount becomes the position of the first pixel of the strip area 82 to be processed next, the process returns to step 106. When a setting instruction signal is input, the processing target strip / input start position setting unit 56 is located at a position moved in the X-axis direction by the calculated movement amount from the position of the first pixel of the strip area 82 processed last time. After setting the input start position so that the pixel becomes the first pixel of the strip area 82 to be processed next, the process returns to step 106.

ステップ202の処理によって、短冊領域82内のX軸方向の最大歪み量が小さくなるほど、前回処理した短冊領域82の先頭画素から次の短冊領域82の先頭画素までの移動量が大きくなるような移動量を定めることができる。   As the maximum distortion amount in the X-axis direction in the strip area 82 is reduced by the processing in step 202, the movement from the first pixel of the strip area 82 processed last time to the first pixel of the next strip area 82 is increased. The quantity can be determined.

以上説明したように、本実施の形態では、各短冊領域82毎のX軸方向の最大光学歪み量に基づいて、次に処理する短冊領域82への移動量を算出することができるので、撮影によって得られた画像データの画像に設定する短冊領域82の数を、第1の実施の形態の光学歪み補正方法に比べて更に少なくすることができるので、メインメモリ38に記憶された画像データから読み出す画素数をさらに減少させることができ、効率よく光学歪み補正を行うことができる。   As described above, in the present embodiment, the movement amount to the strip region 82 to be processed next can be calculated based on the maximum optical distortion amount in the X-axis direction for each strip region 82. The number of strip regions 82 set in the image data obtained by the above can be further reduced as compared with the optical distortion correction method according to the first embodiment, so that the image data stored in the main memory 38 can be used. The number of pixels to be read can be further reduced, and optical distortion correction can be performed efficiently.

すなわち、図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 strip area 82, the amount of movement of the strip area 82 to be read for correction can be determined. Since the number can be further reduced, the speed of the optical distortion correction process can be increased, and the optical distortion correction process can be performed efficiently.

なお、上記図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 optical center 81, each strip region 82 has the same optical property so as to be symmetrical in the X-axis direction about the strip region 82 including the optical center 81. There is a pair of strip regions 82 having a distortion amount. That is, a strip region 82 including a margin 87 region that is the same as the margin 87 region of each strip region 82 on the minus side in the X-axis centering on the strip region 82 including the optical center 81 is also present on the plus side in the X-axis direction. .

したがって、上記実施の形態では、各短冊領域82毎に移動量を算出したが、光学中心81を含む短冊領域82よりX軸方向マイナス側に位置する短冊領域82各々に対応する算出した移動量をCPU36の図示を省略したメモリに記憶するようにし、対応する光学歪み量を有する短冊領域82各々の移動量算出は、図示を省略したメモリに記憶された対応する光学歪み量を有する短冊領域82の移動量を用いるようにすれば、さらに光学歪み補正処理を高速に行うことができる。   Therefore, in the above embodiment, the movement amount is calculated for each strip region 82. However, the calculated movement amount corresponding to each strip region 82 located on the minus side in the X-axis direction from the strip region 82 including the optical center 81 is calculated. The movement amount calculation of each strip area 82 having the corresponding optical distortion amount is stored in the memory not shown in the CPU 36, and the movement amount calculation of each strip area 82 having the corresponding optical distortion amount stored in the memory not shown in the figure. If the movement amount is used, the optical distortion correction process can be further performed at high speed.

第一の実施の形態に係るデジタルカメラの概略構成を示す模式図である。It is a schematic diagram which shows schematic structure of the digital camera which concerns on 1st embodiment. 第一の実施の形態に係るディストーション補正部の詳細構成を示す模式図である。It is a schematic diagram which shows the detailed structure of the distortion correction part which concerns on 1st embodiment. 短冊領域毎に画像データの画像を読み取る読み取り方法を示す模式図である。It is a schematic diagram which shows the reading method which reads the image of image data for every strip area | region. (A)は、糸巻き型の光学歪みを示す模式図であり、(B)は、たる型の光学歪みを示す模式図であり、(C)は、糸巻き型及びたる型各々のディストーションカーブを示す線図である。(A) is a schematic diagram showing optical distortion of a pincushion mold, (B) is a schematic diagram showing optical distortion of a barrel mold, and (C) shows distortion curves of the pincushion mold and the barrel mold. FIG. (A)は、たる型の光学歪みを有する画像を補正するときの、光学中心81からの距離に応じた各短冊領域82毎ののりしろ87発生方向を示す模式図であり、(B)は、糸巻き型の光学歪みを有する画像を補正するときの、光学中心81からの距離に応じた各短冊領域82毎ののりしろ87発生方向を示す模式図である。(A) is a schematic diagram showing a margin 87 generation direction for each strip region 82 according to the distance from the optical center 81 when correcting an image having a barrel-shaped optical distortion, and (B), It is a schematic diagram showing a margin 87 generation direction for each strip region 82 according to the distance from the optical center 81 when correcting an image having a pincushion type optical distortion. 光学歪みの種類毎の、短冊領域の位置に対応する光学歪み補正方向を示す模式図である。It is a schematic diagram which shows the optical distortion correction direction corresponding to the position of a strip area | region for every kind of optical distortion. 光学歪み補正処理を示す模式図であり、(A)は、画像データの画像を短冊領域82毎に設定することを示す模式図であり、(B)は、短冊領域82毎に読み出した画像データの画像の重複状態を示す模式図であり、(C)は、光学歪みが補正された画像を示す模式図である。It is a schematic diagram which shows an optical distortion correction process, (A) is a schematic diagram which shows setting the image of image data for every strip area | region 82, (B) is the image data read for every strip area | region 82 It is a schematic diagram which shows the overlapping state of these images, (C) is a schematic diagram which shows the image by which the optical distortion was correct | amended. 第一の実施の形態に係る光学歪みの補正処理を示すフローチャートである。It is a flowchart which shows the correction process of the optical distortion which concerns on 1st embodiment. (A)は、従来の短冊領域の移動量を示す模式図であり、(B)は、第一の実施の形態に係る短冊領域の移動量を示す模式図である。(A) is a schematic diagram which shows the movement amount of the conventional strip area | region, (B) is a schematic diagram which shows the movement amount of the strip area | region which concerns on 1st embodiment. 第二の実施の形態に係るディストーション補正部の詳細構成を示す模式図である。It is a schematic diagram which shows the detailed structure of the distortion correction part which concerns on 2nd embodiment. 第二の実施の形態に係る光学歪みの補正処理を示すフローチャートである。It is a flowchart which shows the correction process of the optical distortion which concerns on 2nd embodiment. (A)は、従来の短冊領域の移動量を示す模式図であり、(B)は、第二の実施の形態に係る短冊領域の移動量を示す模式図である。(A) is a schematic diagram which shows the movement amount of the conventional strip area | region, (B) is a schematic diagram which shows the movement amount of the strip area | region which concerns on 2nd embodiment. (A)は、第二の実施の形態における糸巻き型の場合の短冊領域の移動量を示す模式図であり、(B)は、第二の実施の形態におけるたる型の場合の短冊領域の移動量を示す模式図である。(A) is a schematic diagram showing the amount of movement of the strip region in the case of the spool type in the second embodiment, and (B) is the movement of the strip region in the case of the barrel in the second embodiment. It is a schematic diagram which shows quantity.

符号の説明Explanation of symbols

12 光学ユニット
24 ディストーション補正部
38 メインメモリ
52 入力短冊処理制御部
54 演算処理部
56 処理対象短冊・入力開始位置設定部
57 処理対象短冊・入力開始位置設定部
DESCRIPTION OF SYMBOLS 12 Optical unit 24 Distortion correction | amendment part 38 Main memory 52 Input strip process control part 54 Operation processing part 56 Process target strip and input start position setting part 57 Process target strip and input start position setting part

Claims (5)

収差を有する光学系を介して被写体を撮影することにより得られた画像データであって、複数の画素が所定方向に配列された画素列を前記所定方向と交差する方向に複数列配列して画像を表示する画像データを記憶した記憶手段と、  Image data obtained by photographing a subject through an optical system having aberration, and an image in which a plurality of pixels are arranged in a direction intersecting the predetermined direction. Storage means for storing image data for displaying
前記記憶手段に記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正する補正手段と、  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:
前記短冊移動量毎移動量算出手段は、前回処理した短冊領域の所定方向下流側端部から該短冊領域の所定方向の最大光学歪み量に相当する画素数だけ所定方向上流側に移動した位置が、次に処理する短冊領域の所定方向先頭画素の位置となるように、前記移動量を算出する請求項1に記載の光学歪み補正装置。  The moving amount calculation means for each moving amount of the strip has a position moved upstream in the predetermined direction by the number of pixels corresponding to the maximum optical distortion amount in the predetermined direction of the strip region from the downstream end portion in the predetermined direction of the strip region processed last time. The optical distortion correction apparatus according to claim 1, wherein the movement amount is calculated so as to be a position of a first pixel in a predetermined direction of a strip area to be processed next. 前記短冊移動量毎移動量算出手段は、前記光学系の中心に対応する前記画像の中心位置を含む中央短冊領域より所定方向上流側の短冊領域毎に算出した移動量を記憶する移動量記憶手段を含み、前記中央短冊領域より所定方向下流側の短冊領域が次に処理する短冊領域のときは、前記移動量記憶手段に記憶された対応する短冊領域の移動量を読み取ることによって移動量を算出する請求項1または請求項2に記載の光学歪み補正装置。  The movement amount calculating means for storing the movement amount calculated for each strip area upstream in a predetermined direction from the central strip area including the center position of the image corresponding to the center of the optical system. When the strip area downstream in the predetermined direction from the central strip area is a strip area to be processed next, the movement amount is calculated by reading the movement amount of the corresponding strip area stored in the movement amount storage means. The optical distortion correction apparatus according to claim 1 or 2. 収差を有する光学系を介して被写体を撮影することにより得られた画像データであって、複数の画素が所定方向に配列された画素列を前記所定方向と交差する方向に複数列配列して画像を表示する画像データを記憶し、  Image data obtained by photographing a subject through an optical system having aberration, and an image in which a plurality of pixels are arranged in a direction intersecting the predetermined direction. Store the image data to display
前記記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正し、  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.
収差を有する光学系を介して被写体を撮影することにより得られた画像データであって、複数の画素が所定方向に配列された画素列を前記所定方向と交差する方向に複数列配列して画像を表示する画像データを記憶した記憶手段と、  Image data obtained by photographing a subject through an optical system having aberration, and an image in which a plurality of pixels are arranged in a direction intersecting the predetermined direction. Storage means for storing image data for displaying
前記記憶手段に記憶された画像データから、前記画素列の所定方向上流側端部の画素を先頭画素とすると共に前記所定方向の幅が予め定めた所定画素数となるような前期所定方向と交差する方向の短冊領域を設定すると共に、該短冊領域を入力された移動量に相当する画素数前記所定方向に順次移動させて、各短冊領域内の各画素の画素値を前記各短冊領域内の各画素列毎に前記所定方向に読み出し、読み出した画像データの光学歪みを補正する補正手段と、  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:
JP2004358795A 2004-12-10 2004-12-10 Optical distortion correction apparatus, optical distortion correction method, and imaging apparatus Expired - Fee Related JP4279775B2 (en)

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)

* Cited by examiner, † Cited by third party
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

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