Patent Description:
The invention applies, for instance, to the field of Augmented Reality (AR), where 3D computer-generated images representing virtual objects are superposed on top of images captured by a video camera. To merge the virtual and the real images in the most realistic way, an accurate calibration of the video camera is required. Indeed, AR needs defining a virtual camera, which is used for rendering virtual 3D objects. This virtual camera must match as closely as possible the real camera used to capture the real world which is rendered in the background. Data provided by the manufacturer of the camera are usually insufficiently accurate to give satisfactory results, making it necessary to resort to calibration.

Camera calibration is all about accuracy. Without a well-calibrated camera, the rendered objects will not look as if they were real and the User Experience will be ruined.

Augmented Reality is a particularly demanding application, but not the only one requiring accurate camera calibration. Other applications include, for instance, 3D volume reconstructions, in which case the camera is often a depth camera.

The invention is not limited to one or several specific applications; it may be useful whenever accurate calibration of a video camera is required.

The most widespread technique used to perform camera calibration is known as Zhang's algorithm and is described in the paper by <NPL>).

To calibrate a camera using this technique, a user must:.

The processing step, by itself, can be easily carried out using existing software. Manufacturing the calibration pattern may be tedious, but it is not particularly difficult. Indeed, the most difficult and time consuming part of the calibration process is constituted by steps <NUM> and <NUM>, i.e. positioning the pattern and acquiring a suitable set of images thereof. Indeed, it is very difficult to take many different pictures of a pattern while respecting a good image distribution: too few images will lead to an incorrect, or at least not accurate, camera calibration, and too many images of similar poses can lead to biases in the estimation of the parameters. Moreover, there is a risk that a significant fraction of the images turns out to be non-exploitable by the calibration algorithm, for instance because part of the pattern is not visible, reducing the size of the calibration set. Therefore, the general recommendation is to take as many pictures as possible, in the hope that that errors and biases will be averaged out in the process. Also, the calibration lacks repeatability: two users calibrating a same camera (or a same user calibrating it twice) will use different sets of poses, and therefore find slightly different calibration parameters.

Document <CIT> also describes a method of calibrating a camera by detecting distortions in a plurality of images of a pattern.

Without any guidance by an experienced person, a novice user will very often end up with an inaccurate camera calibration, wasting time and feeling frustrated.

Also, it is difficult for a person to perform the calibration alone. Most often, at least two people are required: one person keeps the pattern in front of the camera, in the required pose, and the other one triggers the acquisition of an image, e.g. by pressing a key. A person trying to perform both tasks at once would probably end up moving the pattern haphazardly when triggering the image acquisition.

The invention aims at solving these drawbacks of the prior art. It achieves this aim by providing a camera calibration "wizard" - i.e. a software assistant - which guides the user through the complex camera calibration process. Instead of making the user take as many pictures of as many poses as possible and then reject those which are considered invalid or redundant, the invention provides the user with a predetermined set of required poses, materialized by target areas successively displayed on a computer screen. Visual feedback, provided through the screen, helps the user to align the physical calibration pattern to the displayed target areas; the software detects when the calibration pattern is correctly aligned to the currently displayed target area before acquiring an image thereof, and then displaying the following target area. Once all the predetermined target areas, associated to respective poses, have been displayed and the corresponding pattern images have been acquired, the calibration algorithm (step <NUM>) may be run like in the prior art - but with the guarantee of using a suitable (usually optimal or near-optimal) calibration set. Calibration proper may be performed using Zhang's algorithm or any other suitable method.

The invention simplifies and accelerates the calibration process, while improving its quality, reliability and repeatability:.

An object of the present invention is then a computer-implemented method of calibrating a camera, as defined in the appended set of claims.

Another object of the invention is a computer program product, stored on a computer-readable data-storage medium, comprising computer-executable instructions to cause a computer system interfaced to a camera to carry out such a method.

Another object of the invention is a computer-readable data-storage medium containing computer-executable instructions to cause a computer system interfaced to a camera to carry out such a method.

Yet another object of the invention is a computer system comprising a processor coupled to a memory, a screen and a camera, the memory storing computer-executable instructions to cause the computer system to calibrate the camera by carrying out such a method.

Additional features and advantages of the present invention will become apparent from the subsequent description, taken in conjunction with the accompanying drawings, which show:.

