WO2015198478A1 - 画像歪み補正装置、情報処理装置および画像歪み補正方法 - Google Patents

画像歪み補正装置、情報処理装置および画像歪み補正方法 Download PDF

Info

Publication number
WO2015198478A1
WO2015198478A1 PCT/JP2014/067198 JP2014067198W WO2015198478A1 WO 2015198478 A1 WO2015198478 A1 WO 2015198478A1 JP 2014067198 W JP2014067198 W JP 2014067198W WO 2015198478 A1 WO2015198478 A1 WO 2015198478A1
Authority
WO
WIPO (PCT)
Prior art keywords
distance
unit
subject
image
estimated
Prior art date
Application number
PCT/JP2014/067198
Other languages
English (en)
French (fr)
Inventor
芳邦 市川
Original Assignee
株式会社 市川ソフトラボラトリー
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 株式会社 市川ソフトラボラトリー filed Critical 株式会社 市川ソフトラボラトリー
Priority to PCT/JP2014/067198 priority Critical patent/WO2015198478A1/ja
Publication of WO2015198478A1 publication Critical patent/WO2015198478A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N25/00Circuitry of solid-state image sensors [SSIS]; Control thereof
    • H04N25/60Noise processing, e.g. detecting, correcting, reducing or removing noise
    • H04N25/61Noise processing, e.g. detecting, correcting, reducing or removing noise the noise originating only from the lens unit, e.g. flare, shading, vignetting or "cos4"

