Information processing device, information processing method, and information processing program
By employing a learning model for skeletal point estimation to analyze images and projecting auxiliary diagonal points onto a unit sphere, the technique effectively addresses the challenge of accurately estimating vanishing points and determining camera posture in complex environments, enhancing accuracy and reducing computational costs.
Patent Information
- Application Number
- PCT/JP2023/040279
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-23
- Filing Date
- 2023-11-08
- Publication Date
- 2024-09-26
AI Technical Summary
Conventional techniques for estimating vanishing points from distorted images, particularly in urban areas with unclear building outlines, face challenges in accurately detecting circular arcs, leading to inaccurate camera posture determination.
A learning model trained for skeletal point estimation is used to accurately estimate vanishing points by inputting images into a trained model, with auxiliary diagonal points projected onto a unit sphere to uniquely identify the camera posture, even in cases where vanishing points are difficult to detect.
This approach allows for high-accuracy vanishing point estimation and camera posture determination, reducing reliance on odometry or gyro sensors and improving robustness and efficiency compared to traditional methods.
Smart Images

Figure JP2023040279_26092024_PF_FP
Abstract
Description
Information processing device, information processing method, and information processing program
[0001] The present disclosure relates to a technique for detecting the orientation of a camera.
[0002] In recent years, a technique for estimating multiple vanishing points from a distorted image based on the Manhattan world hypothesis has become known (e.g., Non-Patent Documents 1 and 2). This technique involves acquiring a distorted image, detecting multiple candidate arcs in the height direction, front-back direction, and width direction from the acquired image based on the Manhattan world hypothesis, searching for an optimal combination from the detected multiple arcs, and estimating multiple vanishing points from the search results.
[0003] However, the conventional technology has a problem in that it cannot accurately estimate the vanishing point in places where it is difficult to detect the arc, and therefore it has a problem in that it cannot accurately identify the camera orientation.
[0004] Y. Lochman, O. Dobosevych, R. Hryniv, and J. Pritts. Minimal solvers for single-view lens-distorted camera autocalibration. In Proceedings of IEEE Winter Conference on Applications of Computer Vision (WACV), pages 2886-2895, 2021. J. Pritts, Z. Kukelova, V. Larsson, and O. Chum. Radially-distorted conjugate translations. In Proceedings of IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 1993-2001, 2018.
[0005] An object of the present disclosure is to provide a technique that can accurately estimate a vanishing point.
[0006] An information processing device in one aspect of the present disclosure includes an acquisition unit that acquires an image captured by a camera, and an estimation unit that estimates a vanishing point by inputting the image into a trained model, and the trained model is generated by having a training model used for skeleton estimation perform machine learning using a heat map indicating the true value of the vanishing point as training data.
[0007] According to this configuration, the vanishing point can be estimated accurately.
[0008] 10 is a diagram illustrating an example of a configuration of an information processing device according to a first embodiment of the present disclosure. FIG. 11 is a flowchart illustrating an example of processing according to the first embodiment. FIG. 12 is a diagram illustrating an example of a world coordinate system and a camera coordinate system. FIG. 13 is a flowchart illustrating an example of processing according to a first modification of the first embodiment. FIG. 14 is a flowchart illustrating an example of processing according to a second modification of the first embodiment. FIG. 15 is a diagram illustrating an example of a configuration of an information processing device according to a second embodiment. FIG. 16 is a flowchart illustrating an example of processing according to the second embodiment. FIG. 17 is a diagram illustrating an overview of processing according to the second embodiment. FIG. 18 is a diagram illustrating an example of a configuration of an information processing device according to a third embodiment. FIG. 19 is a flowchart illustrating an example of processing according to the third embodiment.
[0009] (Background to one aspect of the present disclosure) In autonomous driving control of a moving body such as an automobile or a drone, the attitude of the moving body is treated as a rotation relative to the road. Therefore, such a moving body is equipped with an odometry or gyro sensor to estimate the attitude. A camera is typically equipped on the moving body for sensing the external world. If the attitude of the moving body can be estimated using only a camera, an odometry or gyro sensor is not required, which is preferable.
[0010] In the above-mentioned Non-Patent Documents 1 and 2, multiple candidate arcs in the height direction, front-rear direction, and width direction are detected from an image based on the Manhattan world hypothesis, and multiple vanishing points are estimated based on the detected arcs. However, Non-Patent Documents 1 and 2 assume that a large number of arcs must be detected in order to accurately estimate a vanishing point. Therefore, Patent Documents 1 and 2 have a problem in that, when targeting an urban area where multiple trees are lined up along the road, the outlines of buildings become unclear and multiple arcs cannot be detected. This makes it impossible to accurately estimate a vanishing point and accurately identify the camera posture.
[0011] Therefore, the inventors investigated a trained model for estimating vanishing points without using arcs, and discovered that vanishing point estimation has a high affinity with skeleton point estimation, and that the trained model used for skeleton point estimation can also be applied to vanishing point estimation.
[0012] The present disclosure has been made to solve such problems, and aims to provide a technology for accurately estimating a vanishing point.
[0013] (1) An information processing device in one aspect of the present disclosure includes an acquisition unit that acquires an image captured by a camera, and an estimation unit that estimates a vanishing point by inputting the image into a trained model, and the trained model is generated by having a training model used for skeleton estimation perform machine learning using a heat map indicating the true value of the vanishing point as training data.
[0014] According to this configuration, a trained model is generated by performing machine learning on the learning model used for skeleton estimation using a heat map indicating the true value of the vanishing point as training data, and the vanishing point is estimated using the trained model. Therefore, a trained model that can accurately estimate the vanishing point is obtained using the learning model used for skeleton point estimation. As a result, the vanishing point can be estimated accurately.
[0015] (2) In the information processing device described in (1) above, the estimation unit may further estimate auxiliary diagonal points from the image, and the auxiliary diagonal points may be any of a set of eight or more points arranged at positions that maintain the symmetry of a regular octahedron inscribed in a unit sphere arranged in a world coordinate system when projected onto the unit sphere.
[0016] According to this configuration, auxiliary diagonal points are estimated in addition to the vanishing point, so even if the vanishing point required to uniquely identify the camera posture cannot be obtained, it is possible to uniquely identify the camera posture using the auxiliary diagonal points.
[0017] (3) The trained model described in (1) or (2) above is machine-learned using an error function that evaluates the error between the estimated heat map output from the trained model and a true value heat map indicating the true value of the vanishing point, and the error function may use both vanishing points included in the estimated heat map and vanishing points not included in the estimated heat map to evaluate the error.
[0018] In the error function used in machine learning for skeleton point estimation, skeleton points that are not visible in the image are not used in error evaluation. In contrast, in vanishing point estimation, the image is captured by a camera, so the vanishing point is basically included in the image. Therefore, regardless of whether the estimated heat map contains a vanishing point, the vanishing point should be taken into consideration in error evaluation. In this configuration, the vanishing point is used in error evaluation regardless of whether the estimated heat map contains a vanishing point, resulting in a trained model with high vanishing point estimation accuracy.
[0019] (4) In the information processing device described in any one of (1) to (3) above, the learned model may be machine-learned using an error function that evaluates the error between the estimated heat map output from the learned model and a true value heat map indicating the true values of the vanishing point and the auxiliary diagonal point.
[0020] According to this configuration, a trained model with high estimation accuracy of vanishing points and auxiliary diagonal points can be obtained.
[0021] (5) In the information processing device described in any one of (1) to (4) above, a projection unit may be provided that projects the estimated vanishing point onto a unit sphere arranged in a world coordinate system based on the internal parameters of the camera, and a calculation unit that calculates a rotation angle indicating the attitude of the camera based on the error between the projected vanishing point and a reference vanishing point that has been projected in advance onto the unit sphere.
[0022] This configuration makes it possible to obtain a rotation angle that accurately indicates the camera's attitude.
[0023] (6) In another aspect of the present disclosure, an information processing method is an information processing method in a computer, in which an image captured by a camera is acquired, and a vanishing point is estimated by inputting the image into a trained model, and the trained model is generated by performing machine learning on a trained model used for skeleton estimation using a heat map indicating the true value of the vanishing point as training data.
[0024] According to this configuration, it is possible to provide an information processing method that can estimate the vanishing point with high accuracy.
[0025] (7) In yet another aspect of the present disclosure, an information processing program causes a computer to function as the information processing device described in any one of (1) to (5) above.
[0026] According to this configuration, it is possible to provide an information processing program that can estimate a vanishing point with high accuracy.
[0027] The present disclosure can also be realized as an information updating program that causes a computer to execute each of the characteristic configurations included in such an information updating method, or as an information updating system that operates by this information updating program. Needless to say, such a computer program can be distributed on a computer-readable non-transitory recording medium such as a CD-ROM or via a communication network such as the Internet.
[0028] Note that each of the embodiments described below represents a specific example of the present disclosure. The numerical values, shapes, components, steps, and step orders shown in the following embodiments are merely examples and are not intended to limit the present disclosure. Furthermore, among the components in the following embodiments, components that are not described in the independent claims that represent the highest concept are described as optional components. Furthermore, in all of the embodiments, the respective contents can be combined.
[0029] (First Embodiment) FIG. 1 is a diagram illustrating an example of the configuration of an information processing device 1 according to a first embodiment of the present disclosure. The information processing device 1 is configured as a computer including a communication interface. The information processing device 1 may be configured as a cloud server or as an edge-side computer. The information processing device 1 includes a processor 10 and a memory 20. An example of the processor 10 is a central processing unit (CPU). The processor 10 includes an acquisition unit 11 and a setting unit 12. The acquisition unit 11 and the setting unit 12 are realized, for example, by the processor 10 executing an information processing program. The acquisition unit 11 and the setting unit 12 may be implemented in a single computer or may be distributed across multiple computers. The processor 10 and the memory 20 may be implemented in a single computer or may be distributed across multiple computers.
[0030] The acquisition unit 11 acquires information indicating the coordinate axes of a world coordinate system 21 from the memory 20. The world coordinate system 21 is a three-dimensional coordinate system based on the Manhattan world hypothesis. The acquisition unit 11 acquires information indicating the coordinate axes of a camera coordinate system 22 from the memory 20, thereby acquiring the front direction of the camera 2. The camera coordinate system 22 is a coordinate system possessed by a camera mounted on a moving object. In the camera coordinate system 22, the front direction of the camera is determined in advance. In this embodiment, the front direction of the camera 2 is considered to be the front direction of the moving object 3. Note that the moving object is not necessarily limited to a moving object in the narrow sense, such as an automobile, and may be a device worn by a person, such as smart glasses (an eyeglass-type electronic display device).
[0031] The setting unit 12 sets a first axis, which is one of two axes defining the ground in the world coordinate system 21, as the reference axis for the pan angle of the camera 2. The first axis includes a first direction extending from the origin of the world coordinate system 21 to one side and a second direction extending from the origin to the other side. In the present disclosure, the ground is a reference surface for constructing an image obtained by the camera, and includes not only roads but also floor surfaces that exist indoors and outdoors.
[0032] The setting unit 12 calculates a first angle, which is the angle between the first direction and the front direction of the camera 2, and a second angle, which is the angle between the second direction and the front direction of the camera 2. Then, the setting unit 12 sets the direction of the first axis facing the smaller angle of the first angle and the second angle to the forward direction.
[0033] FIG. 3 is a diagram showing an example of a world coordinate system 21 and a camera coordinate system 22. In FIG. 3, the world coordinate system 21 has coordinate axes consisting of three mutually orthogonal axes, Xm, Ym, and Zm. The world coordinate system 21 is a right-handed system. The world coordinate system 21 is a coordinate system based on the Manhattan world hypothesis. In the Manhattan world hypothesis, the world is considered to be composed of a grid of roads 35 and 36. Two of the three axes of the world coordinate system 21 are parallel to the roads 35 and 36, and the remaining axis is a height direction perpendicular to the ground. In the example of FIG. 3, the Xm axis is parallel to the road 36, the Zm axis is parallel to the road 35, and the Ym axis defines the height direction. In addition, in the Manhattan world hypothesis, the buildings 31 to 34 are considered to be composed of rectangular parallelepipeds. The downward direction of the Ym axis is the positive direction.
[0034] In this embodiment, it is assumed that it is known that the Xm-Zm plane is a plane that defines the ground.
[0035] The camera coordinate system 22 is the coordinate system of the camera 2 mounted on the moving body 3. The camera coordinate system 22 is a three-dimensional coordinate system consisting of three mutually orthogonal axes: the Xc axis, the Yc axis, and the Zc axis. The camera coordinate system 22 is a right-handed system. The Zc axis defines the front direction of the camera 2. Since the front direction of the camera 2 is the same as the front direction of the moving body 3, the Zc axis points in the front direction of the moving body 3. For ease of understanding, the following description will assume that the roll angle and tilt angle are 0 degrees. However, the present invention is not limited to these angles being 0 degrees and can be implemented with any roll angle and tilt angle. For example, when the roll angle is 180 degrees and the tilt angle is 0 degrees, the downward direction of the Yc axis (described below) is negative (a 180-degree rotation of the roll angle flips the camera coordinate system upside down). The Yc axis defines the height direction perpendicular to the ground. The Xc axis defines the lateral direction of the camera 2 and the moving body 3. The Xc-Zc plane is parallel to the Xm-Zm plane. In this embodiment, it is assumed that the position of the camera coordinate system 22 in the world coordinate system 21 is known. The downward direction of the Yc axis is the positive direction.
[0036] When calculating the pan angle φ of the camera 2, it is preferable to set either the Zm axis or the Xm axis as the reference axis for the pan angle φ. Furthermore, when specifying the pan angle φ, it is preferable to specify which direction of the reference axis is forward and which direction is backward. Furthermore, it is preferable to specify the direction perpendicular to the front-to-back direction on the ground as the lateral direction, and to specify which lateral direction is rightward and which direction is leftward.
[0037] In the prior art, no particular process was performed to set the reference axis of the pan angle φ, and the reference angle of the pan angle φ was randomly determined from the Zm axis and the Xm axis each time the pan angle was calculated. As a result, the prior art had four-fold rotational symmetry ambiguity, and the pan angle could only be specified in the range of -45° to 45°.
[0038] Therefore, in this embodiment, the setting unit 12 sets a first axis, which is one of the Xm axis and Zm axis that define the ground, in the world coordinate system 21 as the reference axis for the pan angle of the camera 2. Here, the Zm axis that is parallel to the predetermined road direction K1 is set as the reference axis. This eliminates the four-fold rotational symmetry ambiguity.
[0039] Furthermore, the setting unit 12 calculates a first angle α between the positive direction (first direction) of the Zm axis and the Zc axis. The setting unit 12 calculates a second angle β between the negative direction (second direction) of the Zm axis and the Zc axis. The setting unit 12 sets the direction of the Zm axis that faces the smaller of the first angle α and the second angle β as the forward direction. Here, since the first angle α is smaller than the second angle β, the positive direction of the Zm axis is set as the forward direction. With the forward direction being the front, the setting unit 12 sets the positive direction of the Xm axis, which is to the right, as the right direction, and the negative direction of the X axis, which is to the left, as the left direction. In addition, four directions, front, back, left, and right, are defined.
[0040] 2 is a flowchart showing an example of processing in the first embodiment. First, in step S1, the acquisition unit 11 acquires information indicating the coordinate axes of the world coordinate system 21 from the memory 20. Next, in step S2, of the three axes constituting the world coordinate system 21, the Ym axis, which is perpendicular to the Xm-Zm plane corresponding to the ground, is set as the height direction. Next, in step S3, the setting unit 12 sets the Zm axis, which is parallel to the road direction K1, as the reference axis of the pan angle φ. Next, in step S4, the acquisition unit 11 acquires information indicating the coordinate axes of the camera coordinate system 22 from the memory 20.
[0041] Next, in step S5, the setting unit 12 calculates the first angle α and the second angle β shown in FIG. 3 . Next, in step S6, the setting unit 12 determines whether the first angle α is smaller than the second angle β. If the first angle α is smaller than the second angle β (YES in step S6), the setting unit 12 sets the first angle α side of the Zm axis as the forward direction (step S7). In the example of FIG. 3 , the positive direction of the Zm axis is set as the forward direction. On the other hand, if the first angle α is equal to or greater than the second angle β (NO in step S6), the setting unit 12 sets the second angle β side of the Zm axis as the forward direction (step S9). In the example of FIG. 3 , the negative direction of the Zm axis is set as the backward direction. Next, in step S8, the setting unit 12 sets the left direction and the right direction with respect to the Xm axis. In the example of FIG. 3 , the positive direction of the Xm axis is set as the right direction, and the negative direction of the Xm axis is set as the left direction.
[0042] As described above, according to this embodiment, of the Xm and Zm axes that define the ground in a three-dimensional world coordinate system 21 based on the Manhattan world hypothesis, the Zm axis is set as the reference axis for the pan angle φ of camera 2. As a result, when estimating the pan angle from an image, the pan angle φ can be expressed based on the Zm axis, and the direction in which camera 2 is facing can be accurately represented. Therefore, the pan angle can be accurately represented even in places such as intersections where there is four-fold rotational symmetry ambiguity. If the pan angle can be accurately represented in this way, it can be accurately determined from which direction an image obtained by a camera was captured.
[0043] (First Modification of First Embodiment) When the reference direction of the pan angle is set to the forward direction and the traveling direction of the moving object 3 is facing backward, the pan angle is expressed outside the range of -90° to 90°, making it difficult to handle. Therefore, in a first modification of the first embodiment, the reference direction of the pan angle is set to the backward direction in such a scene.
[0044] A modified example of the first embodiment will be described below with reference to Fig. 1. When the reference direction of the pan angle is set to the forward direction and the setting unit 12 acquires first direction information indicating that the image captured by the camera 2 is an image of the rearward side, the setting unit 12 sets the reference direction of the pan angle to the rearward direction, which is opposite to the forward direction.
[0045] Fig. 4A is a flowchart showing an example of processing in Modification 1 of Embodiment 1. The flowchart shown in Fig. 4A is executed, for example, when camera 2 captures an image while moving object 3 is traveling on a road. Note that before the flowchart shown in Fig. 4A is executed, it is assumed that the forward / backward and left / right directions are set on the Xm and Zm axes according to the flowchart shown in Fig. 2.
[0046] First, in step S21, the setting unit 12 determines whether the forward direction is set as the reference direction of the pan angle. If the forward direction is not set as the reference direction of the pan angle (NO in step S21), the processing ends. On the other hand, if the forward direction is set as the reference direction of the pan angle (YES in step S21), the setting unit 12 determines whether first direction information has been acquired (step S22). The first direction information is information accompanying an image captured by the camera 2 and is set in the camera 2, for example, at the time of capture. The first direction information may be information input by the user through the camera 2, for example. If the first direction information has been acquired (YES in step S22), the processing proceeds to step S23. If the first direction information has not been acquired (NO in step S22), the processing ends. In this case, the reference direction of the pan angle is maintained as the forward direction. Next, in step S23, the setting unit 12 sets the backward direction as the reference direction of the pan angle.
[0047] In this way, in Variation 1 of Embodiment 1, the reference direction of the pan angle is set to the backward direction depending on whether or not directional information has been acquired, so that the pan angle can be expressed within a range of -90° to 90°, making the pan angle easier to handle. Note that in Variation 1 of Embodiment 1, after setting the reference direction of the pan angle to the backward direction, if directional information is acquired indicating that the image captured by camera 2 was an image captured in the forward direction, setting unit 12 simply returns the reference direction of the pan angle to the forward direction.
[0048] (Variation 2 of Embodiment 1) When the reference direction for the pan angle is set to the right or left and the traveling direction of the moving object 3 is facing the opposite direction to the reference direction, the pan angle cannot be expressed within the range of -90° to 90°, making it difficult to handle. Therefore, in Variation 2 of Embodiment 1, the reference direction for the pan angle is set to the opposite direction in such a scene.
[0049] When either the right direction or the left direction is set as the reference direction of the pan angle, if the setting unit 12 acquires second direction information indicating that the image captured by the camera 2 is an image captured on the opposite side of the reference direction, it sets the reference direction of the pan angle to the opposite direction.
[0050] 4B is a flowchart showing an example of processing in Modification 2 of Embodiment 1. The flowchart shown in FIG. 4B is executed, for example, when the camera 2 captures an image while the moving object 3 is traveling on a road. Note that before the flowchart shown in FIG. 4B is executed, it is assumed that the forward, backward, left, and right directions are set on the Xm and Zm axes according to the flowchart shown in FIG. 2. In this flowchart, it is assumed that the default reference direction is set to the right.
[0051] First, in step S31, the setting unit 12 determines whether the right direction is set as the reference direction of the pan angle. If the right direction is not set as the reference direction of the pan angle (NO in step S31), the processing ends. On the other hand, if the right direction is set as the reference direction of the pan angle (YES in step S31), the setting unit 12 determines whether second direction information has been acquired (step S32). Here, it is determined whether second information indicating that the image captured by the camera 2 is an image captured on the left side has been acquired. If second direction information has been acquired (YES in step S32), the processing proceeds to step S33. If second direction information has not been acquired (NO in step S32), the processing ends. In this case, the reference direction of the pan angle is maintained as the right direction. Next, in step S33, the setting unit 12 sets the left direction as the reference direction of the pan angle.
[0052] In this way, in Variation 2 of Embodiment 1, the reference direction of the pan angle is set to the opposite direction of the default reference direction depending on whether or not directional information has been acquired, so that the pan angle can be expressed in the range of -90° to 90°, making the pan angle easier to handle. Note that in Variation 2 of Embodiment 1, after setting the reference direction of the pan angle to the left, if directional information is acquired indicating that the image captured by camera 2 is an image captured to the right, setting unit 12 simply returns the reference direction of the pan angle to the right.
[0053] (Third Modification of First Embodiment) In the first embodiment, the world coordinate system 21 and the camera coordinate system are right-handed systems, but they may also be left-handed systems.
[0054] (Embodiment 2) In embodiment 2, a rotation angle indicating the attitude of camera 2 is calculated from an image captured by camera 2. FIG. 5 is a diagram showing an example of the configuration of information processing device 1A in embodiment 2. Note that in embodiment 2, it is assumed that the processing shown in embodiment 1 has been executed in advance and the directions of the coordinate axes of world coordinate system 21 have been set. The processor 110 and memory 120 of information processing device 1A shown in embodiment 2 may have blocks that the processor 10 and memory 20 of information processing device 1 shown in embodiment 1 have. This also applies to embodiments 3 and 4 described below. In embodiment 2, the same components as those in embodiment 1 are assigned the same reference numerals and description thereof will be omitted.
[0055] The information processing device 1A includes a processor 110 and a memory 120. The hardware configuration of the information processing device 1A is the same as that of the information processing device 1 shown in FIG. 1 , so detailed description will be omitted. A camera 2 is connected to the information processing device 1A. The camera 2 is communicatively connected to the information processing device 1A via a predetermined communication path. If the information processing device 1A is a cloud server, an example of the communication path is the Internet. If the information processing device 1A is an edge-side device, an example of the communication path is a wireless LAN or a wired LAN. If the information processing device 1A is implemented in a mobile object 3, an example of the communication path is an in-vehicle network.
[0056] The camera 2 is mounted on the moving object 3. The camera 2 captures images of the surroundings of the moving object 3 at a predetermined frame rate, for example, and transmits the captured images to the information processing device 1A at the predetermined frame rate. However, this is just one example, and the camera 2 may capture images of the surroundings of the moving object 3 in response to an image capture instruction from the user or the information processing device 1A, and transmit the captured images to the information processing device 1A. One example of the image is a fisheye image. Other examples of the image are a panoramic image or a regular rectangular image. The image may also be a still image.
[0057] The processor 110 includes an image acquisition unit 111 (an example of an acquisition unit), a vanishing point estimation unit 112 (an example of an estimation unit), an internal parameter estimation unit 113 (an example of an estimation unit), a projection unit 114, a calculation unit 115, and an output unit 116. The image acquisition unit 111 to the output unit 116 may be implemented in a single computer, or may be distributed across multiple computers.
[0058] The image acquisition unit 111 acquires an image from the camera 2. The vanishing point estimation unit 112 estimates multiple vanishing points by inputting the image acquired by the image acquisition unit 111 into a first learning model. The first learning model is a model that has been machine-learned in advance to estimate multiple vanishing points from an image. The first learning model outputs a heat map from the input image, in which each of multiple pixels is represented by the likelihood of a vanishing point. The vanishing point estimation unit 112 outputs ordered heat maps in the same number as the predetermined vanishing points to be estimated, and can acquire a label indicating the type of vanishing point by associating the order with a label indicating the type of vanishing point, such as designating the vanishing point estimated in the first heat map in this order as the right vanishing point, and the vanishing point estimated in the second heat map as the left vanishing point.
[0059] The coordinates of the vanishing point in each heat map are the coordinate values of the pixel with the maximum likelihood. The vanishing point does not simply have to be the pixel with the maximum likelihood, but may instead be the pixel with the maximum likelihood after applying a Gaussian filter or the like to the heat map. For example, when focusing on 9 pixels in a 3x3 matrix, if the likelihood of the central pixel is 0 and the remaining 8 pixels each have a maximum likelihood of 0.9, the central pixel without the maximum likelihood may be estimated as the vanishing point pixel. This reduces the influence of errors contained in the heat map and improves the accuracy of vanishing point estimation. Alternatively, the vanishing point may be a pixel estimated with sub-pixel accuracy from the vicinity of the maximum likelihood.
[0060] The first learning model is generated by performing machine learning using a heat map indicating the true values of the vanishing points as training data. The vanishing point estimation unit 112 estimates multiple vanishing points based on the heat map output by the first learning model.
[0061] In this embodiment, there are six types of vanishing points, numbered first to sixth. The first vanishing point is the vanishing point in the front direction of camera 2. The second vanishing point is the vanishing point in the opposite direction from the front direction of camera 2. The third vanishing point is the vanishing point in the zenith direction of camera 2. The fourth vanishing point is the vanishing point in the opposite direction from the zenith direction of camera 2. The fifth vanishing point is the vanishing point to the right in the horizontal direction of camera 2. The sixth vanishing point is the vanishing point to the left in the horizontal direction of camera 2.
[0062] The internal parameter estimation unit 113 estimates the internal parameters of the camera 2 by inputting the image into a second learning model. The second learning model is a model that has been machine-learned in advance to estimate the internal parameters. The internal parameters include the focal length of the camera 2 and the distortion coefficients of the camera 2. A technique for estimating the focal length and distortion coefficients from an image is disclosed in, for example, Document D1 below.
[0063] Document D1: N. Wakai, Y. Ishii, S. Sato, and T. Yamashita. Rethinking generic camera models for deep single image camera calibration to recover rotation and fisheye distortion. In Proceedings of European Conference on Computer Vision (ECCV), volume 13678, pages 679-698, 2022. Therefore, the internal parameter estimation unit 113 may estimate the internal parameters using the technique of document D1.
[0064] The projection unit 114 projects the plurality of vanishing points estimated by the vanishing point estimation unit 112 onto a unit sphere arranged in the world coordinate system 21 based on the internal parameters estimated by the internal parameter estimation unit 113 .
[0065] For the following explanation, we will discuss three-dimensional rotation related to camera calibration. In Literature D1, external parameters are expressed using a rotation matrix. Although the three-dimensional coordinate values obtained after rotational translation using a rotation matrix are uniquely determined, this rotational translation can be expressed in multiple ways other than using a rotation matrix. The pan angle, tilt angle, and roll angle are examples of rotational representations, and are obtained by decomposing a rotation matrix into three rotational components. Since the decomposition of a rotation matrix is not unique, it is decomposed under constraints. For example, a set of pan, tilt, and roll angles that minimizes the sum of the absolute values of the pan, tilt, and roll angles may be selected. Furthermore, a rotation matrix can be expressed using a Rodriguez vector. In this case, the vector is represented by the rotation axis, and the vector length is represented by the rotation amount. Similar to a Rodriguez vector, a rotation matrix may also be expressed using a quaternion, which represents rotation using the rotation axis and the rotation amount. A one-to-one conversion between a Rodriguez vector and a quaternion is possible, and the calculation method is disclosed in Literature D2 below.
[0066] Reference D2: D. Mortari, F. Markley, and P. Singla. Optimal linear attitude estimator. Journal of Guidance, Control, and Dynamics (JGCD), 3:1619-1627, 2007. Therefore, since three-dimensional rotations can be converted to each other, any of the above rotation representations can be used depending on the processing content.
[0067] A point p in the world coordinate system and a pixel u in the image coordinate system are associated with each other by the camera model shown in equations (1) and (2), where point p is a point on a unit sphere located at the origin of the world coordinate system.
[0068]
[0069] u is two-dimensional coordinate data representing the image coordinate system. R is a rotation matrix indicating the rotation between the camera coordinate system 22 and the world coordinate system 21, and t is a translation vector indicating the translation between the camera coordinate system 22 and the world coordinate system 21. Note that in the camera parameters estimated from a single image used in this disclosure, the amount of movement of the translation vector is arbitrary, so the translation vector is set to a zero vector. (cu, cv) is the image principal point. (du, dv) is the pixel pitch of the image sensor of the camera 2, which is known. γ indicates distortion. The distortion γ is expressed by equation (2). In equation (2), η indicates the angle of incidence, and k1 indicates the distortion coefficient. The rotation matrix R and the translation vector t are examples of external parameters of the camera 2.
[0070] The projection unit 114 uses this camera model to project the vanishing point estimated from the image onto the unit sphere. Note that equation (1) represents forward projection, which projects from world coordinates to image coordinates, and backprojection, which calculates world coordinates from image coordinates, is calculated as a positive real solution to a cubic equation related to the angle of incidence η. To obtain world coordinates equivalent to the camera's line-of-sight vector, backprojection is calculated by using the rotation matrix R in equation (1) as a unit matrix and the translation vector t as a zero vector. In backprojection, the dimension increases from two dimensions (image coordinates) to three dimensions (world coordinates), but the backprojection point can be uniquely calculated by selecting the world coordinates of the unit sphere. A vanishing point that coincides with the image principal point is a singular point that cannot be projected onto the unit sphere. Therefore, if the vanishing point coincides with the image principal point, the projection unit 114 simply adds a small amount to the vanishing point coordinates. An example of a small amount is 0.0000001. According to equation (1), the projection from the image onto the unit sphere is a back projection, but in the following explanation it will simply be referred to as a projection.
[0071] Returning to FIG. 5 , the calculation unit 115 calculates a rotation angle indicating the attitude of the camera 2 based on the error between the multiple vanishing points projected onto the unit sphere and the multiple reference vanishing points projected onto the unit sphere in advance. The rotation angle indicates the rotation of the camera 2 with respect to the world coordinate system 21. The rotation angle includes a pan angle, a tilt angle, and a roll angle. See FIG. 3 . The pan angle φ indicates the rotation of the camera 2 around the pan axis (Yc axis). The tilt angle indicates the rotation of the camera 2 around the tilt axis (Xc axis). The roll angle indicates the rotation of the camera 2 around the roll axis (Zc axis). The reference vanishing point is the vanishing point when the camera coordinate system 22 does not rotate with respect to the world coordinate system 21. The reference vanishing point will be described later in embodiment 3. The error between the vanishing point and the reference vanishing point refers to the angle between the projected vanishing point and the reference vanishing point at the origin of the world coordinate system 21.
[0072] Specifically, the calculation unit 115 searches for rotation angles of multiple vanishing points that minimize the error between the multiple projected vanishing points and the multiple reference vanishing points, and calculates the smallest rotation angle found as the rotation angle that indicates the attitude of the camera 2. The problem of minimizing such an error is known as the absolute orientation problem, and a solution to this problem is disclosed in the following document D3, which calculates a quaternion that minimizes the error.
[0073] Document D3: Z. Wang and Jepson. A new closed-form solution for absolute orientation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 129-134, 1994. Furthermore, the solution in document D2 is a solution method for absolute orientation problems with low computational cost. In document D2, a Rodrigues vector that minimizes error is calculated. Hereinafter, a method for calculating a rotation angle using the solution in document D2 will be described, but the rotation angle may also be calculated using the solution disclosed in document D3. In this case, the quaternion is calculated directly.
[0074] The calculation unit 115 calculates errors between a plurality of vanishing points and a plurality of reference vanishing points corresponding to each of the plurality of vanishing points. The calculation unit 115 obtains a Rodrigues vector that minimizes this error. The Rodrigues vector is defined by the principal axes of rotation that minimize the error and the amount of rotation that minimizes the error. The calculation unit 115 calculates a quaternion from the Rodrigues vector. The calculation unit 115 obtains the pan angle, tilt angle, and roll angle from the quaternion. This calculates the rotation angle of the camera 2.
[0075] The output unit 116 outputs the rotation angle of the camera 2 calculated by the calculation unit 115. Here, the output unit 116 may output the rotation angle to the memory 120, may output the rotation angle to an external device, or may output the rotation angle to the camera 2. Note that pan angles, tilt angles, and roll angles can be converted into the Rodrigues vectors and quaternions described above. Therefore, the output unit 116 may output the Rodrigues vectors or quaternions instead of the rotation angles described above. In this way, the output unit 116 may output the rotation angle expressed in a manner expected by an application that uses the rotation angle. This reduces unnecessary calculations.
[0076] The memory 120 stores, for example, a world coordinate system 21 and a camera coordinate system 22 that are initially set in the first embodiment.
[0077] FIG. 6 is a flowchart showing an example of processing by the information processing device 1A according to the second embodiment. First, in step S101, the acquisition unit 11 acquires an image from the camera 2. Next, in step S102, the vanishing point estimation unit 112 estimates a vanishing point by inputting the image into a first learning model. The first learning model outputs six heat maps corresponding to the first to sixth vanishing points, respectively. The vanishing point estimation unit 112 detects peaks from each of the six heat maps output from the first learning model, and if the detected peaks are equal to or greater than a threshold, determines that the vanishing point has been estimated. For example, if the peak in the heat map corresponding to the first vanishing point is equal to or greater than a threshold, it is determined that the first vanishing point has been estimated. For example, if the peak in the heat map corresponding to the second vanishing point is less than a threshold, it is determined that the second vanishing point has not been estimated. Note that the vanishing point estimation unit 112 may detect peaks using a technique such as applying a Gaussian filter, as described above, or may detect peaks with subpixel accuracy.
[0078] Next, in step S103, the internal parameter estimation unit 113 estimates internal parameters by inputting the image to the second learning model. Here, the focal length f and the distortion coefficient k1 are estimated.
[0079] Next, in step S104, the projection unit 114 applies the internal parameters estimated in step S103 to the camera model, thereby projecting the vanishing point estimated in step S102 onto the unit sphere.
[0080] Next, in step S105, the calculation unit 115 calculates the error between the vanishing point projected onto the unit sphere and the reference vanishing point that has been projected in advance onto the unit sphere and that corresponds to that vanishing point. For example, when the first vanishing point and the third vanishing point have been estimated, the error between the first vanishing point and the first reference vanishing point that is the reference vanishing point for the first vanishing point, and the error between the third vanishing point and the third reference vanishing point that is the reference vanishing point for the third vanishing point are calculated.
[0081] Next, in step S106, the calculation unit 115 searches for a rotation angle of the vanishing point that minimizes the error calculated in step S105. Details of this process have been described above.
[0082] Next, in step S107, the calculation unit 115 calculates the rotation angle of the camera 2 that minimizes the error obtained in step S106.
[0083] Next, in step S108, the output unit 116 outputs the calculated rotation angle of the camera 2. As a result, the pan angle, tilt angle, and roll angle of the camera 2 are obtained.
[0084] FIG. 7 is a diagram showing an overview of the processing in embodiment 2. An image captured by camera 2 is input to a first learning model and a second learning model. The first learning model outputs a heat map. The second learning model outputs internal parameters. The vanishing point estimation unit 112 estimates a vanishing point from the heat map. The projection unit 114 projects the vanishing point onto a unit sphere placed at the origin of the world coordinate system 21 using the internal parameters. In this example, three vanishing points P1 to P3 are estimated, and therefore the three vanishing points P1 to P3 are projected onto the unit sphere. The calculation unit 115 calculates the error between the reference vanishing points corresponding to each of the vanishing points P1 to P3 and the vanishing points P1 to P3. The calculation unit 115 calculates the pan angle φ, pitch angle θ, and roll angle ψ based on the calculated error.
[0085] As described above, according to the second embodiment, multiple vanishing points are estimated by inputting an image into the first learning model, and multiple vanishing points are not estimated from circular arcs. Therefore, the vanishing points can be accurately estimated even in places where the outlines of buildings are unclear. The estimated multiple vanishing points are then projected onto the unit sphere using internal parameters estimated from the image, and the rotation angle indicating the camera pose is estimated based on the error between the projected vanishing points and the reference vanishing point. Therefore, the camera pose can be accurately estimated.
[0086] (Variation of Embodiment 2) The camera 2 may be installed on the moving body 3 so that its optical axis faces in a direction that intersects with the front direction. This makes it easier for multiple vanishing points to appear on the image, making it easier to estimate multiple vanishing points. For example, the camera 2 may be installed on the moving body 3 so that it is at a predetermined angle (e.g., 30° or 45°) diagonally downward with respect to the front direction.
[0087] (Embodiment 3) In embodiment 3, the rotation angle of camera 2 is estimated taking into account auxiliary diagonal points in addition to the vanishing point. Fig. 8 is a diagram showing an example of the configuration of an information processing device 1B in embodiment 3. Note that in embodiment 3, the same components as in embodiments 1 and 2 are given the same reference numerals, and descriptions thereof will be omitted. The processor 110 of information processing device 1B differs particularly in the configurations of a vanishing point estimation unit 112B (an example of an estimation unit), a projection unit 114B, and a calculation unit 115B.
[0088] The vanishing point estimation unit 112B estimates auxiliary diagonal points in addition to the vanishing point. Fig. 10 is a diagram showing the vanishing point and auxiliary diagonal points projected onto a unit sphere 1000. The unit sphere 1000 is positioned so that its center is located at the origin of the world coordinate system 21.
[0089] There are six vanishing points: PF, PB, PT, PM, PR, and PL. When these six vanishing points are projected onto the unit sphere 1000 using the above-mentioned camera model, they are located at the six vertices of a regular octahedron (not shown) inscribed in the unit sphere 1000. The six vertices of this regular octahedron are located on either the Xm, Ym, or Zm axis. That is, the vanishing points PT and PM are located on the Ym axis, the vanishing points PF and PB are located on the Zm axis, and the vanishing points PR and PL are located on the Xm axis.
[0090] Vanishing point PF is the vanishing point in the direction in front of camera 2, and is the first vanishing point mentioned above. Vanishing point PB is the vanishing point in the direction opposite to the direction in front of camera 2, and is the second vanishing point mentioned above. Vanishing point PT is the vanishing point in the zenith direction of camera 2, and is the third vanishing point mentioned above. Vanishing point PM is the vanishing point in the direction opposite to the zenith direction of camera 2, and is the fourth vanishing point mentioned above. Vanishing point PR is the vanishing point to the right of camera 2, and is the fifth vanishing point mentioned above. Vanishing point PL is the vanishing point to the left of camera 2, and is the sixth vanishing point mentioned above.
[0091] As mentioned above, vanishing points represent the positive infinity and negative infinity directions of each axis in a three-dimensional Cartesian coordinate system. Furthermore, when vanishing points are treated as three-dimensional coordinates on a unit sphere, a regular octahedron is formed using at least six vanishing points depending on their relative positions. Such a regular octahedron is a regular polygon and possesses a high degree of symmetry. Based on this characteristic of the regular octahedron (also known as the regular octahedral symmetry group), which possesses a high degree of symmetry, we came up with the invention of the auxiliary diagonal points described below.
[0092] There are eight auxiliary diagonal points: FRT, FLT, BLT, BRT, FRB, FLB, BLB, and BRB. The auxiliary diagonal points are eight points arranged at positions that maintain the symmetry of a regular octahedron inscribed in the unit sphere 1000. FIG. 10 shows auxiliary diagonal points arranged with high spatial uniformity when there are eight auxiliary diagonal points. These eight auxiliary diagonal points are located at the eight vertices of a cube 1001 inscribed in the unit sphere 1000 and arranged, for example, with its top surface perpendicular to the Ym axis. These eight auxiliary diagonal points have the symmetry of the regular octahedron group and are arranged spatially uniformly. The arrangement pattern of the eight auxiliary diagonal points shown in FIG. 10 is called a first pattern.
[0093] The auxiliary diagonal point FRT is an auxiliary diagonal point in the front-right-up direction, the auxiliary diagonal point FLT is an auxiliary diagonal point in the front-left-up direction, the auxiliary diagonal point BLT is an auxiliary diagonal point in the back-left-up direction, the auxiliary diagonal point BRT is an auxiliary diagonal point in the back-right-up direction, the auxiliary diagonal point FRB is an auxiliary diagonal point in the front-right-down direction, the auxiliary diagonal point FLB is an auxiliary diagonal point in the front-left-down direction, the auxiliary diagonal point BLB is an auxiliary diagonal point in the back-left-down direction, and the auxiliary diagonal point BRB is an auxiliary diagonal point in the back-right-down direction.
[0094] Note that there are other arrangements of auxiliary diagonal points that maintain the symmetry of a regular octahedron. FIG. 14 is a diagram showing a second pattern of arrangement of auxiliary diagonal points. FIG. 15 is a diagram showing a third pattern of arrangement of auxiliary diagonal points. Regular octahedron symmetry groups have six symmetry axes C2 ( FIG. 15 ), four symmetry axes C3 ( FIG. 10 ), and three symmetry axes C4 ( FIG. 14 ). Note that Cn is the Schoenflies notation, which represents the symmetry axis in 360° / n rotational symmetry. In order to maintain the symmetry of a regular octahedron, it is necessary to arrange the auxiliary diagonal points so that they are symmetrical on or with respect to any of the symmetry axes C2, C3, and C4. Using many auxiliary diagonal points increases the constraint on the estimation of the camera's external parameters, but estimating many auxiliary diagonal points makes optimization in deep neural network learning difficult. Therefore, in practice, a small number of auxiliary diagonal points and an arrangement with high spatial uniformity are preferable, and the auxiliary diagonal points of the first pattern are suitable for estimating camera parameters. The first pattern is a pattern in which the auxiliary diagonal points are arranged on the symmetry axis C3. The third pattern is a pattern in which the auxiliary diagonal points are arranged on the symmetry axis C2. The third pattern is an arrangement pattern consisting of a total of 12 points: four midpoints of each of the four sides of the top surface of the cube 1001, four midpoints of each of the four sides of the bottom surface of the cube 1001, and four midpoints of each of the four sides of the cube 1001 parallel to the Ym axis. The top surface of the cube 1001 is the surface on the vanishing point PT side, and the bottom surface of the cube 1001 is the surface on the vanishing point PM side.
[0095] The second pattern is a pattern in which eight auxiliary diagonal points are arranged on the midline C5 of the three symmetry axes C4. That is, the second pattern includes eight auxiliary diagonal points where four midline C5 intersect with the unit sphere 1000.
[0096] Among the eight-point arrangement patterns that maintain the symmetry of a regular octahedron, the arrangement pattern that maximizes spatial uniformity is the arrangement pattern in which the minimum value of the angle between any two of the eight auxiliary diagonal points and the origin is the largest. This minimum angle is 54.7° for the first pattern. Comparing the 54.7° angle for the first pattern with the 45° angle for the second pattern, the angle for the first pattern is larger than that for the second pattern. Furthermore, when a third pattern with auxiliary diagonal points arranged on the symmetry axis C2 was also considered, the minimum value of the angle for the first pattern was found to be the largest when there were eight auxiliary diagonal points. Therefore, the auxiliary diagonal points of the first pattern are used in the example of FIG. 10 . However, this is merely an example, and the second or third pattern may also be used. Alternatively, 16 auxiliary diagonal points including the first and second patterns may be used, or a pattern including the third pattern in addition to the first and second patterns may be used. That is, a pattern including at least one of the first to third patterns may be used.
[0097] FIG. 11 is a table summarizing the arrangement of vanishing points and auxiliary diagonal points shown in FIG. 10. Labels indicate the type of vanishing point and the type of auxiliary diagonal point. Directions are vectors indicating the direction from the origin at the vanishing points and auxiliary diagonal points. Image coordinates are the coordinates of the vanishing points and auxiliary diagonal points in the panoramic image that is the projection source. Note that the panoramic image is an equirectangular projection. W indicates the width in the panoramic image, and H indicates the height in the panoramic image. The Xm, Ym, and Zm vectors shown in the direction column are unit vectors of the Xm, Ym, and Zm axes, respectively.
[0098] For example, vanishing point PF is located at (W / 2, H / 2) in the panoramic image, and its direction in the world coordinate system 21 is represented by the Zm vector. Vanishing point PB is located at (0, H / 2) in the panoramic image, and its direction in the world coordinate system 21 is represented by the -Zm vector. Vanishing point PL is located at (W / 4, H / 2) in the panoramic image, and its direction in the world coordinate system 21 is represented by the -Xm vector. Vanishing point PR is located at (3W / 4, H / 2) in the panoramic image, and its direction in the world coordinate system 21 is represented by the Xm vector. Vanishing point PT is located at (0, 0) in the panoramic image, and its direction in the world coordinate system 21 is represented by the -Ym vector. Vanishing point PM is located at (0, H) in the panoramic image, and its direction in the world coordinate system 21 is represented by the Ym vector.
[0099] For example, the auxiliary diagonal point FLT is located at (3W / 8, H / 4) in the panoramic image, and its direction in the world coordinate system 21 is expressed as (Zm vector - Xm vector - Ym vector) / √3. The auxiliary diagonal point FRT is located at (5W / 8, H / 4) in the panoramic image, and its direction in the world coordinate system 21 is expressed as (Zm vector + Xm vector - Ym vector) / √3. The auxiliary diagonal point FLB is located at (3W / 8, 3H / 4) in the panoramic image, and its direction in the world coordinate system 21 is expressed as (Zm vector - Xm vector + Ym vector) / √3. The auxiliary diagonal point FRB is located at (5W / 8, 3H / 4) in the panoramic image, and its direction in the world coordinate system 21 is expressed as (Zm vector + Xm vector + Ym vector) / √3. The auxiliary diagonal point BLT is located at (W / 8, H / 4) in the panoramic image, and its direction in the world coordinate system 21 is represented by (-Zm vector - Xm vector - Ym vector) / √3. The auxiliary diagonal point BRT is located at (7W / 8, H / 4) in the panoramic image, and its direction in the world coordinate system 21 is represented by (-Zm vector + Xm vector - Ym vector) / √3. The auxiliary diagonal point BLB is located at (W / 8, 3H / 4) in the panoramic image, and its direction in the world coordinate system 21 is represented by (-Zm vector - Xm vector + Ym vector) / √3. The auxiliary diagonal point BRB is located at (7W / 8, 3H / 4) in the panoramic image, and its direction in the world coordinate system 21 is represented by (-Zm vector + Xm vector + Ym vector) / √3.
[0100] In this way, the six vanishing points and eight supplementary diagonal points shown in FIG. 10 are respectively arranged in the directions shown in FIG. 11 in the world coordinate system 21.
[0101] 10 and 11 indicate reference vanishing points and reference auxiliary diagonal points. The reference vanishing point is an ideal vanishing point projected onto the unit sphere 1000 when the camera coordinate system 22 is not rotated with respect to the world coordinate system 21. The reference auxiliary diagonal points are ideal auxiliary diagonal points projected onto the unit sphere 1000 when the camera coordinate system 22 is not rotated with respect to the world coordinate system. Therefore, when the camera coordinate system 22 is rotated with respect to the world coordinate system, the six vanishing points and eight auxiliary diagonal points are projected at positions shifted from the six reference vanishing points and eight reference auxiliary diagonal points, respectively.
[0102] Returning to FIG. 8 , the vanishing point estimation unit 112B estimates vanishing points and auxiliary diagonal points by inputting an image into a first learning model. The first learning model is a model that has been machine-learned in advance to estimate vanishing points and auxiliary diagonal points. The first learning model outputs a heat map from the input image in which each of a plurality of pixels is represented by the likelihood of a vanishing point. Furthermore, the first learning model outputs a heat map from the input image in which each of a plurality of pixels is represented by the likelihood of an auxiliary diagonal point. The first learning model is generated by machine learning using a heat map indicating the true values of the vanishing point and the auxiliary diagonal point as training data. The vanishing point estimation unit 112B estimates a vanishing point based on the heat map of the vanishing point output by the first learning model, and also estimates a vanishing point based on the heat map of the auxiliary diagonal points output by the first learning model.
[0103] The projection unit 114B projects the vanishing point and auxiliary diagonal points estimated by the vanishing point estimation unit 112B using the camera model shown in equations (1) and (2) onto the unit sphere 1000 placed in the world coordinate system 21.
[0104] The calculation unit 115B calculates a rotation angle indicating the attitude of the camera 2 based on the error between the vanishing point projected by the projection unit 114B and a reference vanishing point projected in advance onto the unit sphere 1000, and the error between the auxiliary diagonal point projected by the projection unit 114B and a reference auxiliary diagonal point projected in advance onto the unit sphere 1000. The error between the auxiliary diagonal point and the reference auxiliary diagonal point is the angle formed between the auxiliary diagonal point and the reference diagonal point at the origin of the world coordinate system 21.
[0105] FIG. 9 is a flowchart showing an example of processing by the information processing device 1B according to embodiment 3. The processing in step S201 is the same as S101 in FIG. 6. Next, in step S202, the vanishing point estimation unit 112B estimates vanishing points and auxiliary diagonal points by inputting an image into a first learning model. The first learning model outputs six heat maps corresponding to the six vanishing points shown in FIG. 10 and eight heat maps corresponding to the eight auxiliary diagonal points shown in FIG. 10. The vanishing point estimation unit 112B detects peaks from each of the six heat maps corresponding to the vanishing points output from the first learning model, and determines that the vanishing points have been estimated if the detected peaks are equal to or greater than a threshold. Furthermore, the vanishing point estimation unit 112B determines that the auxiliary diagonal points have been estimated if the peaks of the eight heat maps corresponding to the auxiliary diagonal points output from the first learning model are equal to or greater than a threshold. For example, if the peak of the heat map corresponding to the auxiliary diagonal point FRT is greater than or equal to a threshold, it is determined that the auxiliary diagonal point FRT has been estimated, and if the peak of the heat map corresponding to the auxiliary diagonal point BLB is less than the threshold, it is determined that the auxiliary diagonal point BLB has not been estimated.
[0106] The processing of step S203 is the same as step S103 in Fig. 6. Next, in step S204, the projection unit 114B applies the internal parameters estimated in step S203 to the camera model, thereby projecting the vanishing point and auxiliary diagonal points estimated in step S202 onto the unit sphere 1000.
[0107] Next, in step S205, the calculation unit 115B calculates the error between the vanishing point projected onto the unit sphere 1000 and a reference vanishing point projected in advance onto the unit sphere corresponding to that vanishing point, and also calculates the error between the auxiliary diagonal point projected onto the unit sphere 1000 and a reference auxiliary diagonal point projected in advance onto the unit sphere 1000 corresponding to that auxiliary diagonal point. For example, when the vanishing point PF and the auxiliary diagonal point FRT are estimated, the error between the vanishing point PF and the reference vanishing point of the vanishing point PF, and the error between the auxiliary diagonal point FRT and the reference vanishing point of the auxiliary diagonal point FRT are calculated.
[0108] Next, in step S206, the calculation unit 115B searches for the rotation angles of the vanishing points and auxiliary diagonal points that minimize the error calculated in step S205. The details of this process are the same as in embodiment 1 except that auxiliary diagonal points are added in addition to the vanishing points, so a detailed description will be omitted. The processes of steps S207 and S208 are the same as steps S107 and S108.
[0109] Thus, according to the third embodiment, auxiliary diagonal points are estimated in addition to vanishing points. Here, the auxiliary diagonal points are composed of eight or more points that can maintain the symmetry of the six vanishing points corresponding to the vertices of the regular octahedron projected onto the unit sphere 1000. As a result, the projected auxiliary diagonal points are arranged uniformly in space and, like the vanishing points, are points with high geometric constraints. Therefore, this configuration can provide information that can uniquely identify the camera posture even if there are insufficient vanishing points estimated from the image.
[0110] (Fourth Embodiment) In the fourth embodiment, a trained model is generated using a training model used for skeleton estimation. FIG. 12 is a diagram showing an example of the configuration of an information processing device 1C in the fourth embodiment. Note that in the fourth embodiment, the same components as those in the first to third embodiments are given the same reference numerals, and description thereof will be omitted. The processor 110 of the information processing device 1C further includes a training unit 117 in addition to the configuration of the third embodiment. The trained model corresponds to the first training model shown in the second and third embodiments. A training model before training and during training is called a pre-trained model.
[0111] The learning unit 117 generates a trained model by machine learning training data using a pre-training model. The training data includes training images and true value heat maps that indicate the true values of vanishing points and auxiliary diagonal points included in the training images. The true value heat maps include six true value heat maps corresponding to the six vanishing points shown in FIG. 10 and eight true value heat maps corresponding to the eight auxiliary diagonal points shown in FIG. 10.
[0112] The learning unit 117 performs machine learning on the pre-learning model using an error function that evaluates the error between the estimated heat map output by inputting a learning image into the pre-learning model and the true heat map. The learning model outputs six heat maps corresponding to the six vanishing points shown in Fig. 10. The learning model outputs eight heat maps corresponding to the eight auxiliary diagonal points shown in Fig. 10.
[0113] The error function uses both vanishing points that are included in the estimated heat map and those that are not included in the estimated heat map to evaluate the error. Furthermore, the error function uses both vanishing points that are included in the estimated heat map and those that are not included in the estimated heat map to evaluate the error.
[0114] The pre-training model can be HRNet, which is widely used for skeleton point estimation and is disclosed in Document D4. In HRNet machine learning for skeleton point estimation, the pre-training model outputs an estimated heat map for each skeleton point to be estimated, and if the peak of the estimated heat map is equal to or greater than a threshold, it is determined that a skeleton point exists. Each pixel in the estimated heat map takes a value between 0 and 1, for example, and the threshold is 0.8, for example. The error function of HRNet for skeleton point estimation calculates the squared error for each pixel of the true value heat map and the estimated heat map, and calculates the sum of these as the error evaluation value. In this case, in HRNet machine learning for skeleton point estimation, the squared error is calculated only for estimated heat maps where skeleton points exist, and not for estimated heat maps where skeleton points do not exist. The error function in HRNet for skeleton point estimation is expressed by Equation (3).
[0115] Document D4: K. Sun, B. Xiao, D. Liu, and J. Wang. Deep high-resolution representation learning for human pose estimation. In Proceedings of IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5686-5696, 2019.
[0116]
[0117] Jpose is the evaluation value of the error function. N is the number of skeleton points determined to exist in the estimated heat map, and i is the index of the skeleton points. M is the number of pixels in the estimated heat map, and j is the index of the pixel. sj is the pixel value of the estimated heat map, and sj' is the pixel value of the true heat map. ai is a Boolean value indicating whether or not a skeleton point is included in the estimated heat map; if it is included, it is "1", and if it is not included, it is "0".
[0118] In estimating human skeleton points, there are cases where a person appears in the image and cases where a person does not appear, and the Boolean value ai is adopted in equation (3) with the intention of prioritizing learning when a person appears.
[0119] However, when estimating vanishing points in an image using HRNet, the above error function is inappropriate. This is because there is a camera that captured every image, so vanishing points and auxiliary diagonal points should be considered for every image. However, vanishing points and auxiliary diagonal points may exist outside the image range, so they do not necessarily exist within the image. Therefore, in this embodiment, a pre-training model is machine-learned using an error function that does not use the Boolean value ai. The error function in embodiment 4 is expressed as equation (4).
[0120] Jvp is the evaluation value, N is the number of vanishing points and auxiliary diagonal points determined to exist in the estimated heat map, and i is the index of the vanishing points and auxiliary diagonal points. M, j, sj, and sj' are the same as in equation (3). As shown in equation (4), in this embodiment, the Boolean value ai is omitted. Therefore, regardless of whether the estimated heat map includes vanishing points and auxiliary diagonal points, the vanishing points and auxiliary diagonal points are used to evaluate the error, and a trained model with high estimation accuracy of vanishing points and auxiliary diagonal points is obtained.
[0121] The learning unit 117 corrects the parameters of the pre-learning model so as to minimize the error shown in equation (4), and generates a trained model.
[0122] The training data is generated as follows. First, the training unit 117 acquires a panoramic image captured with a calibrated camera. The panoramic image captured with the calibrated camera can be converted into any image, such as a fisheye image or an image without distortion. Next, the training unit 117 determines a camera model. One example of a camera model is an equidistant projection fisheye camera model. Next, the training unit 117 determines camera parameters related to the pan angle, tilt angle, roll angle, focal length, and lens distortion using random numbers. Next, the training unit 117 sets these camera parameters as true values and generates training images captured with a camera model having these camera parameters from the panoramic image. This is generated using common image processing, such as OpenCV's remap. Next, the training unit 117 obtains labels for the vanishing point and auxiliary diagonal point from the image coordinates of the panoramic image, as shown in FIG. 11 . Next, the training unit 117 generates a binary image in which the pixel value of the vanishing point in the training image is set to 1 and the other values are set to 0. Next, the learning unit 117 generates a true value heat map image by applying a two-dimensional Gaussian filter to the binary image. The standard deviation of the Gaussian filter is, for example, 2 pixels. The peak after application of the filter becomes smaller than 1. Therefore, the learning unit 117 multiplies the pixel values of all pixels in the true value heat map by a constant so that the peak becomes 1. Learning data is generated in this manner. The generated learning data is stored in the memory 120.
[0123] FIG. 13 is a flowchart showing an example of processing by the information processing device 1C according to the fourth embodiment. First, in step S301, the learning unit 117 acquires training data from the memory 120. Next, in step S302, the learning unit 117 generates estimated heat maps by inputting training images included in the training data into a pre-training model. For example, a total of 14 heat maps are generated, including six estimated heat maps corresponding to the six vanishing points and eight estimated heat maps corresponding to the eight auxiliary diagonal points shown in FIG. 10. However, this is just an example, and all six vanishing points and all eight auxiliary diagonal points do not necessarily need to be used in the training. For example, at least one vanishing point and at least one auxiliary diagonal point may be used in the training.
[0124] Next, in step S303, the learning unit 117 calculates an evaluation value of the error between the estimated heat map and the true value heat map using equation (4).
[0125] Next, in step S304, the parameters of the pre-training model are corrected so as to reduce the evaluation value. This correction is performed by, for example, backpropagation.
[0126] Next, the learning unit 117 determines whether or not the machine learning has reached a termination condition. If the termination condition has been reached (YES in step S305), the processing is terminated. This generates a trained model. The generated trained model is stored in the memory 120. On the other hand, if the termination condition has not been reached (NO in step S305), the processing returns to step S301, and the processing from step S301 onwards is repeated. The termination condition is, for example, that the number of times learning has been performed has reached a predetermined number of times.
[0127] As described above, according to the fourth embodiment, a trained model is generated by performing machine learning on a pre-trained model used for skeleton estimation using a heat map indicating the true values of the vanishing point and auxiliary diagonal points as training data, and the vanishing point is estimated using the trained model. Therefore, a trained model that can accurately estimate the vanishing point and auxiliary diagonal points can be obtained by utilizing the trained model used for skeleton point estimation. As a result, the vanishing point and auxiliary diagonal points can be accurately estimated.
[0128] (Variant 1 of Embodiment 4) Although the trained model is configured with HRNet, the present disclosure is not limited to this, and the trained model may be configured with any training model that is capable of estimating key points such as skeleton points.
[0129] (Second Modification of Fourth Embodiment) The trained model may be one that has been machine-learned to estimate only the vanishing point.
[0130] (Factors of the Effects of the Present Disclosure) The following explains why the present disclosure has higher accuracy, higher robustness, and lower calculation costs than conventional camera calibration methods.
[0131] Non-Patent Documents 1 and 2 disclose geometrical methods for estimating pan, tilt, and roll angles.
[0132] Conventional camera calibration methods rely only on vanishing points based on geometry-based arc detectors for their information. In contrast, this disclosure utilizes deep neural networks to utilize auxiliary diagonal points that conventional geometry-based arc detectors cannot extract. Unlike vanishing points, auxiliary diagonal points cannot be detected using geometry-based methods. However, because they have the geometric meaning of diagonal directions, they can be detected using deep neural networks. Therefore, the proposed method, which uses many vanishing points and auxiliary diagonal points, can achieve higher accuracy in camera calibration than conventional methods.
[0133] Furthermore, conventional camera calibration methods require combinatorial optimization through iteration using random numbers to estimate the vanishing point from a large number of arcs, which results in high computational costs.In contrast, the present disclosure can estimate the pan angle, tilt angle, and roll angle without iterative calculations, resulting in lower computational costs than conventional camera calibration methods.
[0134] Furthermore, heat map-based detection of vanishing points and auxiliary diagonal points is more robust than the conventional learning-based method disclosed in the following document D5, which does not use heat maps.
[0135] Document D5: M. Lopez-Antequera, R. Mari, P. Gargallo, Y. Kuang, J. Gonzalez-Jimenez, and G. Haro. Deep single image camera calibration with radial distortion. In Proceedings of IEEE / CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11809-11817, 2019. Conventional rotation angle estimation using regression without heat maps focuses on the sky and roads, which occupy large areas of the image, making it difficult to distinguish between a cloudy sky and a gray road. Sky and roads occupy large areas in the image, but extracting geometric features is difficult. In contrast, the heat map-based method of estimating vanishing points and auxiliary diagonal points disclosed herein uses geometric features, which have strong constraints on camera calibration and can achieve high robustness.
[0136] The present disclosure is applicable in the technical field of estimating the posture of a moving body.
Claims
1. An information processing device comprising: an acquisition unit that acquires an image captured by a camera; and an estimation unit that estimates a vanishing point by inputting the image into a trained model, wherein the trained model is generated by having a learning model used for skeleton estimation perform machine learning using a heat map indicating the true value of the vanishing point as training data.
2. The information processing device of claim 1, wherein the estimation unit further estimates auxiliary diagonal points from the image, the auxiliary diagonal points being any of a set of eight or more points arranged at positions that maintain the symmetry of a regular octahedron inscribed in a unit sphere arranged in a world coordinate system.
3. An information processing device as described in claim 1 or 2, wherein the trained model is machine-learned using an error function that evaluates the error between an estimated heat map output from the trained model and a true value heat map indicating the true value of the vanishing point, and the error function uses both vanishing points included in the estimated heat map and vanishing points not included in the estimated heat map to evaluate the error.
4. The information processing device of claim 3, wherein the trained model is machine-learned using an error function that evaluates the error between the estimated heat map output from the trained model and a true-value heat map indicating the true values of the vanishing points and the auxiliary diagonal points, and the error function uses both vanishing points included in the estimated heat map and vanishing points not included in the estimated heat map to evaluate the error, and uses both auxiliary diagonal points included in the estimated heat map and auxiliary diagonal points not included in the estimated heat map to evaluate the error.
5. An information processing device as described in claim 1 or 2, further comprising: a projection unit that projects the estimated vanishing point onto a unit sphere arranged in a world coordinate system based on internal parameters of the camera; and a calculation unit that calculates a rotation angle indicating the attitude of the camera based on an error between the projected vanishing point and a reference vanishing point projected in advance onto the unit sphere.
6. An information processing method in a computer, comprising: acquiring an image captured by a camera; estimating a vanishing point by inputting the image into a trained model; and generating the trained model by having a trained model used for skeletal estimation perform machine learning using a heat map indicating the true value of the vanishing point as training data.
7. An information processing program that causes a computer to function as the information processing device according to claim 1 or 2.
Citation Information
Patent Citations
Training method, computer readable medium and method and apparatus for detecting vanishing point
CN111091038A
Methods for utilizing a critical edge detection neural network and a geometric model to determine camera parameters
CN111489396A