<FIG> shows a calibration pattern <NUM> formed by a regular array of black disks on a white background. Other patterns may be used for carrying out the invention, for instance chessboards or grids, but this one turns out to be particularly advantageous as it provides the best accuracy with a minimal number of poses, see <NPL>. This pattern is carried by a physical support <NUM> which may e.g. be a rigid cardboard panel. A three-dimensional (i.e. intentionally non-planar) calibration pattern may also be used, but is not recommended. "Active" calibration patterns, comprising e.g. blinking light sources, may also be used.

As explained above, the inventive computer program leads the user to place the calibration pattern in several different poses within the field of view of the camera to be calibrated. <FIG> shows a set of <NUM> poses for the pattern of <FIG>, which allows performing the calibration quickly yet accurately. The first pose (albeit the order is not important) corresponds to the pattern facing the camera, at the center of the field of view, the plane of the pattern being perpendicular to the focal axis of the camera (otherwise stared, the pattern lies in the focal plane, or in a plane parallel and near to it). The second and third poses are obtained by inclining the pattern toward the left and toward the right, respectively, while keeping it near the center of the field of view. The fourth (fifth) pose is similar to the second (third) one, but the pattern is turned more, and also shifted toward the right (left) of the visual field. The sixth (seventh) pose is obtained by turning the pattern upwardly (downwardly) and shifting it toward the bottom (top) of the visual field. In the eighth, ninth, tenth and eleventh pose, the pattern is shifted toward the corners of the - supposedly rectangular - field of view, and tilted toward its center. All but the first pose induce a perspective, as the pattern is not parallel to the focal plane; the first pose, without perspective, is useful for estimating lens distortions.

Other sets of poses may be used without departing from the scope of the invention. Advantageously, a set may comprise no less than <NUM> (to ensure accuracy) and no more than <NUM> (to avoid an excessive duration of the process) poses, all different from each other.

According to the invention, the user positions him/herself in front of the camera, holding the physical support <NUM> carrying the calibration pattern <NUM>. The camera is connected to a computer, and placed near to (or on top of, or even integrated with) a screen - also called a monitor, or a display - of this computer. The camera acquires a series of images of a scene including the physical support <NUM> and therefore the calibration pattern <NUM>, and converts them to a digital video stream. Then, the computer acquires the video stream from the camera and drives the screen to display said video stream; therefore the user sees himself, and the calibration pattern, like in a mirror. The screen also displays, superimposed to the video stream from the camera, a geometric shape <NUM> generated by the computer and representing a target area for the calibration pattern. More precisely, this geometric shape may correspond to the outline of the calibration pattern as seen by the camera when it is positioned according to one of the poses of the set of <FIG>. This is illustrated on <FIG>. In this exemplary embodiment, the target area <NUM> is represented by a dashed outline, but other representations are possible; for instance, the target area may be a semi-transparent representation of the target pattern.

The user moves the calibration pattern trying to make its image, displayed by the computer screen, to fit the target area (see <FIG>). During this time, the computer processes the video stream to detect the pattern - using well known image processing algorithms - and determine whether it does fit the target area. If it does, the computer extracts an image of the pattern from the video stream and stores it into its memory, it provides a visual feedback to the user to inform him of the image acquisition (on the example of <FIG>, the appearance of the outline of the target area <NUM> is changed) and starts displaying the target area corresponding to the following pose of the set (unless the image acquisition process is over). Already-used target areas may remain displayed with a semi-transparent appearance, so that the user "sees" the progress which is being made.

Alternatively, it may be more convenient for the user to hold and move the camera around a static pattern instead of moving the pattern. This is typically the case when the camera to calibrate is on the rear side of a tablet computer or a smartphone.

Determining that the calibration pattern properly fits the target area may be carried out using known algorithms. For instance, the computer may check that the pattern (or, rather, its image acquired by the camera) fills at least a predetermined minimal fraction of the surface of the target area, say <NUM>%. Alternatively or additionally, the computer may check the parallelism between corresponding edges of the calibration pattern and of the target area. Considering that the pattern is most often seen in perspective, it may also be useful to measure the angle between two consecutive edges thereof and comparing it with a corresponding angle of the target area. The computer may also check if the corners of the calibration pattern are close enough to those of the target area. A more accurate but less flexible approach consists in calculating where each feature of the pattern should be projected inside the target area, and comparing these projected features with the actually detected ones.

The computer generates, and displays on the screen, graphical patterns helping the user to align the calibration pattern to the target area. Some of these patterns are illustrated on <FIG>. On this figure, the four sides <NUM> of the target may have different appearances (in an actual implementation, they may have different colors). Corresponding sides <NUM> of the calibration pattern are identified and displayed with a similar appearance (the same color). The computer also draws lines <NUM>, <NUM> connecting corners <NUM> of the target area to corresponding corners <NUM> of the calibration pattern. The direction of these lines indicates the direction of the translation required to make the two corners coincide; the appearance of the line may be indicative of the distance between the corresponding corners (compare lines <NUM> and <NUM>). More generally the graphical pattern indicates at least one of:.

