WO2019049421A1 - キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法 - Google Patents

キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法 Download PDF

Info

Publication number
WO2019049421A1
WO2019049421A1 PCT/JP2018/018015 JP2018018015W WO2019049421A1 WO 2019049421 A1 WO2019049421 A1 WO 2019049421A1 JP 2018018015 W JP2018018015 W JP 2018018015W WO 2019049421 A1 WO2019049421 A1 WO 2019049421A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
chart
imaging device
calibration
correction
Prior art date
Application number
PCT/JP2018/018015
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 US16/643,678 priority Critical patent/US11232593B2/en
Priority to CN201880058435.8A priority patent/CN111095923B/zh
Priority to JP2019540760A priority patent/JP6859442B2/ja
Publication of WO2019049421A1 publication Critical patent/WO2019049421A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/002Diagnosis, testing or measuring for television systems or their details for television cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker
    • G06T2207/30208Marker matrix
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Definitions

  • the present invention relates to an apparatus for realizing calibration of an imaging device, a calibration system, and a calibration method.
  • Patent Document 1 There is known a game in which a user's body or marker is photographed by a camera, and the image area is replaced with another image and displayed on a display (see, for example, Patent Document 1).
  • the technology for acquiring the position and movement of the subject and the camera itself and recognizing the attributes of the subject by detecting and analyzing the image in the photographed image is not only the camera mounted on the game device and the information terminal but also the crime prevention It is widely introduced in systems including cameras, on-board cameras, cameras with robots, etc.
  • the internal parameter defines the relationship between the position coordinates of the pixel in the captured image and the position coordinates in the camera coordinate system in which the optical center is the origin and the length is the unit.
  • the distortion correction coefficient is a coefficient for correcting barrel distortion due to the lens and distortion in the circumferential direction.
  • the external parameters define the relationship between the camera coordinate system and the world coordinate system, and are used especially for the purpose of adjusting the inclination of the images captured by performing calibration simultaneously for multi-view cameras such as stereo cameras.
  • a calibration technique a plane chart of a checkered pattern is photographed from a plurality of viewpoints, and the position of the feature point on the photographed image and the position of the feature point on the plane of the chart in real space have a correct correspondence relationship Zhang's method for optimizing parameters is widely known (see Non-Patent Document 1).
  • the present invention has been made in view of these problems, and an object thereof is to provide a technology capable of performing calibration of a fisheye camera easily and with high accuracy.
  • the calibration apparatus comprises a photographed image acquisition unit for acquiring data of a photographed image of a calibration chart from an imaging apparatus having a fisheye lens, a position on a screen corresponding to the fisheye lens, and the chart forming an image on the position And correcting the distortion due to the lens based on the relationship with the position on the surface of the lens, and evaluating and correcting the corrected image to derive and output the value of the parameter related to the imaging device.
  • the calibration device includes a captured image acquisition unit that acquires data of a captured image of a calibration chart from an imaging device having a fisheye lens, a parameter acquisition unit that acquires values of parameters related to the imaging device, and a virtual camera
  • a pseudo image drawing unit that arranges an object model of a chart in a virtual three-dimensional space, and generates a captured image in a pseudo manner using values of acquired parameters as an image captured by a virtual camera, and a pseudo generated image
  • a viewpoint adjustment unit that derives the position of the imaging device with respect to the chart by comparing the image with the captured image.
  • This calibration system is characterized by including an imaging device having a fisheye lens and the calibration device.
  • Yet another aspect of the present invention relates to a calibration method.
  • This calibration method comprises the steps of acquiring data of a photographed image of a chart for calibration from an imaging device having a fisheye lens, a position on a screen corresponding to the fisheye lens, and the surface of the chart imaged at the position. And correcting the distortion caused by the lens based on the relationship with the position of the lens, and deriving and outputting the value of the parameter related to the imaging apparatus by evaluating the corrected image.
  • FIG. 10 is a flowchart showing a processing procedure of adjusting the setting of the attitude of the imaging device so that the image of the grid line after correction coincides with the horizontal and vertical directions of the image plane in S48 of FIG. 9.
  • FIG. 10 is a flowchart showing a processing procedure of adjusting the angle of view and the coefficient of distortion correction in S50 of FIG. 9. It is a flowchart which shows the process sequence in which the pseudo image drawing part in this Embodiment draws a pseudo image.
  • FIG. 8 schematically shows a procedure for obtaining position coordinates in a three-dimensional space, which corresponds to position coordinates on an image plane, in the present embodiment.
  • FIG. 8 schematically shows a procedure for obtaining position coordinates in a three-dimensional space, which corresponds to position coordinates on an image plane, in the present embodiment.
  • FIG. 1 illustrates the configuration of a system to which the present embodiment can be applied.
  • the system includes an imaging device 12, a chart 200 for calibration, and a calibration device 10 that performs calibration using an image of the chart 200 captured by the imaging device 12.
  • the calibration device 10 acquires predetermined parameters relating to the imaging device 12 using the captured image of the chart 200.
  • the predetermined parameters include general camera parameters such as a lens distortion correction coefficient, a lens center position, and a tangent distortion correction coefficient, as well as the position, posture, horizontal / vertical image of the imaging device 12 when the chart 200 is photographed. It includes corners (hereinafter simply referred to as "field angles").
  • the imaging device 12 includes a fisheye lens as an imaging optical system, an image sensor such as a CCD (Charge Coupled Device) sensor or a CMOS (Complementary Metal Oxide Semiconductor) sensor, and a mechanism for performing general image processing such as demosaicing processing.
  • an image sensor such as a CCD (Charge Coupled Device) sensor or a CMOS (Complementary Metal Oxide Semiconductor) sensor
  • a mechanism for performing general image processing such as demosaicing processing.
  • Shoot at a wide angle The imaging device 12 may be a single-eye camera provided with only one set of a lens and an image sensor, or may be a multi-eye camera having a plurality of sets.
  • the configuration of the camera provided in the imaging device 12 may be determined according to the content of information processing performed using a captured image.
  • the imaging device 12 is not limited to that illustrated.
  • the imaging device 12 may be realized integrally with the calibration device 10.
  • the imaging device 12 may be mounted on a robot or a head mounted display. In this case, an image corresponding to the field of view of the user wearing the robot or head mounted display is taken at a predetermined frame rate, reflected in the operation of the robot, or displayed on the head mounted display. It is conceivable to use it for
  • the chart 200 is a real object such as a flat board or paper representing a predetermined pattern (pattern). Or the display apparatus which displayed the said pattern, the electronic device provided with the display apparatus, etc. may be used.
  • the pattern of the chart 200 in the illustrated example is, as shown in the front view at the bottom of the figure, formed by the grid lines formed by arranging black horizontal lines and vertical lines at predetermined intervals on a white background.
  • the marker 202 is arranged at a predetermined position in the two-dimensional array of white rectangles, for example, a central rectangle.
  • the pattern of the chart 200 is not limited to this, and it may be a combination of a symbol whose horizontal direction and vertical direction of the chart are represented by predetermined intervals and a symbol showing a specific position on the chart.
  • a marker it is possible to add a marker to a checkered pattern in which black and white are reversed in adjacent rectangles in a rectangular region divided in a grid shape, or a barcode exemplified later.
  • the marker 202 is a black square in the illustrated example, it is not intended to be limited thereto, and may be a known shape or color that is clearly distinguishable from the grid line.
  • the calibration device 10 acquires the above-described parameters relating to the imaging device 12 using the image of the chart 200 as input data.
  • the photographed image used as input data is an image before correcting barrel distortion peculiar to a fisheye lens.
  • the calibration device 10 acquires parameters such as the posture of the imaging device 12 and the correction coefficient from one captured image by using the lens distortion. Furthermore, a captured image is created in a pseudo manner using model data of a chart prepared separately, and the position of the imaging device 12 in a three-dimensional space is derived based on the position and size of the image of the marker 202.
  • the calibration device 10 stores the obtained parameters in an internal memory or outputs the parameters to an external device (not shown).
  • the information processing such as the above-described electronic game may be performed using the obtained parameter, and the function may be displayed on an output device (not shown). It is also conceivable to create a surrounding environment map by mounting on a robot together with the imaging device 12 and analyzing the captured image using the parameters. In these cases, an information processing apparatus having the function of the calibration apparatus 10 can be realized.
  • FIG. 2 is a diagram for explaining center projection performed in a general imaging device that is not a fisheye.
  • This figure shows a state in which the image pickup apparatus with focal length fa looks at photographing a plane at a distance Za from the principal point 14.
  • the image captured by this imaging device corresponds to an image obtained by projecting the subject onto the screen 15 separated by the distance fa from the principal point 14.
  • the focal length fa determines the angle of view ⁇ .
  • the areas 13a and 13b having the same size a of the surface of the subject form images 16a and 16b of the same size (fa ⁇ a / Za) regardless of the position on the photographed image.
  • the size of the image is a function of the ratio of the focal distance fa to the distance Za, if the ratio is the same, the size of the image may be the same even if the distance Za is different. In other words, the position of the viewpoint and the angle of view can not be determined simultaneously from the size of the image on one captured image. Therefore, in calibration of a general imaging device, various camera parameters are obtained by capturing a chart from various directions to obtain a simultaneous equation or capturing a fixed distance to the chart.
  • FIG. 3 is a diagram for explaining equidistant projection performed in the imaging device according to the present embodiment.
  • the imaging device of the focal distance fb shows how to capture a plane at a distance Zb from the principal point 18.
  • the screen 19 onto which an image is projected is spherically shaped by the fisheye lens. In this case, the images 20a and 20b of the areas 17a and 17b having the same size b on the surface of the subject become smaller as they are farther from the center on the photographed image.
  • the change of the reduction ratio with respect to the distance from the center on the photographed image depends on the curvature of the screen 19 spherical surface, that is, the focal length fb regardless of the position of the principal point.
  • the focal length and hence the angle of view are specified by evaluating distortion caused by the fisheye lens, and the position and size of the image are evaluated and the position of the imaging device is specified.
  • calibration is possible with only one captured image obtained by capturing the chart 200 without strict alignment.
  • FIG. 4 shows the internal circuit configuration of the calibration device 10.
  • the calibration device 10 includes a central processing unit (CPU) 122, a graphics processing unit (GPU) 124, and a main memory 126.
  • the CPU 122 controls processing and signal transmission in components inside the apparatus based on programs such as an operating system and an application.
  • the GPU 124 performs image processing.
  • the main memory 126 is constituted by a RAM (Random Access Memory), and stores programs and data required for processing.
  • the input / output interface 128 is further connected to the bus 130.
  • the input / output interface 128 may be a peripheral device interface such as USB or IEEE 1394, a communication unit 132 including a wired or wireless LAN network interface, a storage unit 134 such as a hard disk drive or nonvolatile memory, a display device (not shown), a printer, etc.
  • a recording medium drive unit 140 that drives removable recording media such as magnetic disks, optical disks, or semiconductor memories. Be done.
  • the CPU 122 controls the entire apparatus by executing the operating system stored in the storage unit 134.
  • the CPU 122 also executes various programs read from the removable storage medium and loaded into the main memory 126 or downloaded via the communication unit 132.
  • the GPU 124 has a geometry engine function and a rendering processor function, and performs image drawing in accordance with a drawing command from the CPU 122.
  • FIG. 5 shows the configuration of functional blocks of the calibration device 10.
  • Each functional block shown in FIG. 5 can be realized as hardware by the CPU 122, the GPU 124, the main memory 126, etc. shown in FIG. 4, and as software as a computer program loaded to the main memory from a hard disk or a recording medium Is realized by Therefore, it is understood by those skilled in the art that these functional blocks can be realized in various forms by hardware only, software only, or a combination thereof, and is not limited to any of them.
  • the calibration apparatus 10 includes a photographed image acquisition unit 30 for acquiring data of a photographed image, a distortion correction unit 34 for projectively converting an image generated from an actual photographed image and a model, and correcting a lens distortion, and a corrected image Image with distortion using image storage unit 36 for storing, parameter storage unit 38 for storing parameters acquired at the time of correction, chart image storage unit 40 for storing model data of pattern of chart 200, model data of chart 200 Using the pseudo image drawing unit 42 that generates the image in a pseudo manner, the viewpoint adjustment unit 44 that acquires the viewpoint position of the imaging device 12 based on the position and size of the marker image, and parameters obtained for the imaging device or It includes an output data generation unit 46 that generates and outputs data indicating the result of the information processing.
  • the captured image acquisition unit 30 acquires data of an image obtained by capturing the chart 200 from the imaging device 12.
  • the imaging device 12 is configured by a multi-view camera, all data of an image captured by each camera is acquired.
  • the image of the chart in this captured image has an inclination according to the posture of the imaging device and distortion due to a fisheye lens.
  • disortion such deformation from the original chart in the photographed image may be generally referred to as “distortion”.
  • the distortion correction unit 34 performs correction to remove distortion from the captured image. Specifically, an image captured by the equidistant projection method is converted into data of central projection, and further detailed correction is performed using a distortion correction equation. This makes the grid lines of the chart 200 approximately straight. Furthermore, projective transformation is performed so as to eliminate the inclination of the image of the chart 200 due to the attitude of the imaging device 12. In these processes, the angle of view, posture, lens distortion correction coefficient, position on the image corresponding to the lens center (hereinafter referred to as “position of lens center”), and tangent distortion correction coefficient are used in these processes.
  • the distortion correction unit 34 first performs correction on the assumption of these parameters, and performs parameter adjustment so that the result becomes an image of the original chart pattern. Thereby, each parameter can be acquired.
  • the distortion correction unit 34 further performs the same process on the pseudo photographed image generated by the pseudo image drawing unit 42 and using the chart model data.
  • the data of the image after correction obtained by the correction processing is stored in the image storage unit 36, and the parameter is stored in the parameter storage unit 38.
  • the pseudo image drawing unit 42 reads out the model data of the chart 200 stored in the chart image storage unit 40, and arranges it in a virtual three-dimensional space together with the virtual camera.
  • the attitude of the imaging device 12 obtained from the actual captured image is given to the virtual camera. Since the position of the imaging device 12 is unknown, a temporary value is set. Then, by projecting the chart 200 as an object model equidistantly, the same state as the imaging environment by the actual imaging device 12 is created.
  • the above-mentioned correction for lens distortion is eliminated Performs an inverse correction to produce a distorted image similar to the captured image.
  • this image is referred to as a "pseudo image”.
  • the viewpoint adjustment unit 44 compares the position and size of the marker 202 in the image after correction of the captured image with the position and size of the marker 202 in the image after correction of the pseudo image. If the position of the virtual camera set when the pseudo image drawing unit 42 generates a pseudo image is incorrect, a difference occurs in those parameters. Therefore, the actual position of the imaging device 12 is specified by adjusting the position of the viewpoint based on the difference.
  • the output data generation unit 46 acquires various parameters stored in the parameter storage unit 38 and the position of the photographed image specified by the viewpoint adjustment unit 44, stores it as output data in a storage device, or outputs it to an external device Do.
  • predetermined information processing may be performed using such information to correct an image captured during operation or used for image analysis, and output data such as a display image may be generated and output.
  • the imaging device 12 is a stereo camera
  • the difference between the distance between the principal points of the two and the posture is determined based on the position and the posture of each camera. Therefore, it is possible to accurately specify the position of the object by using these parameters for correcting a stereo image obtained at the time of operation or using it for calculation based on triangulation.
  • FIG. 6 is a flowchart showing a processing procedure in which the calibration device 10 specifies the parameters of the imaging device.
  • the photographed image acquisition unit 30 acquires data of an image obtained by photographing the chart 200 from the imaging device 12 (S10).
  • the imaging device 12 is a multi-view camera
  • data of an image captured by each camera is acquired. This data may be an image of the chart 200 taken approximately from the front, and it is not necessary to perform precise alignment at the time of shooting.
  • the posture / distortion correction unit 34 acquires the above-described parameters relating to the imaging device by correcting the captured image and bringing it close to the original chart pattern (S12).
  • distortion of a captured image includes that due to the posture of the imaging device 12 and that due to the structure of the imaging device 12 such as a fisheye lens. Therefore, assuming the parameters necessary for correction, corrections to eliminate both are sequentially performed, and the parameters are adjusted until the obtained data after correction becomes substantially the same as the pattern of the chart, final correction Get the image and parameter values after.
  • the position of the imaging device 12 is not used for distortion correction, it is not known at this stage. When it is not necessary to obtain the position of the imaging device 12, the processes of S14 to S18 described below can be omitted.
  • the pseudo image drawing unit 42 reads out the model data of the chart 200 from the chart image storage unit 40 and arranges it in a virtual space, and draws an image of the image taken by the virtual camera as a pseudo image (S14).
  • the attitude of the virtual camera is a value acquired in S12, and a temporary value is given for the position.
  • the virtual camera is also a fisheye lens, and has the same angle of view as the imaging device 12, a lens distortion correction coefficient, a position of the lens center, and a tangential distortion correction coefficient.
  • the posture / distortion correction unit 34 corrects the pseudo image drawn in S14 as in S12 (S16). That is, correction for eliminating distortion is performed using the parameters obtained in S12. As a result, an image close to the pattern of the chart is obtained, but the position and magnification of the chart on the image depend on the position of the virtual camera set at the time of drawing the pseudo image.
  • the viewpoint adjustment unit 44 sets the marker positions and lattice intervals in the corrected image of the captured image acquired in S12 to be substantially the same as the marker positions and lattice intervals in the pseudo image acquired in S16.
  • the position of the virtual camera is adjusted to be (S18).
  • the output data generation unit 46 generates and outputs data representing the parameter itself obtained by the processing up to that point and the result of the image analysis and information processing performed using the parameter (S20).
  • the output destination may be a device that executes other processing such as a game or display, or may be a storage device. Alternatively, the imaging device 12 itself may be used.
  • FIG. 7 illustrates how the actual captured image is corrected.
  • the chart shown in the photographed image 50 represents a black straight line having a predetermined width on a white background in a grid, as described in FIG. 1, and further has a black rectangle as one of the rectangles surrounded by the grid. It has a pattern representing a marker.
  • the imaging device 12 as a fisheye lens, the image is reduced as it goes away from the approximate center of the image plane corresponding to the center of the lens.
  • the distortion correction unit 34 corrects the photographed image 50, and generates a corrected image 52 in a state close to the original chart pattern, that is, black straight lines are orthogonal at equal intervals.
  • the degree of reduction of the image toward the image edge, and hence the degree of bending of the straight line mainly depends on the internal structure of the imaging device 12 such as the angle of view of the imaging device 12 and the position of the lens center,
  • the degree of inclination of the grid with respect to the vertical direction depends on the attitude of the imaging device 12. Therefore, those parameters can be derived in the process of correcting the photographed image 50 into the image 52.
  • FIG. 8 shows the transition of a conceptual image due to the correction of the distortion correction unit 34.
  • this correction is a process of eliminating lens distortion in the captured image 60 to generate a linear image 62 of the lattice (S30), and project-transforming it to obtain the corrected image 64 in which the lattice is orthogonal (S32).
  • the image processing is processing for inputting position coordinates on the photographed image 60 and outputting position coordinates on the image 64 after correction.
  • the angle of view, correction coefficient, and the like of the imaging device 12 are searched so that the lattice becomes a linear image by the process of S30, and the original of the imaging device 12 is made to be orthogonal To explore the attitude of
  • the distortion correction unit 34 efficiently generates the corrected image 64 by properly using these processes. Thereafter, the processing path for generating the chart pattern image from the distorted image as in S30 and S32 is “forward direction correction”, and the processing path for generating the distorted image from the chart pattern image as in S34 and S36 It is called “reverse direction correction”.
  • FIG. 9 is a flowchart showing a processing procedure for the distortion correction unit 34 to correct a captured image. This process corresponds to S12 of FIG.
  • the plane of the image after correction is prepared (S40), and parameters used for correction are temporarily set (S42). Specifically, the angle of view, posture (pan angle, tilt angle, roll angle), lens distortion correction coefficient, lens center position, and tangent distortion correction coefficient of the imaging device 12 are set. In most cases, lens distortion is corrected by the following equation using lens distortion correction coefficients k2, k4, and k6.
  • i ' i (1 + k2 * r 2 + k4 * r 4 + k6 * r 6) / (1 + k2 + k4 + k6)
  • j ' j (1 + k2 * r 2 + k4 * r 4 + k6 * r 6) / (1 + k2 + k4 + k6)
  • (i, j) is the position coordinate in the distorted image
  • (i ', j') is the position coordinate after the correction
  • r is the lens center of the position coordinate (i, j) in the image before the correction
  • tangential distortion is corrected by the following equation using tangential distortion correction coefficients p1 and p2.
  • the distortion due to the fisheye lens is first corrected in consideration of the difference in projection method, and the correction accuracy is improved by further correcting according to the above equation.
  • a corrected image when using the temporary parameters set in S42 is drawn on the image plane prepared in S40 (S44).
  • S44 a processing path of reverse direction correction for obtaining a corresponding position coordinate on the photographed image is used.
  • an image close to the chart pattern corrected using the temporarily set parameters is generated.
  • a straight line forming a grid of the chart pattern is searched (S46).
  • the setting of the attitude is adjusted until it is orthogonal (S48).
  • the processing efficiency is improved by adjusting the setting of the posture while monitoring only the intersections of the four straight lines vertically and horizontally detected on the outermost side. Thereby, the attitude of the imaging device 12 is determined.
  • the grid lines in the image generated in S48 are still distorted or inclined by a small amount. Therefore, the setting of the parameters is adjusted until the distortion is eliminated (S50).
  • processing efficiency is improved by sampling the points dividing the width of the grid line at predetermined intervals and adjusting the setting of parameters while monitoring only the error with respect to their approximate straight line.
  • the angle of view of the imaging device 12 the correction coefficient, and the position of the lens center are determined.
  • the parameters set in S42 are updated by the processes of S48 and S50, a final corrected image is generated by performing the same drawing process as S44 using the updated value again (S52) ).
  • the grid line spacing and the marker size are also specified by detecting the grid lines and the markers on the image.
  • the data of the image after correction is stored in the image storage unit 36, and the updated parameter is stored in the parameter storage unit 38.
  • FIG. 10 is a diagram for explaining the process of projective transformation in S32 of FIG. (A) shows a three-dimensional space including the chart 200, the viewpoint 205 of the imaging device 12, and the gaze vector 207.
  • the line-of-sight vector 207 defines the direction in which the optical axis of the imaging device is directed.
  • position coordinates (x, y, z) of the viewpoint 205 are defined in a three-dimensional space formed by an XZ plane parallel to the chart 200 and a Y axis perpendicular to the center of the chart.
  • the origin O of the three-dimensional space is a viewpoint when the chart pattern is displayed over the entire visual field when the Y-axis direction is a gaze vector.
  • the corrected image 64 of FIG. 8 is obtained in the reference state in which the viewpoint is at the origin O and the line-of-sight vector overlaps the Y axis (the imaging device 12 faces the chart 200).
  • FIG. 7B shows parameters for defining the attitude of the imaging device 12 after enlarging the sight line vector 207.
  • a pan angle p and a tilt angle q are defined on the basis of a perpendicular L (the Y-axis direction) from the viewpoint 205 to the chart 200, and a roll angle r is defined in the rotation direction of the line-of-sight vector 207. Changes in position coordinates on the image when the viewpoint 205 and the gaze vector 207 are displaced to the standard state can be obtained by a general projective transformation matrix using these parameters.
  • the image 64 after correction of FIG. 8 is obtained by the projective transformation.
  • the parameters defining them are temporarily set, the converted image is confirmed, and the setting parameters are adjusted so that the image of the target chart pattern can be obtained. Do. As a result, it is possible to specify the viewpoint 205 and the gaze vector 207, and hence the position and orientation of the imaging device 12.
  • FIG. 11 is a diagram for explaining the distortion correction process in S30 of FIG.
  • the correction amount may be insufficient at the image end where the distance from the optical axis is large, and the distortion may not be sufficiently eliminated.
  • a general correction formula is applied after correcting distortion peculiar to a fisheye lens in consideration of a projection system.
  • This figure shows the viewpoint 74, the screen surface 70 of the central projection represented by the straight line AB, and the screen surface 72 of the equidistant projection of the fisheye lens represented by the arc A2B2.
  • the left and right ends of the image of the horizontal projection pixel number Nh of the center projection when the angle of view is ⁇ are A and B, and the left and right ends of the image of the corresponding fisheye lens are A2 and B2.
  • the point P (i1, j1) on the screen surface 72 of the equidistant projection and the point Q (i2, j2) on the screen surface 70 of the corresponding central projection are the respective image centers (strictly speaking, the positions of the lens centers) And the distances r1 and r2 from C).
  • a tan (r 2 / f) represents an angle formed by the sight axis vector to the point P (i 1, j 1) and the point Q (i 2, j 2) before and after the correction and the optical axis.
  • the ratio s of the distance r1 to the distance r2 is determined as follows using the position coordinates of the point Q (i2, j2).
  • This operation is based on the angle of the line-of-sight vector with respect to the optical axis, as opposed to a general correction equation based on the distance from the image center. That is, the image can be corrected using not only the information on the plane of the image but also the three-dimensional information in consideration of the relationship between it and the viewpoint.
  • the ratio s' can be obtained with the corrected point Q (i2, j2) as known.
  • the screen surface 70 of the central projection is prepared first, and the reference position in the image of the fisheye lens before correction is specified by multiplying the position coordinates of the pixels on the surface by the ratio s ′. It is. By subtracting the pixel value of the reference destination in this manner, it is possible to generate an image after correction.
  • this correction uses the angle of view of the imaging device, the lens distortion correction coefficient, the position of the lens center, and the tangent distortion correction coefficient, correction is once performed assuming these parameters, and as a result, the grid lines are sufficiently The final parameter value is determined by adjusting until it approaches a straight line with high accuracy.
  • FIG. 12 illustrates the relationship between the screen surface of the expanded central projection and the screen surface of the fisheye lens. This figure is an overhead view of the viewpoint 74 and each screen surface as in FIG. 11. However, by setting the angle of view to 360 °, the screen surface 76 of the fisheye lens becomes an entire spherical surface whose radius is the focal distance f.
  • the six inner walls of the cube circumscribed to the spherical screen surface 76 are used as the screen surfaces of the center projection (for example, screen surfaces 78a, 78b, 78c, 78d). Then, the space is divided into quadrilateral pyramids with the viewpoint 74 as the apex and each surface of the inner wall as the bottom, and the screen surface to be converted is selected depending on which region the target pixel on the screen surface 76 of the spherical belongs. In the figure, since the screen is overlooked, it is divided into four quadrants of 90 ° around the viewpoint 74.
  • An image belonging to the first quadrant of the spherical screen surface 76 is corrected to an image on the screen surface 78a.
  • Images belonging to quadrants II, III, and IV are corrected to images on screen surfaces 78b, 78c, and 78d, respectively.
  • the calculation of the correction in each quadrant may be similar to that described above. If the chart 200 also has a form in which a chart pattern is represented on the inner wall of a cube and the imaging device 12 is placed at the center of the cube and photographed, the other processes of the present embodiment can be similarly performed for each quadrant. This makes it possible to correct a fisheye lens image to a substantially distortion-free image without any restriction on the angle of view.
  • the same correction can be made by preparing an appropriate number of planes for any angle of view smaller than that, not limited to the case where the angle of view is 360 °.
  • the plane to be prepared is not limited to the cube plane, and may be a polyhedron circumscribing the spherical screen surface 76 or a cylinder circumscribing the spherical screen surface 76.
  • This method can be applied not only to the purpose of specifying the correction coefficient as described above, but also to an aspect in which an image without distortion is generated and displayed from an image taken at the time of operation. For example, when an imaging device of a fisheye lens is provided on a head mounted display, and a photographed image is displayed as it is or a virtual object is drawn and displayed, the image is temporarily corrected to an image on a center projection screen. Then, by performing necessary processing on each screen and reprojecting on the view screen corresponding to the line of sight of the user, it is possible to efficiently display an image without distortion.
  • the process in S44 of FIG. 9 is reverse correction in which the position coordinate of the photographed image is obtained from the position coordinate in order to determine the pixel value on the image plane after correction.
  • the process of adjusting the setting of the posture so that the grid lines are orthogonal in S48, and the process of adjusting the correction parameter so as to eliminate the distortion in S50 are also performed on the temporarily corrected image by using the reverse correction.
  • the degree of adjustment can be evaluated only for specific pixels sampled, and processing efficiency can be increased.
  • the projective transformation at S34 of FIG. 8 can be easily realized by means such as using the inverse of the projective transformation matrix described for S32.
  • a reverse process of the correction using the distortion correction equation by the correction coefficient is included, and ingenuity is required.
  • "a distortion correction unique to a fisheye lens and a correction using a correction coefficient” are performed as a set. Also in the reverse correction, the set is used as it is so as to be substantially reverse correction.
  • FIG. 13 is a diagram for explaining a method of inverse correction of lens distortion correction. As shown in the upper part of the figure, this processing is processing for obtaining the corresponding point P (i1, j1) in the image 80 with lens distortion from the point Q (i2, j2) in the image 82 without lens distortion. (Arrow B). The correction in the forward direction (arrow A) for eliminating lens distortion is as described above, and this is also used as it is in the reverse correction.
  • a start point where the end point when correction in the forward direction is made is the point Q (i2, j2) is searched as follows.
  • the initial value P0 of the start point is temporarily determined at the position of the point Q (i2, j2) to be a target, and the above-mentioned forward correction is performed.
  • the end point Q0 thus obtained is naturally deviated from the target point Q (i2, j2). Therefore, for example, the start point is shifted by multiplying the position coordinate of the point P0 by a predetermined ratio of the deviation amount.
  • the forward correction is performed again on the start point P1 to obtain an end point Q1.
  • the start point is further shifted to perform correction in the forward direction. This process is repeated until the end point position Qn falls within a predetermined range from the target point Q (i2, j2).
  • the start point Pn at which convergence occurs is taken as the end point P (i1, j1) of the inverse correction in the distorted image 80.
  • FIG. 14 is a diagram for describing an example of a method in which the distortion correction unit 34 searches for grid lines of the image after correction in S46 of FIG. 9.
  • the figure shows an enlarged area near the center of the image after the correction.
  • a line segment of a predetermined length centering on the center 84 of the image is defined, and while changing the angle and position of the line segment, the sum of pixel values passing through is obtained. Since the pixel value is minimized if the entire line segment is in the black area of the grid line, the line segment 86 in such a state is determined.
  • the approximate angle and position of the lower end of the horizontal line among the grid lines of the chart pattern can be determined.
  • a line segment is defined by the angle and the position, and the two line segments formed by dividing the line segment are further moved downward in the image plane to obtain the sum of pixel values through which they pass.
  • the line segment enters the black grid line of the chart pattern the sum of pixel values decreases.
  • threshold determination Line segments 90a and 90b of the said state are shown in the figure.
  • the angle is adjusted depending on which one arrived earlier, and the process of searching for a black grid line again is repeated. As a result, the approximate angle and position of the upper end of the horizontal line among the grid lines of the chart pattern can be determined.
  • the inclination and the position of the upper end and the lower end of the horizontal line among the grid lines can be identified by searching while adjusting the angle upward and downward based on the straight lines.
  • the inclination and the position of the left end and the right end can be specified by the same processing for vertical lines among grid lines.
  • the same processing is performed when the final image after correction is generated in S52 of FIG.
  • the image of the marker is detected by searching for a black area in the white rectangular area surrounded by the grid lines of the chart pattern.
  • the size of the marker is obtained, and is used for acquiring the viewpoint position of the imaging device 12 together with the interval of the grid lines.
  • FIG. 15 is a diagram for describing a method of finely adjusting a line representing a boundary of grid lines.
  • the figure shows a rectangle 96 whose sides are the four outermost straight lines detected in the image 92 to be searched, and a line 94 to be adjusted.
  • the intersection points 98a and 98b of the line 94 and the rectangle 96 are acquired.
  • line segments 100a and 100b of a predetermined length with the same inclination as the line 94 are defined in the center direction of the image with the intersection points 98a and 98b as the starting point. Then, in the same principle as the method of FIG. 14, while moving the line segments 100a and 100b upward or downward, the sum of pixel values through which the line segments pass is acquired. As a result, the timing at which the line segments 100a and 100b enter the white rectangle is detected, the inclination of the straight line obtained based on the position is reflected, the line segments are defined again, and the search is repeated. Since the inclination and the position of the boundary can be detected at a position near the both ends of the image by this processing, the line 94 is adjusted after adjustment by connecting these.
  • FIG. 16 shows a processing procedure in which the distortion correction unit 34 adjusts the setting of the attitude of the imaging device 12 so that the image of the grid line after correction coincides with the horizontal and vertical directions of the image plane in S48 of FIG. It is a flowchart.
  • inclination errors from the horizontal direction or the vertical direction of the image plane are determined for the outermost four straight lines forming each side of the rectangle 96 of FIG. S60).
  • the position coordinates of the intersection point of those straight lines are acquired, and the position coordinates of the four points before correction are specified on the photographed image (S62).
  • the reverse correction described above can be applied to this process.
  • the setting of the attitude of the imaging device 12 is adjusted in the direction to eliminate the error obtained in S60 (S64), and the position coordinates of the four points are corrected assuming the attitude (S66). Then, with respect to each side of the rectangle having the position coordinates after correction as vertexes, an inclination error from the horizontal direction or the vertical direction of the image plane is obtained again (S68). If the error is equal to or greater than the predetermined threshold (N in S70), the processes in S64 to S68 are repeated. If the error is smaller than the threshold value, the processing is ended assuming that the set posture is correct (Y in S70). Thus, the posture of the imaging device 12 can be accurately determined by tracking only four correction situations.
  • FIG. 17 is a flowchart showing a processing procedure in which the distortion correction unit 34 adjusts the angle of view and the distortion correction coefficient in S50 of FIG.
  • the distortion correction unit 34 adjusts the angle of view and the distortion correction coefficient in S50 of FIG.
  • the angle of view of the imaging apparatus and the correction coefficient are used.
  • the grid lines may be distorted or inclined. Therefore, correct parameters are derived by adjusting the parameters while checking the linearity of the grid lines.
  • the middle point group which bisects the width of the grid line is extracted at a predetermined interval. Go (S80).
  • the extracted middle point group is approximated to a straight line by the least square method or the like, and the sum of the distances from the respective middle points to the straight line is acquired as an error (S 82).
  • position coordinates of the middle point group before correction are specified on the photographed image (S84). The reverse correction described above can be applied to this process.
  • each parameter is adjusted in the direction to eliminate the error obtained in S82 (S86), and the position coordinates of the middle point group after correction when corrected using it are obtained (S88).
  • FIG. 18 is a flowchart showing a processing procedure for the pseudo image drawing unit 42 to draw a pseudo image.
  • This process corresponds to S14 of FIG.
  • the pseudo image drawing unit 42 first arranges the object model of the chart 200 in a virtual three-dimensional space similar to that shown in FIG. 10, and further obtains the attitude of the imaging device 12 acquired as shown in FIGS. And arrange the virtual camera at the angle of view (S100). For the position, set a temporary value. Then, the image plane of the virtual camera is prepared (S102), and the corresponding position on the chart 200 is determined starting from each pixel in the image plane. This process corresponds to the above-described forward correction.
  • the distortion peculiar to the fisheye lens is corrected and the correction using the correction coefficient is performed as described in FIG. (S106).
  • the correction uses the values of the parameters of the imaging device 12 shown in FIG.
  • the position coordinates of the reference destination on the pattern of the chart 200 are determined by general projective transformation according to the position and attitude of the virtual camera ( S108).
  • the pixel value of the target pixel on the image plane of the virtual camera is determined by subtracting the pixel value from the position of the reference destination (S110).
  • the processes from S104 to S110 are performed on all the pixels on the image plane (N in S112), and when the process is completed, the process is ended (Y in S112).
  • the pseudo image of the captured image generated in this manner is supplied to the distortion correction unit 34.
  • the distortion correction unit 34 performs the same process as that described in FIG. 9 on the image. That is, correction processing is performed using various parameters of the imaging apparatus obtained by correction processing on the captured image, and an image without distortion is generated.
  • a grid line search as described in FIGS. 14 and 15 is also performed on the image, and a marker is detected to obtain the grid line interval and the marker position. Then, the spacing between the grid lines in the corrected image of the photographed image acquired in S52 of FIG. 9 is compared with the position of the marker. If the position of the virtual camera is different from the actual one, those parameters are different from the values obtained for the captured image. Therefore, the viewpoint adjustment unit 44 adjusts the viewpoint position of the virtual camera so as to eliminate the difference. For example, the pseudo image drawing unit 42 draws the pseudo image at the adjusted viewpoint position again and corrects it so that the grid line interval and the marker position are adjusted to match the actual one.
  • the adjustment process may be streamlined using only the image after the correction of the pseudo image. That is, the relationship between the difference between the grid line spacing and the actual position of the marker and the movement amount of the viewpoint position necessary to eliminate it is determined in advance.
  • the viewpoint position moved based on the actual difference is the position of the imaging device to be determined using the relationship.
  • the imaging device 12 is a multi-view camera
  • the process shown in FIG. 6 is performed on each captured image. Since this obtains the position and attitude of each camera, it can be used in the same manner as general camera external parameters. That is, at the time of operation, when extracting corresponding points from images taken by each camera, it can be used for correction of the taken image.
  • FIG. 19 exemplifies an actual pseudo image generated by the pseudo image drawing unit 42. That is, it shows a photographed image when it is assumed that a chart arranged in a virtual space is photographed by a virtual camera having a fisheye lens. However, the position of the virtual camera is after adjustment by the viewpoint adjustment unit 44. As a result, it can be seen that an image substantially identical to the photographed image 50 of FIG. 7 is obtained.
  • FIG. 20 shows an image after correction of the pseudo image shown in FIG. The said image is also substantially the same as the image 52 after correction
  • the correction process can reproduce the chart pattern in which the grid lines are orthogonal.
  • the image initially obtained by correcting the pseudo image differs from the actual grid line spacing and the marker position depending on the setting position of the virtual camera. By adjusting the position of the viewpoint so that this becomes the same, an image substantially identical to the image 52 after correction of the photographed image can be obtained as illustrated.
  • FIG. 21 shows another example of the pattern of the chart 200 that can be applied to the present embodiment.
  • the pattern shown is called a fractal barcode and is disclosed in U.S. Pat. No. 7,857,232.
  • Fractal barcodes arrange the minimum unit of 2D barcode in 2 rows and 2 columns, and further arrange it in 2 rows and 2 columns, etc., by embedding it as a repeating pattern of the hierarchical structure in a nested form, it is possible to embed information It can be hierarchical.
  • Each barcode also contains information on the position relative to the whole. Therefore, it is possible to obtain necessary information even if only a partial region is photographed by bringing the imaging device close.
  • the position of the imaging device with respect to the chart can be roughly identified from the photographed image by using the fractal barcode as a marker of the chart pattern of the present embodiment or by arranging a plurality of them all over the chart. Therefore, setting of the virtual camera in the pseudo image drawing unit 42 can be performed relatively accurately from the beginning, and processing efficiency can be improved. In addition, since the same effect can be obtained even if only a part of the chart is photographed, the necessity of alignment at the time of photographing can be further reduced. For example, if a fractal barcode is reflected in part of the wide field of view of a fisheye lens, calibration is possible.
  • FIG. 22 exemplifies the photographed image of the chart 200, where (a) shows a chart pattern consisting of a fractal bar code and (b) shows a chart pattern consisting of a lattice and markers on the display screen of the portable terminal. It shows a photographed image when it is displayed on a television receiver. Thus, even when displayed on the screen of the electronic device, the pattern of the chart can be clearly photographed.
  • the fractal bar code of (b) calibration is possible even if only a partial area is shown as shown. Therefore, it is possible to easily carry out the calibration by displaying a chart on an electronic device owned by a general user at an arbitrary timing during operation.
  • SLAM Simultaneous Localization and Mapping
  • FIG. 23 is a diagram for explaining the difference between a general processing system using an imaging device having a wide-angle lens at the time of operation and a processing system using the present embodiment.
  • two-dimensional correction information on an image plane is mainly used.
  • correction information on a plane is given, and by performing distortion correction and the like accordingly, image processing can be easily performed, and an image without discomfort on display can be obtained.
  • an image captured by the fisheye lens may be converted into planar information at the time of calibration.
  • three-dimensional information such as the relationship between the position and the posture of the imaging device and the chart can be obtained.
  • the angle of view is also three-dimensional information in the sense of defining the field of view for the viewpoint. Therefore, as shown in (b) in operation, since three-dimensional information is given to the photographed image, geometrical information in the three-dimensional space can be acquired. For example, it can be used to create an environmental map as described above. By using the result, it is possible to significantly increase the variation of the information processing. Even when displaying the results, it is possible to accurately represent more attractive image worlds such as virtual reality and augmented reality.
  • calibration is performed by photographing a chart of a predetermined pattern using a fisheye lens.
  • the angle of view of the imaging device is determined using distortion due to the fisheye lens. This makes it possible to determine one of the angle of view and the position of the viewpoint, which is difficult to separate in one shooting.
  • the image on the model of the chart viewed from the virtual camera is drawn using the obtained posture, and the viewpoint position can also be specified by comparing with the actual image.
  • the correction is repeated while adjusting the parameters until a target image is obtained.
  • it is possible to efficiently reach the optimal value of the parameter by focusing on only the sampling point of the evaluation target in the target image and tracking the change due to the adjustment.
  • the present embodiment is nothing more than acquiring three-dimensional information from one photographed image using a fisheye lens. Therefore, it can be used for geometric processing in a three-dimensional space, such as creation of an environmental map, also at the time of operation, and variations of processing using a photographed image can be increased.
  • the position and orientation of the captured image with respect to the chart are known, it is not necessary to exactly align the chart and the imaging device in calibration.
  • a fractal barcode is used as the chart pattern, the position of the imaging device can be specified even when photographing only a partial region, so the degree of freedom for photographing further increases.
  • the chart can be displayed on an electronic device, allowing the user to easily carry out calibration regardless of time or place, as a base point for continuous information acquisition thereafter, and latest for aging of the device It can provide a correction environment.
  • the distortion correction unit corrects a captured image of a chart on the assumption of parameters, and derives parameters by adjusting the image until it becomes equal to the original chart pattern, and in the process, Fisheye lens specific distortion correction was performed based on the difference in conversion.
  • the said correction method can be used not only at the time of a calibration but correction
  • the outdoor or indoor image photographed by the fisheye camera is converted into an image of central projection as shown in FIG. Furthermore, if necessary, a general correction formula using a correction coefficient is applied and corrected, and it is displayed or used for information processing. Also in this case, since the entire image can be corrected with high accuracy, distortion that is likely to occur in an image with a wide field of view can be minimized.
  • the distortion correction unit adjusts the parameters such as the angle of view and the correction coefficient as described above, and the pseudo image drawing unit sets the virtual camera using the parameters.
  • those parameters may be acquired by another means, and the pseudo image drawing unit may set the virtual camera using the data.
  • the correction coefficient is acquired by a general calibration method, and the posture of the imaging device is acquired by the motion sensor incorporated in the imaging device.
  • a pseudo image may be generated using the result, and the position of the imaging device may be specified by adjusting the viewpoint of the virtual camera as in the present embodiment.
  • the posture may be unknown in addition to the position of the imaging device.
  • the pseudo image obtained as a result can be confirmed while adjusting both the viewpoint position and the gaze vector of the virtual camera, and the viewpoint position and the gaze vector when they coincide with the photographed image can be determined as the position and orientation of the imaging device .
  • the degree of coincidence can be evaluated accurately by using the grid lines and markers in the image after correction for comparison with the photographed image.
  • the distortion correction unit 34 in the present embodiment performs correction for converting the projection method, general correction using a correction coefficient, and projection conversion based on the difference in posture from the reference state as a set.
  • One or two may be omitted.
  • the correction using the correction coefficient may not be performed.
  • projective transformation may not be performed. Even in this case, the same effect as the present embodiment can be obtained.
  • Embodiment 2 In the first embodiment, as shown in FIG. 11, in a positional relationship in which the optical axis of the imaging device coincides with the vertical line of the chart surface, it is fundamental to convert distortion unique to a fisheye lens into an image of central projection. According to this method, it is possible that distortion correction of the chart pattern can be realized by easy calculation, but the correction accuracy of the pattern captured in the area away from the optical axis is considered to decrease as the lens becomes wider. Therefore, in the present embodiment, high-accuracy correction can be performed on the entire captured image regardless of the angle of view of the imaging device 12.
  • the configuration of the functional blocks of the calibration apparatus 10 and the main processing procedure of calibration are the same as those shown in FIGS. The following description will be given focusing on differences from the first embodiment.
  • FIG. 24 exemplifies a photographed image of a chart pattern different in position and posture with respect to a fisheye lens.
  • the positional relationship between the screen surface and the surface of the chart when photographing each image is shown in an overhead view.
  • (a) is assumed that the chart surface 302a faces the screen surface 300 as assumed in the first embodiment
  • (b) is when the vertical line of the chart surface 302b is inclined 45 ° to the left with respect to the optical axis oa
  • C is a photographed image when the vertical line of the chart surface 302c is inclined 90 ° to the left with respect to the optical axis oa.
  • the distortion correction unit 34 and the pseudo image drawing unit 42 restore the chart pattern in which the grids are orthogonal from the photographed image as shown in the figure by an operation different from that of the first embodiment.
  • 25 26 and 27 are diagrams for explaining the procedure of generating a pseudo image in the present embodiment.
  • the pseudo image drawing unit 42 arranges the object model of the chart and the virtual camera in the virtual three-dimensional space similar to FIG. 10, and starts each pixel of the image plane corresponding to the screen surface of the virtual camera. Find the position on the chart that will appear there.
  • the screen surface in the distortion correction of the lens in S106 of FIG. 18, the screen surface is deformed and rotated in a three-dimensional space in consideration of the fact that the screen surface is originally spherical.
  • the coordinate system shown in FIGS. 25, 26 and 27 is the same as that of FIG. 10, and is defined by an XZ plane parallel to the chart and a Y axis perpendicular to the center of the chart.
  • a region 310 in FIG. 25 represents a square region facing the chart pattern on the screen surface of the virtual camera in XZ space.
  • the region 310 corresponds to the original chart pattern viewed from the front.
  • the subsequent processing corresponds to obtaining a change in the position on the chart pattern projected onto each pixel of the region 310 when the curvature of the screen surface is taken into consideration.
  • the viewpoint is matched to the origin.
  • Region 312 is obtained by applying reverse correction of general distortion correction using a correction coefficient to region 310.
  • the recursive method shown in FIG. 13 can be used for this processing. However, here, only general distortion correction calculation using a lens distortion correction coefficient and a tangential distortion correction coefficient is considered. Although the correction formula up to the sixth order is shown in the first embodiment, a term of a larger order may be included. If a factor to correct barrel distortion is given, then the region 312 will be in the form of a pincushion as shown.
  • the screen surface is actually in a state of being stuck to a spherical surface centered on the viewpoint. Therefore, when changing the attitude of the virtual camera, if it is rotated according to the roll angle r, the tilt angle q, and the pan angle p in the state of a spherical surface, the original situation can be accurately reflected.
  • the rotation in the roll direction is a rotation around the Y-axis of three-dimensional space, ie, in the XZ plane.
  • the roll angle r 10 ° is rotated to form the area 314.
  • the lower part shows the state of the area 314 in the XY space when looking over the shooting environment. As shown, the area 314 is considered to be stuck to the spherical surface of the lens.
  • the rotation in the tilt direction is a rotation around the X axis of the three-dimensional space.
  • Rotation in the pan direction is rotation around the Z axis in three-dimensional space.
  • the region 320 is 200 mm close to the flat surface of the chart. Note that the order of pan, tilt, roll rotation and parallel movement is not limited to that illustrated.
  • FIG. 27 shows how a chart image is projected onto the converted screen surface.
  • (A) shows the area 320 of the screen surface after conversion and the state of looking over the chart 322, as shown in FIG.
  • the illustrated conversion reveals the displacement destination of each pixel of the area 310 in the XZ space in the three-dimensional space. Therefore, a vector 326 from the viewpoint 324 of the virtual camera to the displacement destination is obtained for each pixel. Before extending the vector 326, there is a point 328 on the chart 322 which appears as an image at the pixel.
  • (B) shows the area on the chart 322 projected to the area 320. Due to the inverse correction of the barrel distortion, the area as a whole has the shape of a pincushion. Also, as pan, tilt, and roll rotations are given in the positive direction as the attitude of the virtual camera, an area having an asymmetric distortion as shown in the drawing forms an image. If an image of this area is arranged as pixels of the original image plane, a photographed image by a fisheye lens can be generated in a pseudo manner.
  • FIGS. 28 and 29 show examples of pseudo images that can be generated in the present embodiment.
  • the chart patterns are respectively shown inside the six sides of the cube, and the viewpoint of the virtual camera is placed at the center. Note that the color of the chart is changed depending on the surface.
  • FIG. 28 shows a pseudo image when the attitude of the virtual camera with a horizontal angle of view of 140 ° is changed.
  • generated with respect to the state where all roll angles are 0 degree is shown.
  • (d) shows a pseudo image in which the pan angle is 60 °, the tilt angle is 20 °, and the roll angle is 45 °.
  • FIG. 29 shows a pseudo image when the horizontal angle of view of the virtual camera is changed in a state where the virtual camera faces one surface of the cube.
  • A is at the horizontal angle of view of 90 °
  • the horizontal width of the chart image matches the horizontal width of the photographed image because the viewpoint is at the center of the cube.
  • B is at a horizontal angle of view of 140 °
  • (c) is at a horizontal angle of view of 180 °.
  • the front half of the left and right faces of the cube is within the angle of view.
  • D is at a horizontal angle of view of 270 °
  • (e) is at a horizontal angle of view of 360 °.
  • FIG. 30 shows the definition of parameters used for the calculation.
  • the figure (a) is the state which looked over the three-dimensional space
  • (b) represents XZ space.
  • the image plane 340 shows the area where the chart pattern appears like the area 310 in FIG. 25.
  • the position coordinate of each pixel is represented by (i, j) with the lower left as the origin.
  • FIGS. 31 and 32 schematically show a procedure for obtaining position coordinates in a three-dimensional space corresponding to position coordinates (i, j) on the image plane.
  • (a) shown in the upper part of FIG. 31 indicates position coordinates (i, j) on the image plane 340.
  • This is converted into position coordinates in the XZ space having the center of the image plane 340 as the origin, and the lens distortion correction is reversely corrected.
  • This correction is performed as described in FIG. 13 using general lens distortion and tangential distortion equations.
  • the coordinates obtained in this manner are (x1, z1).
  • the middle figure of (b) shows the longitude PP and the latitude QQ in the unit sphere in a perspective view.
  • the rightmost drawing shows a plane 344 including a line 342 from the origin in the longitude and latitude plane to the coordinates (PP, QQ).
  • the angle R at which the line 342 wraps around the unit spherical surface as shown in the figure is an angle obtained by combining the longitude PP and the latitude QQ, and is obtained as follows.
  • R (PP 2 + QQ 2 ) 1/2
  • the angle tt from the longitude axis of the line 342 in the longitude and latitude plane corresponds to the angle from the XY plane of the plane 344 including the line 342, and is obtained as follows.
  • tt atan (QQ / PP)
  • PP, QQ position coordinates
  • the line 342 is displaced to the line 346, and the position coordinates (PP, QQ) in the longitude and latitude plane are converted to the position coordinates (x2, y2) in the XY plane by the following equation.
  • x2 sin (R)
  • y2 cos (R) Since Y coordinates of the position coordinates (PP, QQ) in the XYZ space are also stored by this rotation, y2 is the Y coordinate y3 of the position coordinates (x3, y3, z3) in the three-dimensional space to be obtained There is nothing else.
  • position coordinates (PP , QQ) in the XYZ space (x3, y3, z3) is finally obtained as follows.
  • x3 x2 * cos (tt)
  • the image plane can be converted to the screen plane of the three-dimensional space by performing the above process on all the pixels of the image plane 340 shown in FIG.
  • the screen surface is further converted according to the posture (pan angle p, tilt angle q, roll angle r) of the virtual camera.
  • the rotation in the roll direction about the Y axis can be performed simultaneously with the rotation of the angle tt shown in FIG.
  • position coordinates (x4, y4, z4) when rotated in the tilt direction can be obtained by the following conversion equation.
  • z4 y3 * sin (q) + z3 * cos (q)
  • position coordinates (x5, y5, z5) when rotated in the pan direction can be obtained by the following conversion equation.
  • x5 y4 * cos (p) + z4 * sin (p)
  • y5 y4 * sin (p) + z4 * cos (p)
  • z5 z4
  • the conversion process from the two-dimensional space to the three-dimensional space shown in FIGS. 31 and 32 is reversible. That is, following the procedure for obtaining the position coordinates (x3, y3, z3) of the three-dimensional space from the pixel array of (i, j) in the two-dimensional space corresponding to the original chart pattern, the position coordinates (x3, y3) , Z3), position coordinates (i, j) of the image of the original chart pattern are obtained. That is, it is possible to generate two-dimensional information from which distortion has been removed from three-dimensional information that defines distortion specific to a fisheye lens.
  • the distortion correction unit 34 in the present embodiment uses this, and corrects the image of the chart pattern in the photographed image by the reverse process of the pseudo image drawing unit 42 generating the pseudo image.
  • the basic operation of the distortion correction unit 34 is as shown in FIG. 9, but in distortion correction performed in S44, S50, and S52, the processing reverse to the generation of the pseudo image shown in FIGS. 31 and 32 is performed. Do. Due to the reversibility described above, the recursive conversion process shown in FIG. 13 may be applied only to the reverse process of general distortion correction using a correction coefficient.
  • FIG. 33 is a flowchart showing a processing procedure in which the distortion correction unit 34 performs distortion correction on the image of the chart pattern of the captured image.
  • target pixels in the photographed image are set, and position coordinates (x7, y7, z7) in the three-dimensional space are acquired from the position coordinates (S200).
  • the position of the pixel can be represented by polar coordinates (r, ⁇ ) whose origin is the center of the image.
  • the distance r from the image center is proportional to the zenith angle when the optical axis is vertically upward in the three-dimensional space
  • the angle ⁇ from the reference axis represents the azimuthal angle in the three-dimensional space.
  • position coordinates (x7, y7, z7) in the three-dimensional space can be easily obtained from the positions of the pixels in the photographed image.
  • a unit vector (x8, y8, z8) directed from the viewpoint to the target pixel is obtained as follows (S202).
  • x8 x7 / (x7 2 + y7 2 + z7 2 ) 1/2
  • y8 y7 / (x7 2 + y7 2 + z7 2 ) 1/2
  • z8 z7 / (x7 2 + y7 2 + z7 2 ) 1/2
  • the position coordinates (x10, z10) in the XZ space are determined as follows using the pixel density dens which is the number of pixels per one field angle, as the inverse of (b) in FIG. 31 (S210).
  • the distortion correction unit 34 searches in advance an approximate area in which the chart pattern appears in the captured image, and further, an approximate direction of the chart pattern in the three-dimensional space.
  • FIG. 34 is a flowchart showing a processing procedure in which the distortion correction unit 34 detects the area of the chart pattern.
  • the distortion correction unit 34 first divides the photographed image into regions (S220). For example, the angle of view is divided into a predetermined number in the horizontal direction and the vertical direction, and is divided into areas on the image corresponding to each angle range. As an example, in the case of an imaging device with an angle of view of 210 °, the image is divided into 3 ⁇ 3 areas every 70 °. Next, one of the regions is targeted, and the image of the region is developed on an image plane separately prepared at a predetermined magnification (S222).
  • horizontal line search of the grid line of the chart pattern is performed on the developed partial image (S224).
  • the method shown in FIG. 14 can be used for this search. If a valid angle or position is not obtained as a result of the search (N in S226), the horizontal line search is repeated by changing the magnification of the image in the same area or setting the next area as a target ((6) S222, S224).
  • the distortion correction process described above is performed on the area of the image of the chart pattern detected by the above process, and the attitude of the imaging device 12 is obtained using the chart pattern corrected approximately in a linear shape.
  • the approximate processing procedure is the same as that shown in FIG. That is, posture adjustment and line inclination acquisition are alternately repeated so that the outermost four straight lines of the detected grid lines coincide with the horizontal and vertical directions of the image plane.
  • FIG. 35 is a diagram for describing parameters to be evaluated in the posture detection process of the imaging device based on the orthogonality of the chart patterns.
  • the illustrated rectangles represent the image plane, and the straight lines shown inside indicate the outermost four straight lines or two opposing straight lines of the detected grid lines.
  • (a) represents a state in which there is no error in all of the pan angle, the tilt angle, and the roll angle representing the posture of the imaging device 12.
  • four straight lines of the image of the grid are parallel to the horizontal and vertical directions of the image plane as shown.
  • (b) is an image of a grid line when there is an error in the pan angle
  • (c) is an error in the tilt angle
  • (d) is an error in the roll angle.
  • the difference epan of the slopes of the upper and lower lines is evaluated as an error of the pan angle. For example, epan assumes that the right side narrows as shown in the figure.
  • the difference etil between the inclinations of the left and right lines is evaluated as an error of the tilt angle. etil is, for example, positive when the lower side narrows as shown.
  • an average value erol of inclinations of straight lines in the upper, lower, left, and right directions is evaluated as an error of the roll angle. For example, erol is counterclockwise positive as illustrated.
  • the chart pattern is photographed approximately from the front. Therefore, by acquiring the errors epan, etil and erol based on the relationship of straight lines as shown in the drawing, an accurate pan angle can be obtained by adjusting the pan angle, the tilt angle and the roll angle which are set and subtracting epan, etil and erol respectively. It is possible to converge on the tilt angle and the roll angle.
  • the state where the chart pattern is parallel to the optical axis is permitted as in the present embodiment, it is conceivable that the correspondence between the positional relationship of the straight line and the rotational direction in which an error occurs is changed. .
  • the roll and pan will swap the evaluation parameters. Therefore, in some cases, the errors epan, etil, and erol are appropriately combined in consideration of their interchange, and errors of the pan angle p, the tilt angle q, and the roll angle r are calculated. Then, by subtracting the error from the setting values of pan angle p, tilt angle q, and roll angle r until these errors become smaller than the threshold value, the attitude of the imaging device is made accurate regardless of the position of the chart. You can get it well.
  • FIG. 36 shows the result of the distortion correction unit 34 correcting the image of the chart pattern in the photographed image.
  • the images (a), (b) and (c) are images after correction respectively generated from the photographed images shown in (a), (b) and (c) of FIG.
  • (a) shows the case where the chart surface 302a faces the screen surface 300
  • (b) shows the case where the vertical line of the chart surface 302b is inclined 45 ° to the left with respect to the optical axis oa
  • (c) shows the chart surface 302c. Is a correction result of the photographed image in the case where the perpendicular of the light source is inclined 90.degree. To the left with respect to the optical axis oa. It can be seen that the chart pattern is suitably restored regardless of the position and attitude of the chart with respect to the lens.
  • the posture, the correction coefficient, and the angle of view of the imaging device 12 can be accurately obtained without setting the chart in the center of the field of view and capturing images.
  • the viewpoint adjustment unit 44 compares the chart pattern restored in this manner with the chart pattern restored by the same process on the pseudo image, and acquires the position of the imaging device 12.
  • a pseudo image generated at the time of viewpoint adjustment here is also generated by the same method as described above in the present embodiment.
  • FIG. 37 shows an image in which the chart of each surface is restored from a pseudo image on the assumption that the chart pattern is shown inside the cube and the center is taken as a viewpoint at a field angle of 220 °.
  • an area on the image corresponding to the angle of view in which each face is captured is set, and correction processing is performed in units of that area.
  • the field angle of 220 ° as shown in the photographed image of (a), the entire front and part of the upper, lower, left, and right surfaces are photographed. If five three-dimensional spaces are set for these planes and correction processing is performed on each of them, five corrected images can be generated as shown in (b).
  • the chart patterns of all the faces can be restored in the range where the image is captured.
  • FIG. 38 shows the result of restoring a chart of a surface from a pseudo image assuming that the inside of a cube is photographed in an arbitrary posture.
  • FIG. 28A is a pseudo image of a pan angle of 60 °, a tilt angle of 20 ° and a roll angle of 45 ° shown in FIG. 28D
  • FIG. 28B is a pan angle of 0 ° and a tilt angle of 0 °.
  • distortion unique to a fisheye lens can be accurately reproduced by mapping the image plane as a spherical screen surface to a three-dimensional space in calibration utilizing the characteristics of the fisheye lens. Then, by rotating the spherical surface around each axis, the change of the posture of the imaging device is accurately reflected on the image. Since the mapping onto the spherical surface of the area where the image of the chart pattern appears is not included in the constraint condition related to the optical axis, the same process can be performed wherever the chart pattern appears in the photographed image.
  • the tolerance of the position and orientation of the chart pattern with respect to the field of view can be greatly expanded. This enables calibration in a state where only a part of the chart pattern is in view, and parallel processing with the original operation processing can improve the calibration processing efficiency as well as the accuracy of the operation processing. It can be maintained.
  • the chart pattern is not limited to a straight grid, and may be another pattern such as the fractal barcode described in the first embodiment.
  • the application mode of the calibration apparatus and the modification of the process are the same as those described in the first embodiment.
  • the present invention can be used for various information processing apparatuses such as a calibration apparatus, an imaging apparatus, an image processing apparatus, a display apparatus, a robot, a personal computer, and a system including any of them.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Geometry (AREA)
  • Computing Systems (AREA)
  • Computer Graphics (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Image Analysis (AREA)

Abstract

キャリブレーション装置10において、撮影画像取得部30はキャリブレーション用のチャートを魚眼の撮像装置12で撮影した画像のデータを取得する。歪み補正部34は、撮像装置のパラメータを仮定して、射影方式を考慮した補正を行い、元のチャートの像が得られるまでパラメータを調整する。疑似画像描画部42はチャートのモデルデータを用いて撮影画像を疑似的に描画する。視点調整部44は疑似的な画像と撮影画像を比較し、マーカーの位置やパターンの間隔の差に応じて仮想カメラの視点位置を調整することで、撮像装置12の位置を特定する。

Description

キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法
 本発明は、撮像装置のキャリブレーションを実現する装置、キャリブレーションシステム、およびキャリブレーション方法に関する。
 ユーザの体やマーカーをカメラで撮影し、その像の領域を別の画像で置換してディスプレイに表示するゲームが知られている(例えば、特許文献1参照)。撮影画像における像を検出し解析することにより、被写体やカメラ自体の位置や動きを取得したり被写体の属性を認識したりする技術は、ゲーム装置や情報端末に搭載されたカメラのみならず、防犯カメラ、車載カメラ、ロボット搭載カメラなどを含むシステムにおいても広く導入されている。
 それらのシステムにおける処理精度を保障するため、撮像装置の内部パラメータ、歪み補正係数、外部パラメータ等、装置固有の情報を事前に取得するキャリブレーション処理が行なわれる。内部パラメータは、撮影画像における画素の位置座標と、光学中心を原点とし長さを単位とするカメラ座標系における位置座標との関係を規定する。歪み補正係数は、レンズによる樽型歪みや円周方向の歪みを補正するための係数である。
 外部パラメータは、カメラ座標系とワールド座標系の関係を規定し、特にステレオカメラなど多眼カメラについて同時にキャリブレーションを行うことにより、それぞれが撮影した画像の傾きを合わせるなどの目的で用いられる。キャリブレーション技術としては、チェッカーパターンの平面チャートを複数の視点から撮影し、撮影画像上での特徴点の位置と、実空間でのチャートの平面における特徴点の位置とが正しい対応関係となるようにパラメータを最適化するZhangの手法が広く知られている(非特許文献1参照)。
欧州特許出願公開第0999518号明細書
Zhengyou Zhang, "A Flexible New Technique for Camera Calibration", Microsoft Research Technical Report, MSR-TR-98-71, December 2, 1998.
 Zhangの手法では、いくつかの位置や姿勢で撮像装置やチャートをセッティングしたうえ、撮影を繰り返す必要があり、作業負担が大きい。また近年、魚眼レンズを用いて広角画像を撮影する技術が一般的になりつつあるが、魚眼レンズ特有の歪みを画像全体で精度よく補正するのは困難であった。
 本発明はこうした課題に鑑みてなされたものであり、その目的は、魚眼カメラのキャリブレーションを、容易かつ高精度に行うことのできる技術を提供することにある。
 上記課題を解決するために、本発明のある態様はキャリブレーション装置に関する。このキャリブレーション装置は、魚眼レンズを有する撮像装置から、キャリブレーション用のチャートの撮影画像のデータを取得する撮影画像取得部と、魚眼レンズに対応するスクリーン上の位置と、当該位置に結像する前記チャートの面上の位置との関係に基づきレンズによる歪みを補正するとともに、補正された画像を評価することにより撮像装置に係るパラメータの値を導出し出力する補正部と、を備えたことを特徴とする。
 本発明の別の態様もキャリブレーション装置に関する。このキャリブレーション装置は、魚眼レンズを有する撮像装置から、キャリブレーション用のチャートの撮影画像のデータを取得する撮影画像取得部と、撮像装置に係るパラメータの値を取得するパラメータ取得部と、仮想カメラとチャートのオブジェクトモデルを仮想3次元空間に配置し、仮想カメラが撮影する画像として、取得したパラメータの値を用いて撮影画像を疑似的に生成する疑似画像描画部と、疑似的に生成された画像と撮影画像とを比較することにより、チャートに対する撮像装置の位置を導出する視点調整部と、を備えたことを特徴とする。
 本発明のさらに別の態様はキャリブレーションシステムに関する。このキャリブレーションシステムは、魚眼レンズを有する撮像装置と、上記キャリブレーション装置と、を備えたことを特徴とする。
 本発明のさらに別の態様はキャリブレーション方法に関する。このキャリブレーション方法は、魚眼レンズを有する撮像装置から、キャリブレーション用のチャートの撮影画像のデータを取得するステップと、魚眼レンズに対応するスクリーン上の位置と、当該位置に結像する前記チャートの面上の位置との関係に基づきレンズによる歪みを補正するステップと、補正された画像を評価することにより撮像装置に係るパラメータの値を導出し出力するステップと、を含むことを特徴とする。
 なお、以上の構成要素の任意の組合せ、本発明の表現を方法、装置、システム、記録媒体、コンピュータプログラムなどの間で変換したものもまた、本発明の態様として有効である。
 本発明によれば、撮像装置のキャリブレーションを、容易かつ高精度に行うことができる。
本実施の形態を適用できるシステムの構成を例示する図である。 一般的な撮像装置においてなされる中心射影を説明するための図である。 本実施の形態における撮像装置においてなされる等距離射影を説明するための図である。 本実施の形態におけるキャリブレーション装置の内部回路構成を示す図である。 本実施の形態におけるキャリブレーション装置の機能ブロックの構成を示す図である。 本実施の形態におけるキャリブレーション装置が撮像装置のパラメータを特定する処理手順を示すフローチャートである。 本実施の形態において実際の撮影画像が補正される様子を例示する図である。 本実施の形態の歪み補正部の補正による概念的な画像の変遷を示す図である。 本実施の形態において、歪み補正部が撮影画像を補正する処理手順を示すフローチャートである。 図8のS32における射影変換の処理を説明するための図である。 図8のS30における歪み補正の処理を説明するための図である。 本実施の形態における拡張された中心射影のスクリーン面と魚眼レンズのスクリーン面の関係を例示する図である。 本実施の形態におけるレンズの歪み補正の逆補正の手法を説明するための図である。 図9のS46において、補正後の画像の格子線を探索する手法の例を説明するための図である。 本実施の形態において格子線の境界線を表す線を微調整する手法を説明するための図である。 図9のS48において、補正後の格子線の像が画像平面の水平および垂直方向と一致するように、撮像装置の姿勢の設定を調整する処理手順を示すフローチャートである。 図9のS50において、画角および歪み補正の係数を調整する処理手順を示すフローチャートである。 本実施の形態における疑似画像描画部が疑似画像を描画する処理手順を示すフローチャートである。 本実施の形態における疑似画像描画部が生成した実際の疑似画像を例示する図である。 図19で示した疑似画像の補正後の画像を示す図である。 本実施の形態に適用できるチャートのパターンの別の例を示す図である。 本実施の形態におけるチャートの撮影画像を例示する図である。 運用時における広角レンズを有する撮像装置を用いた一般的な処理の体系と、本実施の形態を利用した処理の体系との差を説明するための図である。 本実施の形態における魚眼レンズに対する位置および姿勢が異なるチャートパターンの撮影画像を例示する図である。 本実施の形態において疑似画像を生成する手順を説明するための図である。 本実施の形態において疑似画像を生成する手順を説明するための図である。 本実施の形態において疑似画像を生成する手順を説明するための図である。 本実施の形態において生成できる疑似画像の例を示す図である。 本実施の形態において生成できる疑似画像の例を示す図である。 本実施の形態において演算に用いるパラメータの定義を示す図である。 本実施の形態において、画像平面における位置座標に対応する、3次元空間での位置座標を求める手順を模式的に示す図である。 本実施の形態において、画像平面における位置座標に対応する、3次元空間での位置座標を求める手順を模式的に示す図である。 本実施の形態における歪み補正部が、撮影画像のチャートパターンの像に歪み補正を施す処理手順を示すフローチャートである。 本実施の形態における歪み補正部が、チャートパターンの領域を検出する処理手順を示すフローチャートである。 本実施の形態におけるチャートパターンの直交性に基づく撮像装置の姿勢検出処理において、評価対象とするパラメータを説明するための図である。 本実施の形態における歪み補正部が、撮影画像におけるチャートパターンの像を補正した結果を示す図である。 本実施の形態においてチャートパターンを立方体の内部に表し、その中心を視点として撮影したことを想定した疑似画像から、各面のチャートを復元した画像を示す図である。 本実施の形態において立方体の内部を任意の姿勢で撮影したことを想定した疑似画像から、ある面のチャートを復元した結果を示す図である。
 実施の形態1
 図1は、本実施の形態を適用できるシステムの構成を例示している。このシステムは撮像装置12、キャリブレーション用のチャート200、および撮像装置12が撮影したチャート200の画像を用いてキャリブレーションを実施するキャリブレーション装置10を含む。キャリブレーション装置10は、チャート200の撮影画像を用いて撮像装置12に係る所定のパラメータを取得する。ここで所定のパラメータとは、レンズ歪み補正係数、レンズ中心の位置、接線歪み補正係数など一般的なカメラパラメータのほか、チャート200を撮影したときの撮像装置12の位置、姿勢、水平/垂直画角(以後、単に「画角」と呼ぶ)を含む。
 撮像装置12は撮像光学系として魚眼レンズ、CCD(Charge Coupled Device)センサやCMOS(Complementary Metal Oxide Semiconductor)センサなどのイメージセンサ、およびデモザイク処理など一般的な画像処理を実施する機構を備え、被写空間を広角で撮影する。撮像装置12はレンズとイメージセンサのセットを1つのみ備えた単眼カメラでもよいし、当該セットを複数有する多眼カメラとしてもよい。撮像装置12に備えるカメラをどのような構成とするかは、撮影画像を用いて行う情報処理の内容によって決定してよい。
 例えばユーザやコントローラなどの対象物の3次元空間における位置を撮影画像から取得して電子ゲームを実現する場合、左右に既知の間隔を設けた2つのカメラからなるステレオカメラで構成することが考えられる。また撮像装置12の形態は図示するものに限らない。例えばキャリブレーション装置10と一体的に実現してもよい。あるいは撮像装置12を、ロボットやヘッドマウントディスプレイに装備させてもよい。この場合、ロボットや、ヘッドマウントディスプレイを装着したユーザの視野に対応するような画像を所定のフレームレートで撮影し、ロボットの動作に反映させたり、対応する画像をヘッドマウントディスプレイに表示させたりするのに利用することが考えられる。
 チャート200は所定のパターン(図柄)を表した平面状のボードや紙などの実物体である。あるいは当該図柄を表示した表示装置や、表示装置を備えた電子機器などでもよい。図示する例でチャート200のパターンは、図の下方の正面図に示すように、白い背景に所定幅の黒い水平線、垂直線を等間隔に配置してなる格子線と、当該格子線が形成する白い矩形の2次元配列のうち所定位置、例えば中心の矩形に配したマーカー202で構成されている。
 ただしチャート200のパターンはこれに限らず、チャートの水平方向、垂直方向が所定の間隔で表される図柄と、チャート上の特定の位置を表す図柄の組み合わせであればよい。例えば、格子状に区切られてなる矩形領域のうち隣り合う矩形で白黒が逆転するようなチェッカーのパターンにマーカーを付加したものでもよいし、後に例示するバーコードなどでもよい。マーカー202は図示する例では黒い正方形であるが、それに限定する趣旨ではなく、格子線との区別が明らかな既知の形状や色であればよい。
 キャリブレーション装置10は、チャート200を撮影した画像を入力データとして、撮像装置12に係る上述のパラメータを取得する。ここで入力データとする撮影画像は、魚眼レンズ特有の樽型歪みを補正する前の画像とする。キャリブレーション装置10は、そのレンズ歪みを利用することで、撮像装置12の姿勢や補正係数などのパラメータを1枚の撮影画像から取得する。さらに、別途準備したチャートのモデルデータを利用して疑似的に撮影画像を作り出し、マーカー202の像の位置やサイズに基づき撮像装置12の3次元空間での位置を導出する。
 キャリブレーション装置10は、得られたパラメータを内部のメモリに格納したり、図示しない外部の装置に出力したりする。あるいは得られたパラメータを用いて上述の電子ゲームなどの情報処理を実施し、図示しない出力装置に表示させる機能を備えてもよい。また撮像装置12とともにロボットに実装し、撮影された画像を、当該パラメータを用いて解析することにより、周囲の環境地図を作成することも考えられる。これらの場合、キャリブレーション装置10の機能を備えた情報処理装置を実現できる。
 図2は、魚眼でない一般的な撮像装置においてなされる中心射影を説明するための図である。同図は焦点距離faの撮像装置が、主点14から距離Zaにある平面を撮影する様子を俯瞰した様子を示している。この撮像装置が写す画像は、主点14から距離faだけ離れたスクリーン15へ被写体を射影した像に対応する。またセンササイズが既知のとき、焦点距離faは画角θを決定づける。この場合、被写体表面の同一サイズaを有する範囲13a、13bは、撮影画像上での位置によらず同じサイズ(fa・a/Za)の像16a、16bを形成する。
 すなわち像のサイズは焦点距離faと距離Zaの比率の関数となるため、当該比率が同じであれば、距離Zaが異なっていても像のサイズは同じになり得る。換言すれば1つの撮影画像上の像のサイズから、視点の位置と画角を同時に求めることはできない。そのため一般的な撮像装置のキャリブレーションでは、チャートを様々な方向から撮影することにより連立方程式とするか、チャートまでの距離を固定して撮影することにより、各種カメラパラメータを求める。
 図3は、本実施の形態における撮像装置においてなされる等距離射影を説明するための図である。同図でも焦点距離fbの撮像装置が、主点18から距離Zbにある平面を撮影する様子を示している。一方、本実施の形態の撮像装置12は、魚眼レンズにより、像が射影されるスクリーン19が球面状となる。この場合、被写体表面の同一サイズbを有する範囲17a、17bの像20a、20bは、撮影画像上で中心から離れるほど小さくなる。
 そして撮影画像上での中心からの距離に対する縮小率の変化は、主点の位置によらずスクリーン19球面の曲率、すなわち焦点距離fbに依存する。本実施の形態ではこれを利用し、魚眼レンズによって生じる歪みを評価することで焦点距離、ひいては画角を特定し、像の位置やサイズを評価することで撮像装置の位置を特定する。これにより、厳密な位置合わせなしにチャート200を撮影した1枚のみの撮影画像によってキャリブレーションが可能になる。
 図4は、キャリブレーション装置10の内部回路構成を示している。キャリブレーション装置10は、CPU(Central Processing Unit)122、GPU(Graphics Processing Unit)124、メインメモリ126を含む。CPU122は、オペレーティングシステムやアプリケーションなどのプログラムに基づいて、装置内部の構成要素における処理や信号伝送を制御する。GPU124は画像処理を行う。メインメモリ126はRAM(Random Access Memory)により構成され、処理に必要なプログラムやデータを記憶する。
 これらの各部は、バス130を介して相互に接続されている。バス130にはさらに入出力インターフェース128が接続されている。入出力インターフェース128には、USBやIEEE1394などの周辺機器インターフェースや、有線又は無線LANのネットワークインターフェースからなる通信部132、ハードディスクドライブや不揮発性メモリなどの記憶部134、図示しない表示装置、プリンタなどの出力装置へデータを出力する出力部136、撮像装置12や図示しない入力装置からデータを入力する入力部138、磁気ディスク、光ディスクまたは半導体メモリなどのリムーバブル記録媒体を駆動する記録媒体駆動部140が接続される。
 CPU122は、記憶部134に記憶されているオペレーティングシステムを実行することにより装置の全体を制御する。CPU122はまた、リムーバブル記録媒体から読み出されてメインメモリ126にロードされた、あるいは通信部132を介してダウンロードされた各種プログラムを実行する。GPU124は、ジオメトリエンジンの機能とレンダリングプロセッサの機能とを有し、CPU122からの描画命令に従って画像描画を行う。
 図5はキャリブレーション装置10の機能ブロックの構成を示している。図5に示す各機能ブロックは、ハードウェア的には、図4で示したCPU122、GPU124、メインメモリ126などで実現でき、ソフトウェア的にはハードディスクや記録媒体からメインメモリにロードされたコンピュータプログラムなどで実現される。したがって、これらの機能ブロックがハードウェアのみ、ソフトウェアのみ、またはそれらの組合せによっていろいろな形で実現できることは当業者には理解されるところであり、いずれかに限定されるものではない。
 キャリブレーション装置10は、撮影画像のデータを取得する撮影画像取得部30、実際の撮影画像およびモデルから生成した画像を射影変換したりレンズ歪みを補正したりする歪み補正部34、補正した画像を格納する画像記憶部36、補正の際に取得したパラメータを格納するパラメータ記憶部38、チャート200のパターンのモデルデータを格納するチャート画像記憶部40、チャート200のモデルデータを用いて歪みのある画像を疑似的に生成する疑似画像描画部42、マーカーの像の位置とサイズに基づき撮像装置12の視点位置を取得する視点調整部44、および、撮像装置に関し求められたパラメータ、あるいはそれを用いて情報処理を行った結果を示すデータを生成し出力する出力データ生成部46を含む。
 撮影画像取得部30は、チャート200を撮影した画像のデータを撮像装置12から取得する。撮像装置12が多眼カメラで構成される場合、各カメラが撮影した画像のデータを全て取得する。この撮影画像におけるチャートの像は、撮像装置の姿勢に応じた傾きや、魚眼レンズによる歪みを有する。以後、撮影画像におけるこのような本来のチャートからの変形を総じて「歪み」と呼ぶことがある。
 歪み補正部34は撮影画像から歪みを除く補正を行う。具体的には、等距離射影方式で撮影された画像を中心射影のデータに変換し、さらに歪み補正式により詳細な補正を行う。これによりチャート200の格子線がおよそ直線になる。さらに撮像装置12の姿勢によるチャート200の像の傾きを解消するように射影変換を施す。これらの処理において、撮像装置12の画角、姿勢、レンズ歪み補正係数、レンズ中心に対応する画像上の位置(以後、「レンズ中心の位置」と呼ぶ)、接線歪み補正係数を用いている。
 歪み補正部34はまず、これらのパラメータを仮定して補正を行い、その結果が本来のチャートのパターンの画像となるようにパラメータ調整を行う。これにより、各パラメータを取得できる。歪み補正部34はさらに、疑似画像描画部42が生成した、チャートのモデルデータを用いた疑似的な撮影画像についても同じ処理を実施する。これらの補正処理により得られた補正後の画像のデータは画像記憶部36に、パラメータはパラメータ記憶部38に格納する。
 疑似画像描画部42は、チャート画像記憶部40に格納しておいたチャート200のモデルデータを読み出し、仮想カメラとともに仮想3次元空間に配置する。ここで仮想カメラには、実際の撮影画像から得られた撮像装置12の姿勢を与える。撮像装置12の位置は未知のため仮の値を設定する。そしてオブジェクトモデルとしてのチャート200を等距離射影することにより、実際の撮像装置12による撮影環境と同じ状態を作り出す。このとき、パラメータ記憶部38に格納された、撮像装置12に対し得られた画角、レンズ歪み補正係数、レンズ中心の位置、接線歪み補正係数を用いて、上述のレンズ歪みを解消する補正とは逆の補正を実施することにより、撮影画像と類似する歪みのある画像を生成する。以後、この画像を「疑似画像」と呼ぶ。
 視点調整部44は、撮影画像の補正後の画像におけるマーカー202の位置およびサイズと、疑似画像の補正後の画像におけるマーカー202の位置およびサイズとを比較する。疑似画像描画部42が疑似画像を生成する際に設定した仮想カメラの位置が正しくなければそれらのパラメータに差が生じる。したがって、その差に基づき視点の位置を調整することで、撮像装置12の実際の位置を特定する。
 出力データ生成部46は、パラメータ記憶部38に格納された各種パラメータや、視点調整部44が特定した撮影画像の位置を取得し、それを出力データとして記憶装置に格納したり外部の装置に出力したりする。あるいはそれらの情報を用いて、運用時に撮影された画像の補正に用いたり、画像解析に用いたりして所定の情報処理を実施し、表示画像などの出力データを生成、出力してもよい。例えば撮像装置12をステレオカメラとした場合、各カメラの位置と姿勢に基づき両者の主点の間隔や姿勢の差が判明する。したがってそれらのパラメータを、運用時に得られたステレオ画像の補正に用いたり、三角測量に基づく演算に利用したりすることで、対象物の位置を正確に特定できる。
 次に、上記構成によって実現できるキャリブレーション装置10の動作を説明する。図6は、キャリブレーション装置10が撮像装置のパラメータを特定する処理手順を示すフローチャートである。まず撮影画像取得部30は、撮像装置12からチャート200を撮影した画像のデータを取得する(S10)。撮像装置12が多眼カメラの場合は、各カメラが撮影した画像のデータを取得する。このデータは、チャート200をおよそ正面から撮影した画像でよく、撮影時に厳密な位置合わせをする必要はない。
 姿勢・歪み補正部34は、撮影画像を補正し元のチャートのパターンに近づけることで、撮像装置に係る上述したパラメータを取得する(S12)。上述のとおり撮影画像の歪みには、撮像装置12の姿勢によるものと、魚眼レンズなど撮像装置12の構造によるものとが含まれる。したがって、補正に必要なパラメータを仮定して両者を解消する補正を順に施し、得られた補正後のデータがチャートのパターンと略同一になるまでパラメータを調整していくことで、最終的な補正後の画像とパラメータの値を取得する。ただし撮像装置12の位置は歪みの補正には用いないため、この段階では判明しない。なお撮像装置12の位置を求める必要がない場合、次に述べるS14~S18の処理は省略できる。
 次に疑似画像描画部42は、チャート画像記憶部40からチャート200のモデルデータを読み出し仮想空間に配置したうえ、仮想カメラがそれを撮影した画像を疑似画像として描画する(S14)。このとき仮想カメラの姿勢は、S12で取得した値とし、位置については仮の値を与えておく。また当該仮想カメラも魚眼レンズとし、撮像装置12と同じ画角、レンズ歪み補正係数、レンズ中心の位置、接線歪み補正係数を有するとする。これに従いモデル上のチャートを射影して歪みをつけることにより、S10で取得した撮影画像に類似の画像を生成できる。
 次に姿勢・歪み補正部34は、S14で描画された疑似画像を、S12と同様に補正する(S16)。すなわちS12で得られたパラメータを用いて歪みを解消する補正を施す。これによりチャートのパターンに近い画像が得られるが、画像上でのチャートの位置や倍率は、疑似画像の描画時に設定した仮想カメラの位置に依存している。視点調整部44は、S12で取得した撮影画像の補正後の画像におけるマーカーの位置および格子の間隔と、S16で取得した疑似画像の補正後の画像におけるマーカーの位置および格子の間隔が略同一になるように仮想カメラの位置を調整する(S18)。
 両者の差が所定のしきい値以下となったときの仮想カメラの位置を、実際の撮像装置12の位置として取得する。出力データ生成部46は、それまでの処理で得られたパラメータ自体や、それを用いて行った画像解析や情報処理の結果を表すデータを生成し出力する(S20)。上述のとおり出力先は、ゲームや表示などその他の処理を実行する装置でもよいし、記憶装置でもよい。あるいは撮像装置12自体でもよい。
 次に、歪み補正部34が図6のS12において行う撮影画像の補正手法について説明する。図7は実際の撮影画像が補正される様子を例示している。撮影画像50に写るチャートは、図1で説明したように、白い背景上に所定幅を有する黒い直線を格子状に表し、さらに当該格子線で囲まれた矩形のうちの1つに黒い矩形のマーカーを表したパターンを有する。撮像装置12を魚眼レンズとすることにより、レンズの中心に対応する画像平面の略中心から離れるほど像が縮小されている。
 歪み補正部34は撮影画像50を補正し、本来のチャートパターンに近い状態、すなわち黒い直線が等間隔で直交している補正後の画像52を生成する。上述のとおり画像端に向かう像の縮小度合い、ひいては直線の曲がり具合は撮像装置12の画角やレンズ中心の位置のずれなど、主に撮像装置12の内部構造に依存し、画像平面の水平方向、垂直方向に対する格子の傾斜の度合いは撮像装置12の姿勢に依存する。したがって撮影画像50から画像52に補正する過程でそれらのパラメータを導出できる。
 図8は、歪み補正部34の補正による概念的な画像の変遷を示している。当該補正は上述のとおり、撮影画像60におけるレンズ歪みを解消して格子が直線状の画像62を生成し(S30)、それを射影変換することにより格子が直交する補正後の画像64を得る処理である(S32)。画像処理としては、撮影画像60上の位置座標を入力して、補正後の画像64上の位置座標を出力する処理となる。また本実施の形態では、S30の処理により格子が直線状の画像となるように撮像装置12の画角や補正係数等を模索し、S32の処理により格子が直交するように撮像装置12の元の姿勢を模索する。
 すなわち、画像62、64のように目標となる画像での直線性や直交性を評価したうえ、各種パラメータを調整した場合に当該直線性や直交性がどのように改善されるかを確認する処理が含まれる。このとき評価対象の画像62、64上の位置座標を入力して、撮影画像60上の元の位置座標を出力する処理経路を準備しておくと、調整処理を効率化できる。すなわち補正後の画像64に逆の射影変換を施し(S34)、レンズ歪みをつける(S36)処理経路を準備する。
 歪み補正部34は、これらの処理を適宜使い分けることにより、補正後の画像64を効率的に生成する。以後、S30、S32のように歪みのある画像からチャートパターンの画像を生成する処理経路を「順方向補正」、S34、S36のようにチャートパターンの画像から歪みのある画像を生成する処理経路を「逆方向補正」と呼ぶ。
 図9は、歪み補正部34が撮影画像を補正する処理手順を示すフローチャートである。この処理は図6のS12に対応する。まず補正後の画像の平面を準備するとともに(S40)、補正に用いるパラメータを仮に設定する(S42)。具体的には撮像装置12の画角、姿勢(パン角、チルト角、ロール角)、レンズ歪み補正係数、レンズ中心の位置、接線歪み補正係数を設定する。多くの場合、レンズ歪みはレンズ歪み補正係数k2、k4、k6を用いて次式により補正される。
 i' = i (1 + k2 * r2 + k4 * r4 + k6 * r6)/(1 + k2 + k4 + k6)
 j' = j (1 + k2 * r2 + k4 * r4 + k6 * r6)/(1 + k2 + k4 + k6)
 ここで(i,j)は歪みのある画像における位置座標、(i’,j’)はその補正後の位置座標、rは補正前の画像における位置座標(i,j)の、レンズ中心からの距離であり、レンズ中心の位置座標を(ic,jc)とすると次の式で定義される。
 r = ((i - ic)2 + (j - jc)2)1/2
なお上記は6次までの補正を示しているが、補正の次数は限定されない。一方、接線歪みは接線歪み補正係数p1、p2を用いて次式により補正される。
 i' = i + (2p1 * ij + p2 (r2 + 2i2))
 j' = j + (p1 (r2 + 2j2) + 2p2 * ij)
すなわちこれらの式を用いると、レンズ中心からの距離のみに依存した補正がなされる。
 なお後述するように、本実施の形態では魚眼レンズによる歪みを、まず射影方式の違いを考慮して補正し、さらに上式により補正することで補正精度を向上させる。次に、S42で設定した仮のパラメータを用いたときの補正画像を、S40で準備した画像平面に描画する(S44)。この処理には、当該画像平面における各画素の位置座標を入力値として、撮影画像上の対応する位置座標を求める逆方向補正の処理経路を利用する。これにより、仮設定されたパラメータを用いて補正された、チャートパターンに近い画像が生成される。
 次に、当該画像において、チャートパターンの格子を構成する直線を探索する(S46)。S42で設定した撮像装置12の姿勢が実際と異なっている場合、それらの直線は直交しないため、直交するまで姿勢の設定を調整していく(S48)。ただしここでは、最も外側に検出された上下左右の4直線の交点のみを監視しながら姿勢の設定を調整することにより処理効率を上げる。これにより撮像装置12の姿勢が判明する。S42で設定した姿勢以外のパラメータが実際と異なっている場合、S48で生成した画像における格子線はなお、微小量歪曲していたり傾斜していたりする。したがってそれらの歪みが解消されるまで、当該パラメータの設定を調整していく(S50)。
 この場合も、格子線の幅を2分する点を所定間隔でサンプリングし、それらの近似直線に対する誤差のみを監視しながらパラメータの設定を調整することにより処理効率を上げる。これにより撮像装置12の画角、補正係数、レンズ中心の位置が判明する。S48、S50の処理により、S42で設定したパラメータが更新されるため、当該更新値を用いて再度、S44と同様の描画処理を実施することにより、最終的な補正後の画像を生成する(S52)。このとき、当該画像に対し格子線とマーカーの検出を行うことにより、格子線の間隔とマーカーのサイズも特定しておく。補正後の画像のデータは画像記憶部36に、更新されたパラメータはパラメータ記憶部38に、それぞれ格納する。
 図10は、図8のS32における射影変換の処理を説明するための図である。(a)はチャート200と、撮像装置12の視点205および視線ベクトル207を含む3次元空間を示している。なおここでの視線ベクトル207は撮像装置の光軸が向く方向を規定する。図示する例では、視点205の位置座標(x,y,z)は、チャート200に平行なXZ平面とチャートの中心で垂直に交わるY軸がなす3次元空間で定義される。3次元空間の原点Oは、Y軸方向を視線ベクトルとしたときにチャートパターンが視野全体に表示されるときの視点とする。換言すれば、視点が原点Oにあり視線ベクトルがY軸と重なる(撮像装置12がチャート200に正対する)基準状態において、図8の補正後の画像64が得られる。
 同図(b)には、視線ベクトル207を拡大したうえ、撮像装置12の姿勢を定義するパラメータを示している。視点205からチャート200への垂線L(Y軸方向)を基準としてパン角p、チルト角qが定義され、視線ベクトル207の回転方向にロール角rが定義される。視点205と視線ベクトル207が標準状態へ変位するときの画像上の位置座標の変化は、これらのパラメータを用いて一般的な射影変換行列により求めることができる。
 始点となる視点205および視線ベクトル207が既知であれば、当該射影変換により図8の補正後の画像64が得られる。本実施の形態では視点205と視線ベクトル207が未知のため、それらを定義するパラメータを仮に設定して変換後の画像を確認し、目的とするチャートパターンの画像が得られるように設定パラメータを調整する。これにより、視点205と視線ベクトル207、ひいては撮像装置12の位置と姿勢を特定できる。
 図11は、図8のS30における歪み補正の処理を説明するための図である。魚眼レンズの場合は特に、上述した補正式による一般的な歪み補正では、光軸からの距離が大きい画像端部において補正量が不足し、歪みの解消が十分でない場合がある。そこで本実施の形態では、魚眼レンズ特有の歪みを、射影方式を考慮して補正したうえで、一般的な補正式を適用する。同図は、視点74と、直線ABで表される中心射影のスクリーン面70、弧A2B2で表される魚眼レンズの等距離射影のスクリーン面72を俯瞰した状態を示している。
 画角をθとしたときの中心射影の水平画素数Nhの画像における左右の端がAおよびBであり、それに対応する魚眼レンズの画像における左右の端がA2およびB2である。視点74から画像までの距離fは、画素を単位として次の式で表される。
 f = Nh / ( 2 * (tan (q / 2))
等距離射影のスクリーン面72上の点P(i1,j1)と、それに対応する中心射影のスクリーン面70上の点Q(i2,j2)は、それぞれの画像中心(厳密にはレンズ中心の位置)Cからの距離r1、r2と次の関係にある。
 r1 = f * atan (r2 / f)
 r2 = (i2 + j2)1/2
ここでatan(r2/f)は、補正前後の点P(i1,j1)および点Q(i2,j2)への視線ベクトルと光軸がなす角度を表す。距離r2に対する距離r1の割合sは点Q(i2,j2)の位置座標を用いて次のように求められる。
 s = r1 / r2 = (f * atan (r2 / f)) / r2
 中心から画像端までの長さの割合Rは
 R = (2f * atan( Nh/2f )) / Nh
であるから、正規化された割合s’は次にようになる。
 s' = s / R = ( Nh / 2r2) * ( atan (r2 / f) / atan ( Nh / 2f))
この演算は、画像中心からの距離に基づく一般的な補正式に対し、光軸に対する視線ベクトルの角度に基づいている。すなわち画像の平面上での情報のみならず、それと視点との関係を考慮した3次元での情報を用いて画像を補正できる。
 これにより、画像上での位置によらず正確な補正を実現できる。なお割合s’は補正後の点Q(i2,j2)を既知として求められる。これは実際の処理では、中心射影のスクリーン面70を先に準備し、当該面上の画素の位置座標に割合s’を乗算することにより、補正前の魚眼レンズの画像における参照先を特定するためである。このようにして参照先の画素値を引いてくることにより、補正後の画像を生成できる。
 このように魚眼レンズによる歪みを解消してもなお、レンズの固体差や組み付け具合による歪みが残るため、上述したレンズ中心からの距離に基づく一般的な補正式を用いて補正する。ただし魚眼レンズの歪みを上述のとおり補正した場合、レンズ歪み補正式のうち2次の項を省略する。本実施の形態ではこれらの処理をセットとして歪み補正を行うことにより、画像の端まで高い精度で歪みが解消された画像を得ることができる。この補正には、撮像装置の画角、レンズ歪み補正係数、レンズ中心の位置、接線歪み補正係数が用いられるため、一旦それらのパラメータを仮定して補正を実施し、その結果として格子線が十分な精度で直線に近づくまで調整することで、最終的なパラメータの値を決定する。
 図示する例では、魚眼レンズの画角θを100°程度に限定しているため、中心射影のスクリーン面70への変換が容易である。一方、魚眼レンズを用いたカメラは、視点に対し360°の画角での画像が一度に得られるという利点がある。この特性を活かすため、中心射影のスクリーン面を拡張することが考えられる。図12は、拡張された中心射影のスクリーン面と魚眼レンズのスクリーン面の関係を例示している。同図は図11と同様、視点74と各スクリーン面の俯瞰図であるが、画角を360°とすることで、魚眼レンズのスクリーン面76が、焦点距離fを半径とする球面全体となる。
 この場合、画像全体を補正するため、球面のスクリーン面76に外接する立方体の6面の内壁を中心射影のスクリーン面とする(例えばスクリーン面78a、78b、78c、78d)。そして視点74を頂点とし内壁の各面を底面とする四角錐状に空間を領域分割し、球面のスクリーン面76上の対象画素がどの領域に属するかによって、変換先のスクリーン面を選択する。図ではスクリーンを俯瞰しているため、視点74周りで90°ごとの4象限に分割されている。球面のスクリーン面76のうち第I象限に属する画像はスクリーン面78a上での画像に補正する。第II、III、IV象限に属する画像はそれぞれ、スクリーン面78b、78c、78d上での画像に補正する。
 各象限における補正の計算は上述したのと同様でよい。チャート200も立方体の内壁にチャートパターンを表した形態とし、その中央に撮像装置12を配置して撮影すれば、本実施の形態のその他の処理についても象限ごとに同様に行える。これにより画角の制限なしに、魚眼レンズの画像をほぼ歪みのない画像に補正できる。画角が360°の場合に限らず、それより小さい任意の画角に対し適切な枚数の平面を準備すれば、同じように補正できる。また準備する平面は立方体の面に限らず、球面のスクリーン面76に外接する多面体や、球面のスクリーン面76に外接する円筒形などでもよい。
 この手法は、これまで述べたような補正係数を特定する目的以外に、運用時に撮影された画像から歪みのない画像を生成し表示させる態様にも適用できる。例えばヘッドマウントディスプレイに魚眼レンズの撮像装置を設け、撮影された画像をそのまま表示したり仮想オブジェクトを描画して表示したりする場合、一旦、中心射影のスクリーン上での画像に補正する。そして各スクリーン上で必要な加工を行ったうえ、ユーザの視線に対応するビュースクリーンに射影し直すことで、歪みのない画像を効率的に表示できる。
 これまでの説明は主に、図8におけるS30、S32の順方向補正を想定した。一方、図9のS44における処理は、補正後の画像平面における画素値を決定するため、その位置座標から撮影画像の位置座標を求める逆方向補正となる。S48において格子線が直交するように姿勢の設定を調整する処理や、S50において歪みが解消されるように補正パラメータを調整する処理も、逆方向補正を用いることにより、仮に補正された画像上でサンプリングされた特定の画素のみを対象として調整具合を評価でき処理効率を上げられる。
 逆方向補正のうち図8のS34における射影変換は、S32について説明した射影変換行列の逆行列を用いるなどの手段で容易に実現できる。一方、図8のS36の、レンズに起因した歪み補正の逆補正については、特に補正係数による歪み補正式を用いた補正の逆処理が含まれるため工夫を要する。本実施の形態では上述のとおり、「魚眼レンズ特有の歪み補正と補正係数を用いた補正」をセットで実施している。逆補正においても当該セットをそのまま用いて、実質的に逆の補正となるようにする。
 図13は、レンズの歪み補正の逆補正の手法を説明するための図である。同図上段に示すように、この処理は、レンズ歪みのない画像82上の点Q(i2,j2)から、レンズ歪みのある画像80における対応する点P(i1,j1)を求める処理である(矢印B)。レンズ歪みを解消する順方向の補正(矢印A)は上述したとおりであり、逆補正においてもこれをそのまま利用する。
 具体的には同図下段に示すように、順方向の補正を施したときの終点が点Q(i2,j2)になるような始点を次のように探索する。まず始点の初期値P0を、目標とする点Q(i2,j2)の位置に仮に定め、上述した順方向の補正を行う。これにより得た終点Q0は当然、目標とする点Q(i2,j2)からずれている。そこで例えば、当該ずれ量の所定割合を点P0の位置座標に乗算することで始点をずらす。当該始点P1に対し再び順方向の補正を施し、終点Q1を得る。
 そして終点Q1と目標とする点Q(i2,j2)のずれ量の所定割合を、点P1の位置座標に乗算することで、さらに始点をずらし順方向の補正を施す。この処理を、終点の位置Qnが目標とする点Q(i2,j2)から所定範囲内に収まるまで繰り返す。収束したときの始点Pnを、歪みのある画像80における逆補正の終点P(i1,j1)とする。
 図14は、歪み補正部34が図9のS46において、補正後の画像の格子線を探索する手法の例を説明するための図である。図は当該補正後の画像における中央近傍の領域を拡大して示している。当該画像領域において、例えば画像の中央84を中心とする所定長の線分を定義したうえ、当該線分の角度と位置を変化させながらそれが通る画素値の合計を取得していく。線分全体が格子線の黒い領域に入っていれば画素値は最小になるため、そのような状態の線分86を決定する。
 次に、線分86を中心84で等分してなる2つの線分をそれぞれ、画像平面の下方向に移動させながらそれが通る画素値の合計を取得していく。線分がチャートパターンの白い矩形に入ると、画素値の合計が大きくなる。実際にはしきい値判定によりそのような状態を検出する。同図において当該状態の線分88a、88bを示している。ここで右の線分88bは、左の線分88aより早く白い矩形に到達している。これにより当初の線分86は、チャートパターンの格子線より右下がりになっていることが判明する。そこで線分86を所定角度右上がりにしたうえ、再度それを分割してなる線分を下方向に移動させることにより白い矩形を探索し、到達するタイミングによって元の線分の角度を調整する。
 この処理を所定回数繰り返すことにより、チャートパターンの格子線のうち横線の下端のおよその角度と位置が判明する。同様に、当該角度および位置で線分を定義し、それを分割してなる2つの線分を、画像平面の下方向にさらに移動させながら、それが通る画素値の合計を取得していく。線分がチャートパターンの黒い格子線に入ると、画素値の合計が小さくなる。実際にはしきい値判定によりそのような状態を検出する。同図において当該状態の線分90a、90bを示している。この場合も、どちらが早く到達したかによって角度を調整し、再度黒い格子線を探索する処理を繰り返す。これによりチャートパターンの格子線のうち横線の上端のおよその角度と位置が判明する。
 以後は、それらの直線を基点として上方向および下方向に、角度を調整しながら探索していくことで、格子線のうち横線の上端および下端の傾きおよび位置を全て特定できる。格子線のうち縦線についても同様の処理により、左端および右端の傾きおよび位置を特定できる。図9のS52において最終的な補正後の画像が生成された際も、同様の処理を実施する。この場合、さらにチャートパターンの格子線で囲まれた白い矩形領域のうち、中心が黒い領域を探索することによりマーカーの像を検出する。そしてマーカーのサイズを求めておき、格子線の間隔とともに、撮像装置12の視点位置の取得に用いる。
 上記のように特定した、格子線の境界線の傾きおよび位置を、広い領域で確認することにより微調整し、精度を高めてもよい。図15は、格子線の境界線を表す線を微調整する手法を説明するための図である。同図は探索対象の画像92において検出された、最も外側の4直線を辺とする矩形96と、調整対象の線94を示している。まず線94と矩形96の交点98a、98bを取得する。
 次に交点98a、98bを始点として画像の中心方向に、線94と同じ傾きで所定長さの線分100a、100bを定義する。そして図14の手法と同様の原理で、線分100a、100bを上方向または下方向に移動させながら、それが通る画素値の合計を取得していく。これにより線分100a、100bが白い矩形に入るタイミングを検出し、その位置に基づき得られる直線の傾き反映させて再度線分を定義し探索を繰り返す。この処理により画像の両端に近い離れた位置で、境界線の傾きおよび位置が検出できるため、これらを結ぶことにより線94の調整後の線とする。
 図16は、歪み補正部34が図9のS48において、補正後の格子線の像が画像平面の水平および垂直方向と一致するように、撮像装置12の姿勢の設定を調整する処理手順を示すフローチャートである。まず上述のように検出された格子線の境界線のうち、図15の矩形96の各辺を構成する、最も外側の4直線について、画像平面の水平方向あるいは垂直方向からの傾き誤差を求める(S60)。続いてそれらの直線の交点の位置座標を取得し、当該4点の補正前の位置座標を撮影画像上で特定する(S62)。この処理には上述の逆方向補正を適用できる。
 そしてS60で求めた誤差を解消する方向に、撮像装置12の姿勢の設定を調整し(S64)、当該姿勢を仮定して4点の位置座標を補正する(S66)。そして補正後の位置座標を頂点とする矩形の各辺について、画像平面の水平方向あるいは垂直方向からの傾き誤差を再度求める(S68)。誤差が所定のしきい値以上の場合(S70のN)、S64からS68の処理を繰り返す。誤差がしきい値より小さくなったら、設定された姿勢が正しいとして処理を終了する(S70のY)。これにより、僅か4点の補正状況を追跡することにより、撮像装置12の姿勢を正確に求めることができる。
 図17は、歪み補正部34が図9のS50において、画角および歪み補正の係数を調整する処理手順を示すフローチャートである。上述したように、本実施の形態では撮影画像からレンズに起因した歪みを解消するため、魚眼レンズ特有の歪み補正と補正係数を用いた補正を実施する。これらの補正には、撮像装置の画角と補正係数を用いる。一方、図9のS44における処理では、仮に設定された値を用いているため、格子線が歪曲していたり傾いていたりすることがあり得る。そこで格子線の直線性を確認しながらそれらのパラメータを調整することで、正しいパラメータを導出する。
 まず図14、15で説明したように検出された、チャートパターンの格子線の境界線の情報を利用して、当該格子線の幅を2等分する中点群を所定の間隔で抽出していく(S80)。次に抽出した中点群を最小二乗法等で直線に近似したうえ、各中点から直線までの距離の合計を誤差として取得する(S82)。さらに中点群の補正前の位置座標を、撮影画像上で特定する(S84)。この処理には上述の逆方向補正を適用できる。そしてS82で求めた誤差を解消する方向に各パラメータを調整し(S86)、それを用いて補正したときの補正後の中点群の位置座標を求める(S88)。
 そしてS82と同様に近似直線からの誤差を求め(S90)、それがしきい値以上の場合(S92のN)、S86からS90の処理を繰り返す。誤差がしきい値より小さくなったら、正しいパラメータが得られたと判定して処理を終了する(S92のY)。この場合も、限定された数の点の補正状況のみを追跡することにより、撮像装置12の画角を含むパラメータを効率的に求めることができる。
 図18は、疑似画像描画部42が疑似画像を描画する処理手順を示すフローチャートである。この処理は図6のS14に対応する。疑似画像描画部42はまず、図10で示したのと同様の仮想的な3次元空間にチャート200のオブジェクトモデルを配置し、さらに図16、17で示したように取得した撮像装置12の姿勢および画角で仮想カメラを配置する(S100)。位置については仮の値を設定しておく。そして仮想カメラの画像平面を準備し(S102)、当該画像平面における各画素を始点として、チャート200上の対応する位置を求める。この処理は、上述の順方向補正に対応する。
 すなわち図8で説明したのと同様に、本来歪みのある画像が表されるべき仮想カメラの画像平面の各画素について(S104)、魚眼レンズ特有の歪みを補正したうえ補正係数を用いた補正を行う(S106)。補正には図17で示した撮像装置12の各パラメータの値を用いる。この時点で、レンズ歪みのない中心射影の画素配列となっているため、仮想カメラの位置と姿勢に応じた一般的な射影変換により、チャート200のパターン上の参照先の位置座標を決定する(S108)。
 そして当該参照先の位置から画素値を引いてくることにより、仮想カメラの画像平面における対象画素の画素値を決定する(S110)。S104からS110の処理を、画像平面の全ての画素について実施し(S112のN)、完了したら処理を終了させる(S112のY)。このようにして生成された、撮影画像の疑似画像は歪み補正部34に供給される。歪み補正部34は当該画像に対し、図9で説明したのと同じ処理を実施する。すなわち撮影画像に対する補正処理により得られた、撮像装置に係る各種パラメータを用いて補正処理を実施し、歪みのない画像を生成する。
 この際、当該画像に対しても図14、15で説明したような格子線の探索を行い、さらにマーカーを検出することで、格子線の間隔とマーカーの位置を取得する。そして図9のS52で取得した、撮影画像の補正画像における格子線の間隔とマーカーの位置とそれぞれ比較する。仮想カメラの位置が実際と異なっている場合、それらのパラメータは撮影画像に対し得られた値と異なっている。したがって視点調整部44は、その差を解消するように仮想カメラの視点位置を調整する。例えば疑似画像描画部42に、調整後の視点位置での疑似画像を再度描画させ、それを補正することで格子線の間隔とマーカーの位置が実際と合致するように調整していく。
 一方、疑似画像の補正後の画像のみを用いて調整処理を効率化してもよい。すなわち格子線の間隔およびマーカーの位置の実際との差と、それを解消するのに必要な視点位置の移動量との関係をあらかじめ求めておく。当該関係を用いて、実際の差に基づき移動させた視点位置が、求めるべき撮像装置の位置となる。なお撮像装置12を多眼カメラとする場合、図6で示した処理をそれぞれの撮影画像に対し行う。これにより各カメラの位置および姿勢が得られるため、一般的なカメラの外部パラメータと同等に利用できる。すなわち運用時に、各カメラで撮影された画像から対応点を抽出する際、撮影画像の補正に用いることができる。
 図19は、疑似画像描画部42が生成した実際の疑似画像を例示している。すなわち仮想空間に配置したチャートを、魚眼レンズを有する仮想カメラで撮影することを想定したときの撮影画像を示している。ただし仮想カメラの位置は、視点調整部44による調整後のものとしている。その結果、図7の撮影画像50とほぼ同一の画像が得られることがわかる。図20は、図19で示した疑似画像の補正後の画像を示している。当該画像も、図7の補正後の画像52とほぼ同一となっている。
 厳密には、実際の撮影画像の補正後の画像52では、画像上の位置によって歪み特性に僅かな差があるため、格子線が微妙に歪曲している場合があるが、図20の画像ではそのような差が生じない。したがって補正処理により、格子線が直交するチャートパターンを再現できる。また実際には、疑似画像を補正して最初に得られる画像は、仮想カメラの設定位置に依存して、格子線の間隔やマーカーの位置が実際と異なっている。これが同一になるように視点の位置を調整することにより、図示するように撮影画像の補正後の画像52とほぼ同一の画像が得られる。
 図21は、本実施の形態に適用できるチャート200のパターンの別の例を示している。図示するパターンは、フラクタルバーコードと呼ばれ、米国特許第7857232号明細書に開示されている。フラクタルバーコードは最小単位の2次元バーコードを2行2列に配置し、さらにそれを2行2列に配置する、というように入れ子状の階層構造の繰り返しパターンとすることにより、埋め込む情報も階層構造にできる。また各バーコードには、全体に対する位置に係る情報が含まれる。したがって撮像装置を近づけてその一部領域のみが撮影されても必要な情報を得ることができる。
 そこでフラクタルバーコードを本実施の形態のチャートパターンのマーカーとして用いたり、チャート全体に複数、配置したりすることにより、チャートに対する撮像装置の位置をその撮影画像からおよそ特定できる。したがって疑似画像描画部42における仮想カメラの設定を、当初より比較的正確に行え、処理効率を向上させることができる。またチャートの一部のみを撮影しても同様の効果が得られるため、撮影時の位置合わせの必要性をさらに低くできる。例えば魚眼レンズの広い視野のうち一部にフラクタルバーコードが映り込んでいれば、キャリブレーションが可能となる。
 図22は、チャート200の撮影画像を例示しており、(a)は格子とマーカーからなるチャートパターンを携帯端末の表示画面に表示させた場合、(b)はフラクタルバーコードからなるチャートパターンをテレビ受像器に表示させた場合の撮影画像を示している。このように電子機器の画面に表示させても、チャートのパターンを鮮明に撮影することができる。また(b)のフラクタルバーコードの場合、図示するように一部領域のみが写っていてもキャリブレーションが可能である。したがって一般ユーザが運用時の任意のタイミングで、自らが保有する電子機器にチャートを表示させることによりキャリブレーションを実施することも容易にできる。
 例えば据え置き型のモニターやテレビ受像器にチャートを表示させ、ユーザ自らが装着したヘッドマウントディスプレイが備える撮像装置のキャリブレーションを行えば、モニターなどに対するヘッドマウントディスプレイの位置や姿勢が判明する。その状態を始点として、撮像装置が撮影し続ける画像を追跡していくことにより、ヘッドマウントディスプレイの動きを追跡できる。また視野に入った物とモニターとの関係が判明し、室内の環境地図を作成することが容易になる。画像を解析して周囲の環境地図を作成する技術としてSLAM(Simultaneous Localization and Mapping)が知られている。本実施の形態はそのような画像解析技術にも適用できる。
 図23は、運用時における広角レンズを有する撮像装置を用いた一般的な処理の体系と、本実施の形態を利用した処理の体系との差を説明するための図である。(a)に示す一般的な処理では、主に画像平面上の2次元的な補正情報を利用する。図示するように撮影処理がなされたあと、平面上での補正情報が与えられ、それに応じて歪み補正等を実施することにより、画像処理を行いやすく、また表示上で違和感のない画像が得られる。そのようなことを目的とするため、キャリブレーション時にも魚眼レンズが撮影した画像を早々に、平面的な情報に変換しても構わない。
 一方、本実施の形態では、キャリブレーション時に魚眼レンズの歪みを利用することで、撮像装置とチャートの位置や姿勢の関係といった3次元の情報が求められる。画角も、視点に対する視野を規定するという意味では3次元の情報である。したがって運用時には(b)に示すように、撮影画像に対し3次元の情報が与えられるため、3次元空間における幾何学的な情報を取得できる。例えば上述のような環境地図の作成に用いることができる。その結果を用いれば、情報処理のバリエーションを格段に増やすことができる。その結果を表示する場合も、仮想現実や拡張現実などより魅力的な画像世界を精度よく表現できる。
 以上、述べた本実施の形態によれば、魚眼レンズを用いて所定パターンのチャートを撮影することによりキャリブレーションを行う。この際、魚眼レンズによる歪みを利用して撮像装置の画角を求める。これにより、1回の撮影では切り分けが困難であった、画角と視点位置のうち一方を既知とできる。さらに得られた姿勢を用いて、仮想カメラから見たチャートのモデル上の画像を描画し、実際の画像と比較することで、視点位置も特定できる。
 結果として、チャートと撮像装置の間隔を固定としたうえで撮影したり、撮像装置の向きを変化させて複数回の撮影を繰り返したりする手間なく、補正係数など一般的なパラメータも取得できる。またレンズ歪みを補正する際は、まず魚眼レンズの等距離射影の画像を、中心射影の画像に補正したうえで、一般的な補正式を適用する。これにより従来見られた、画像の中心から離れるほど補正精度が悪化する状況を改善できる。結果として、画像全体から情報を取得することができ、キャリブレーションやそれを用いた情報処理の精度を向上させられる。
 撮像装置から各種パラメータを得る際は、目標とする画像が得られるまでパラメータを調整しながら補正を繰り返す。この際、目標とする画像のうち評価対象のサンプリング点のみに着目し、調整による変化を追跡することにより、効率的にパラメータの最適値へ到達することができる。本実施の形態は、魚眼レンズを用いて1枚の撮影画像から3次元情報を取得していることに他ならない。したがって、運用時にも環境地図の作成など3次元空間での幾何的な処理に利用でき、撮影画像を用いた処理のバリエーションを増やすことができる。
 多眼カメラに適用すれば、全てのカメラの相対位置や姿勢の差を取得できるため、各カメラによる撮影画像の位置合わせに利用でき、ひいてはそれを用いた被写体の位置取得も容易になる。多眼カメラによる撮影画像を接続して表示画像とするスティッチング処理においても、各カメラの相対位置や姿勢の差を考慮して3次元空間での射影変換により微調整できるため、より精密なつなぎ合わせを実現できる。
 また、チャートに対する撮影画像の位置や姿勢が判明するため、キャリブレーションにおいてチャートと撮像装置を厳密に位置合わせする必要がない。チャートパターンとしてフラクタルバーコードを用いると、部分領域のみの撮影でも撮像装置の位置を特定できるため、撮影に対する自由度がさらに増える。チャートは電子機器に表示させることも可能なため、時期や場所に関わらずユーザが容易にキャリブレーションを実施でき、その後の継続的な情報取得の基点とできるほか、装置の経年変化に対し最新の補正環境を提供できる。
 以上、本発明を実施の形態をもとに説明した。上記実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。
 例えば本実施の形態の歪み補正部は、パラメータを仮定してチャートの撮影画像を補正し、その像が本来のチャートパターンと同等になるまで調整することでパラメータを導出し、その過程において、射影変換の差に基づく魚眼レンズ特有の歪み補正を行った。一方、当該補正手法はキャリブレーション時に限らず、魚眼カメラで撮影されたあらゆる画像の補正にも用いることができる。
 すなわち魚眼カメラで撮影された屋外や屋内の画像を、図11で示したように中心射影の画像に変換する。さらに必要に応じて補正係数を用いた一般的な補正式を適用して補正し、それを表示させたり情報処理に用いたりする。この場合も、画像全体を高精度に補正できるため、視野の広い画像では生じがちな歪みを最小限に抑えることができる。
 また本実施の形態では、歪み補正部が上述のとおり画角や補正係数などのパラメータを調整し、それを用いて疑似画像描画部が仮想カメラの設定を行った。一方、それらのパラメータを別の手段で取得し、疑似画像描画部はそのデータを用いて仮想カメラを設定してもよい。例えば一般的なキャリブレーション手法により補正係数を取得し、撮像装置に内蔵させたモーションセンサにより撮像装置の姿勢を取得する。その結果を用いて疑似画像を生成し、本実施の形態と同様に仮想カメラの視点を調整することで撮像装置の位置を特定してもよい。
 あるいは撮像装置の位置に加え姿勢も未知としてよい。この場合、仮想カメラの視点位置と視線ベクトルの双方を調整しながら結果として得られる疑似画像を確認し、撮影画像と一致するときの視点位置と視線ベクトルを、撮像装置の位置および姿勢として決定できる。撮影画像との比較には本実施の形態と同様、補正後の画像における格子線やマーカーを利用することにより、一致度を正確に評価できる。
 また本実施の形態における歪み補正部34は、射影方式を変換する補正、補正係数を用いた一般的な補正、基準状態からの姿勢の差に基づく射影変換をセットとして行ったが、それらのうち1つまたは2つを省略してもよい。例えば射影方式を変換する補正のみで要求される精度が得られれば、補正係数を用いた補正を行わなくてよい。また撮像装置がチャートに正対していることが明らかな状況においては、射影変換を行わなくてよい。そのようにしても、本実施の形態と同様の効果が得られる。
 実施の形態2
 実施の形態1では、図11に示すように撮像装置の光軸がチャート面の垂線と一致するような位置関係において、魚眼レンズ特有の歪みを中心射影の画像に変換することを基本とした。この手法によれば、チャートパターンの歪み補正を容易な演算で実現できる一方、レンズが広角になるほど、光軸から離れた領域に写るパターンの補正精度が低下することが考えられる。そこで本実施の形態では、撮像装置12の画角によらず、撮影画像全体で高精度な補正を行えるようにする。キャリブレーション装置10の機能ブロックの構成やキャリブレーションの主な処理手順は、図5、6で示したものと同様である。以下、実施の形態1と異なる点に着目して説明する。
 図24は、魚眼レンズに対する位置および姿勢が異なるチャートパターンの撮影画像を例示している。同図上段には、各画像を撮影した際の、スクリーン面とチャートの面の位置関係を俯瞰図で示している。(a)は実施形態1で想定したように、チャート面302aがスクリーン面300に正対している場合、(b)はチャート面302bの垂線が光軸oaに対し左に45°傾いている場合、(c)はチャート面302cの垂線が光軸oaに対し左に90°傾いている場合の撮影画像である。
 このように広角の魚眼レンズによれば、広い範囲にあるチャートを写すことができる。したがってパターンが写っている限り、チャートの位置や向きによらず同じ精度で像の補正を行えるようにすると、魚眼レンズの特性が最大限に活かせるようなキャリブレーションを一度の撮影で実現できる。このため本実施の形態の歪み補正部34および疑似画像描画部42は、実施の形態1とは異なる演算により、図示するような撮影画像から格子が直交するチャートパターンを復元したり、当該撮影画像の疑似画像を生成したりする。
 まず疑似画像描画部42が疑似画像を生成する手法について説明する。図25、26、27は、本実施の形態において疑似画像を生成する手順を説明するための図である。図18で説明したように、疑似画像描画部42は図10と同様の仮想3次元空間にチャートのオブジェクトモデルと仮想カメラを配置し、仮想カメラのスクリーン面に対応する画像平面の各画素を始点として、そこに表れるチャート上の位置を求める。
 本実施の形態では図18のS106におけるレンズの歪み補正において、スクリーン面が本来は球面状であることを踏まえ、3次元空間で当該スクリーン面を変形・回転させる。図25、26、27に示す座標系は図10と同様であり、チャートに平行なXZ平面とチャートの中心で垂直に交わるY軸で定義される。まず図25における領域310は初期状態として、仮想カメラのスクリーン面のうちチャートパターンに正対している正方形の領域を、XZ空間で表している。
 スクリーン面は実際にはY軸方向に湾曲しているが、XZ空間においては、領域310は元のチャートパターンを正面から見た状態に対応する。以後の処理は、スクリーン面の湾曲を加味したときに、領域310の各画素に射影されるチャートパターン上の位置の変化を求めることに対応する。なおこの段階では視点を原点に一致させている。
 領域312は、領域310に対し、補正係数を用いた一般的な歪み補正の逆補正を施したものである。この処理には図13で示した再帰的手法を利用できる。ただしここではレンズ歪み補正係数と接線歪み補正係数を用いた一般的な歪み補正計算のみを考慮する。また実施の形態1では6次までの補正式を示したが、それより大きい次数の項を含めてもよい。樽型歪みを補正する係数が与えられている場合、図示するように領域312は糸巻き型の形状となる。
 上述のとおりスクリーン面は実際には、視点を中心とする球面に貼り付いた状態となっている。したがって仮想カメラの姿勢を変化させる際、球面の状態でロール角r、チルト角q、パン角pに応じて回転させると、本来の状況を正確に反映できる。ロール方向の回転は3次元空間のY軸周り、すなわちXZ平面内の回転である。図示する例ではロール角r=10°回転させ、領域314としている。撮影環境を俯瞰したときの、領域314のXY空間での状態を下段に示している。図示するように領域314は、レンズの球面に貼り付いた状態として考える。
 図26に移り、チルト方向の回転は3次元空間のX軸周りの回転である。図示する例では、図25の領域314を、チルト角q=10°で回転させた領域316を、俯瞰した状態で示している。パン方向の回転は3次元空間のZ軸周りの回転である。図示する例では領域316を、パン角p=10°で回転させた領域318を、俯瞰した状態で示している。視点が原点にない場合、球面をさらに3次元空間で平行移動させる。図示する例では200mm、チャートの平面側に近づけた領域320としている。なおパン、チルト、ロールの回転や平行移動の順序は図示するものに限らない。
 図27は、変換後のスクリーン面上にチャートの画像を射影する様子を示している。(a)は図26で示したのと同様の、変換後のスクリーン面の領域320と、チャート322を俯瞰した状態を示している。図示した変換により、XZ空間における領域310の各画素の、3次元空間での変位先が判明している。そこで仮想カメラの視点324から当該変位先へのベクトル326を、各画素について求める。ベクトル326を延長した先に、当該画素に像として表れるチャート322上のポイント328が存在する。
 すなわちベクトル326を画素ごとに求めることにより、そこに表されるチャートパターン上の位置を取得できる。(b)は領域320に射影される、チャート322上の領域を示している。樽型歪みの逆補正により領域は全体として糸巻き型の形状を有する。また仮想カメラの姿勢として、正方向にパン、チルト、ロールの回転を与えた結果、図示するような非対称な歪みを有する領域が結像する。この領域の像を元の画像平面の画素として配列させれば、魚眼レンズによる撮影画像を擬似的に生成できる。
 以上述べた手順により、基本的には画角の制限なく疑似画像の生成が可能になる。図28、29は、本実施の形態において生成できる疑似画像の例を示している。これらの図は、立方体の6面の内側にそれぞれチャートパターンを表し、その中心に仮想カメラの視点を置いた状況を想定している。なお面によってチャートの色を変化させている。図28は、水平画角140°の仮想カメラの姿勢を変化させたときの疑似画像を示している。
 このうち(a)は、左の俯瞰図に示すように、仮想カメラが立方体の一面330に正対した状態、すなわち当該面に平行な面をXZ平面と定義したとき、パン角、チルト角、ロール角が全て0°の状態に対し生成される疑似画像を示す。(b)は、右の俯瞰図に示すように、パン角が30°、チルト角とロール角が0°の状態、(c)は、左の斜視図に示すように、チルト角が45°パン角とロール角が0°の状態の疑似画像を示す。(d)は右の斜視図に示すように、パン角60°、チルト角20°、ロール角45°の状態の疑似画像を示す。
 図29は、仮想カメラが立方体の一面に正対した状態で、仮想カメラの水平画角を変化させたときの疑似画像を示している。(a)は水平画角90°のときであり、視点が立方体の中心にあることにより、チャートの像の横幅が撮影画像の横幅に一致している。(b)は水平画角140°のとき、(c)は水平画角180°のときである。(c)の場合、立方体の左右の面の前方半分までが画角に入っている。(d)は水平画角270°のとき、(e)は水平画角360°のときである。
 (e)の場合、立方体の6面のうち光軸と逆方向の面が視野の周縁領域に写っており、当該面上のチャートの中央にあるマーカーが視野端の円周上に表れる。このように本実施の形態の手法によれば、仮想カメラの姿勢や画角に依存した撮影画像の変化を忠実に再現できる。また樽型歪みなど一般的なレンズ歪みも反映できる。
 次に、スクリーン面が球面に貼り付いているときに、XZ空間において定義される画素の2次元座標から、3次元空間での位置座標を取得する手法について説明する。図30は、演算に用いるパラメータの定義を示している。同図(a)は3次元空間を俯瞰した状態、(b)はXZ空間を表している。画像平面340は図25の領域310と同様にチャートパターンが写る領域を示しており、左下を原点として各画素の位置座標を(i,j)で表す。
 画像平面340に写るチャート322の横方向および縦方向のサイズは、画像平面340の水平画素数imaxと垂直画素数jmaxに対応する。また視点324からチャート322が写る水平方向の角度範囲をθとすると、水平方向の画角の1°に対応する、画像平面340の画素数(画素密度)Densは次のようになる。
 dens = imax / (2 *θ)
 図31、32は、画像平面における位置座標(i,j)に対応する、3次元空間での位置座標を求める手順を模式的に示している。まず図31の上段に示す(a)は、画像平面340上の位置座標(i,j)を示している。これを、画像平面340の中心を原点とするXZ空間における位置座標に換算したうえ、レンズ歪み補正の逆補正を施す。この補正は一般的なレンズ歪みおよび接線歪みの式を用いて図13で説明したように実施する。このようにして求めた座標を(x1,z1)とする。
 XZ空間の原点から(x1,z1)への線342は、XZ空間では直線状となるが、3次元空間では(a)の右側に示すように、単位球面に沿って巻き付いている。そこで下段の(b)に示すように、位置座標(x1,z1)を、経度と緯度の2次元空間での位置座標に変換する。Y軸上のY=1の点を経度緯度空間での原点とすると、変換後の経度PPと緯度QQは次のようになる。
 PP = x1 / dens
 QQ = z1 / dens
 (b)の中央の図は単位球面における経度PPと緯度QQを斜視図で示している。また右端の図は、経度緯度平面における原点から座標(PP,QQ)へ至る線342を含む平面344を取り出して示している。図示するように線342が単位球面に巻き付いている角度Rは、経度PPと緯度QQを合成した角度であり、次のように求められる。
 R = ( PP2 + QQ2)1/2
 また経度緯度平面における、線342の経度軸からの角度ttは、線342を含む平面344の、XY平面からの角度に対応し、次のように求められる。
 tt = atan(QQ / PP)
 座標(PP,QQ)の、3次元空間での位置座標(x3,y3,z3)を求めるため、図32の上段(a)に示すように、まず平面344を角度ttだけ回転させ、XY平面と一致させる。
 この変換により線342は線346へ変位し、経度緯度平面における位置座標(PP,QQ)は、次の式によりXY平面の位置座標(x2,y2)に変換される。
 x2 = sin (R)
 y2 = cos (R)
この回転によっても位置座標(PP,QQ)のXYZ空間におけるY座標は保存されているため、y2は、求めるべき3次元空間での位置座標(x3,y3,z3)のうちのY座標y3に他ならない。
 さらに下段(b)に示すように、そのように回転させた平面を、今度は角度ttだけ逆方向に回転させ元の平面344(ただしXYZ空間で定義される)に戻すと、位置座標(PP,QQ)の、XYZ空間における位置座標(x3,y3,z3)は結局、次のように求められる。
 x3 = x2 * cos (tt)
 y3 = y2
 z3 = x2 * sin (tt)
 以上の処理を、図30で示した画像平面340の全ての画素について実施することにより、画像平面を3次元空間のスクリーン面に変換できる。当該スクリーン面を、仮想カメラの姿勢(パン角p、チルト角q、ロール角r)に応じてさらに変換する。このとき、Y軸周りのロール方向の回転は、図32の(b)で示した角度ttの回転と同時に実施できる。この場合の変換式は次のようになる。
 x3 = x2 * cos(tt + r)
 y3 = y2
 z3 = x2 * sin (tt + r)
 さらにチルト方向に回転させたときの位置座標(x4,y4,z4)は次の変換式により求められる。
 x4 = x3
 y4 = y3 * cos(q) + z3 * sin(q)
 z4 = y3 * sin(q) + z3 * cos(q)
 さらにパン方向に回転させたときの位置座標(x5,y5,z5)は次の変換式により求められる。
 x5 = y4 * cos(p) + z4 * sin(p)
 y5 = y4 * sin(p) + z4 * cos(p)
 z5 = z4
 また視点の位置座標が原点から(Δx,Δy,Δz)ずれている場合はさらに、つぎのように平行移動させた位置座標(x6,y6,z6)を求める。
 x6 = x5 + Dx
 y6 = y5 + Dy
 z6 = z5 + Dz
以上の処理により、図27で示した領域320への変換を実現できるため、視点から変換先の位置座標へのベクトル326により、チャート322上の対応するポイント328を特定できる。当該ポイント328をサンプリング点として適宜バイリニア補間などを施したうえ画素値を決定すれば、図28、29で示したような疑似画像を生成できる。
 図31、32で示した2次元空間から3次元空間への変換処理は可逆性を有する。すなわち、元のチャートパターンに対応する2次元空間における(i,j)の画素配列から3次元空間の位置座標(x3,y3,z3)を求める手順を逆に辿れば、位置座標(x3,y3,z3)から元のチャートパターンの画像の位置座標(i,j)が求められる。つまり魚眼レンズ特有の歪みを規定する3次元の情報から、歪みを取り除いた2次元の情報を生成できる。
 本実施の形態における歪み補正部34はこれを利用し、疑似画像描画部42が疑似画像を生成するのと逆の処理により撮影画像におけるチャートパターンの像を補正する。歪み補正部34の基本的な動作は、図9で示したとおりであるが、S44、S50、S52において実施する歪み補正において、図31、32で示した疑似画像の生成と逆の処理を実施する。上述の可逆性により、図13で示した再帰的な変換処理は、補正係数を用いた一般的な歪み補正の逆処理のみに適用すればよくなる。
 図33は、歪み補正部34が撮影画像のチャートパターンの像に歪み補正を施す処理手順を示すフローチャートである。まず撮影画像のうち対象画素を設定し、その位置座標から3次元空間での位置座標(x7,y7,z7)を取得する(S200)。図24で例示した等距離射影の撮影画像においては、画素の位置を、画像中心を原点とする極座標(r,θ)で表せる。ここで画像中心からの距離rは、3次元空間において光軸を垂直上向きとしたときの天頂角に比例し、基準軸からの角度θは、当該3次元空間における方位角を表す。
 したがって撮影画像における画素の位置から、3次元空間での位置座標(x7,y7,z7)を容易に取得できる。そして視点から対象画素へ向く単位ベクトル(x8,y8,z8)を次のように求める(S202)。
 x8 = x7 / (x72 + y72 + z72)1/2
 y8 = y7 / (x72 + y72 + z72)1/2
 z8 = z7 / (x72 + y72 + z72)1/2
 次に、視点を原点として図32の(b)の逆の処理を実施する。すなわち原点と位置座標(x8,y8,z8)を結ぶ線を、XY平面上に位置するように回転させる(S204)。このときの回転角ttaは次のように求められる。
 tta = atan (z8 / x8)
また回転によって位置座標(x8,y8,z8)は、次の位置座標(x9,y9,z9)に変位する。
 x9 = x8 / cos (tta)
 y9 = y8
 z9 = 0
 続いて図32の(a)の逆の処理を実施する。すなわちZ平面における位置座標(x9,y9)が単位球に巻き付いている角度Raを求め(S206)、角度ttaだけ逆方向に回転させ元に戻すことにより、経度Pa1、緯度Qa1を次のように求める(S208)。
 Ra = atan (x9 / y9)
 Pa1 = Ra * cos (tta)
 Qa1 = Ra * sin (tta)
 そして図31の(b)の逆として、画角1°あたりの画素数である画素密度densを用いて、XZ空間での位置座標(x10,z10)を次のように求める(S210)。
 x10 = Pa1 * dens
 z10 = Qa1 * dens
 さらに図31の(a)の逆として、一般的なレンズ歪みおよび接線歪みの式による補正を施したうえ原点を左下に移動させることにより、元の画像平面での位置座標を得る(S212)。S200からS212までの処理を、チャートパターンの像の画素ごとに実施し(S214のN)、全画素について変換先の位置座標が求められたら処理を終了する(S214のY)。以上の処理により、チャートパターンの格子がおよそ直線状の画像が得られる。図示した歪み補正を行いつつ、格子の直交性が得られる撮像装置の姿勢を探索したり、より精度の高い直線が得られる画角や補正係数を探索したりする処理は、実施の形態1と同様である。
 ところで本実施の形態では、チャートパターンの位置や姿勢を幅広い範囲で許容するため、図24に示すように、撮影画像におけるチャートパターンの像の位置は様々となる。そこで好適には、歪み補正部34はあらかじめ、撮影画像においてチャートパターンが写っているおよその領域、ひいては3次元空間におけるチャートパターンのおよその方向を探索する。
 図34は、歪み補正部34がチャートパターンの領域を検出する処理手順を示すフローチャートである。歪み補正部34はまず、撮影画像を領域分割する(S220)。例えば画角を水平方向および垂直方向に所定数に分割し、各角度範囲に対応する画像上の領域に分割する。一例として、210°の画角の撮像装置の場合、70°ごとに3×3の領域に分割する。次に領域の1つを対象とし、当該領域の画像を、所定の倍率で別途準備した画像平面に展開する(S222)。
 続いて、展開した部分画像に対し、チャートパターンの格子線の横線探索を実施する(S224)。この探索には、図14で示した手法を利用できる。探索の結果、有効な角度や位置が得られなかった場合(S226のN)、同じ領域で画像の倍率を変化させたり次の領域を対象に設定し直したりして、横線の探索を繰り返す(S222、S224)。
 横線の探索で有効な結果が得られたら(S226のY)、続いて縦線を同様に探索する(S208)。縦線探索の結果、有効な結果が得られなかった場合(S230のN)、同じ領域で倍率を変化させたり次の領域を対象に設定し直したりして、横線の探索からやり直す(S222~S228)。そのようにして縦線の探索でも有効な結果が得られたら(S230のY)、当該領域をチャートパターンが写っている領域と判定して(S232)、探索処理を終了する。
 以上の処理により検出されたチャートパターンの像の領域に対し、上述の歪み補正処理を実施し、およそ直線状に補正されたチャートパターンを用いて、撮像装置12の姿勢を求める。およその処理手順は図16で示したのと同様である。すなわち、検出された格子線のうち最も外側の4直線が画像平面の水平、垂直方向と一致するように、姿勢の調整と線の傾き取得を交互に繰り返す。
 図35は、チャートパターンの直交性に基づく撮像装置の姿勢検出処理において、評価対象とするパラメータを説明するための図である。図示する矩形は画像平面を表し、内部に示した直線は、検出された格子線のうち最も外側の4直線、あるいは対向する2直線を示している。
 まず(a)は、撮像装置12の姿勢を表すパン角、チルト角、ロール角の全てに誤差がない状態を表している。この場合、図示するように格子の像の4直線が画像平面の水平方向、垂直方向と平行になる。これに対し(b)はパン角に誤差がある場合、(c)はチルト角に誤差がある場合、(d)はロール角に誤差がある場合の、格子線の像である。
 例えば(b)の状態において、上下の線の傾きの差epanを、パン角の誤差として評価する。epanは例えば、図示するように右側が狭まっている状態を正とする。(c)の状態において、左右の線の傾きの差etilを、チルト角の誤差として評価する。etilは例えば、図示するように下側が狭まっている場合を正とする。(d)の状態において、上下左右の直線の傾きの平均値erolを、ロール角の誤差として評価する。erolは例えば、図示するように半時計回りを正とする。
 実施の形態1では、チャートパターンをおよそ正面から撮影することを想定していた。そのため図示するような直線の関係に基づき誤差epan、etil、erolを取得し、設定したパン角、チルト角、ロール角からepan、etil、erolをそれぞれ減算していく調整により、正確なパン角、チルト角、ロール角に収束させることができる。一方、本実施の形態のように、チャートパターンが光軸と平行になるような状態を許容した場合、直線の位置関係と、誤差が生じている回転方向との対応が変化することが考えられる。
 例えば同図右側の俯瞰図に示すように、視点324から見て光軸方向に正対するようにチャート360aがある場合は、矢印で示すチルト方向の回転に対し、(c)に示すように、左右の直線の開き具合が変化する。一方、光軸と平行に近い状態でチャート360bが真横にある場合、同じチルト方向の回転に対し、(d)に示すような、本来のロール方向の回転と同様の変化が生じる。逆に、チャート360bの状態でロール方向に回転させれば、(c)に示す、本来のチルト方向の回転と同様の変化が生じる、というように、ロールとチルトで評価パラメータが入れ替わってしまう。
 同様に、チャートが真上や真下にある場合、ロールとパンで評価パラメータが入れ替わる。したがって場合によってはそれらの入れ替わりを考慮し、誤差epan、etil、erolを適宜組み合わせ、パン角p、チルト角q、ロール角rの各誤差を算出する。そしてこれらの誤差がしきい値より小さくなるまで、パン角p、チルト角q、ロール角rの設定値から誤差分を減算していくことにより、チャートの位置によらず撮像装置の姿勢を精度よく取得できる。
 このようにして撮像装置12の姿勢が得られたら、図17で示したのと同様の手順で、チャートパターンの格子の像が直線になるまで補正係数と画角を調整することにより、それらの最終値を決定する。図36は、歪み補正部34が撮影画像におけるチャートパターンの像を補正した結果を示している。(a)、(b)、(c)の画像は、図24の(a)、(b)、(c)に示した撮影画像から、それぞれ生成された補正後の画像である。
 すなわち(a)はチャート面302aがスクリーン面300に正対している場合、(b)はチャート面302bの垂線が光軸oaに対し左に45°傾いている場合、(c)はチャート面302cの垂線が光軸oaに対し左に90°傾いている場合の撮影画像の補正結果である。レンズに対するチャートの位置や姿勢によらず、チャートパターンが好適に復元されていることがわかる。
 換言すれば、チャートを視野の中心に据えて撮影せずとも、撮像装置12の姿勢、補正係数、画角が正確に求められる。視点調整部44は、このようにして復元したチャートパターンと、疑似画像に対し同様の処理で復元したチャートパターンとを比較し、撮像装置12の位置を取得する。ここで視点調整時に生成する疑似画像も、本実施の形態で上述したのと同様の手法により生成する。
 これまで述べた態様では、一面のチャートパターンの位置や姿勢の許容範囲を広げることを想定した。これにより、チャートパターンの一部が視野の隅に入っているような状態でキャリブレーションが可能になる。結果として、対象物を撮影してその動きに対応するようにゲームを進捗させたり、撮影画像の視野に合わせて表示画像を生成したりといった、撮影画像を用いた情報処理を、キャリブレーションと並行して行える。一方、図28、29で示したように、チャートパターンを複数面とすることで、全天空を撮影するような撮像装置であっても、一度の撮影で視野全体のキャリブレーションを精度よく行える。
 図37は、チャートパターンを立方体の内部に表し、その中心を視点として画角220°で撮影したことを想定した疑似画像から、各面のチャートを復元した画像を示している。この場合、3次元空間の定義がチャートの面ごとに異なるため、各面が写る画角に対応する画像上の領域を設定し、その単位で補正処理を施す。220°の画角によれば(a)の撮影画像に示すように、正面全体と上下左右の面の一部が撮影される。これらの面に対し5つの3次元空間を設定し、それぞれに補正処理を施すと、(b)に示すように5つの補正後画像を生成できる。図示するように、画像が撮影されている範囲において、全ての面のチャートパターンを復元できる。
 図37に示した状況を撮影画像に置き換えると、(a)で示したように複数のチャートパターンを一度に撮影した画像のうち、画角に応じて切り出した領域ごとに、(b)に示すように補正処理を独立に実施する。これにより、撮影画像の全領域について補正係数を正確に求めることができる。また撮影された面ごとに視点や姿勢の情報が得られるため、それらを統合することにより、撮像装置の視点、姿勢、画角をより高精度に求めることができる。
 図38は、立方体の内部を任意の姿勢で撮影したことを想定した疑似画像から、ある面のチャートを復元した結果を示している。同図(a)は、図28の(d)で示したパン角60°、チルト角20°、ロール角45°の疑似画像であり、(b)はパン角0°、チルト角0°、ロール角0°のとき正面に位置するチャート面370の補正後の画像である。この場合も、チャートパターンのうち、視野に入っている部分のみから、元のチャートパターンの対応する部分が精度よく再現されている。
 図38に示した状況を撮影画像に置き換えると、(a)で示した撮影画像がどのような姿勢で撮影されたものかが未知であっても、また補正係数や画角が未知であっても、(b)に示したような元のチャートパターンが得られるまで調整することにより、それらのパラメータを取得できることになる。
 以上述べた本実施の形態によれば、魚眼レンズの特性を利用したキャリブレーションにおいて、画像平面を球面状のスクリーン面として3次元空間にマッピングすることにより、魚眼レンズ特有の歪みを正確に再現する。そして当該球面を各軸周りに回転させることにより、撮像装置の姿勢の変化を正確に、画像に反映させる。チャートパターンの像が写る領域の、球面へのマッピングには、光軸に係る拘束条件が含まれないため、チャートパターンが撮影画像のどこに写っていようと同様の処理を行える。
 結果として、実際の状況を再現することによる精度の向上に加え、撮影視野に対するチャートパターンの位置や姿勢の許容範囲を大幅に広げることができる。これにより、チャートパターンの一部のみ視野に入っている状態でのキャリブレーションも可能になり、本来の運用処理との並行処理によって、キャリブレーションの処理効率を向上させられるとともに、運用処理の精度も維持できる。
 また、画像平面から球面への変換は可逆処理であるため、到達点を設定してそれに至る初期状態を模索するような処理を最小限にすることができ、キャリブレーションの処理効率や精度を向上させられる。さらにチャートパターンの位置や姿勢の制限が少ないことを利用して、撮影画像の画角を網羅するように複数面のチャートパターンを用いれば、画角によらず一度の撮影で、高精度なキャリブレーションを実現できる。これらのことにより、実施形態1で述べたのと同様の効果を、より広い撮影環境で適用でき、汎用性、利便性を高めることができる。
 なお本実施の形態においても、チャートパターンは直線の格子に限らず、実施の形態1で説明したフラクタルバーコードなどその他のパターンでよい。またキャリブレーション装置の利用形態や処理の変形例については、実施の形態1で述べたのと同様である。
 10 キャリブレーション装置、 12 撮像装置、 30 撮影画像取得部、 34 歪み補正部、 36 画像記憶部、 38 パラメータ記憶部、 40 チャート画像記憶部、 44 視点調整部、 46 出力データ生成部、 122 CPU、 124 GPU、 126 メインメモリ、 200 チャート。
 以上のように本発明は、キャリブレーション装置、撮像装置、画像処理装置、表示装置、ロボット、パーソナルコンピュータなど各種情報処理装置や、それらのいずれかを含むシステムなどに利用可能である。

Claims (19)

  1.  魚眼レンズを有する撮像装置から、キャリブレーション用のチャートの撮影画像のデータを取得する撮影画像取得部と、
     前記魚眼レンズに対応するスクリーン上の位置と、当該位置に結像する前記チャートの面上の位置との関係に基づきレンズによる歪みを補正するとともに、補正された画像を評価することにより撮像装置に係るパラメータの値を導出し出力する補正部と、
     を備えたことを特徴とするキャリブレーション装置。
  2.  前記補正部は、前記撮像装置の画角を仮定して前記レンズによる歪みを補正することにより得られた画像を、前記チャートのパターンと比較することにより当該画像を評価し、その結果に基づき前記画角を導出することを特徴とする請求項1に記載のキャリブレーション装置。
  3.  前記補正部はさらに、前記撮像装置の姿勢を仮定して、補正された画像を射影変換し、当該画像を前記チャートのパターンと比較することにより評価し、その結果に基づき前記姿勢を導出することを特徴とする請求項1または2に記載のキャリブレーション装置。
  4.  仮想カメラと前記チャートのオブジェクトモデルを仮想3次元空間に配置し、前記仮想カメラが撮影する画像として、前記パラメータの値を用いて前記補正部と逆の処理を実施することにより、前記撮影画像を疑似的に生成する疑似画像描画部と、
     前記疑似的に生成された画像と前記撮影画像とを比較することにより、前記チャートに対する前記撮像装置の位置を導出する視点調整部と、
     をさらに備えたことを特徴とする請求項1から3のいずれかに記載のキャリブレーション装置。
  5.  前記補正部は、前記疑似的に生成された画像に対し前記撮影画像と同じ補正を施し、
     前記視点調整部は、補正された画像同士を比較することにより前記撮像装置の位置を導出することを特徴とする請求項4に記載のキャリブレーション装置。
  6.  前記補正部は、撮影画像における各画素位置への視線ベクトルと光軸のなす角度に基づく補正の後、レンズ中心に対応する位置から各画素位置までの距離に基づく補正を行うことを特徴とする請求項1から5のいずれかに記載のキャリブレーション装置。
  7.  前記補正部は、前記撮影画像の各画素について、前記チャートの面に平行な画像平面と前記チャートの面の垂線で定義される3次元空間における、前記撮像装置の視点を中心とする球面上の位置座標を求め、当該位置座標に対応する、前記球面の経度緯度座標に基づき、前記画像平面の空間における位置座標に変換することにより、前記レンズによる歪みを補正することを特徴とする請求項1から5のいずれかに記載のキャリブレーション装置。
  8.  前記撮影画像取得部は、角度の異なる複数の面のそれぞれに表された前記チャートを一度に撮影した画像のデータを取得し、
     前記補正部は、前記チャートの面ごとに、対応する3次元空間を定義することにより前記レンズによる歪みを補正して、前記パラメータの値を導出することを特徴とする請求項7に記載のキャリブレーション装置。
  9.  前記補正部は、前記パラメータを調整しながら補正を行い、前記補正された画像のうち所定のサンプリング点について評価を繰り返すことにより、前記パラメータの値を決定することを特徴とする請求項1から8のいずれかに記載のキャリブレーション装置。
  10.  前記補正部は、前記撮像装置の画角の範囲によって、前記レンズによる歪みの補正を個別に行うことを特徴とする請求項1に記載のキャリブレーション装置。
  11.  前記撮影画像取得部は、画像平面の水平方向および垂直方向に伸張する複数の直線からなる格子線と、当該直線で囲まれた矩形領域のうち所定の位置の矩形領域に配された所定形状のマーカーと、を含むチャートの撮影画像のデータを取得することを特徴とする請求項1から10のいずれかに記載のキャリブレーション装置。
  12.  前記撮影画像取得部は、上層の2次元バーコードの配列内に、下層の複数の2次元バーコードの配列が包含されてなる入れ子構造のバーコード配列を含むチャートの撮影画像のデータを取得することを特徴とする請求項1から9のいずれかに記載のキャリブレーション装置。
  13.  魚眼レンズを有する撮像装置から、キャリブレーション用のチャートの撮影画像のデータを取得する撮影画像取得部と、
     前記撮像装置に係るパラメータの値を取得するパラメータ取得部と、
     仮想カメラと前記チャートのオブジェクトモデルを仮想3次元空間に配置し、前記仮想カメラが撮影する画像として、前記パラメータの値を用いて前記撮影画像を疑似的に生成する疑似画像描画部と、
     前記疑似的に生成された画像と前記撮影画像とを比較することにより、前記チャートに対する前記撮像装置の位置を導出する視点調整部と、
     を備えたことを特徴とするキャリブレーション装置。
  14.  前記疑似画像描画部は、前記チャートの面に平行な画像平面の画素の位置座標を、当該画像平面と前記チャートの面の垂線で定義される3次元空間における、前記仮想カメラの視点を中心とする球面上のスクリーン面での位置座標に変換し、前記視点と変換後の位置座標に基づき、前記チャートの面におけるサンプリング点を前記画素ごとに取得することにより、前記撮影画像を擬似的に生成することを特徴とする請求項13に記載のキャリブレーション装置。
  15.  前記疑似画像描画部は、前記画像平面の画素の位置座標を、前記球面の経度緯度座標に変換することにより球面上での対応する位置を求め、その結果に基づき前記3次元空間における変換後の位置座標を求めることを特徴とする請求項14に記載のキャリブレーション装置。
  16.  前記パラメータ取得部は、前記撮像装置の姿勢に係る情報を取得し、
     前記疑似画像描画部は、前記球面を前記姿勢に基づき3次元空間で回転させることにより、当該姿勢に応じた位置座標に変換することを特徴とする請求項14または15に記載のキャリブレーション装置。
  17.  魚眼レンズを有する撮像装置と、
     請求項1から16のいずれかに記載のキャリブレーション装置と、
     を備えたことを特徴とするキャリブレーションシステム。
  18.  魚眼レンズを有する撮像装置から、キャリブレーション用のチャートの撮影画像のデータを取得するステップと、
     前記魚眼レンズに対応するスクリーン上の位置と、当該位置に結像する前記チャートの面上の位置との関係に基づきレンズによる歪みを補正するステップと、
     補正された画像を評価することにより撮像装置に係るパラメータの値を導出し出力するステップと、
     を含むことを特徴とする、キャリブレーション装置によるキャリブレーション方法。
  19.  魚眼レンズを有する撮像装置から、キャリブレーション用のチャートの撮影画像のデータを取得する機能と、
     前記魚眼レンズに対応するスクリーン上の位置と、当該位置に結像する前記チャートの面上の位置との関係に基づきレンズによる歪みを補正する機能と、
     補正された画像を評価することにより撮像装置に係るパラメータの値を導出し出力する機能と、
     をコンピュータに実現させることを特徴とするコンピュータプログラム。
PCT/JP2018/018015 2017-09-08 2018-05-09 キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法 WO2019049421A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US16/643,678 US11232593B2 (en) 2017-09-08 2018-05-09 Calibration apparatus, calibration system, and calibration method
CN201880058435.8A CN111095923B (zh) 2017-09-08 2018-05-09 校准装置、校准***和校准方法
JP2019540760A JP6859442B2 (ja) 2017-09-08 2018-05-09 キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JPPCT/JP2017/032563 2017-09-08
PCT/JP2017/032563 WO2019049331A1 (ja) 2017-09-08 2017-09-08 キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法

Publications (1)

Publication Number Publication Date
WO2019049421A1 true WO2019049421A1 (ja) 2019-03-14

Family

ID=65634755

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/JP2017/032563 WO2019049331A1 (ja) 2017-09-08 2017-09-08 キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法
PCT/JP2018/018015 WO2019049421A1 (ja) 2017-09-08 2018-05-09 キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/032563 WO2019049331A1 (ja) 2017-09-08 2017-09-08 キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法

Country Status (4)

Country Link
US (1) US11232593B2 (ja)
JP (1) JP6859442B2 (ja)
CN (1) CN111095923B (ja)
WO (2) WO2019049331A1 (ja)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111210478A (zh) * 2019-12-31 2020-05-29 重庆邮电大学 一种无共同视野多相机***外参标定方法、介质及***
CN112288649A (zh) * 2020-10-27 2021-01-29 长安大学 一种圆柱状物体透视成像失真的图像校正方法及设备
CN112584136A (zh) * 2020-12-23 2021-03-30 上海艾为电子技术股份有限公司 位置校准模块、校准方法、电子设备、校准装置及存储介质
CN115314690A (zh) * 2022-08-09 2022-11-08 北京淳中科技股份有限公司 一种图像融合带处理方法、装置、电子设备及存储介质
JP7449393B2 (ja) 2020-08-28 2024-03-13 株式会社デンソーテン 車載装置および車載カメラのキャリブレーション方法
JP7474137B2 (ja) 2020-06-30 2024-04-24 キヤノン株式会社 情報処理装置およびその制御方法

Families Citing this family (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3523777A4 (en) * 2016-12-06 2019-11-13 SZ DJI Technology Co., Ltd. SYSTEM AND METHOD FOR CONFIGURING A WIDE ANGLE IMAGE
CN108596854B (zh) * 2018-04-28 2021-02-12 京东方科技集团股份有限公司 图像畸变校正方法及装置、计算机可读介质、电子设备
US11210859B1 (en) * 2018-12-03 2021-12-28 Occam Video Solutions, LLC Computer system for forensic analysis using motion video
CN111435969B (zh) * 2019-01-11 2021-11-09 佳能株式会社 图像处理装置及其控制方法、记录介质和信息处理***
CN111667398B (zh) * 2019-03-07 2023-08-01 株式会社理光 图像处理方法、装置和计算机可读存储介质
JP7192582B2 (ja) * 2019-03-11 2022-12-20 オムロン株式会社 物体追跡装置および物体追跡方法
JP2020182127A (ja) * 2019-04-25 2020-11-05 株式会社ソニー・インタラクティブエンタテインメント キャリブレーション装置、キャリブレーションシステム、および表示装置のキャリブレーション方法
JP7269864B2 (ja) * 2019-10-21 2023-05-09 株式会社アマダ ワーク撮影画像処理装置及びワーク撮影画像処理方法
CN110930336B (zh) * 2019-11-29 2023-11-28 深圳市商汤科技有限公司 图像处理方法及装置、电子设备和存储介质
DE102020131808A1 (de) * 2019-12-05 2021-06-10 Denso Wave Incorporated Vorrichtung zur Unterstützung von Kalibrierungsvorgängen bei Industriekameras
JP2021164095A (ja) * 2020-04-01 2021-10-11 キヤノン株式会社 投影装置
TWI720869B (zh) * 2020-04-15 2021-03-01 致伸科技股份有限公司 相機模組之對位方法
CN111612720B (zh) * 2020-05-21 2023-11-07 烟台艾睿光电科技有限公司 一种广角红外图像优化方法、***及相关组件
CN111795805B (zh) * 2020-06-29 2022-06-21 歌尔光学科技有限公司 测试图的绘制方法、终端设备及存储介质
CN112468716B (zh) * 2020-11-02 2022-07-19 航天信息股份有限公司 摄像头视角矫正方法、装置、存储介质及电子设备
KR102661114B1 (ko) 2020-11-10 2024-04-25 삼성전자주식회사 카메라 모듈 검사 장치, 카메라 모듈 검사 방법 및 이미지 생성 장치
US11172193B1 (en) * 2020-12-04 2021-11-09 Argo AI, LLC Method and system to calibrate camera devices of a vehicle vision system using a programmable calibration target device
CN112668505A (zh) * 2020-12-30 2021-04-16 北京百度网讯科技有限公司 基于路侧相机的外参的三维感知信息获取方法和路侧设备
CN113538283B (zh) * 2021-07-22 2024-04-30 浙江赫千电子科技有限公司 一种冗余鱼眼摄像头拍摄图像的畸变矫正方法
CN113687627B (zh) * 2021-08-18 2022-08-19 太仓中科信息技术研究院 一种基于摄像机器人的目标跟踪方法
CN113822941B (zh) * 2021-09-03 2023-12-19 大连中科创达软件有限公司 相机倾斜校准方法、装置、设备及存储介质
FR3127063B1 (fr) * 2021-09-10 2023-09-22 Renault Sas procédé de génération d’une image finale de l’environnement d’un véhicule automobile
CN115100026B (zh) * 2022-06-15 2023-07-14 佳都科技集团股份有限公司 基于目标对象的标签坐标转换方法、装置、设备及存储介质
CN117392241B (zh) * 2023-12-11 2024-03-05 新石器中研(上海)科技有限公司 自动驾驶中的传感器标定方法、装置及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003141521A (ja) * 2001-08-21 2003-05-16 Computer Image Laboratory Co Ltd 画像表示システム
WO2007055336A1 (ja) * 2005-11-11 2007-05-18 Sony Corporation 画像処理装置、画像処理方法、そのプログラム及びそのプログラムを記録した記録媒体と撮像装置
JP2012085026A (ja) * 2010-10-08 2012-04-26 Toshiba Alpine Automotive Technology Corp 画像処理装置及び画像処理方法
WO2012120561A1 (ja) * 2011-03-08 2012-09-13 三菱電機株式会社 移動体周辺映像補正装置
JP2013115540A (ja) * 2011-11-28 2013-06-10 Clarion Co Ltd 車載カメラシステム及びその較正方法、及びその較正プログラム

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU751852B2 (en) 1998-05-19 2002-08-29 Sony Interactive Entertainment Inc. Image processing apparatus and method, and providing medium
JP4307934B2 (ja) * 2003-08-13 2009-08-05 株式会社トプコン 画像補正機能付撮影装置及び方法、並びに撮影装置及び方法
CN101305595B (zh) 2005-11-11 2011-06-15 索尼株式会社 图像处理设备以及图像处理方法
JP4757142B2 (ja) * 2006-08-10 2011-08-24 キヤノン株式会社 撮影環境校正方法及び情報処理装置
US9361562B1 (en) * 2011-10-06 2016-06-07 AI Cure Technologies, Inc. Method and apparatus for fractal multilayered medication identification, authentication and adherence monitoring
KR102068992B1 (ko) * 2013-06-20 2020-01-22 삼성전자 주식회사 렌즈 캘리브레이션 방법 및 영상 복원 방법
JP6576945B2 (ja) * 2014-11-13 2019-09-18 オリンパス株式会社 較正装置、較正方法、光学装置、撮影装置、投影装置、計測システムおよび計測方法
US9894350B2 (en) * 2015-02-24 2018-02-13 Nextvr Inc. Methods and apparatus related to capturing and/or rendering images
CN104809739B (zh) * 2015-05-15 2019-03-22 南京大学 一种超广角镜头相机视频实时校正的方法
CN106815805A (zh) * 2017-01-17 2017-06-09 湖南优象科技有限公司 基于Bayer图像的快速畸变校正方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003141521A (ja) * 2001-08-21 2003-05-16 Computer Image Laboratory Co Ltd 画像表示システム
WO2007055336A1 (ja) * 2005-11-11 2007-05-18 Sony Corporation 画像処理装置、画像処理方法、そのプログラム及びそのプログラムを記録した記録媒体と撮像装置
JP2012085026A (ja) * 2010-10-08 2012-04-26 Toshiba Alpine Automotive Technology Corp 画像処理装置及び画像処理方法
WO2012120561A1 (ja) * 2011-03-08 2012-09-13 三菱電機株式会社 移動体周辺映像補正装置
JP2013115540A (ja) * 2011-11-28 2013-06-10 Clarion Co Ltd 車載カメラシステム及びその較正方法、及びその較正プログラム

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111210478A (zh) * 2019-12-31 2020-05-29 重庆邮电大学 一种无共同视野多相机***外参标定方法、介质及***
CN111210478B (zh) * 2019-12-31 2023-07-21 重庆邮电大学 一种无共同视野多相机***外参标定方法、介质及***
JP7474137B2 (ja) 2020-06-30 2024-04-24 キヤノン株式会社 情報処理装置およびその制御方法
JP7449393B2 (ja) 2020-08-28 2024-03-13 株式会社デンソーテン 車載装置および車載カメラのキャリブレーション方法
CN112288649A (zh) * 2020-10-27 2021-01-29 长安大学 一种圆柱状物体透视成像失真的图像校正方法及设备
CN112584136A (zh) * 2020-12-23 2021-03-30 上海艾为电子技术股份有限公司 位置校准模块、校准方法、电子设备、校准装置及存储介质
CN112584136B (zh) * 2020-12-23 2023-02-28 上海艾为电子技术股份有限公司 位置校准模块、校准方法、电子设备、校准装置及存储介质
CN115314690A (zh) * 2022-08-09 2022-11-08 北京淳中科技股份有限公司 一种图像融合带处理方法、装置、电子设备及存储介质
CN115314690B (zh) * 2022-08-09 2023-09-26 北京淳中科技股份有限公司 一种图像融合带处理方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN111095923B (zh) 2022-01-04
JPWO2019049421A1 (ja) 2020-07-27
US11232593B2 (en) 2022-01-25
WO2019049331A1 (ja) 2019-03-14
US20200273205A1 (en) 2020-08-27
CN111095923A (zh) 2020-05-01
JP6859442B2 (ja) 2021-04-14

Similar Documents

Publication Publication Date Title
JP6859442B2 (ja) キャリブレーション装置、キャリブレーションシステム、およびキャリブレーション方法
JP6764533B2 (ja) キャリブレーション装置、キャリブレーション用チャート、チャートパターン生成装置、およびキャリブレーション方法
JP3975736B2 (ja) 画像処理装置及び画像処理方法、記憶媒体、並びにコンピュータ・プログラム
CN109003311B (zh) 一种鱼眼镜头的标定方法
US8855441B2 (en) Method and apparatus for transforming a non-linear lens-distorted image
TWI555378B (zh) 一種全景魚眼相機影像校正、合成與景深重建方法與其系統
JP5490040B2 (ja) ディジタル3d/360度カメラシステム
WO2018076154A1 (zh) 一种基于鱼眼摄像机空间位姿标定的全景视频生成方法
CN113841384B (zh) 校准装置,用于校准的图表和校准方法
JP2015022510A (ja) 自由視点画像撮像装置およびその方法
KR20160116075A (ko) 카메라로부터 획득한 영상에 대한 자동보정기능을 구비한 영상처리장치 및 그 방법
CN107809610B (zh) 摄像头参数集算出装置、摄像头参数集算出方法以及记录介质
JP4965967B2 (ja) 映像表示システムの調整システム
CN110689476A (zh) 全景图像拼接方法及其装置、可读存储介质和电子设备
TWI820246B (zh) 具有像差估計之設備、估計來自廣角影像的像差之方法及電腦程式產品
JP2003179800A (ja) 多視点画像生成装置、画像処理装置、および方法、並びにコンピュータ・プログラム
JP2019525509A (ja) 水平視差ステレオパノラマ取込方法
JP7203051B2 (ja) 2次元全体画像を生成するための方法
JP2011146762A (ja) 立体モデル生成装置
GB2560301A (en) Methods and apparatuses for determining positions of multi-directional image capture apparatuses
KR102146839B1 (ko) 실시간 가상현실 구축을 위한 시스템 및 방법
JP4925112B2 (ja) 自由視点画像の生成方法
CN116996659A (zh) 投影入幕方法及投影设备

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: 18854693

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019540760

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18854693

Country of ref document: EP

Kind code of ref document: A1