CAMERA PARAMETER DERIVATION APPARATUS, CAMERA PARAMETER DERIVATION METHOD, AND CAMERA PARAMETER DERIVATION PROGRAM
20220394183 · 2022-12-08
Assignee
Inventors
- Takasuke NAGAI (Musashino-shi, Tokyo, JP)
- Munekazu DATE (Musashino-shi, Tokyo, JP)
- Shinya SHIMIZU (Musashino-shi, Tokyo, JP)
- Hideaki KIMATA (Musashino-shi, Tokyo, JP)
Cpc classification
H04N13/239
ELECTRICITY
H04N13/243
ELECTRICITY
H04N23/695
ELECTRICITY
International classification
Abstract
A camera parameter derivation apparatus for deriving camera parameters of a plurality of cameras for which conditions that the cameras be arranged at ideal positions that are set on a straight line at equal intervals and that directions of all arranged cameras be parallel to each other have been set includes an internal parameter derivation unit that derives internal parameter matrices of the cameras based on estimated internal parameter matrices for all cameras that are arranged at estimated positions while being oriented in estimated directions, a camera position derivation unit that derives ideal positions of the cameras that minimize the maximum of the distances between the estimated positions and the ideal positions, and a rotation matrix derivation unit that derives rotation matrices for correcting external parameters such that errors from parallel directions are equal to or less than a threshold value.
Claims
1. A camera parameter derivation apparatus for deriving camera parameters of a plurality of cameras for which conditions that the cameras be arranged at ideal positions that are set on a straight line at equal intervals and that directions of all arranged cameras be parallel to each other have been set, the camera parameter derivation apparatus comprising: a processor; and a storage medium having computer program instructions stored thereon, when executed by the processor, perform to: derive, based on estimated internal parameter matrices for all cameras that are arranged at estimated positions that possibly have errors from the ideal positions while being oriented in estimated directions that possibly have errors from the parallel directions, internal parameter matrices of the cameras for correcting the estimated internal parameter matrices; derive, based on external parameters of the arranged cameras, the ideal positions of the cameras that minimize a maximum of distances between the estimated positions and the ideal positions of the cameras; and derive, based on the external parameters, rotation matrices for correcting the external parameters such that the errors from the parallel directions are equal to or less than a threshold value.
2. The camera parameter derivation apparatus according to claim 1, wherein the computer program instructions further perform to derive a temporary reference position and a distance vector between the adjacent temporary ideal positions such that a sum of distances between the estimated positions and the temporary ideal positions is minimized and to derive the ideal positions that minimize the maximum by adjusting the temporary reference position and the distance vector between the adjacent temporary ideal positions.
3. The camera parameter derivation apparatus according to claim 1, wherein the rotation matrix derivation unit is configured to derive the rotation matrices based on the external parameters and a distance vector between the adjacent ideal positions.
4. A camera parameter derivation method performed by a camera parameter derivation apparatus for deriving camera parameters of a plurality of cameras for which conditions that the cameras be arranged at ideal positions that are set on a straight line at equal intervals and that directions of all arranged cameras be parallel to each other have been set, the camera parameter derivation method comprising: deriving, based on estimated internal parameter matrices for all cameras that are arranged at estimated positions that possibly have errors from the ideal positions while being oriented in estimated directions that possibly have errors from the parallel directions, internal parameter matrices of the cameras for correcting the estimated internal parameter matrices; deriving, based on external parameters of the arranged cameras, the ideal positions of the cameras that minimize a maximum of distances between the estimated positions and the ideal positions of the cameras; and deriving, based on the external parameters, rotation matrices for correcting the external parameters such that the errors from the parallel directions are equal to or less than a threshold value.
5. A non-transitory computer-readable medium having computer-executable instructions that, upon execution of the instructions by a processor of a computer, cause the computer to function as the camera parameter derivation apparatus according to claim 1.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019]
DESCRIPTION OF EMBODIMENTS
[0020] Embodiments of the present invention will be described in detail with reference to the drawings.
First Embodiment
[0021]
[0022] An ideal arrangement is an arrangement that satisfies predetermined conditions. In the following, the predetermined conditions are conditions that all cameras for photographing a subject be installed on a straight line at equal intervals with predetermined accuracy and that the directions of all cameras be parallel to each other with predetermined accuracy.
[0023] Camera parameters include external parameters and internal parameters. The external parameters are parameters representing the position and direction (orientation) of the camera, examples of which are parameters representing a translation vector (parallel translation vector) representing the position of the camera and a rotation matrix representing the orientation of the camera. The internal parameters are parameters for converting camera coordinates into image coordinates, examples of which are a parameter representing a focal length, a parameter representing the position of an optical center (principal point), and a parameter representing lens distortion.
[0024] The camera parameter derivation apparatus 1a includes an internal parameter derivation unit 10, a camera position derivation unit 11a, and a rotation matrix derivation unit 12a. The camera position derivation unit 11a includes a temporary position derivation unit 110 and an ideal position derivation unit 111a.
[0025]
[0026] Some or all of the internal parameter derivation unit 10, the camera position derivation unit 11a, and the rotation matrix derivation unit 12a are implemented in software by the processor 100 such as a central processing unit (CPU) executing a program stored in a storage unit 200 having a non-volatile recording medium (non-temporary recording medium). The program may be recorded on a computer-readable recording medium. The computer-readable recording medium is a portable medium such as a flexible disk, a magneto-optical disc, a read only memory (ROM), or a CD-ROM or a non-temporary recording medium such as a storage device such as a hard disk provided in a computer system. The program may be received by the communication unit 300 via a communication line. The storage unit 200 may store the camera parameters of each camera, image data, data tables, and lookup tables.
[0027] Some or all of the internal parameter derivation unit 10, the camera position derivation unit 11a, and the rotation matrix derivation unit 12a may be implemented, for example, using hardware including an electrical circuit or circuitry that uses a large scale integration (LSI) circuit, an application specific integrated circuit (ASIC), a programmable logic device (PLD), or a field programmable gate array (FPGA).
[0028] Hereinafter, a position estimated as an actual position of a camera is referred to as an “estimated position.” An ideal position of a camera is referred to as an “ideal position.” A temporary position as an ideal position of a camera is referred to as a “temporary ideal position.” A position that serves as a reference for the positions of cameras is referred to as a “reference position.” A temporary position as the reference position for cameras is referred to as a “temporary reference position.” An ideal distance between adjacent cameras is referred to as an “ideal distance.” A temporary distance as the ideal distance between cameras is referred to as a “temporary ideal distance.” A vector of the distance between adjacent ideal positions is referred to as an “ideal distance vector.” A vector of the distance between adjacent temporary positions is referred to as a “temporary ideal distance vector.”
[0029]
[0030] Hereinafter, “d.sup.ideal” represents the ideal distance vector. “C.sub.i.sup.ideal” represents the ideal position of each camera 2-i. “C.sub.i.sup.real” represents the estimated position of each camera 2-i “C.sub.i.” The ideal position of the camera 2-1 “C.sub.1” is defined as the reference position.
[0031] The n cameras 2-i photograph a subject. Each camera 2-i generates a moving image or a still image including an image of a subject (not illustrated). Thus, multi-view images are generated from the images taken by the n cameras 2-i. The internal and external parameters of each camera 2-i are estimated in advance, for example, by a calibration method disclosed in Reference 1. [0032] Reference 1: Zhang Zhengyou, “A flexible new technique for camera calibration,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 22(11), (2000): 1330-1334.
[0033] Referring back to
[0034] The internal parameter derivation unit 10 derives and outputs an ideal internal parameter matrix of each camera 2-i based on the input estimated internal parameters. The temporary position derivation unit 110 derives and outputs a temporary reference position for each camera 2-i based on the input estimated external parameters. The temporary position derivation unit 110 derives and outputs a temporary ideal distance vector for the cameras 2-i based on the input estimated external parameters. The ideal position derivation unit 111a derives an ideal position of each camera 2-i based on the temporary reference position and the temporary ideal distance vector. The ideal position derivation unit 111a derives an ideal distance vector for the n cameras 2-i and outputs the ideal distance vector to the rotation matrix derivation unit 12a. The rotation matrix derivation unit 12a derives an ideal rotation matrix of each camera 2-i based on the estimated external parameters and the ideal distance vector for the n cameras 2-i.
[0035] Next, details of the camera parameter derivation apparatus 1a will be described. The internal parameter derivation unit 10 takes internal parameters estimated in previously executed calibration as inputs and derives and outputs an ideal internal parameter matrix. A method by which the internal parameter derivation unit 10 derives the ideal internal parameter matrix is not limited to a specific derivation method.
[0036] For example, the internal parameter derivation unit 10 may derive an average of the internal parameter matrices of all cameras 2-i as an ideal internal parameter matrix. For example, the internal parameter derivation unit 10 may derive an average of the internal parameter matrices of all cameras 2-i and derive an internal parameter matrix closest to the average as an ideal internal parameter matrix. For example, the internal parameter derivation unit 10 may derive an internal parameter matrix of a camera 2-i selected from all arranged cameras 2-i as an ideal internal parameter matrix.
[0037] The camera position derivation unit 11a acquires external parameters estimated in the previously executed calibration. The camera position derivation unit 11a takes the estimated external parameters as inputs and derives and outputs a reference position “C.sub.1.sup.ideal” and an ideal distance vector “d.sup.ideal” between adjacent ideal positions “C.sub.i.sup.ideal.” The camera position derivation unit 11a derives and outputs an ideal position “C.sub.i.sup.ideal” of each camera 2-i based on the reference position “C.sub.i.sup.ideal” and the ideal distance vector “d.sup.ideal” between adjacent ideal positions “C.sub.i.sup.ideal.”
[0038] In order for the multi-view images input to the light field display to be corrected with a certain level of accuracy or higher such that discomfort to an observer is reduced, it is desirable that all cameras 2-i be arranged in the same directions at positions that are on a straight line at equal intervals and the distances between the estimated positions and the ideal positions be short. Therefore, the camera position derivation unit 11a derives expression (1) to minimize the maximum of the distances (errors) between the estimated positions and the ideal positions.
[Math. 1]
minimize max{D.sub.1,D.sub.2, . . . ,D.sub.n} (1)
[0039] Here, “D.sub.i” represents the distance between the estimated position “C.sub.i.sup.real” and the ideal position “C.sub.i.sup.ideal” of each camera 2-i. The distance between the estimated position “C.sub.i.sup.real” and the ideal position “C.sub.i.sup.ideal” of each camera 2-i is represented by equation (2).
[Math. 2]
D.sub.i=∥C.sub.i.sup.real−C.sub.i.sup.ideal∥.sub.2 (2)
[0040] Here, the ideal position “C.sub.i.sup.ideal” is represented by equation (3) using the ideal distance vector “d.sup.ideal.”
[Math. 3]
C.sub.i.sup.ideal=C.sub.i.sup.ideal+(i−1)d.sup.ideal (3)
[0041] The camera position derivation unit 11a derives the reference position “C.sub.1.sup.ideal” and the ideal distance vector “d.sup.ideal” by solving expression (1). A method by which the camera position derivation unit 11a solves expression (1) is not limited to a specific method. The camera position derivation unit 11a may derive the reference position “C.sub.i.sup.ideal” and the ideal distance vector “d.sup.ideal,” for example, by performing a full search.
[0042] Next, a method of deriving the reference position “C.sub.1.sup.ideal” and the ideal distance vector “d.sup.ideal” will be described.
[0043] The temporary position derivation unit 110 takes the external parameters estimated in the previously executed calibration as inputs, derives a temporary reference position “C′.sub.1” and a temporary ideal distance vector “d′,” and outputs the derived temporary reference position “C′.sub.1” and temporary ideal distance vector “d” to the ideal position derivation unit 111a. Here, the temporary position derivation unit 110 derives the temporary reference position “C′.sub.1” and the temporary ideal distance vector “d′,” by solving expression (4) that minimizes the sum of the distances (errors) between the estimated positions “C.sub.i.sup.real” and the temporary ideal positions “C′.sub.i.” The temporary position derivation unit 110 outputs the temporary reference position “C′.sub.1” and the temporary ideal distance “d” to the ideal position derivation unit 111a.
[0044] Here, “C′.sub.i” represents the temporary ideal position of each camera 2-i. “C′.sub.i” is represented by equation (5) using the temporary reference position “C′.sub.1” and the temporary ideal distance vector “d′.”
[Math. 5]
C.sub.1′=C.sub.1′+(i−1)d′ (5)
[0045] The ideal position derivation unit 111a takes the derived temporary reference position “C′.sub.1” and temporary ideal distance vector “d” as inputs and sets them as initial values for expression (1). The ideal position derivation unit 111a derives the reference position “C.sub.1.sup.ideal” of the camera 2-1 and the ideal distance vector “d.sup.ideal” by adjusting the temporary reference position “C′.sub.1” and the temporary ideal distance vector “d” within a predetermined range and outputs the derived reference position “C.sub.1.sup.ideal” and ideal distance vector “d.sup.ideal.”
[0046] The range of adjustment is not limited to a specific range. For example, the ideal position derivation unit 111a may set the distance from the temporary reference position “C′.sub.1” to the closest estimated position “C.sub.2.sup.real” as an upper limit of the range in which the temporary reference position “C′.sub.1” is to be moved. The ideal position derivation unit 111a may also set an average of the distances between adjacent estimated positions “C.sub.i.sup.real” as a distance to be added or subtracted from the temporary ideal distance vector “d′.”
[0047] The ideal position derivation unit 111a derives and outputs the ideal position “C.sub.i.sup.ideal” of each camera 2-i based on the reference position “C.sub.1.sup.ideal” of the camera 2-1 and the ideal distance vector “d.sup.ideal” as in equation (2).
[0048] The rotation matrix derivation unit 12a acquires the external parameters estimated in the previously executed calibration and takes them as inputs. The rotation matrix derivation unit 12a acquires the ideal distance vector “d.sup.ideal” for the n cameras 2-i from the ideal position derivation unit 111a. Thereby, the rotation matrix derivation unit 12a can derive ideal rotation matrices for making the directions of all cameras 2-i parallel to each other. Based on the ideal internal parameter matrix, the ideal positions, and the ideal rotation matrices, the images taken by the cameras 2-i are converted into images taken by the cameras 2-i at the ideal positions, thereby generating multi-view images that can be accurately reproduced by the light field display.
[0049] A method for deriving the ideal rotation matrix is not limited to a specific method. For example, the rotation matrix derivation unit 12a may use the unit vector of the ideal distance vector as the x component of the ideal rotation matrix. Here, the rotation matrix derivation unit 12a uses the outer product of the z component of a rotation matrix for a camera 2-i selected from the arranged cameras 2-i and the x component of the ideal rotation matrix as the y component of the ideal rotation matrix. The rotation matrix derivation unit 12a may use the outer product of the x component and they component of the ideal rotation matrix as the z component of the ideal rotation matrix.
[0050] Next, an exemplary operation of the camera parameter derivation apparatus 1a will be described.
[0051]
[0052] The camera position derivation unit 11a acquires estimated external parameters. The camera position derivation unit 11a takes the estimated external parameters as inputs and derives and outputs a reference position “C.sub.1.sup.ideal” and an ideal distance vector “d.sup.ideal” between adjacent ideal positions “C.sub.i.sup.ideai” (step S102).
[0053] The camera position derivation unit 11a derives and outputs an ideal position “C.sub.i.sup.ideal” of each camera 2-i based on the reference position “C.sub.1.sup.ideal” and the ideal distance vector “d.sup.ideal” between adjacent ideal positions “C.sub.i.sup.ideal” (step S103).
[0054] The rotation matrix derivation unit 12a acquires the estimated external parameters. The rotation matrix derivation unit 12a acquires the ideal distance vector “d.sup.ideal” between adjacent ideal positions “C.sub.i.sup.ideal” from the camera position derivation unit 11a. The rotation matrix derivation unit 12a derives and outputs an ideal rotation matrix of each camera 2-i based on the estimated external parameters and the ideal distance vector “d.sup.ideal” between adjacent ideal positions “C.sub.i.sup.ideal” (step S104).
[0055]
[0056] The ideal position derivation unit 111a acquires the temporary reference position “C′.sub.1” and the ideal distance vector “d” between adjacent temporary ideal positions from the temporary position derivation unit 110. The ideal position derivation unit 111a takes the temporary reference position “C′.sub.1” and the temporary ideal distance vector “d′” between adjacent temporary ideal positions as inputs and derives a reference position “C.sub.1.sup.ideal” and an ideal distance vector “d.sup.ideal” between adjacent ideal positions. The ideal position derivation unit 111a derives an ideal position of each camera 2-i based on the reference position “C.sub.1.sup.ideal” and the ideal distance vector “d.sup.ideal” between adjacent ideal positions. The ideal position derivation unit 111a outputs the ideal position of each camera 2-i to an external device (not illustrated). The ideal position derivation unit 111a outputs the ideal distance vector “d.sup.ideal” between adjacent ideal positions to the rotation matrix derivation unit 12a (step S202).
[0057] The camera parameter derivation apparatus 1a derives camera parameters (internal parameter matrices and external parameters) of a plurality of cameras 2-i for which conditions that the cameras 2-i be arranged at ideal positions that are set on a straight line at equal intervals and that the directions of all arranged cameras 2-i be parallel to each other have been set as described above. The cameras 2-1 to 2-n are arranged at estimated positions that may have errors from the ideal positions while being oriented in estimated directions that may have errors from the parallel directions.
[0058] Based on estimated internal parameter matrices for all cameras 2-i that are arranged at the estimated positions while being oriented in the estimated directions that may have errors from parallel directions, the internal parameter derivation unit 10 derives internal parameter matrices of the cameras 2-i for correcting the estimated internal parameter matrices.
[0059] Based on the external parameters of the arranged cameras 2-i, the camera position derivation unit 11a derives ideal positions of the cameras 2-i which minimize the maximum of the distances “D.sub.i” between the estimated positions “C.sub.i.sup.real” and the ideal positions “C.sub.i.sup.ideal” of the cameras 2-i (for example, expression (1)). The camera position derivation unit 11a may derive a temporary reference position and a distance vector between temporary ideal positions such that the sum of the distances between the estimated positions and the temporary ideal positions is minimized (for example, expression (4)). The camera position derivation unit 11a may derive ideal positions that minimize the maximum of the distances between the estimated positions and the ideal positions by adjusting the temporary reference position and the distance vector between temporary ideal positions. Based on the external parameters, the rotation matrix derivation unit 12a derives rotation matrices for correcting the external parameters such that the errors from the parallel directions are equal to or less than a threshold value. The rotation matrix derivation unit 12a derives rotation matrices based on the external parameters and the distance vector between adjacent ideal positions.
[0060] Based on the external parameters of the arranged cameras 2-i, the camera position derivation unit 11a derives and outputs ideal positions of the cameras 2-i that minimize the maximum of the distances between the estimated positions and the ideal positions of the cameras 2-i as described above. Thereby, it is possible to derive camera parameters for correcting multi-view images with a certain level of accuracy or higher such that discomfort to an observer is reduced, when generating the multi-view images to be displayed on a light field display based on images taken by a plurality of cameras. It is also possible to efficiently derive the ideal position of each camera which is one of the camera parameters with a reduced amount of computation.
Second Embodiment
[0061] A second embodiment differs from the first embodiment in that a rotation matrix derivation unit derives ideal rotation matrices based only on external parameters. In the second embodiment, differences from the first embodiment will be mainly described.
[0062]
[0063] The ideal position derivation unit 111b acquires a temporary reference position “C′ i” and a distance vector “d” between adjacent temporary ideal positions from the temporary position derivation unit 110. The ideal position derivation unit 111b takes the temporary reference position “C′.sub.1” and the distance vector “d” between adjacent temporary ideal positions (for example, those of equation (5)) as inputs and derives a reference position “C.sub.1.sup.ideal” and a distance vector “d.sup.ideal” between adjacent ideal positions. The ideal position derivation unit 111b derives an ideal position of each camera 2-i based on the reference position “C.sub.i.sup.ideal” and the distance vector “d.sup.ideal” between adjacent ideal positions. The ideal position derivation unit 111b outputs the ideal position of each camera 2-i to an external device (not illustrated).
[0064] The rotation matrix derivation unit 12b acquires external parameters estimated in previously executed calibration. The rotation matrix derivation unit 12b takes the estimated external parameters as inputs and derives an ideal rotation matrix of each camera 2-i. The rotation matrix derivation unit 12a outputs ideal rotation matrices for making the directions of all cameras 2-i parallel to each other to an external device (not illustrated). A method by which the rotation matrix derivation unit 12b derives the ideal rotation matrices is not limited to a specific method. For example, the rotation matrix derivation unit 12b may derive an average of the rotation matrices of the cameras as an ideal rotation matrix.
[0065] Next, an exemplary operation of the camera parameter derivation apparatus 1b will be described.
[0066]
[0067] The rotation matrix derivation unit 12b acquires estimated external parameters. The rotation matrix derivation unit 12b takes the estimated external parameters as inputs and derives and outputs ideal rotation matrices of the cameras 2-i for making the directions of all cameras 2-i parallel to each other (step S304). The execution order of steps S301 and S302 does not matter in deriving the ideal rotation matrices in step S304.
[0068] In the camera parameter derivation apparatus 1b, the rotation matrix derivation unit 12b derives the rotation matrices based on the external parameters as described above. Thereby, it is possible to derive camera parameters for correcting multi-view images such that discomfort to an observer is reduced, when generating the multi-view images to be displayed on a light field display based on images taken by a plurality of cameras.
[0069] Although embodiments of the present invention have been described above in detail with reference to the drawings, the specific configurations thereof are not limited to those of the embodiments and also include designs or the like without departing from the spirit of the present invention.
INDUSTRIAL APPLICABILITY
[0070] The present invention can be applied to an image processing apparatus that derives camera parameters for correcting multi-view images displayed on a light field display or the like.
REFERENCE SIGNS LIST
[0071] 1a, 1b Camera parameter derivation apparatus [0072] 2 Camera [0073] 10 Internal parameter derivation unit [0074] 11a, 11b Camera position derivation unit [0075] 12a, 12b Rotation matrix derivation unit [0076] 20 Estimated position [0077] 21 Ideal position [0078] 100 Processor [0079] 110 Temporary position derivation unit [0080] 111a, 111b Ideal position derivation unit [0081] 200 Storage unit [0082] 300 Communication unit