The graphical pattern may also be indicative of a correspondence between geometrical elements of the calibration pattern and of the target area.

A computer suitable for carrying out a method according to an exemplary embodiment of the present invention is described with reference to <FIG>. In <FIG>, the computer includes a Central Processing Unit (CPU) P which performs the processes described above. The process can be stored as an executable program, i.e. a set of computer-readable instructions in memory, such as RAM M1 or ROM M2, or on hard disk drive (HDD) M3, DVD/CD drive M4, or can be stored remotely. At least one reference image of calibration pattern (cf. <FIG>) and a set of target areas <NUM> corresponding to different, predetermined poses of the calibration pattern (cf. <FIG>) are stored on one or more of memory devices M1 to M4, or remotely.

The claimed invention is not limited by the form of the computer-readable media on which the computer-readable instructions and/or the calibration pattern(s) and the set of target areas are stored. For example, the instructions, the trial sets of calibration parameters and the digital model(s) can be stored on CDs, DVDs, in FLASH memory, RAM, ROM, PROM, EPROM, EEPROM, hard disk or any other information processing device with which the computer aided design station communicates, such as a server or computer. The program, the calibration pattern(s) and the set of target areas can be stored on a same memory device or on different memory devices.

Further, a computer program suitable for carrying out the inventive method can be provided as a utility application, background daemon, or component of an operating system, or combination thereof, executing in conjunction with CPU <NUM> and an operating system such as Microsoft VISTA, Microsoft Windows <NUM>, UNIX, Solaris, LINUX, Apple MAC-OS and other systems known to those skilled in the art.

CPU P can be a Xenon processor from Intel of America or an Opteron processor from AMD of America, or can be other processor types, such as a Freescale ColdFire, IMX, or ARM processor from Freescale Corporation of America. Alternatively, the CPU can be a processor such as a Core2 Duo from Intel Corporation of America, or can be implemented on an FPGA, ASIC, PLD or using discrete logic circuits, as one of ordinary skill in the art would recognize. Further, the CPU can be implemented as multiple processors cooperatively working to perform the computer-readable instructions of the inventive processes described above.

The computer aided design station in <FIG> also includes a network interface NI, such as an Intel Ethernet PRO network interface card from Intel Corporation of America, for interfacing with a network, such as a local area network (LAN), wide area network (WAN), the Internet and the like. The computer aided design station further includes a display controller DC, such as a NVIDIA GeForce GTX graphics adaptor from NVIDIA Corporation of America for interfacing with screen or display DY, such as a Hewlett Packard HPL2445w LCD monitor. A general purpose I/O interface IF interfaces with a keyboard KB and pointing device PD, such as a roller ball, mouse, touchpad and the like. The display, the keyboard and the pointing device, together with the display controller and the I/O interfaces, form a graphical user interface. All these components are connected to each other through communication bus CBS, which can be an ISA, EISA, VESA, PCI, or similar. Moreover, the camera CAM to be calibrated is also connected to the bus CBS, in order to provide a video stream to the CPU P, which processes it as explained above.

Claim 1:
A computer-implemented method of calibrating a camera, comprising the steps of:
a. acquiring a video stream from said camera (CAM), and displaying it on a screen (DY);
b. displaying on the screen, superimposed to the video stream, a representation of a target area (<NUM>);
c. detecting a calibration pattern (<NUM>) in the video stream and periodically check whether it fits within the target area, comprising displaying lines (<NUM>, <NUM>) on the screen, said lines (<NUM>, <NUM>) connecting corners (<NUM>) of the target area (<NUM>) to corresponding corners (<NUM>) of the calibration pattern (<NUM>), said lines (<NUM>, <NUM>) indicating at least one of:
- a distance between a corner of the calibration pattern and a corresponding corner of the target area;
- a direction of a translation required to make a corner of the calibration pattern coincide with a corresponding corner of the target area;
d. when the calibration pattern is found to fit within the target area, extracting an image thereof from the video stream and storing it;
said steps a. to d. being iterated a plurality of times using respective target areas different from each other, each target area corresponding to the outline of the calibration pattern as seen by the camera when a physical support (<NUM>) carrying it takes a respective position within a field of view of the camera; and then
e. estimating intrinsic calibration parameters of the camera by processing the stored images.