Definitions

  • the present invention relates to an image distortion correction apparatus, an information processing apparatus, and an image distortion correction method for correcting distortion of a subject image.
  • Japanese Patent Application Laid-Open No. 2007-243241 discloses a technique for automatically correcting an image distorted in a trapezoidal shape when taking a self-portrait.
  • Japanese Patent Application Laid-Open No. 2007-243241 corrects the entire distortion of the photographed image, and does not correct only a part of the face taken by himself, for example.
  • the nose with the shortest distance from the camera appears larger than other facial parts, resulting in an unnatural image.
  • the camera can only be placed at a distance that allows the user to reach his / her hand.
  • the present invention has been made to solve the above-described problems, and its purpose is to prevent a problem that a part of the face such as the nose is enlarged when performing close-up shooting such as when taking a self-portrait. It is to provide a possible image distortion correction apparatus.
  • a positional relationship estimation unit that estimates a positional relationship between the imaging unit and a subject based on a subject image captured by the imaging unit;
  • a first storage for storing pixel data corresponding to the subject image and the background image;
  • a distance estimation unit that estimates a distance from each position on the surface of the subject to a reference plane of the subject orthogonal to the optical axis of the imaging unit; When each estimated distance is less than or equal to a predetermined reference distance, the value is zero, and when the estimated distance is greater than the reference distance, a difference value between the estimated distance and the reference distance is used.
  • a distance limiter for calculating a distance limit value to be a value
  • the pixel position of the corresponding pixel data stored in the first storage unit is determined based on the distance limit value, and the optical system of the imaging unit
  • the pixel position of the corresponding pixel data stored in the first storage unit A pixel position conversion unit that maintains
  • an image distortion correction apparatus comprising: a second storage unit that stores pixel data corresponding to a subject image and a background image thereof after pixel position conversion by the pixel position conversion unit.
  • the present invention it is possible to prevent a problem in which a part of the face such as the nose is enlarged when performing close-up shooting such as when taking a self-portrait.
  • FIG. 1 is a block diagram showing a schematic configuration of an image distortion correction apparatus 1 according to an embodiment of the present invention.
  • the block diagram which shows the structure of the principal part of the information processing apparatus 11 incorporating the image distortion correction apparatus 1 of FIG.
  • FIG. 4 is a diagram illustrating an example of a subject image 22 captured on an imaging surface 21 of the imaging unit 12.
  • FIG. 3 is a flowchart showing an example of processing operation of the image distortion correction apparatus 1 shown in FIG. 1.
  • FIG. 9 is a diagram illustrating the subject image 22 after the processing of FIG. 7 is performed on the subject image 22 captured by short-distance shooting as illustrated in FIG. 8.
  • the figure on the left shows the subject 23 as viewed from above, and the figure on the right shows a part of the subject image 22.
  • the image distortion correction apparatus may have a configuration and operation omitted in the following description. However, these omitted configurations and operations are also included in the scope of the present embodiment.
  • FIG. 1 is a block diagram showing a schematic configuration of an image distortion correction apparatus 1 according to an embodiment of the present invention.
  • the image distortion correction apparatus 1 in FIG. 1 includes a first storage unit 2, a positional relationship estimation unit 3, a distance estimation unit 4, a distance restriction unit 5, a pixel position conversion unit 6, and a second storage unit 7. I have.
  • the positional relationship estimation unit 3 estimates the positional relationship between the imaging unit and the subject based on the subject image captured by the imaging unit described later.
  • the first storage unit 2 stores pixel data corresponding to the subject image and its background image.
  • the distance estimation unit 4 estimates the distance from each position on the subject to the reference plane of the subject orthogonal to the optical axis of the imaging unit.
  • the distance restriction unit 5 generates a distance restriction value based on the distance estimated by the distance estimation unit 4.
  • the distance limit value is zero when the distance estimated by the distance estimation unit 4 is equal to or smaller than a predetermined reference distance, and when the distance estimated by the distance estimation unit 4 is larger than the reference distance, the distance estimation unit 4 It becomes a value corresponding to the difference value between the distance estimated in step 1 and the reference distance.
  • the pixel position conversion unit 6 captures the pixel position of the corresponding pixel data stored in the first storage unit 2 based on the distance limit value.
  • the corresponding pixel data stored in the first storage unit 2 is converted into a pixel position when the focal length of the optical system of the unit is set to infinity. The pixel position is maintained as it is.
  • the second storage unit 7 stores pixel data corresponding to the subject image and the background image after the pixel position is converted by the pixel position conversion unit 6.
  • the image distortion correction apparatus 1 in FIG. 1 corrects distortion generated in a captured image by short-distance shooting when taking a self-portrait using a mobile device with a camera function such as a mobile phone or a smartphone.
  • the reason why the captured image is distorted is that since the distance between the camera and the subject is short, the subject position closest to the camera is photographed larger when the subject is uneven. That is, even if the camera lens itself has very little distortion, the size of the subject image changes in proportion to the inverse of the distance to the subject. Thus, if the subject has irregularities, the image magnification changes depending on the location in the subject, and the closer the camera is, the larger the image will be.
  • an ideal condition for minimizing variation in image magnification is to image a subject with a lens having an infinite focal length. That is, the subject is imaged by moving the lens away from the imaging surface to infinity so that the imaging position of the lens with an infinite focal length is the imaging surface of the imaging unit. Therefore, in the present embodiment, the distortion of the subject image is corrected by converting each pixel position of the pixel data imaged by the camera into a pixel position when the subject is imaged by a lens having an infinite focal length.
  • FIG. 2 is a block diagram showing a configuration of a main part of the information processing apparatus 11 incorporating the image distortion correction apparatus 1 of FIG.
  • the information processing apparatus 11 in FIG. 2 is a mobile device with a camera function such as a mobile phone, a smartphone, a tablet terminal, or a digital camera.
  • FIG. 2 includes the image distortion correction apparatus 1 illustrated in FIG. 1, an imaging unit 12, a monitor screen display unit 13, and a control unit 14.
  • the imaging unit 12 images the subject and the background thereof, and generates pixel data constituting the subject image and the background image.
  • the imaging unit 12 includes an imaging sensor such as a CMOS sensor or a CCD (Charge Coupled Device).
  • the monitor screen display unit 13 displays a live image before being imaged by the imaging unit 12, a subject image and a background image after imaging. Further, the monitor screen display unit 13 may display a frame indicating the recommended display position of the subject image to be subjected to image distortion correction. Further, the monitor screen display unit 13 may be provided with a touch panel function so that a subject image to be subjected to distortion correction can be selected with a finger from live images displayed on the monitor screen display unit 13. Alternatively, a face recognition process may be performed on a live image or a still image captured by the imaging unit 12 to automatically select a subject image to be subjected to image distortion correction. Alternatively, face recognition processing may be performed to extract a plurality of subject images that can be candidates for image distortion correction, and at least a part of the plurality of subject images may be selected by the user.
  • the control unit 14 controls the image distortion correction apparatus 1, the imaging unit 12, and the monitor screen display unit 13.
  • FIG. 3 is a diagram showing an example of the subject image 22 shown on the imaging surface 21 of the imaging unit 12, and FIG. 4 is a diagram of the subject 23 and the optical system 15 of the imaging unit 12 as viewed from above.
  • FIG. 3 shows an example in which a subject image 22 is arranged and imaged inside the frame 24 so as to be in contact with the frame 24 set in advance on the imaging surface 21. 3 corresponds to a frame (not shown) displayed on the monitor screen display unit 13, and FIG. 3 shows the subject image inside the frame displayed on the monitor screen display unit 13 by the user.
  • An example is shown in which images are captured so that 22 is contained.
  • the focal length of the optical system of the imaging unit 12 is 28 mm
  • the size of the imaging surface 21 of the imaging unit 12 is 35 mm ⁇ 24 mm
  • the horizontal length of the frame 24 is 10 mm
  • the vertical length of the frame 24 is 16 mm.
  • the horizontal length 10 mm of the frame 24 corresponds to an angle of view of about 20 degrees.
  • FIG. 5 is a diagram illustrating an example in which a subject is approximated to an elliptical sphere 25.
  • a plane that passes through the center G of the ellipsoidal sphere 25 and is orthogonal to the optical axis 10 of the imaging unit 12 is defined as a reference plane 25a, and an intersection with the optical axis 10 of the imaging unit 12 on this reference plane 25a is captured as B.
  • An intersection point with the optical axis 10 of the imaging unit 12 on the surface 21 is represented by I.
  • the center position of the frame 24 on the imaging surface 21 is shifted 3 mm upward from the intersection I with the optical axis 10 on the imaging surface 21.
  • the lower side of the frame 24 is located 7 mm above the lower side of the imaging surface 21, and the upper side of the frame 24 is located 1 mm below the upper side of the imaging surface 21.
  • FIG. 6 is a diagram showing a meridional surface 26 which is a plane passing through an arbitrary point P on the surface of the subject 23 composed of an elliptical sphere 25 and the optical axis 10.
  • the imaging position on the imaging surface 21 corresponding to the point P is Q ′
  • the intersection point of the perpendicular line drawn from the point P of the ellipsoid sphere 25 to the optical axis 10 is C
  • the position is O
  • the intersection of the optical axis 10 of the imaging unit 12 and the imaging surface 21 is I.
  • the triangle PCO and the triangle Q′IO in FIG. 6 are similar to each other, and therefore, the proportional expression shown in the following expression (1) holds.
  • from the point P on the subject 23 to the reference plane 25a is h
  • from the imaging position of the point P on the imaging surface 21 to the intersection with the optical axis 10 is A '.
  • a ′ represents the image height (real image height) actually captured on the imaging surface 21.
  • the image height on the imaging surface 21 when shooting using a lens having a double focal length (58 mm) is A ′′.
  • the image height A ′ ′′ on the imaging surface 21 when a lens having a focal length of M times to a distance of M times is represented by the following equation (5). Is done.
  • Equation (5) becomes the following Equation (6).
  • a shown in the equation (6) is an image height (ideal image height) of the point P on the subject 23 when photographing from an infinite distance using a telephoto lens.
  • this ideal image height position is Q
  • Q and the image height position Q ′ in the imaging unit 12 with a focal length of 28 mm are both on the meridional surface 26
  • the ideal image height position Q is the light on the imaging surface 21. It is on a straight line connecting the intersection point I with the axis 10 and the image height position Q ′, and the distance between the intersection point I and the ideal image height position Q is A.
  • the subject image 22 on the imaging surface 21 is not distorted by the unevenness of the subject 23.
  • the reason is that the unevenness of the subject 23 is so small that it can be ignored compared to the focal length of the optical system of the imaging unit 12, so that the unevenness of the subject 23 is almost equal to the size of the subject image 22 on the imaging surface 21. This is because it has no effect. Accordingly, if the pixel position of the imaging position on the imaging surface 21 at the focal length of 28 mm is converted to the ideal image height position, the subject image 22 without distortion due to the unevenness of the subject 23 can be obtained.
  • FIG. 7 is a flowchart showing an example of the processing operation of the image distortion correction apparatus 1 shown in FIG.
  • the processing operation of the image distortion correction apparatus 1 in FIG. 1 will be described below based on this flowchart.
  • the horizontal width of the imaging surface 21 in the imaging unit 12 is Wmm
  • the vertical width is Hmm
  • the number of pixels in the horizontal (left / right) direction is PW pixels
  • the number of pixels in the vertical (vertical) direction is PH pixels.
  • the shooting instruction button when a user who wants to take a selfie operates the shooting instruction button with the subject image 22 displayed in contact with the frame 24 inside the frame 24 displayed in advance on the monitor screen display unit 13 of the portable device.
  • the imaging unit 12 captures the subject image 22 and the pixel data of the subject image 22 is stored in the first storage unit 2.
  • the positional relationship estimation unit 3 determines the positional relationship between the imaging unit 12 and the subject 23 from the reference plane 25a passing through the center of the subject 23 and orthogonal to the optical axis 10 to the optical center position O of the imaging unit 12. The distance and the distance from the center of the subject 23 to the intersection of the reference plane 25a and the optical axis 10 are obtained.
  • step S1 when the user captures an image with the imaging unit 12 in a state where the subject image 22 is displayed so as to fit in the frame 24 displayed in advance on the monitor screen display unit 13, the imaging unit 12 and the subject estimated in step S2 are used. The positional relationship with 23 is almost the same. Therefore, when the above-described 364 mm or 39 mm is calculated and stored in advance and the subject image 22 is captured so as to fit within the frame 24, the numerical value calculated and stored in advance may be used. . Thereby, the process of step S1 can be omitted.
  • the distance estimation unit 4 coordinates on the imaging surface 21 based on the pixel position (qx, qy) of the ideal image height position Q on the imaging surface 21 where an arbitrary point P on the surface of the subject 23 is imaged.
  • the position (x, y) is calculated (step S2).
  • step S2 as shown in FIG. 6, assuming that the horizontal direction of the imaging surface 21 is the X-axis direction and the vertical direction is the Y-axis direction, the coordinate position (x, y) is expressed by the following formula (7) and (8 ) Expression.
  • the distance estimation unit 4 calculates the two-dimensional coordinate position (X1, Yl) of the point L obtained by projecting the point P on the surface of the subject 23 onto the reference plane 25a (step S3).
  • the optical axis 10 is the Z axis
  • the horizontal direction of the imaging surface 21 is the X axis
  • the vertical direction is the Y axis. Since the point L is on the meridional surface 26, (Xl, Yl) is expressed by the following equations (9) and (10).
  • the distance estimation unit 4 calculates a distance h from the point P on the surface of the subject 23 to the reference plane 25a (step S4).
  • the center coordinate position A of the subject 23 composed of the elliptic sphere 25 in FIG. 6 is (0, 39, 364). Therefore, the equation of the ellipsoidal sphere 25 is expressed by the following equation (11).
  • the xy coordinate of the point P on the surface of the subject 23 is the same as the point L described above. If the z coordinate of the point P is Zp, the three-dimensional coordinate of the point P is P (Xl, Yl, Zp). . Substituting these coordinates into equation (11) yields the following equation (12).
  • the pixel position conversion unit 6 obtains the image position (qx ′, qy ′) of the real image Q ′ at the pixel position (qx, qy) at the ideal image height Q (step S5).
  • the pixel position conversion unit 6 reads out pixel data of the pixel position (qx ′, qy ′) of the real image Q ′ from the first storage unit 2 (step S ⁇ b> 6).
  • the pixel position conversion unit 6 stores the read pixel data in the second storage unit 7 in association with the pixel position (qx, qy) of the ideal image height Q (step S7).
  • the pixel position conversion unit 6 determines whether or not the pixel position to be corrected still remains (step S8). If the pixel position still remains, the process from step S2 is repeated, and all pixel positions to be corrected are determined. When the pixel position conversion at is finished, the processing of FIG. 7 is finished.
  • FIG. 8 is a diagram showing a region 31 that is not captured by close-up photography such as self-portrait
  • FIG. 9 is a diagram after the processing of FIG. 7 is performed on the subject image 22 taken by close-up photography as shown in FIG. It is a figure which shows the to-be-photographed object image 22.
  • FIG. The hatched area 32 in FIG. 9 is a corresponding pixel area that was not actually captured. In this pixel area, an invalid image in which a part of the original image is folded is displayed, and the image quality deteriorates. Resulting in. Therefore, it is necessary to interpolate a region that is not captured in short-distance shooting but is captured in telephoto shooting from a distance.
  • the boundary line 32b inside the hatched area 32 in FIG. 9 is the contour line of the subject 23 after processing in FIG. As described above, by performing the processing of FIG. 7, the outline of the subject 23 is slightly reduced. Further, the boundary line 32c outside the hatched area 32 in FIG. 9 is a contour line of the background portion in contact with the contour of the subject 23 actually captured.
  • the contour line of the subject 23 and the contour line of the background that are in contact with each other in the actually captured state are the boundary line 32b on the inner side of the hatched area 32 and the boundary line on the outer side. 32c, and an invalid image is displayed in the hatched area 32 between the boundary lines 32b and 32c.
  • FIG. 10 is a diagram in which the subject 23 is viewed from the side, and the diagram on the right is a part of the subject image 22.
  • the left figure and the right figure match the position and size of the subject 23.
  • the left-right direction of the right side of FIG. 10 corresponds to the front-rear direction (front and back of the drawing) of the left side.
  • P1 in FIG. 10 is a point that intersects with the rear background surface 33 through the outermost contour position at the bottom of the subject 23.
  • the background surface 33 is a surface that is behind the center point of the subject 23 by d.
  • P ⁇ b> 2 is a point where a light beam passing through the optical center position O of the imaging unit 12 contacts the lowermost part of the subject 23.
  • P ⁇ b> 2 is a point that is h ⁇ b> 2 ahead from the reference plane 25 a that passes through the center of the subject 23 and is orthogonal to the optical axis 10.
  • P3 is a point where this light ray intersects the background surface 33.
  • Q1 ' is an image position corresponding to P1
  • Q2' is an image position corresponding to P2
  • A1 ' is an image height of Q1'
  • A1 'and A2' are represented by the following equations (18) and (19), respectively.
  • pixel data interpolation processing is performed so that a background image outside the hatched area 32 in FIG. 10 is displayed outside the outline 32a of the subject image 22 after correcting the distortion.
  • the above-described image distortion correction and interpolation processing must be performed on all pixels captured by the image sensor. For example, if the number of pixels of the image sensor is 10 million pixels, 10 million operations are required. . Therefore, in the case where the execution time of image distortion correction and interpolation processing is limited, or in a mobile device equipped with a processor with low calculation processing performance such as a smartphone, the image distortion correction processing and interpolation processing described above for all pixels It is not easy to do.
  • the distance limiter 5 shown in FIG. 1 generates a distance limit value based on the distance from each position on the surface of the subject 23 to the reference plane 25a.
  • the distance limit value is zero when the distance h from each position on the surface of the subject 23 to the reference surface 25a is equal to or less than the reference distance hmin, and the distance h from each position on the surface of the subject 23 to the reference surface 25a. Is greater than the reference distance hmin, the difference value (h ⁇ hmin) between the distance h and the reference distance hmin is obtained.
  • the reference distance hmin is a distance from a contact point at which the light passing through the optical axis center position of the imaging unit 12 contacts the subject 23 at the shortest distance to the reference plane 25a. This contact point is, for example, a point P2 shown in FIG. It is.
  • the distance limit value of the area is (h ⁇ hmin), and the distance limit value of the subject 23 area located behind the point P2 (background side) and the background area is zero.
  • the reference distance hmin described above is a fixed value if the positional relationship between the subject 23 and the imaging unit 12 is the same. Therefore, when the subject 23 is imaged with the positional relationship between the subject 23 and the imaging unit 12 unchanged, the reference distance hmin may be calculated in advance. In addition, when the positional relationship or distance between the subject 23 and the imaging unit 12 changes, the reference distance hmin may be updated only when it changes. Therefore, the distance limiter 5 can calculate the distance limit value easily and quickly.
  • the distance limit value calculated by the distance limiter 5 is set as a new h, and is substituted into the above-described expressions (16) and (17) to obtain the pixel position (qx ′, qy ′) after the pixel position conversion.
  • the pixel position is converted only in the subject 23 area in front of the point P2 shown in FIG. 9, and the original pixel position is adopted as it is behind the point P2.
  • the pixel position is converted only for the inner region from the contour line where the light passing through the optical center position O of the imaging unit 12 contacts the surface of the subject 23, and at the original pixel position in the outer region from the contour line. Is displayed.
  • the size of the contour line is the same as the contour line of the subject image 22 in the image captured by the imaging unit 12.
  • the distance limit value is maximized at the most protruding portion of the subject 23.
  • the subject 23 is a human face, it becomes the head of the nose.
  • the larger the distance limit value the larger the pixel position calculated by the above-described equations (16) and (17) is converted, and the degree of correction of image distortion increases.
  • the distance limit value generated by the distance limiter 5 when the pixel position is converted using the distance limit value generated by the distance limiter 5, the distance from each position on the surface of the subject 23 to the reference plane 25a is uniformly evaluated to be small. Some distortion of the image 22 remains. Therefore, it is conceivable to devise a method for calculating the distance limit value by the distance limiter 5.
  • a distance hmax from the head of the nose to the reference surface 25a is calculated in advance.
  • the distance hmax may be an average value obtained from an average face size of a human.
  • the distance h is converted into a distance limit value based on the following equation (22).
  • the distance limit value is zero as described above.
  • the above-described equation (22) means that the position closer to the optical center position O of the imaging unit 12 among the positions on the surface of the subject 23 is weighted to increase the distance limit value.
  • complete image distortion correction can be performed at the subject position closest to the optical center position O of the imaging unit 12, and the longer the subject position from the optical center position O of the imaging unit 12, the more the image distortion correction is performed.
  • the effect of can be weakened. Therefore, it is possible to correct the distortion of the subject image 22 better than performing the image distortion correction based on the above-described distance limit value (h ⁇ hmin).
  • equation (22) for each position on the surface of the subject 23 performs image distortion correction based on the distance limit value (h ⁇ hmin) in order to increase the processing burden on the processor and the like. Whether to perform image distortion correction based on equation (22) may be appropriately determined according to the processing capability of the processor or the like.
  • the distance from each position on the surface of the subject 23 to the reference plane 25a is converted into a distance limit value, and pixel position conversion is performed on at least a part of the subject image 22 based on the distance limit value. Therefore, it is possible to accurately correct image distortion caused by the close distance between the subject image 22 and the imaging unit 12, and there is no problem that an invalid image is displayed near the contour of the subject image.
  • the image distortion in the vicinity of the location closest to the optical center position O of the imaging unit 12 can be corrected with high accuracy.
  • At least a part of the image distortion correction apparatus 1 and the information processing apparatus 11 described in the above-described embodiment may be configured by hardware or software.
  • a program for realizing at least a part of the functions of the image distortion correction apparatus 1 and the information processing apparatus 11 is stored in a recording medium such as a flexible disk or a CD-ROM, and is read and executed by a computer. May be.
  • the recording medium is not limited to a removable medium such as a magnetic disk or an optical disk, but may be a fixed recording medium such as a hard disk device or a memory.
  • a program for realizing at least a part of the functions of the image distortion correction apparatus 1 and the information processing apparatus 11 may be distributed via a communication line (including wireless communication) such as the Internet. Further, the program may be distributed in a state where the program is encrypted, modulated or compressed, and stored in a recording medium via a wired line such as the Internet or a wireless line.

Landscapes

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

Abstract

 画像歪み補正装置は、撮像部と被写体との位置関係を推定する位置関係推定部と、被写体画像およびその背景画像に対応する画素データを格納する第1記憶部と、推定された距離に応じた距離制限値を算出する距離制限部と、距離推定部で推定された距離が基準距離より大きい場合には、距離制限値に基づいて、第1記憶部に格納された対応画素データの画素位置を、撮像部の光学系の焦点距離を無限遠とした場合の画素位置に変換し、距離推定部で推定された距離が基準距離以下の場合には、第1記憶部に格納された対応画素データの画素位置をそのまま維持する画素位置変換部と、画素位置変換部で画素位置を変換した後の被写体画像およびその背景画像に対応する画素データを格納する第2記憶部と、を備える。

Description

画像歪み補正装置、情報処理装置および画像歪み補正方法
 本発明は、被写体画像の歪みを補正する画像歪み補正装置、情報処理装置および画像歪み補正方法に関する。
 携帯電話やスマートフォン、タブレット端末などの携帯機器に搭載されるカメラ機能の高性能化に伴って、これら端末のユーザが自分自身の姿を撮影する自分撮りを行う機会も増えてきた。
 自分撮りを行う場合、被写体である自分とカメラとの距離が短くなるため、顔の一部が歪んで撮影されることが多い。このような不具合を解消するために、例えば特開2007-243241号公報では、自分撮りをする際に台形状に歪んだ画像の自動補正を行う技術が開示されている。
 しかしながら、特開2007-243241号公報は、撮影画像の全体の歪みを補正するものであり、例えば、自分撮りした顔の一部だけの補正をするものではない。
 自分撮りをした場合、カメラとの距離が最も短くなる鼻が他の顔の部位よりも、より大きく写ってしまい、不自然な撮影画像となる。鼻が大きく写るのを防止するには、顔とカメラとの距離を離さざるを得ず、自分撮りでは自分の手を伸ばせる距離しかカメラを配置できないため、鼻が大きく写るのを防止できない。
 本発明は、上述した課題を解決するためになされたものであり、その目的は、自分撮りする場合のように近距離撮影を行う場合に、鼻等の顔の一部が大きく写る不具合を防止可能な画像歪み補正装置を提供することである。
 上記の課題を解決するために、本発明の一態様では、撮像部で撮像された被写体画像に基づいて、前記撮像部と被写体との位置関係を推定する位置関係推定部と、
 被写体画像およびその背景画像に対応する画素データを格納する第1記憶部と、
 被写体の表面上の各位置から、前記撮像部の光軸に直交する被写体の基準面までの距離を推定する距離推定部と、
 前記推定された各距離が所定の基準距離以下の場合にはゼロになり、前記推定された距離が前記基準距離より大きい場合には前記推定された距離と前記基準距離との差分値に応じた値になる距離制限値を算出する距離制限部と、
 前記距離推定部で推定された距離が前記基準距離より大きい場合には、前記距離制限値に基づいて、前記第1記憶部に格納された対応画素データの画素位置を、前記撮像部の光学系の焦点距離を無限遠とした場合の画素位置に変換し、前記距離推定部で推定された距離が前記基準距離以下の場合には、前記第1記憶部に格納された対応画素データの画素位置をそのまま維持する画素位置変換部と、
 前記画素位置変換部で画素位置を変換した後の被写体画像およびその背景画像に対応する画素データを格納する第2記憶部と、を備えることを特徴とする画像歪み補正装置が提供される。
 本発明によれば、自分撮りする場合のように近距離撮影を行う場合に、鼻等の顔の一部が大きく写る不具合を防止できる。
本発明の一実施形態による画像歪み補正装置1の概略構成を示すブロック図。 図1の画像歪み補正装置1を内蔵する情報処理装置11の主要部の構成を示すブロック図。 撮像部12の撮像面21に写った被写体画像22の一例を示す図。 被写体23と撮像部12の光学系15を上から眺めた図。 被写体を楕円球25に近似した例を示す図。 楕円球25からなる被写体23の表面上の任意の点Pと光軸10とを通る平面であるメリディオナル面26を示す図。 図1に示す画像歪み補正装置1の処理動作の一例を示すフローチャート。 自分撮りのような近距離撮影で写らない領域31を斜線で示した図。 図8のような近距離撮影で撮像された被写体画像22について図7の処理を行った後の被写体画像22を示す図。 左側の図は被写体23を上から見た図、右側の図は被写体画像22の一部を示す図。
 以下、図面を参照して本発明の実施形態を説明する。以下の実施形態では、画像歪み補正装置内の特徴的な構成および動作を中心に説明するが、画像歪み補正装置には以下の説明で省略した構成および動作が存在しうる。ただし、これらの省略した構成および動作も本実施形態の範囲に含まれるものである。
 図1は本発明の一実施形態による画像歪み補正装置1の概略構成を示すブロック図である。図1の画像歪み補正装置1は、第1記憶部2と、位置関係推定部3と、距離推定部4と、距離制限部5と、画素位置変換部6と、第2記憶部7とを備えている。
 位置関係推定部3は、後述する撮像部で撮像された被写体画像に基づいて、撮像部と被写体との位置関係を推定する。
 第1記憶部2は、被写体画像およびその背景画像に対応する画素データを格納する。
 距離推定部4は、被写体上の各位置から、撮像部の光軸に直交する被写体の基準面までの距離を推定する。
 距離制限部5は、距離推定部4で推定された距離に基づいて距離制限値を生成する。距離制限値は、距離推定部4で推定された距離が所定の基準距離以下の場合にはゼロになり、距離推定部4で推定された距離が基準距離より大きい場合には、距離推定部4で推定された距離と基準距離との差分値に応じた値になる。
 画素位置変換部6は、距離推定部4で推定された距離が基準距離より大きい場合には、距離制限値に基づいて、第1記憶部2に格納された対応画素データの画素位置を、撮像部の光学系の焦点距離を無限遠とした場合の画素位置に変換し、距離推定部4で推定された距離が基準距離以下の場合には、第1記憶部2に格納された対応画素データの画素位置をそのまま維持する。
 第2記憶部7は、画素位置変換部6で画素位置を変換した後の被写体画像およびその背景画像に対応する画素データを格納する。
 図1の画像歪み補正装置1は、携帯電話やスマートフォン等のカメラ機能付きの携帯機器を利用した自分撮りをする場合などに、近距離撮影による撮像画像に生じる歪みを補正するものである。撮像画像に歪みが生じる理由は、カメラと被写体との距離が短いことから、被写体に凹凸がある場合には、カメラに最近接の被写***置がより大きく撮影されてしまうことによる。
すなわち、カメラのレンズ自体の歪みが極めて少ないものとしても、被写体との距離の逆数に比例して被写体の像の大きさが変化する。よって、被写体に凹凸があれば、被写体中の場所によって、像倍率が変化し、カメラに近いほど大きく写ってしまう。
 被写体に凹凸があっても、被写体の像倍率が場所によらず一定であるようにすれば、被写体画像の歪みはなくなる。レンズの焦点距離を長くすればするほど、被写体から遠ざかって撮影することができるようになり、被写体の凹凸による被写体上の近い部分と遠い部分の距離の違いの比率が少なくなるために像倍率のばらつきは小さくなる。よって、像倍率のばらつきを最小化する理想的な条件は、焦点距離が無限遠のレンズで被写体を撮像することである。すなわち、焦点距離が無限遠のレンズの結像位置が撮像部の撮像面となるように、同レンズを撮像面から無限遠にまで離して被写体を撮像することである。そこで、本実施形態では、カメラで撮像した画素データの各画素位置を、焦点距離が無限遠のレンズで被写体を撮像した場合の画素位置に変換することで、被写体画像の歪みを補正する。
 図2は図1の画像歪み補正装置1を内蔵する情報処理装置11の主要部の構成を示すブロック図である。図2の情報処理装置11は、例えば、携帯電話やスマートフォン、タブレット端末、デジタルカメラなどのカメラ機能付きの携帯機器である。
 図2の情報処理装置11は、図1に示す画像歪み補正装置1と、撮像部12と、モニタ画面表示部13と、制御部14とを有する。
 撮像部12は、被写体およびその背景を撮像して、被写体画像およびその背景画像を構成する画素データを生成する。撮像部12は、CMOSセンサやCCD(Charge Coupled Device)などの撮像センサを有する。
 モニタ画面表示部13は、撮像部12で撮像する前のライブ画像や、撮像後の被写体画像および背景画像を表示する。また、モニタ画面表示部13には、画像の歪み補正を行うべき被写体画像の推奨表示位置を示す枠を表示してもよい。また、モニタ画面表示部13にタッチパネル機能を設けて、モニタ画面表示部13に表示されたライブ画像の中から、歪み補正を行う対象となる被写体画像を指で選択できるようにしてもよい。あるいは、撮像部12で撮像したライブ画像や静止画像に対して顔認識処理を行って、画像の歪み補正を行うべき被写体画像を自動選択してもよい。あるいは、顔認識処理を行って、画像の歪み補正を行う候補となりうる複数の被写体画像を抽出し、これら複数の被写体画像から少なくとも一部をユーザに選択させてもよい。
 制御部14は、画像歪み補正装置1、撮像部12、およびモニタ画面表示部13を制御する。
 図3は撮像部12の撮像面21に写った被写体画像22の一例を示す図、図4は被写体23と撮像部12の光学系15を上から眺めた図である。図3では、撮像面21に予め設定された枠24に接するように、その枠24の内側に被写体画像22を配置して撮像した例を示している。なお、図3の枠24は、モニタ画面表示部13に表示される枠(不図示)に対応したものであり、図3はユーザがモニタ画面表示部13に表示される枠の内側に被写体画像22が収まるように撮像した例を示している。
 図3では、一例として、撮像部12の光学系の焦点距離を28mm、撮像部12の撮像面21のサイズを35mm×24mm、図3に示す撮像面21の左右方向の画角を約64度、枠24の左右方向長さを10mm、枠24の上下方向長さを16mmとしている。
 撮像面21の左右方向長さ35mmが約64度の画角に対応するため、枠24の左右方向長さ10mmは、約20度の画角に対応する。
 被写体23が人間の顔の場合、顔の形状や大きさは、個人差はあるものの、概ね決まっている。本実施形態では、処理の簡略化のために、顔の形状を130mm×130mm×210mmの楕円球25に近似する。図5は、被写体を楕円球25に近似した例を示す図である。図5では、楕円球25の中心Gを通って撮像部12の光軸10に直交する面を基準面25aとし、この基準面25a上の撮像部12の光軸10との交点をB、撮像面21上の撮像部12の光軸10との交点をIとしている。
 図3の例では、撮像面21上の枠24の中心位置は、撮像面21上の光軸10との交点Iから上方に3mmずれている。また、枠24の下辺は撮像面21の下辺から7mm上方に位置し、枠24の上辺は撮像面21の上辺から1mm下方に位置している。
 楕円球25の横幅である130mmが撮像面21上では図3に示すように10mmになるため、1/13倍で結像していることになる。撮像部12の光学系の焦点距離は28mmであるため、撮像部12の光学中心位置Oから被写体23の基準面25a上の点Bまでの距離は、28×13=364mmとなる。また、図3に示すように、撮像面21上での光軸10との交点から枠24の中心までの距離は3mmであるため、被写体23の基準面25a上の点Bから被写体23の中心位置Aまでの距離は、3×13=39mmとなる。
 図6は楕円球25からなる被写体23の表面上の任意の点Pと光軸10とを通る平面であるメリディオナル面26を示す図である。図6では、点Pに対応する撮像面21上の撮像位置をQ’、楕円球25の点Pから光軸10に下ろした垂線の光軸10との交点をC、撮像部12の光学中心位置をO、撮像部12の光軸10と撮像面21との交点をIとしている。ここで、レンズの歪み(歪曲収差)がないものと仮定すると、図6における三角形PCOと三角形Q’IOは相似形であるため、以下の(1)式に示す比例式が成り立つ。
 |PC|:|OC|=|Q’I|:|OI|  …(1)
 ここで、被写体23上の点Pから基準面25aまでの距離|BC|をh、撮像面21上の点Pの撮像位置から光軸10との交点までの距離|Q’I|をA’とする。
 上述した(1)式において、|OC|=|OB|-h=364mm-hであり、|OI|=28mmである。
 よって、(1)式は、(2)式のようになる。
 |PC|:(364-h)=A’:28  …(2)
 この(2)式より、撮像面21上の点Pの撮像位置から光軸10との交点までの距離A’は、以下の(3)式で表される。
Figure JPOXMLDOC01-appb-M000001
 A’は、撮像面21上に実際に撮像される像高(実像高)を表している。
 次に、2倍の距離から2倍の焦点距離のレンズを使って撮影する場合について考える。この場合、|OC|=364×2-hとなり、|OI|=28×2となるため、上述した(3)式は、以下の(4)式のようになる。
Figure JPOXMLDOC01-appb-M000002
 (4)式では、2倍の焦点距離(58mm)のレンズを使って撮影した場合の撮像面21上の像高をA”としている。
 この(4)式を一般化すると、M倍の距離からM倍の焦点距離のレンズを使って撮影した場合の撮像面21上の像高A'''は、以下の(5)式で表される。
Figure JPOXMLDOC01-appb-M000003
 ここで、Mを無限大の値とした場合のA'''の極限値をAとすると、(5)式は、以下の(6)式のようになる。
Figure JPOXMLDOC01-appb-M000004
 この(6)式で示すAは、望遠レンズを用いて無限大の遠方から撮影した場合における、被写体23上の点Pの像高(理想像高)である。この理想像高位置をQとすると、このQと焦点距離28mmの撮像部12における像高位置Q’はいずれもメリディオナル面26上にあるため、理想像高位置Qは、撮像面21上の光軸10との交点Iと像高位置Q’とを接続する直線上にあり、交点Iと理想像高位置Qとの距離はAである。
 焦点距離が無限遠の光学系を備えた撮像部12にて被写体23を撮像した場合の撮像面21上の被写体画像22には、被写体23の凹凸による歪みはない。その理由は、被写体23の凹凸の大きさは、撮像部12の光学系の焦点距離に比べて無視できる程度に小さいため、被写体23の凹凸は撮像面21上の被写体画像22の大きさにほとんど影響を与えないためである。よって、焦点距離28mmでの撮像面21上の撮像位置を、理想像高位置に画素位置変換すれば、被写体23の凹凸による歪みのない被写体画像22が得られることになる。
 図7は図1に示す画像歪み補正装置1の処理動作の一例を示すフローチャートである。以下、このフローチャートに基づいて図1の画像歪み補正装置1の処理動作を説明する。なお、このフローチャートでは、撮像部12における撮像面21の横幅をWmm、縦幅をHmm、横(左右)方向の画素数をPW画素、縦(上下)方向の画素数をPH画素とする。
 まず、自分撮りを行いたいユーザが携帯機器のモニタ画面表示部13に予め表示された枠24の内側に、枠24に接するように被写体画像22を表示させた状態で、撮影指示ボタンを操作すると、撮像部12は被写体画像22を撮像して、被写体画像22の画素データが第1記憶部2に格納される。
 次に、位置関係推定部3にて、撮像部12と被写体23との位置関係を推定する(ステップS1)。被写体23の大きさが上述したように横幅130mmの楕円球25であるとし、撮像部12の光学系の焦点距離が28mmで、撮像面21上の被写体画像22の横幅が10mmであるとすると、被写体23の中心を通って光軸10に直交する基準面25aから撮像部12の光学中心位置Oまでの距離は、上述したように、28×130/10=364mmとなる。また、撮像面21上での光軸10との交点から枠24の中心までの距離は図3に示すように3mmであることから、被写体23の中心から基準面25aと光軸10との交点までの距離は、3×130/10=39mmとなる。
 このように、位置関係推定部3は、撮像部12と被写体23との位置関係として、被写体23の中心を通って光軸10に直交する基準面25aから撮像部12の光学中心位置Oまでの距離と、被写体23の中心から基準面25aと光軸10との交点までの距離とを求める。
 なお、ユーザがモニタ画面表示部13に予め表示された枠24にぴったり収まるように被写体画像22を表示させた状態で撮像部12にて撮像する場合、ステップS2で推定される撮像部12と被写体23との位置関係はほぼ同一になる。よって、上述した364mmや39mmを予め算出して記憶しておき、枠24にぴったり収まるように被写体画像22を撮像する際には、予め算出して記憶しておいた数値を流用してもよい。これにより、ステップS1の処理を省略することができる。
 次に、距離推定部4は、被写体23の表面上の任意の点Pを撮像した撮像面21上の理想像高位置Qの画素位置(qx,qy)に基づいて、撮像面21上の座標位置(x,y)を算出する(ステップS2)。
 このステップS2では、図6に示すように、撮像面21の横方向をX軸方向、縦方向をY軸方向とすると、座標位置(x,y)は、以下の(7)式と(8)式で表される。
Figure JPOXMLDOC01-appb-M000005
 次に、距離推定部4は、被写体23の表面上の点Pを基準面25aに投影した点Lの二次元座標位置(Xl,Yl)を算出する(ステップS3)。撮像部12の光学系の光学中心位置Oを原点とする空間座標系において、光軸10をZ軸、撮像面21の横方向をX軸、縦方向をY軸とする。点Lはメリディオナル面26上にあることから、(Xl,Yl)は、以下の(9)式と(10)式で表される。
Figure JPOXMLDOC01-appb-M000006
 次に、距離推定部4は、被写体23の表面上の点Pから基準面25aまでの距離hを算出する(ステップS4)。
 図6における楕円球25からなる被写体23の中心座標位置Aは、(0,39,364)である。よって、楕円球25の方程式は、以下の(11)式で表される。
Figure JPOXMLDOC01-appb-M000007
 被写体23の表面上の点Pのxy座標は、上述した点Lと同じであり、点Pのz座標をZpとすると、点Pの三次元座標は、P(Xl,Yl,Zp)となる。この座標を(11)式に代入すると、以下の(12)式のようになる。
Figure JPOXMLDOC01-appb-M000008
 この(12)式をZpについて解くと、以下の(13)式が得られる。
Figure JPOXMLDOC01-appb-M000009
 ここで、Zp=364-hであるため、(13)式を変形するとhは以下の(14)式で表される。
Figure JPOXMLDOC01-appb-M000010
 次に、画素位置変換部6は、理想像高Qの画素位置(qx,qy)の実像Q’の画像位置(qx’,qy’)を求める(ステップS5)。
 上述した(3)式と(6)式より、以下の(15)式が得られる。
Figure JPOXMLDOC01-appb-M000011
 よって、実像Q’の画素位置(qx’,qy’)は以下の(16)式と(17)式で表される。
Figure JPOXMLDOC01-appb-M000012
 次に、画素位置変換部6は、実像Q’の画素位置(qx’,qy’)の画素データを、第1記憶部2から読み出す(ステップS6)。
 次に、画素位置変換部6は、読み出した画素データを、理想像高Qの画素位置(qx,qy)に対応づけて第2記憶部7に格納する(ステップS7)。
 次に、画素位置変換部6は、修正すべき画素位置がまだ残っているか否かを判定し(ステップS8)、まだ残っていれば、ステップS2以降の処理を繰り返し、修正すべき全画素位置での画素位置変換が終了すると、図7の処理を終了する。
 このように、撮像面21上の任意の座標(x,y)について、上述したステップS1~S8の処理を繰り返すことで、画像の歪み補正のための画素位置の変換を行うことができる。
 図7の処理によれば、予め被写体23の3次元形状が予測できる場合には、近距離撮影による画像の歪みを補正できる。しかしながら、解決しなければならない問題がある。それは、近距離撮影では写らないが、遠方からの撮影では写る部分があることである。
 図8は自分撮りのような近距離撮影で写らない領域31を斜線で示した図、図9は図8のような近距離撮影で撮像された被写体画像22について図7の処理を行った後の被写体画像22を示す図である。図9の斜線領域32は、実際には写らなかった領域の対応画素領域であり、この画素領域には、元画像の一部が折り返したような無効な画像が表示され、画像の品質が劣化してしまう。よって、近距離撮影では写らずに、遠方からの望遠撮影では写る領域を画像補間する必要がある。
 図9の斜線領域32内の実線32aは、実際に撮像されたときの被写体23の輪郭線である。また、図9の斜線領域32の内側の境界線32bは図7の処理後の被写体23の輪郭線である。このように、図7の処理を行うことで、被写体23の輪郭線は一回り小さくなる。さらに、図9の斜線領域32の外側の境界線32cは、実際に撮像された被写体23の輪郭に接する背景部分の輪郭線である。
 このように、図7の処理を行うと、実際に撮像された状態では、互いに接している被写体23の輪郭線と背景の輪郭線とが斜線領域32の内側の境界線32bと外側の境界線32cとに分離してしまい、これら境界線32b,32cの間にある斜線領域32には無効な画像が表示されてしまう。
 図10の左側の図は被写体23を真横から見た図、右側の図は被写体画像22の一部である。左側の図と右側の図は、被写体23の位置および大きさを合わせている。図10の右側の図の左右方向は、左側の図の前後(紙面の表裏)方向に対応する。
 図10のP1は被写体23の下部の最も外側の輪郭位置を通って後方の背景面33と交わる点である。この背景面33は、被写体23の中心点からdだけ後方の面である。P2は撮像部12の光学中心位置Oを通る光線が被写体23の最下部に接する点である。P2は被写体23の中心を通って光軸10に直交する基準面25aからh2だけ前方にある点である。P3はこの光線が背景面33と交わる点である。Q1’はP1に対応する像位置、Q2’はP2に対応する像位置、A1’はQ1’の像高、A2’はQ2’の像高である。
 上述した(15)式より、A1’とA2’はそれぞれ以下の(18)式と(19)式で表される。
Figure JPOXMLDOC01-appb-M000013
 これら(18)式と(19)式を変形すると、以下の(20)式と(21)式が得られる。
Figure JPOXMLDOC01-appb-M000014
 このように、図7の処理に基づいて画素位置の変換を行うと、図10のQ1’の画素位置の画素データはQ1の画素位置に移動し、Q2’の画素位置の画素データはQ2の画素位置に移動する。これにより、図10に示すように、Q1からQ2にかけての斜線領域32内の画素位置に変換される有効な画素データは存在しなくなり、斜線領域32内には本来の被写体画像22とは異なる無意味な画像が表示されてしまい、画像の品質が劣化する。そこで、本実施形態では、斜線領域32のような無意味な画素データが表示される領域が存在しないように、画素データの補間を行う。
 本実施形態では、歪みを補正した後の被写体画像22の輪郭線32aから外側には、図10の斜線領域32よりも外側の背景画像が表示されるように、画素データの補間処理を行う。
 上述した画像の歪み補正と補間処理は、イメージセンサで撮像した全画素を対象として行わなければならず、例えばイメージセンサの画素数が1000万画素であれば、1000万回の演算が必要となる。よって、画像の歪み補正と補間処理の実行時間が限られている場合や、スマートフォンなどの演算処理性能の低いプロセッサを搭載した携帯機器などでは、全画素について上述した画像の歪み補正処理と補間処理を行うのは容易ではない。
 そこで、本実施形態では、被写体23の表面上の各位置から被写体23の基準面25aまでの距離hを制限して、上述した歪み補正処理を行うことで、特別な補間処理を行わなくても、図10に示すような斜線領域32が存在しない画像データを生成する。
 より具体的には、図1に示す距離制限部5は、被写体23の表面上の各位置から基準面25aまでの距離に基づいて距離制限値を生成する。距離制限値は、被写体23の表面上の各位置から基準面25aまでの距離hが基準距離hmin以下の場合にはゼロになり、被写体23の表面上の各位置から基準面25aまでの距離hが基準距離hminより大きい場合には、距離hと基準距離hminとの差分値(h-hmin)になる。基準距離hminは、具体的には、撮像部12の光軸中心位置を通る光が最短距離で被写体23に接する接点から基準面25aまでの距離であり、この接点は例えば図10に示す点P2である。
 このように、被写体23の表面上の各位置における基準面25aまでの距離を、距離制限値に変換すると、図10に示す点P2よりも前側、すなわち撮像部12に近い側に位置する被写体23領域の距離制限値は(h-hmin)になり、点P2よりも後ろ側(背景側)に位置する被写体23領域と背景領域の距離制限値はゼロになる。
 上述した基準距離hminは、被写体23と撮像部12との位置関係が同一であれば固定値である。よって、被写体23と撮像部12との位置関係を不変にして被写体23の撮像を行う場合には、予め基準距離hminを算出しておけばよい。また、被写体23と撮像部12との位置関係や距離が変化した場合には、変化した場合だけ基準距離hminを更新すればよい。よって、距離制限部5は、簡易かつ迅速に距離制限値を算出することができる。
 距離制限部5が算出した距離制限値を新たなhとして、上述した(16)式と(17)式に代入して、画素位置変換後の画素位置(qx’,qy’)を求めるようにすれば、図9に示す点P2よりも前側の被写体23領域のみ画素位置の変換が行われ、点P2よりも後ろ側については、元の画素位置がそのまま採用されることになる。
 これにより、撮像部12の光学中心位置Oを通過する光が被写体23の表面に接する輪郭線から内側領域についてのみ画素位置の変換が行われ、輪郭線よりも外側領域では、元の画素位置での表示が行われる。また、輪郭線のサイズは、撮像部12で撮像した画像に写る被写体画像22の輪郭線と同じとなる。
 なお、距離制限値が最大になるのは、被写体23の中で最も突き出した箇所であり、例えば被写体23が人間の顔であれば、鼻の頭になる。距離制限値が大きいほど、上述した(16)式と(17)式で計算される画素位置がより大きく変換され、画像の歪みの修正度合いが大きくなる。
 ところが、距離制限部5で生成した距離制限値を用いて画素位置の変換を行うと、被写体23の表面上の各位置から基準面25aまでの距離が一律に小さく評価されることになり、被写体画像22の歪みが若干残留してしまう。そこで、距離制限部5による距離制限値の算出手法を一工夫することが考えられる。
 被写体画像22の中で、歪みの修正が最も必要な箇所は、被写体画像22の中で最も突き出した箇所である鼻の頭である。そこで、鼻の頭から基準面25aまでの距離hmaxを予め算出しておく。この距離hmaxは、人間の平均的な顔のサイズから求めた平均値を採用してもよい。そして、距離hが基準距離hminより大きい場合は、以下の(22)式に基づいて、距離hを距離制限値に変換する。
Figure JPOXMLDOC01-appb-M000015
 なお、距離hが基準距離hmin以下の場合は、上記と同様に距離制限値はゼロとする。
 上述した(22)式は、被写体23の表面上の各位置の中で、撮像部12の光学中心位置Oに近い位置ほど、距離制限値をより大きくするための重み付けを行うことを意味する。これにより、撮像部12の光学中心位置Oに最も近い被写***置では、完全な画像歪み補正を行うことができ、撮像部12の光学中心位置Oからの距離がより長い被写***置ほど、画像歪み補正の効果を弱めることができる。よって、上述した距離制限値(h-hmin)に基づいて画像歪み補正を行うよりも、より良好に被写体画像22の歪み修正を行うことができる。
 なお、被写体23の表面上の各位置ごとに、上述した(22)式を算出するのは、プロセッサ等の処理負担を増やすため、距離制限値(h-hmin)に基づいて画像歪み補正を行うか、(22)式に基づいて画像歪み補正を行うかは、プロセッサ等の処理能力に応じて適宜決定すればよい。
 このように、本実施形態では、被写体23の表面上の各位置から基準面25aまでの距離を距離制限値に変換し、この距離制限値に基づいて被写体画像22の少なくとも一部について画素位置変換を行うため、被写体画像22と撮像部12との距離が近接していることにより生じる画像の歪みを精度よく補正でき、被写体画像の輪郭付近に無効な画像が表示される不具合も起きない。
 また、上述した(22)式に基づいて距離制限値への変換を行えば、撮像部12の光学中心位置Oに最近接している箇所付近の画像歪みを精度よく補正できる。
 上述した実施形態で説明した画像歪み補正装置1および情報処理装置11の少なくとも一部は、ハードウェアで構成してもよいし、ソフトウェアで構成してもよい。ソフトウェアで構成する場合には、画像歪み補正装置1および情報処理装置11の少なくとも一部の機能を実現するプログラムをフレキシブルディスクやCD-ROM等の記録媒体に収納し、コンピュータに読み込ませて実行させてもよい。記録媒体は、磁気ディスクや光ディスク等の着脱可能なものに限定されず、ハードディスク装置やメモリなどの固定型の記録媒体でもよい。
 また、画像歪み補正装置1および情報処理装置11の少なくとも一部の機能を実現するプログラムを、インターネット等の通信回線(無線通信も含む)を介して頒布してもよい。さらに、同プログラムを暗号化したり、変調をかけたり、圧縮した状態で、インターネット等の有線回線や無線回線を介して、あるいは記録媒体に収納して頒布してもよい。
 本発明の態様は、上述した個々の実施形態に限定されるものではなく、当業者が想到しうる種々の変形も含むものであり、本発明の効果も上述した内容に限定されない。すなわち、特許請求の範囲に規定された内容およびその均等物から導き出される本発明の概念的な思想と趣旨を逸脱しない範囲で種々の追加、変更および部分的削除が可能である。

Claims (13)

  1.  撮像部で撮像された被写体画像に基づいて、前記撮像部と被写体との位置関係を推定する位置関係推定部と、
     被写体画像およびその背景画像に対応する画素データを格納する第1記憶部と、
     被写体の表面上の各位置から、前記撮像部の光軸に直交する被写体の基準面までの距離を推定する距離推定部と、
     前記推定された各距離が所定の基準距離以下の場合にはゼロになり、前記推定された距離が前記基準距離より大きい場合には前記推定された距離と前記基準距離との差分値に応じた値になる距離制限値を算出する距離制限部と、
     前記距離推定部で推定された距離が前記基準距離より大きい場合には、前記距離制限値に基づいて、前記第1記憶部に格納された対応画素データの画素位置を、前記撮像部の光学系の焦点距離を無限遠とした場合の画素位置に変換し、前記距離推定部で推定された距離が前記基準距離以下の場合には、前記第1記憶部に格納された対応画素データの画素位置をそのまま維持する画素位置変換部と、
     前記画素位置変換部で画素位置を変換した後の被写体画像およびその背景画像に対応する画素データを格納する第2記憶部と、を備えることを特徴とする画像歪み補正装置。
  2.  前記距離推定部は、前記撮像部の光軸中心位置を通る光が最短距離で被写体に接する接点から前記基準面までの距離を前記基準距離として設定する請求項1に記載の画像歪み補正装置。
  3.  前記距離制限部は、前記距離推定部で推定された距離が前記基準距離より大きい場合には、前記推定された距離と前記基準距離との差分値を前記距離制限値とし、
     前記画素位置変換部は、前記距離推定部で推定された距離が前記基準距離より大きい場合には、前記差分値に基づいて、前記第1記憶部に格納された対応画素データの画素位置を、前記撮像部の光学系の焦点距離を無限遠とした場合の画素位置に変換する請求項1または2に記載の画像歪み補正装置。
  4.  前記距離制限部は、前記距離推定部で推定された距離が前記基準距離より大きい場合には、前記撮像部の光軸中心位置に最近接の被写体の表面上の特定位置と前記基準面までの距離を前記特定位置での前記距離制限値とし、前記特定位置から離れるに従って前記特定位置での前記距離制限値より値が次第に小さくなるように前記距離制限値を設定する請求項1または2に記載の画像歪み補正装置。
  5.  前記画素位置変換部は、前記撮像部の光軸中心位置を通る各方向の光が被写体に接する接点よりも内側の各画素位置のみについて画素位置の変換を行う請求項1乃至4のいずれかに記載の画像歪み補正装置。
  6.  前記基準面は、被写体の中心位置を通過し前記撮像部の光軸に直交する平面であることを特徴とする請求項1乃至5のいずれかに記載の画像歪み補正装置。
  7.  前記位置関係推定部は、前記撮像部の光軸中心位置から前記基準面までの距離と、被写体の中心位置から前記基準面と前記撮像部の光軸との交点までの距離と、を推定することを特徴とする請求項6に記載の画像歪み補正装置。
  8.  前記画素位置変換部は、前記距離推定部で推定された距離が前記基準距離より大きい場合には、前記位置関係推定部で推定された前記撮像部の光軸中心位置から前記基準面までの距離と、前記距離制限値とに基づいて、画素位置の変換を行うことを特徴とする請求項7に記載の画像歪み補正装置。
  9.  被写体画像およびその背景画像を表示させるとともに、被写体の推奨撮像位置を示す枠を表示させるモニタ画面表示部を備え、
     前記位置関係推定部は、前記枠の内部に収まっている被写体画像に対して前記位置関係を推定することを特徴とする請求項1乃至8のいずれかに記載の画像歪み補正装置。
  10.  被写体画像を表示させるモニタ画面表示部と、
     前記モニタ画面表示部の表示画像の中から、画像歪み補正を行うべき被写体画像を指定する指定部と、を備え、
     前記位置関係推定部は、前記指定部にて指定された被写体画像に対して前記位置関係を推定することを特徴とする請求項1乃至8のいずれかに記載の画像歪み補正装置。
  11.  前記撮像部にて撮像された画像に対して顔認識処理を行って、画像歪み補正を行うべき被写体画像を抽出する抽出部を備え、
     前記位置関係推定部は、前記抽出部にて抽出された被写体画像に対して前記位置関係を推定することを特徴とする請求項1乃至8のいずれかに記載の画像歪み補正装置。
  12.  被写体画像およびその背景画像を撮像する撮像部と、
     前記撮像部で撮像された被写体画像に基づいて、前記撮像部と被写体との位置関係を推定する位置関係推定部と、
     被写体画像およびその背景画像に対応する画素データを格納する第1記憶部と、
     被写体の表面上の各位置から、前記撮像部の光軸に直交する被写体の基準面までの距離を推定する距離推定部と、
     前記推定された各距離が所定の基準距離以下の場合にはゼロになり、前記推定された距離が前記基準距離より大きい場合には前記推定された距離と前記基準距離との差分値に応じた値になる距離制限値を算出する距離制限部と、
     前記距離推定部で推定された距離が前記基準距離より大きい場合には、前記距離制限値に基づいて、前記第1記憶部に格納された対応画素データの画素位置を、前記撮像部の光学系の焦点距離を無限遠とした場合の画素位置に変換し、前記距離推定部で推定された距離が前記基準距離以下の場合には、前記第1記憶部に格納された対応画素データの画素位置をそのまま維持する画素位置変換部と、
     前記画素位置変換部で画素位置を変換した後の被写体画像およびその背景画像に対応する画素データを格納する第2記憶部と、を備えることを特徴とする情報処理装置。
  13.  撮像部で撮像された被写体画像に基づいて、前記撮像部と被写体との位置関係を推定するステップと、
     被写体画像およびその背景画像に対応する画素データを第1記憶部に格納するステップと、
     被写体の表面上の各位置から、前記撮像部の光軸に直交する被写体の基準面までの距離を推定するステップと、
     前記推定された各距離が所定の基準距離以下の場合にはゼロになり、前記推定された距離が前記基準距離より大きい場合には前記推定された距離と前記基準距離との差分値に応じた値になる距離制限値を算出するステップと、
     前記推定された距離が前記基準距離より大きい場合には、前記距離制限値に基づいて、前記第1記憶部に格納された対応画素データの画素位置を、前記撮像部の光学系の焦点距離を無限遠とした場合の画素位置に変換し、前記推定された距離が前記基準距離以下の場合には、前記第1記憶部に格納された対応画素データの画素位置をそのまま維持するステップと、
     画素位置を変換した後の被写体画像およびその背景画像に対応する画素データを第2記憶部に格納するステップと、を備えることを特徴とする画像歪み補正方法。
PCT/JP2014/067198 2014-06-27 2014-06-27 画像歪み補正装置、情報処理装置および画像歪み補正方法 WO2015198478A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/067198 WO2015198478A1 (ja) 2014-06-27 2014-06-27 画像歪み補正装置、情報処理装置および画像歪み補正方法

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/067198 WO2015198478A1 (ja) 2014-06-27 2014-06-27 画像歪み補正装置、情報処理装置および画像歪み補正方法

Publications (1)

Publication Number Publication Date
WO2015198478A1 true WO2015198478A1 (ja) 2015-12-30

Family

ID=54937601

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/067198 WO2015198478A1 (ja) 2014-06-27 2014-06-27 画像歪み補正装置、情報処理装置および画像歪み補正方法

Country Status (1)

Country Link
WO (1) WO2015198478A1 (ja)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10812717B2 (en) 2018-05-04 2020-10-20 Google Llc Stabilizing video by accounting for a location of a feature in a stabilized view of a frame
US11064119B2 (en) 2017-10-03 2021-07-13 Google Llc Video stabilization
US11190689B1 (en) 2020-07-29 2021-11-30 Google Llc Multi-camera video stabilization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247446A (ja) * 2001-02-16 2002-08-30 Minolta Co Ltd デジタル撮影装置、撮影装置、画像処理装置および記録媒体
JP2005025703A (ja) * 2003-07-04 2005-01-27 Sony Corp 画像処理方法および装置、並びに画像処理プログラム
JP2012094102A (ja) * 2010-09-27 2012-05-17 Nintendo Co Ltd 情報処理プログラム、情報処理装置、情報処理システム、および、情報処理方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002247446A (ja) * 2001-02-16 2002-08-30 Minolta Co Ltd デジタル撮影装置、撮影装置、画像処理装置および記録媒体
JP2005025703A (ja) * 2003-07-04 2005-01-27 Sony Corp 画像処理方法および装置、並びに画像処理プログラム
JP2012094102A (ja) * 2010-09-27 2012-05-17 Nintendo Co Ltd 情報処理プログラム、情報処理装置、情報処理システム、および、情報処理方法

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11064119B2 (en) 2017-10-03 2021-07-13 Google Llc Video stabilization
US11683586B2 (en) 2017-10-03 2023-06-20 Google Llc Video stabilization
US10812717B2 (en) 2018-05-04 2020-10-20 Google Llc Stabilizing video by accounting for a location of a feature in a stabilized view of a frame
US11227146B2 (en) 2018-05-04 2022-01-18 Google Llc Stabilizing video by accounting for a location of a feature in a stabilized view of a frame
US11190689B1 (en) 2020-07-29 2021-11-30 Google Llc Multi-camera video stabilization
US11856295B2 (en) 2020-07-29 2023-12-26 Google Llc Multi-camera video stabilization

Similar Documents

Publication Publication Date Title
CN111147741B (zh) 基于对焦处理的防抖方法和装置、电子设备、存储介质
JP4755490B2 (ja) ブレ補正方法および撮像装置
US9870602B2 (en) Method and apparatus for fusing a first image and a second image
KR101624450B1 (ko) 화상 처리 장치, 화상 처리 방법, 및 기록 매체
CN108600576B (zh) 图像处理装置、方法和***以及计算机可读记录介质
US11825183B2 (en) Photographing method and photographing apparatus for adjusting a field of view of a terminal
JP4811462B2 (ja) 画像処理方法、画像処理プログラム、画像処理装置、及び撮像装置
JP5932045B2 (ja) 立体視画像ペアの条件付き表示のための方法及び装置
JP2014225843A (ja) 画像処理装置、画像処理方法およびプログラム
US8965105B2 (en) Image processing device and method
WO2016184131A1 (zh) 基于双摄像头拍摄图像的方法、装置及计算机存储介质
KR20180101466A (ko) 심도 정보 취득 방법 및 장치, 그리고 이미지 수집 디바이스
JP2017208619A (ja) 画像処理装置、画像処理方法、プログラム及び撮像システム
CA2776881A1 (en) Image processing device, image processing method, image processing program, and recording medium
JP2013070164A (ja) 撮像装置及び撮像方法
CN109690568A (zh) 一种处理方法及移动设备
JP2016085380A (ja) 制御装置、制御方法、及び、プログラム
WO2015198478A1 (ja) 画像歪み補正装置、情報処理装置および画像歪み補正方法
JP6665917B2 (ja) 画像処理装置
JP2017103695A (ja) 画像処理装置、画像処理方法、及びそのプログラム
JP2011259053A (ja) 画像処理装置および画像処理方法
JP2019075716A (ja) 画像処理装置、画像処理方法、及びプログラム
JP6320165B2 (ja) 画像処理装置及びその制御方法、並びにプログラム
CN109214983B (zh) 图像获取装置及其图像拼接方法
JP7054437B2 (ja) 画像処理装置、画像処理方法及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14896247

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: JP

122 Ep: pct application non-entry in european phase

Ref document number: 14896247

Country of ref document: EP

Kind code of ref document: A1