WO2024101429A1 - カメラパラメータ算出装置、カメラパラメータ算出方法、カメラパラメータ算出プログラム - Google Patents

カメラパラメータ算出装置、カメラパラメータ算出方法、カメラパラメータ算出プログラム Download PDF

Info

Publication number
WO2024101429A1
WO2024101429A1 PCT/JP2023/040439 JP2023040439W WO2024101429A1 WO 2024101429 A1 WO2024101429 A1 WO 2024101429A1 JP 2023040439 W JP2023040439 W JP 2023040439W WO 2024101429 A1 WO2024101429 A1 WO 2024101429A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
principal point
camera
heat map
parameter calculation
Prior art date
Application number
PCT/JP2023/040439
Other languages
English (en)
French (fr)
Inventor
信彦 若井
Original Assignee
パナソニックIpマネジメント株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by パナソニックIpマネジメント株式会社 filed Critical パナソニックIpマネジメント株式会社
Publication of WO2024101429A1 publication Critical patent/WO2024101429A1/ja

Links

Images

Definitions

  • This disclosure relates to technology for calculating camera parameters.
  • Non-Patent Document 1 discloses a technology for calculating camera parameters using a geometry-based method that uses a calibration index to associate 3D coordinate values in 3D space with pixel positions in a 2D image.
  • Non-Patent Document 2 discloses a technology that uses deep learning to perform camera calibration from a single image taken with a fisheye camera.
  • Non-Patent Document 3 discloses a method for performing camera calibration from a single image using deep learning.
  • the camera parameters are not estimated based on the distribution of the likelihood that each pixel is the image principal point, so further improvements are needed to estimate the camera parameters with high accuracy.
  • This disclosure has been made in consideration of these issues, and aims to provide technology that can estimate camera parameters with high accuracy.
  • a camera parameter calculation device includes an acquisition unit that acquires an image captured by a camera, and a camera parameter calculation unit that inputs the image acquired by the acquisition unit into a learning model to generate a heat map in which each pixel is represented by the likelihood of the image principal point, and calculates the camera parameters of the camera based on the generated heat map, and the learning model is a model trained by machine learning so that the estimated image principal point indicated by the heat map generated from the input learning image approaches the true value corresponding to the estimated image principal point.
  • camera parameters can be estimated with high accuracy, and as a result, camera calibration can be performed accurately.
  • FIG. 1 is a block diagram showing an example of a configuration of a camera parameter calculation device according to an embodiment.
  • FIG. 10 is a flowchart showing an example of a process for calculating an image principal point by the camera parameter calculation device according to the present embodiment.
  • 5 is a flowchart showing an example of a learning process of the camera parameter calculation device in the present embodiment.
  • FIG. 13 is a diagram illustrating an example of a heat map. 13 is a graph showing an example of a heat map during learning. 13 is a graph showing an example of a heat map at the end of learning. 13 is a graph illustrating an example of a multi-peak heat map.
  • Non-Patent Document 1 A technique is known that associates three-dimensional coordinates with pixel positions in a two-dimensional image by capturing a repeating pattern with a known shape and detecting the intersections of the repeating pattern or the center of a circle.
  • Non-Patent Documents 2 and 3 a method using deep learning is known as a method for calculating camera parameters robustly with respect to the brightness of the image and the subject from a single input image.
  • Non-Patent Documents 1 to 3 the image principal point is not estimated based on the distribution of the likelihood that each pixel is the image principal point, so there is a problem in that the camera parameters cannot be accurately estimated.
  • a camera parameter calculation device includes an acquisition unit that acquires an image captured by a camera, and a camera parameter calculation unit that inputs the image acquired by the acquisition unit into a learning model to generate a heat map in which each pixel is represented by the likelihood of the image principal point, and calculates the camera parameters of the camera based on the generated heat map, and the learning model is a model trained by machine learning so that an estimated image principal point indicated by a heat map generated from the input learning image approaches a true value corresponding to the estimated image principal point.
  • an image captured by a camera is input into the learning model, which outputs a heat map in which each pixel is represented by the likelihood of the image principal point, and the camera parameters are calculated based on the heat map.
  • the learning model is a model that has been machine-learned so that the estimated image principal point indicated by the heat map representing the distribution of likelihood approaches the true value corresponding to the estimated image principal point. Therefore, this configuration can accurately estimate camera parameters, and as a result, camera calibration can be performed accurately.
  • the camera parameter calculation device described in (1) above may further include a camera parameter output unit that outputs the camera parameters calculated by the camera parameter calculation unit.
  • the camera parameters calculated by the camera parameter calculation unit are output, so that the camera calibration can be performed accurately using the output camera parameters.
  • the learning model may be machine-learned to output a heat map in which the likelihood is distributed concentrically.
  • the learning model can be trained to output a heat map in which likelihoods are distributed concentrically.
  • the learning model may be machine-learned to minimize the difference between the likelihood of the pixel of interest and the average value of the likelihoods of pixels on a circumference of a circle centered on the true value and passing through the pixel of interest.
  • This configuration allows for a learning model that outputs a heat map in which likelihoods are distributed concentrically around the true value of the image principal point.
  • the camera parameter calculation device may further include a heat map output unit that outputs the heat map output from the learning model during the learning process of the learning model to a display.
  • the likelihood may be an image principal point probability or a distortion.
  • the likelihood is represented using the image principal point probability or image distortion, so a heat map can be obtained that accurately represents the likelihood of the image principal point.
  • the camera parameter may be the image principal point.
  • the image principal point can be calculated as a camera parameter.
  • a camera parameter calculation method in which a computer acquires an image captured by a camera, inputs the acquired image into a learning model, outputs a heat map in which each pixel is represented by the likelihood of the image principal point, and calculates the camera parameters of the camera based on the output heat map, and the learning model is a machine-learned model that is trained so that an estimated image principal point indicated by a heat map generated from the input learning image approaches a true value corresponding to the estimated image principal point.
  • This configuration provides a camera parameter calculation method that estimates camera parameters with high accuracy.
  • a camera parameter calculation program causes a computer to execute a process of acquiring an image captured by a camera, inputting the acquired image into a learning model, outputting a heat map in which each pixel is represented by the likelihood of the image principal point, and calculating the camera parameters of the camera based on the output heat map, the learning model being a machine-learned model such that an estimated image principal point indicated by a heat map generated from the input learning image approaches a true value corresponding to the estimated image principal point.
  • This configuration makes it possible to provide a camera parameter calculation program that estimates camera parameters with high accuracy.
  • a recording medium is a recording medium for recording a camera parameter calculation program for causing a computer to execute a camera parameter calculation program, which executes a process of acquiring an image captured by a camera, inputting the acquired image into a learning model, outputting a heat map in which each pixel is represented by the likelihood of the image principal point, and calculating the camera parameters of the camera based on the output heat map, and the learning model is a machine-learned model such that an estimated image principal point indicated by a heat map generated from the input learning image approaches a true value corresponding to the estimated image principal point.
  • This configuration provides a recording medium that records a camera parameter calculation program that estimates camera parameters with high accuracy.
  • the recording medium on which the camera parameter calculation program is recorded in this disclosure can be distributed as a non-transitory computer-readable recording medium such as a CD-ROM or via a communication network such as the Internet.
  • Fig. 1 is a block diagram showing an example of a configuration of a camera parameter calculation device 1 in the embodiment.
  • the camera parameter calculation device 1 includes an acquisition unit 11, a frame memory 12, a camera parameter calculation unit 13, and a camera parameter output unit 14. Furthermore, the camera parameter calculation device 1 includes a learning image acquisition unit 15, a learning unit 16, a learning model storage unit 17, and a heat map output unit 18.
  • the camera parameter calculation device 1 is configured, for example, by a computer including a processor, memory, an interface circuit, and the like.
  • the acquisition unit 11, camera parameter calculation unit 13, camera parameter output unit 14, learning image acquisition unit 15, learning unit 16, and heat map output unit 18 may be realized by the processor executing a camera parameter calculation program pre-recorded in memory. These components may also be realized by dedicated hardware circuits.
  • the frame memory 12 is configured, for example, by a storage device such as a RAM or semiconductor memory.
  • the learning model storage unit 17 is configured, for example, by a storage device such as a semiconductor memory, a hard disk drive, and a solid state drive.
  • the camera parameter calculation device 1 does not necessarily have to be configured as a single computer device, but may be configured as a distributed processing system (not shown) including a terminal device and a server.
  • the terminal device may include an acquisition unit 11 and a frame memory 12
  • the server may include a camera parameter calculation unit 13, a camera parameter output unit 14, a learning image acquisition unit 15, a learning unit 16, a learning model storage unit 17, and a heat map output unit 18.
  • data is exchanged between the components via a communication line connected to the terminal device and the server.
  • the learning image acquisition unit 15, the learning unit 16, the learning model storage unit 17, and the heat map output unit 18 may be configured in a learning device configured as a computer separate from the camera parameter calculation device 1.
  • the camera parameter calculation device 1 may acquire the learning model learned by the learning device from the learning device.
  • the acquisition unit 11 acquires images captured by the camera 2.
  • the camera 2 may be a camera that captures video or still images.
  • the camera 2 may be, for example, a surveillance camera installed indoors or outdoors.
  • the camera 2 may be a wide-angle camera, a fisheye camera, or a normal camera. If the camera 2 is configured as a fisheye camera, the images are configured as fisheye images.
  • the camera 2 and the camera parameter calculation device 1 are connected, for example, via a wireless or wired communication path (not shown).
  • the acquisition unit 11 may automatically acquire images from the camera 2 via the communication path. Alternatively, the acquisition unit 11 may acquire images captured by the camera 2 in response to a user operation input to the camera parameter calculation device 1.
  • the frame memory 12 stores the images acquired by the acquisition unit 11.
  • the camera parameter calculation unit 13 calculates the camera parameters by inputting the images read from the frame memory 12 into the learning model stored in the learning model storage unit 17.
  • the camera parameter calculation unit 13 inputs the image read from the frame memory 12 into the learning model, generates a heat map in which each of the multiple pixels that make up the image is represented by the likelihood of being the image principal point, and calculates the camera parameters of the camera based on the generated heat map.
  • the likelihood of the image principal point is a value that indicates the likelihood that each pixel that makes up the heat map is the image principal point.
  • the likelihood of the image principal point is assumed to be the image principal point probability.
  • the image principal point probability is the probability that each pixel that makes up the heat map is the image principal point.
  • the camera parameters may include external parameters and internal parameters of the camera 2.
  • An example of the external parameters may include a parameter indicating the rotation angle of the camera 2 and a parameter indicating the translation of the camera 2.
  • An example of the internal parameters of the camera 2 is the image principal point and pixel pitch.
  • the camera parameter calculation unit 13 is described as calculating the image principal point as a camera parameter.
  • the learning model is a model that takes an image as input and outputs a heat map.
  • the learning model is a model that has been machine-trained to approximate the image principal point indicated by the heat map generated from the input learning image (hereafter referred to as the "estimated image principal point") and the true value corresponding to the estimated image principal point.
  • the camera parameter output unit 14 outputs the camera parameters calculated by the camera parameter calculation unit 13.
  • the camera parameter output unit 14 may output the camera parameters to the camera 2, to an external computer, or to a memory (not shown) included in the camera parameter calculation device 1.
  • FIG. 2 is an explanatory diagram of the image principal point.
  • the camera 2 includes an image sensor 201 and a lens 202.
  • the image principal point Px is a point on the image 203 onto which the intersection Qx of the optical axis Lx of the lens 202 and the image sensor 201 is projected.
  • the incident light L is a ray that does not pass through the optical axis Lx, and is projected onto a position on the image sensor 201 that is different from the image principal point Px.
  • the design value of the image principal point Px is the center of the image 203, but due to assembly errors, the image principal point Px may deviate from the center of the image 203.
  • the training image acquisition unit 15 acquires training images that the training unit 16 uses for training.
  • the training images are associated with the true value of the image principal point.
  • the true value of the image principal point is the coordinates of the true image principal point.
  • the training image acquisition unit 15 acquires training images, for example, from a database (not shown) that stores training images.
  • the learning unit 16 generates a learning model by performing machine learning on the training images acquired by the training image acquisition unit 15.
  • machine learning is a deep neural network.
  • the learning model may be trained using machine learning other than a deep neural network.
  • the learning unit 16 generates a heat map by inputting the training images into the learning model.
  • the learning unit 16 then performs back error propagation so that the estimated image principal point calculated based on this heat map approaches the true value of the image principal point associated with the training image, thereby generating a learning model.
  • the estimated image principal point calculated based on the heat map is the pixel in the heat map that has the highest image principal point probability.
  • the learning model storage unit 17 stores the learning model learned by the learning unit.
  • the heat map output unit 18 outputs the heat map output from the learning model during the learning process of the learning model to the display 3.
  • Figure 3 is a flowchart showing an example of the processing of the camera parameter calculation device 1 in this embodiment for calculating the image principal point.
  • Step S201 The acquisition unit 11 acquires images captured by the camera 2 and stores them in the frame memory 12 .
  • Step S202 The camera parameter calculation unit 13 reads the image acquired in step S201 from the frame memory 12, and generates a heat map by inputting the read image into the learned learning model stored in the learning model memory unit 17.
  • the camera parameter calculation unit 13 calculates the image principal point from the heat map generated in step S202.
  • the camera parameter calculation unit 13 may calculate, as the image principal point, the pixel with the maximum image principal point probability in the heat map generated in step S202.
  • Step S204 The camera parameter output unit 14 outputs the image principal point calculated in step S203 to the camera 2, for example.
  • Figure 4 is a flowchart showing an example of the learning process of the camera parameter calculation device 1 in this embodiment.
  • the learning image acquisition unit 15 acquires learning images to be used in machine learning of the input model.
  • the learning images may be images captured in advance by the camera 2, or may be images generated using computer graphics processing.
  • the learning unit 16 acquires the true value of the image principal point.
  • the true value of the image principal point is data associated with the learning image. This true value of the image principal point may be the image principal point of the camera 2 that captured the learning image, or may be the image principal point used in computer graphics processing.
  • FIG. 5 is a diagram showing an example of a heat map 500.
  • the heat map 500 of the present embodiment refers to a graph in which the distribution of image principal point probability is visualized using colors and shading, and specifically, it is an image in which the image principal point probability having a value of 0 to 1 is expressed in pixel units.
  • pixels with a higher image principal point probability are displayed with a higher brightness
  • pixels with a lower image principal point probability are displayed with a lower brightness.
  • pixels with a higher image principal point probability may be displayed with a lower brightness. This is because the image principal point can be estimated by estimating the vicinity of the center where the image principal point probability is high, and the relationship between the image principal point probability and the brightness in visualizing the heat map 500 may be the opposite of that shown in FIG. 5.
  • the learning unit 16 may train the learning model by machine learning using a partial area of the heat map 500, rather than the entire heat map.
  • the computational cost is roughly proportional to the number of pixels of the heat map used.
  • using a ring-shaped area of the heat map provides higher accuracy than using other areas. This is because an increase in the number of pixels on the same circumference has the effect of reducing noise when calculating the average value of the heat map on the circumference.
  • image distortion decreases as you get closer to the image principal point Px, and increases as you move away from the image principal point Px in the radial direction. Furthermore, image distortion is the same at positions that are the same distance (image height) from the image principal point Px. Therefore, pixels with large distortion have a low probability of being the image principal point, and pixels with small distortion have a high probability of being the image principal point.
  • Step S304 The learning unit 16 calculates an image principal point error based on the heat map generated in step S303 and the true value of the image principal point Px acquired in step S302. The process of step S304 will be described in detail later.
  • Step S305 The learning unit 16 updates the parameters of the deep neural network that constitutes the learning model by backpropagation so as to reduce the image principal point error calculated in step S304.
  • the stochastic gradient descent method can be applied to optimize the backpropagation.
  • Step S306 The learning unit 16 determines whether the learning of the learning model is completed. The completion of the learning is determined, for example, by whether the number of updates of the parameters of the deep neural network constituting the learning model exceeds a threshold.
  • An example of the threshold is 10,000 times. However, this is only an example, and there is no particular limitation to this threshold. If it is determined that the learning is completed (YES in step S306), the process ends, and if it is determined that the learning is not completed (NO in step S306), the process proceeds to step S307.
  • Step S307 The heat map output unit 18 displays the heat map generated in step S303 on the display 3. This allows the user to see the heat map generated by the learning model during learning. In the early stages of learning, the heat map does not show the image principal points in a concentric pattern. However, as learning progresses, a heat map is generated in which the image principal points are shown in a concentric pattern. Therefore, a user who sees the heat map can check the progress of learning.
  • step S307 the process returns to step S301, and steps S301 to S305 are applied to the next training image.
  • step S304 we will explain the process of calculating the image principal point error in step S304.
  • the learning unit 16 calculates the image principal point error J(H, Cx, Cy) based on the heat map H generated in step S303 and the true value (Cx, Cy) of the image principal point.
  • the image principal point error J(H, Cx, Cy) is expressed by formula (1).
  • ⁇ (r, ⁇ , H, Cx, Cy) is the image principal point probability of the pixel of interest (r, ⁇ ) in a polar coordinate system centered on the true value (Cx, Cy) of the image principal point.
  • the pixel of interest is any one of the pixels that make up the training image.
  • the method for calculating this image principal point probability ⁇ (r, ⁇ , H, Cx, Cy) is explained below.
  • the image principal point probability ⁇ (r, ⁇ , H, Cx, Cy) in Cartesian coordinates (x, y) with the upper left corner of the image as the origin can be calculated as a heat map H(x, y).
  • ⁇ '(r, H, Cx, Cy) is the average image principal point probability at image height r. That is, the average image principal point probability ⁇ '(r,H,Cx,Cy) is the average value of the image principal point probabilities of pixels on the circumference of a circle centered on the true value (Cx,Cy) of the image principal point and passing through the pixel of interest (r, ⁇ ).
  • the image height r is the distance from the true value of the image principal point to the pixel of interest (r, ⁇ ).
  • the image principal point error J(H,Cx,Cy) is expressed as ⁇ .
  • the step of the image height r is, for example, one pixel, and the step of the deflection angle ⁇ is, for example, one degree.
  • R is the maximum value of the image height r, and is a predetermined value.
  • the image principal point error J(H,Cx,Cy) represents the sum of the squared errors for all pixels in the heat map, and is a function intended to improve the calculation accuracy of the estimated image principal point by using all pixels in the heat map.
  • the deep neural network is trained to output a heat map representing the image principal point probability by minimizing the image principal point error J(H, Cx, Cy) in equation (1).
  • the parameters of the deep neural network model are generally initialized with random numbers such as those from a normal distribution. Therefore, the output of the deep neural network at the random number initialization stage is a pixel value between 0 and 1 representing a random image principal point probability for each pixel in the heat map. Note that the range of output pixel values can always be between 0 and 1 by using a sigmoid function, for example.
  • the learning unit 16 acquires the coordinates of the true value of the image principal point, as described in step S302.
  • ⁇ '(r, H, Cx, Cy) in formula (1) is the average image principal point probability at image height r.
  • This image height r is calculated as the distance from the true value of the image principal point acquired in step S302 to the pixel of interest (r, ⁇ ). Note that this image height r has the same definition as the distance from the image principal point used in the field of computer vision.
  • the heat map When minimizing the image principal point error J (H, Cx, Cy) in equation (1) is learned, the heat map has a high image principal point probability in areas close to the true value of the image principal point. Furthermore, since the image height r is the distance from the true value of the image principal point, the maximum image principal point probability in the heat map will match the true value of the image principal point. Furthermore, as shown in Figure 6B, at the end of learning, the heat map will have image principal point probability close to a line-symmetric distribution with the true value of the image principal point as the axis of symmetry.
  • Figure 6A is a graph showing an example of a heat map during learning.
  • Figure 6B is a graph showing an example of a heat map at the end of learning. In Figures 6A and 6B, the vertical axis shows the image principal point probability, and the horizontal axis shows the cross section of the heat map at a certain coordinate y.
  • the image principal point error J (H, Cx, Cy) When all pixels in the heat map are 0, the image principal point error J (H, Cx, Cy) will be at a minimum of 0. However, for all pixels in the output of a randomly initialized deep neural network to be 0, most of the parameters of the deep neural network must be 0, which does not happen in normal learning. Furthermore, the image principal point error J (H, Cx, Cy) is not designed with the intention of setting the scale to a specific value. Therefore, in learning, the average image principal point probability of all pixels in the heat map remains roughly the same, but the shape of the distribution of image principal point probability changes. Furthermore, since the pixel with the maximum image principal point probability is selected as the coordinates of the estimated image principal point, the effect of the heat map scale (all pixels multiplied by a constant) on the coordinates of the estimated image principal point can be ignored.
  • Figure 7 is a graph showing an example of a multi-peak heat map.
  • a multi-peak heat map is one in which, in addition to the peak containing the maximum value of the image principal point probability, there is also a ring-shaped region with a high image principal point probability.
  • the image principal point error J (H, Cx, Cy) shown in equation (1) is small even in the case of a multi-peak heat map as shown in Figure 7.
  • the image principal point error J (H, Cx, Cy) becomes large when the center of the ring with high image principal point probability deviates from the true value of the image principal point.
  • a multi-peak heat map may be output temporarily during learning, it is not output when learning is completed.
  • a heat map with a single peak as shown in Figure 5 is output.
  • the coordinates of the image principal point can be obtained that are roughly the same as the true value of the image principal point.
  • the learning unit 16 can set the range of r in equation (1) to r1 to r2 ( ⁇ R).
  • the image principal point error J(H, Cx, Cy) shown in formula (1) is expressed, for example, as the squared error between ⁇ (r, ⁇ , H, Cx, Cy) and ⁇ '(r, H, Cx, Cy), but this is just one example, and it may also be expressed as the Huber error between ⁇ (r, ⁇ , H, Cx, Cy) and ⁇ '(r, H, Cx, Cy).
  • the Huber error is an error that is expressed as a squared error for absolute value errors smaller than 0.5, and as a first-square error for absolute value errors of 0.5 or more.
  • the image principal point error J(H, Cx, Cy) may be expressed using various error expression methods, such as the absolute value error between ⁇ (r, ⁇ , H, Cx, Cy) and ⁇ '(r, H, Cx, Cy).
  • the image principal point is estimated for both the x and y components, but this is just one example.
  • the camera parameter calculation unit 13 may estimate the image principal point for only one of the x and y components, and use a design value for the other.
  • the design value for the x component is the coordinate of 1/2 the image width (x component)
  • the design value for the y component is the coordinate of 1/2 the image height (y component).
  • Heat map 500 has the same image size as the input learning image, and each pixel is represented with a brightness according to the image principal point probability.
  • Heat map 500 is an ideal heat map. Therefore, in heat map 500, the image principal point Px is located at the center, and the image principal point probability decreases with distance from the image principal point Px. In other words, in heat map 500, the pixel with the highest image principal point probability is located at the center, and the image principal point probability is distributed in a concentric pattern.
  • a learning model is machine-trained using the image principal point error J(H, Cx, Cy). That is, the learning model is machine-trained so that the estimated image principal point approaches the true value of the image principal point, taking into account the distribution of image principal point probability shown by the heat map. Therefore, even if the heat map contains a number of pixels that inaccurately represent the image principal point error, a learning model that can accurately estimate the image principal point Px is obtained. As a result, this embodiment can estimate the image principal point Px with high accuracy compared to a regression method in which an image is input into the learning model and the image principal point Px is directly obtained. As a result, this embodiment can estimate the image principal point with high accuracy from a single image.
  • the image principal point probability is used as the likelihood of each pixel that constitutes the heat map, but this is just one example.
  • the magnitude of image distortion may also be used as the likelihood of each pixel that constitutes the heat map.
  • the image principal point has the meaning of a reference position where distortion is zero in a camera model that is symmetric about the optical axis. In other words, by estimating the magnitude of distortion instead of the image principal point probability, the image principal point can be estimated in the same way as in embodiment 1.
  • the learning unit 16 can learn the learning model using a training image to which the other camera parameter is associated in addition to the image principal point.
  • the other parameter include a parameter indicating the rotation angle of the camera 2, a parameter indicating the translation of the camera 2, and the pixel pitch of the image sensor of the camera 2.
  • the camera parameter calculation device disclosed herein is useful for camera calibration.

Landscapes

  • Image Analysis (AREA)

Abstract

カメラパラメータ算出装置は、カメラで撮影された画像を取得し、取得した画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを生成し、生成したヒートマップに基づいてカメラのカメラパラメータを算出し、学習モデルは、ヒートマップが示す推定画像主点が、推定画像主点の真値に近づくように機械学習されたモデルである。

Description

カメラパラメータ算出装置、カメラパラメータ算出方法、カメラパラメータ算出プログラム
 本開示は、カメラパラメータを算出する技術に関するものである。
 非特許文献1は、校正指標を用いて3次元空間中の3次元座標値と2次元画像中の画素位置とを対応づける幾何ベースの手法でカメラパラメータを算出する技術を開示する。
 非特許文献2は、深層学習を使って、魚眼カメラで撮影された1枚の画像からカメラ校正を行う技術を開示する。
 非特許文献3は、深層学習を使って1枚の画像からカメラ校正を行う手法を開示する。
 しかしながら、上記従来技術では、各画素が画像主点である尤度の分布に基づいてカメラパラメータが推定されていないので、カメラパラメータを高精度に推定するにはさらなる改善が必要である。
R. Y. Tsai. "A versatile camera calibration technique for high accuracy 3D machine vision metrology using off-the-shelf TV cameras and lenses. IEEE Journal of Robotics and Automation, Volume 3, Number 4, pages 323-344, 1987 N. Wakai and T. Yamashita. "Deep Single Fisheye Image Camera Calibration for Over 180-degree Projection of Field of View", In Proceedings of IEEE/CVF International Conference on Computer Vision Workshop, pages 1174-1183, 2021 K. Liao, C. Lin, and Y. Zhao."A Deep Ordinal Distortion Estimation Approach for Distortion Rectification", IEEE Transactions on Image Processing, Volume 30, pages 3362-3375, 2021
 本開示は、このような課題を鑑みてなされたものであり、カメラパラメータを高精度に推定することができる技術を提供することである。
 本開示の一態様におけるカメラパラメータ算出装置は、カメラで撮影された画像を取得する取得部と、前記取得部に取得された画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを生成し、生成した前記ヒートマップに基づいて前記カメラのカメラパラメータを算出するカメラパラメータ算出部と、を備え、前記学習モデルは、入力された学習画像から生成したヒートマップが示す推定画像主点が、前記推定画像主点に対応する真値に近づくように機械学習されたモデルである。
 本開示によれば、カメラパラメータを高精度に推定することができ、その結果、カメラ校正を正確に行うことができる。
実施の形態におけるカメラパラメータ算出装置の構成の一例を示すブロック図である。 画像主点の説明図である。 本実施の形態におけるカメラパラメータ算出装置が画像主点を算出する処理の一例を示すフローチャートである。 本実施の形態におけるカメラパラメータ算出装置の学習処理の一例を示すフローチャートである。 ヒートマップの一例を示す図である。 学習途中におけるヒートマップの一例を示すグラフである。 学習終了時におけるヒートマップの一例を示すグラフである。 多峰型のヒートマップの一例を示すグラフである。
 (本開示に至る経緯)
 センシングカメラ等のカメラ校正を行うために、幾何ベースの手法では3次元空間中の3次元座標値と2次元画像中の画素位置とを対応づける必要がある。このためにはカメラパラメータを正確に算出することが要求されている。そこで、形状が既知の繰り返しパタンを撮影し、繰り返しパタンの交点又は円の中心を検出することで、3次元座標と2次元画像中の画素位置とを対応付ける技術が知られている(非特許文献1)。また、入力画像1枚で画像の明るさ及び被写体に対してロバストにカメラパラメータを算出する手法として深層学習を使った手法が知られている(非特許文献2、3)。
 しかしながら、非特許文献1~3はいずれも各画素が画像主点である尤度の分布に基づいて画像主点が推定されていないので、カメラパラメータを正確に推定できないという課題がある。
 本開示はこのような課題を解決するためになされたものである。
 (1)本開示の一態様におけるカメラパラメータ算出装置は、カメラで撮影された画像を取得する取得部と、前記取得部に取得された画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを生成し、生成した前記ヒートマップに基づいて前記カメラのカメラパラメータを算出するカメラパラメータ算出部と、を備え、前記学習モデルは、入力された学習画像から生成したヒートマップが示す推定画像主点が、前記推定画像主点に対応する真値に近づくように機械学習されたモデルである。
 この構成によれば、カメラにより撮影された画像が学習モデルに入力されることにより、各画素が画像主点の尤度で表されたヒートマップが出力され、ヒートマップに基づいてカメラパラメータが算出されている。ここで、学習モデルは、尤度の分布を表すヒートマップが示す推定画像主点が、推定画像主点に対応する真値に近づくように機械学習されたモデルである。そのため、本構成は、カメラパラメータを正確に推定でき、その結果、カメラ校正を正確に行うことができる。
 (2)上記(1)記載のカメラパラメータ算出装置において、前記カメラパラメータ算出部が算出した前記カメラパラメータを出力するカメラパラメータ出力部をさらに備えてもよい。
 この構成によれば、カメラパラメータ算出部により算出されたカメラパラメータが出力されるので、出力されたカメラパラメータを用いてカメラ校正を正確に行うことができる。
 (3)上記(1)又は(2)記載のカメラパラメータ算出装置において、前記学習モデルは、前記尤度が同心円状に分布するヒートマップを出力するように機械学習されてもよい。
 この構成によれば、尤度が同心円状に分布するヒートマップを出力するように学習モデルを機械学習させることができる。
 (4)上記(1)~(3)のいずれか1つに記載のカメラパラメータ算出装置において、前記学習モデルは、前記注目画素の前記尤度と、前記真値を中心とする円であって前記注目画素を通る前記円の円周上の画素の前記尤度の平均値と、の差を、最小化するように機械学習されてもよい。
 この構成によれば、画像主点の真値を中心に尤度が同心円状に分布するヒートマップを出力する学習モデルが得られる。
 (5)上記(1)~(4)のいずれか1つに記載のカメラパラメータ算出装置において、前記学習モデルの学習過程において前記学習モデルから出力された前記ヒートマップをディスプレイに出力するヒートマップ出力部をさらに備えてもよい。
 学習モデルの学習が十分に進むと、尤度が同心円状に分布するヒートマップが学習モデルから出力される。この構成によれば、学習モデルからヒートマップが出力されるので、学習モデルの機械学習が十分に進んでいるか否かを確認できる。
 (6)上記(1)~(5)のいずれか1つに記載のカメラパラメータ算出装置において、前記尤度は、画像主点確率又は歪みであってもよい。
 この構成によれば、画像主点確率又は画像の歪みを用いて尤度が表されるので、画像主点の尤度を正確に表すヒートマップを得ることができる。
 (7)上記(1)~(6)のいずれか1つに記載のカメラパラメータ算出装置において、前記カメラパラメータは、前記画像主点であってもよい。
 この構成によれば、カメラパラメータとして画像主点を算出できる。
 (8)本開示の別の一態様におけるカメラパラメータ算出方法は、コンピュータが、カメラで撮影された画像を取得し、取得された画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを出力し、出力した前記ヒートマップに基づいて前記カメラのカメラパラメータを算出し、前記学習モデルは、入力された学習画像から生成したヒートマップが示す推定画像主点が、前記推定画像主点に対応する真値に近づくように機械学習されたモデルである。
 この構成によれば、カメラパラメータを高精度に推定するカメラパラメータ算出方法を提供できる。
 (9)本開示の別の一態様におけるカメラパラメータ算出プログラムは、コンピュータに、カメラで撮影された画像を取得し、取得された画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを出力し、出力した前記ヒートマップに基づいて前記カメラのカメラパラメータを算出する、処理を実行させ、前記学習モデルは、入力された学習画像から生成したヒートマップが示す推定画像主点が、前記推定画像主点に対応する真値に近づくように機械学習されたモデルである。
 この構成によれば、カメラパラメータを高精度に推定するカメラパラメータ算出プログラムを提供できる。
 (10)本開示の別の一態様における記録媒体は、コンピュータに、カメラパラメータ算出プログラムを実行させるカメラパラメータ算出プログラムを記録する記録媒体であって、カメラで撮影された画像を取得し、取得された画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを出力し、出力した前記ヒートマップに基づいて前記カメラのカメラパラメータを算出する、処理を実行させ、前記学習モデルは、入力された学習画像から生成したヒートマップが示す推定画像主点が、前記推定画像主点に対応する真値に近づくように機械学習されたモデルである。
 この構成によれば、カメラパラメータを高精度に推定するカメラパラメータ算出プログラムを記録する記録媒体が提供される。
 本開示は、カメラパラメータ算出プログラムを記録する記録媒体は、CD-ROM等のコンピュータ読取可能な非一時的な記録媒体あるいはインターネット等の通信ネットワークを介して流通させることができるのは、言うまでもない。
 なお、以下で説明する実施の形態は、いずれも本開示の一具体例を示すものである。以下の実施の形態で示される数値、形状、構成要素、ステップ、ステップの順序などは、一例であり、本開示を限定する主旨ではない。また、以下の実施の形態における構成要素のうち、最上位概念を示す独立請求項に記載されていない構成要素については、任意の構成要素として説明される。また全ての実施の形態において、各々の内容を組み合わせることもできる。
 (実施の形態)
 以下、本開示の実施の形態を、図面を参照しながら説明する。図1は、実施の形態におけるカメラパラメータ算出装置1の構成の一例を示すブロック図である。カメラパラメータ算出装置1は、取得部11、フレームメモリ12、カメラパラメータ算出部13、及びカメラパラメータ出力部14を含む。さらに、カメラパラメータ算出装置1は、学習画像取得部15、学習部16、学習モデル記憶部17、及びヒートマップ出力部18を含む。
 カメラパラメータ算出装置1は、例えば、プロセッサ、メモリ、インタフェース回路などからなるコンピュータによって構成される。取得部11、カメラパラメータ算出部13、カメラパラメータ出力部14、学習画像取得部15、学習部16、及びヒートマップ出力部18は、プロセッサがメモリにあらかじめ記録されたカメラパラメータ算出プログラムを実行することによって実現されてもよい。また、これらの構成要素は、専用のハードウェア回路によって実現されてもよい。フレームメモリ12は、例えばRAM、半導体メモリなどの記憶装置で構成される。学習モデル記憶部17は、例えば、半導体メモリ、ハードディスクドライブ、及びソリッドステートドライブなどの記憶装置で構成される。
 カメラパラメータ算出装置1は、必ずしも単一のコンピュータ装置で構成される必要はなく、端末装置とサーバとを含む分散処理システム(不図示)によって構成されてもよい。例えば、端末装置が取得部11及びフレームメモリ12を備え、サーバがカメラパラメータ算出部13、カメラパラメータ出力部14、学習画像取得部15、学習部16、学習モデル記憶部17、及びヒートマップ出力部18を備えていてもよい。この場合、構成要素間でのデータの受け渡しは、端末装置とサーバとに接続された通信回線を介して行われる。
 また、学習画像取得部15、学習部16、学習モデル記憶部17、及びヒートマップ出力部18は、カメラパラメータ算出装置1とは別のコンピュータで構成された学習装置で構成されてもよい。この場合、カメラパラメータ算出装置1は、学習装置で学習された学習モデルを学習装置から取得すればよい。
 取得部11は、カメラ2で撮影された画像を取得する。カメラ2は、動画を撮影するカメラであってもよいし、静止画を撮影するカメラであってもよい。カメラ2は、例えば屋内又は屋外に設置された監視カメラである。カメラ2は、広角カメラであってもよいし、魚眼カメラであってもよいし、通常のカメラであってもよい。カメラ2が魚眼カメラで構成される場合、画像は魚眼画像で構成される。
 カメラ2とカメラパラメータ算出装置1とは例えば無線又は有線の通信路(図略)を介して接続されている。取得部11は、通信路を介してカメラ2から画像を自動的に取得してもよい。或いは、取得部11は、カメラパラメータ算出装置1に対して入力されたユーザの操作に応じてカメラ2が撮影した画像を取得しても良い。
 フレームメモリ12は、取得部11により取得された画像を記憶する。カメラパラメータ算出部13は、フレームメモリ12から読み出した画像を学習モデル記憶部17に記憶された学習モデルに入力することでカメラパラメータを算出する。
 具体的には、カメラパラメータ算出部13は、フレームメモリ12から読み出した画像を学習モデルに入力することにより、画像を構成する複数の画素のそれぞれが画像主点の尤度で表されたヒートマップを生成し、生成したヒートマップに基づいてカメラのカメラパラメータを算出する。画像主点の尤度とはヒートマップを構成する各画素が画像主点である尤もらしさを示す値である。以下の説明では、画像主点の尤度は、画像主点確率であるものとする。画像主点確率は、ヒートマップを構成する各画素が画像主点であることを示す確率である。
 カメラパラメータはカメラ2の外部パラメータと内部パラメータを含んでいてもよい。外部パラメータの一例はカメラ2の回転角を示すパラメータ及びカメラ2の並進を示すパラメータを含んでもよい。カメラ2の内部パラメータの一例は、画像主点及び画素ピッチなどである。以下の説明では、カメラパラメータ算出部13は、カメラパラメータとして画像主点を算出するものとして説明する。
 学習モデルは、画像を入力とし、ヒートマップを出力とする学習モデルである。学習モデルは、入力された学習画像から生成したヒートマップが示す画像主点(以下、「推定画像主点」と呼ぶ。)と、推定画像主点に対応する真値に近づくように機械学習されたモデルである。
 カメラパラメータ出力部14は、カメラパラメータ算出部13により算出されたカメラパラメータを出力する。例えば、カメラパラメータ出力部14は、カメラパラメータをカメラ2に出力してもよいし、外部のコンピュータに出力してもよいし、カメラパラメータ算出装置1が備えるメモリ(図略)に出力してもよい。
 図2は画像主点の説明図である。図2において、カメラ2はイメージセンサ201及びレンズ202を含む。画像主点Pxは、レンズ202の光軸Lxとイメージセンサ201との交点Qxが投影される画像203上の点である。入射光Lは光軸Lxを通らない光線であり、イメージセンサ201において画像主点Pxとは異なる位置に投影されている。画像主点Pxの設計値は画像203の中心であるが、組み立て誤差により画像主点Pxは画像203の中心からずれることがある。画像主点Pxが画像203の中心からずれると、世界空間の座標をイメージセンサ201の座標に対応づけるカメラ校正の精度が低下する。そこで、本実施の形態では、画像主点Pxの正確な値を算出するために、画像主点を算出する処理を実行する。
 学習画像取得部15は、学習部16が学習に使用する学習画像を取得する。学習画像は画像主点の真値が対応付けられている。画像主点の真値とは、真の画像主点の座標である。学習画像取得部15は、例えば、学習画像を記憶するデータベース(図略)から学習画像を取得する。
 学習部16は、学習画像取得部15により取得された学習画像を機械学習することで、学習モデルを生成する。機械学習の一例は、ディープニューラルネットワークである。ただし、これは一例であり、学習モデルは、ディープニューラルネットワーク以外の機械学習を用いて学習されてもよい。学習部16は、学習画像を学習モデルに入力することでヒートマップを生成する。そして、学習部16は、このヒートマップに基づいて算出される推定画像主点が、学習画像に対応付けられた画像主点の真値に近づくように逆誤差伝搬を行い、学習モデルを生成する。ヒートマップに基づいて算出される推定画像主点とは、ヒートマップにおいて画像主点確率が最も高い画素である。
 学習モデル記憶部17は、学習部により学習された学習モデルを記憶する。
 ヒートマップ出力部18は、前記学習モデルの学習過程において学習モデルから出力されたヒートマップをディスプレイ3に出力する。
 以上が、カメラパラメータ算出装置1の構成である。引き続いてカメラパラメータ算出装置1の処理について説明する。図3は、本実施の形態におけるカメラパラメータ算出装置1が画像主点を算出する処理の一例を示すフローチャートである。
 (ステップS201)
 取得部11は、カメラ2が撮影した画像を取得し、フレームメモリ12に記憶する。
 (ステップS202)
 カメラパラメータ算出部13は、ステップS201で取得された画像をフレームメモリ12から読み出し、読みだした画像を、学習モデル記憶部17に記憶された学習済みの学習モデルに入力することで、ヒートマップを生成する。
 (ステップS203)
 カメラパラメータ算出部13は、ステップS202で生成されたヒートマップから画像主点を算出する。ここで、カメラパラメータ算出部13は、ステップS202で生成されたヒートマップにおいて画像主点確率が最大の画素を画像主点として算出すればよい。
 (ステップS204)
 カメラパラメータ出力部14は、ステップS203で算出された画像主点を例えばカメラ2に出力する。
 次に、学習モデルの学習方法について説明する。図4は、本実施の形態におけるカメラパラメータ算出装置1の学習処理の一例を示すフローチャートである。
 (ステップS301)
 学習画像取得部15は、入力モデルの機械学習に用いる学習画像を取得する。学習画像は、事前にカメラ2で撮影された画像であってもよいし、コンピュータグラフィックス処理を用いて生成された画像であってもよい。
 (ステップS302)
 学習部16は、画像主点の真値を取得する。画像主点の真値は、学習画像に対応付けられたデータである。この画像主点の真値は、学習画像を撮影したカメラ2の画像主点であってもよいし、コンピュータグラフィックス処理に使用した画像主点であってもよい。
 (ステップS303)
 学習部16は、ステップS301で取得した学習画像を学習モデルに入力することでヒートマップを生成する。図5は、ヒートマップ500の一例を示す図である。図5に示すように、本実施の形態のヒートマップ500は、画像主点確率の分布を色や濃淡を用いて可視化したグラフを指し、具体的には、0~1の値を有する画像主点確率が画素単位で表された画像である。図5の例では、画像主点確率が高い画素ほど輝度が高くなり、画像主点確率が低い画素ほど輝度が低くなるように、表示されている。なお、図5の例と逆に画像主点確率が高い画素ほど輝度を低く表示しても良い。これは、画像主点の推定は画像主点確率が高い中心付近を推定すればよく、ヒートマップ500の可視化においては画像主点確率と輝度との関係は図5に示す関係とは逆であってもよいからである。
 なお、学習部16は、ヒートマップ全体ではなく、ヒートマップ500の一部の領域を用いて学習モデルを機械学習させても良い。使用するヒートマップ500の領域が狭くなることで、機械学習の計算コストを低減できる。計算コストは概略使用するヒートマップの画素数に比例する。同じ画素数の場合、ヒートマップの環状領域を用いた場合の方が、それ以外の領域を用いる場合より精度が高くなる。これは、同一円周上に存在する画素数が増加することにより、円周上のヒートマップの平均値を算出する時に、ノイズ低減の効果があるからである。すなわち、学習部16はヒートマップ500において環状領域内の画素を選択して学習モデルを機械学習させることが効率的である。
 画像の歪は、画像主点Pxに近づくほど小さくなり、画像主点Pxから半径方向に離れるにつれて大きくなる。また、画像主点Pxからの距離(像高)が等しい位置において画像の歪は等しい。したがって、歪が大きい画素は画像主点確率が低く、歪が小さい画素は画像主点確率が高くなる。
 (ステップS304)
 学習部16は、ステップS303で生成されたヒートマップと、ステップS302で取得した画像主点Pxの真値とに基づいて画像主点誤差を算出する。ステップS304の処理の詳細は後述する。
 (ステップS305)
 学習部16は、ステップS304で算出された画像主点誤差が小さくなるように、学習モデルを構成するディープニューラルネットワークのパラメータを誤差逆伝搬で更新する。例えば、誤差逆伝搬の最適化は確率的勾配降下法が適用可能である。
 (ステップS306)
 学習部16は、学習モデルの学習が完了したかを判定する。学習の完了は、例えば、学習モデルを構成するディープニューラルネットワークのパラメータの更新回数が閾値を超えたか否かによって判定される。閾値の一例は10,000回である。但し、これは一例であり、この閾値に特に限定はない。学習が完了したと判定された場合(ステップS306でYES)、処理は終了し、学習が完了していないと判定された場合(ステップS306でNO)、処理はステップS307に進む。
 (ステップS307)
 ヒートマップ出力部18は、ステップS303で生成されたヒートマップをディスプレイ3に表示する。これにより、学習途中に学習モデルにより生成されるヒートマップがユーザに提示される。学習初期においては、ヒートマップは画像主点が同心円状に表れていない。しかし、学習が進むにつれて、画像主点が同心円状に表れたヒートマップが生成されるようになる。そのため、ヒートマップを見たユーザは学習の進捗具合を確認できる。
 ステップS307が終了すると、処理はステップS301に戻り、次の学習画像に対して、ステップS301~S305の処理が適用される。
 次に、ステップS304の画像主点誤差の算出処理について説明する。
 学習部16は、ステップS303で生成されたヒートマップHと、画像主点の真値(Cx、Cy)とに基づいて、画像主点誤差J(H、Cx、Cy)を算出する。画像主点誤差J(H、Cx、Cy)は、式(1)で表される。
Figure JPOXMLDOC01-appb-M000001
 ε(r、θ、H、Cx、Cy)は画像主点の真値(Cx、Cy)を中心とする極座標系における注目画素(r,θ)の画像主点確率である。注目画素とは、学習画像を構成する画素のうち任意の1の画素である。この画像主点確率ε(r、θ、H、Cx、Cy)の計算方法を説明する。画像左上を原点とする直交座標(x、y)における画像主点確率ε(r、θ、H、Cx、Cy)は、ヒートマップH(x、y)として算出できる。ここで、極座標(r、θ)から、画像左上を原点とする直交座標(x、y)の変換は、x=r・cosθ+Cx、y=r・sinθ+Cyである。ε´(r、H、Cx、Cy)は像高rにおける平均画像主点確率である。すなわち、平均画像主点確率ε´(r、H、Cx、Cy)は、画像主点の真値(Cx、Cy)を中心とする円であって注目画素(r,θ)を通る円の円周上の画素の画像主点確率の平均値である。像高rは画像主点の真値から注目画素(r,θ)までの距離である。なお、数値計算のため、画像主点誤差J(H、Cx、Cy)はΣで表現されている。像高rのステップは例えば1画素であり、偏角θのステップは例えば1度である。Rは像高rの最大値であり、予め定められた値である。画像主点誤差J(H、Cx、Cy)は、ヒートマップの全画素に対する2乗誤差の総和を表し、ヒートマップの全画素を利用することで推定画像主点の算出精度の向上を意図する関数である。
 次に、式(1)の画像主点誤差J(H、Cx、Cy)の最小化により、ディープニューラルネットワークが画像主点確率を表すヒートマップを出力できるように学習されることを説明する。ディープニューラルネットワークのモデルのパラメータは一般的に正規分布などの乱数で初期化される。したがって、乱数初期化段階のディープニューラルネットワークの出力は、ヒートマップの各画素に対して0~1のランダムな画像主点確率を表す画素値となる。なお、シグモイド関数などを用いることで出力の画素値の範囲を常に0~1にできる。
 学習部16は、ステップS302で説明した、画像主点の真値の座標を取得する。上述したように、式(1)のε´(r、H、Cx、Cy)は像高rにおける平均画像主点確率である。この像高rは、ステップS302で取得した画像主点の真値から注目画素(r、θ)までの距離として計算される。なお、この像高rはコンピュータビジョン分野で使用される画像主点からの距離と同じ定義である。
 式(1)の画像主点誤差J(H、Cx、Cy)の最小化を学習として進めると、ヒートマップは画像主点の真値に近い領域の画像主点確率が高くなる。また、像高rは画像主点の真値からの距離であるので、ヒートマップの画像主点確率の最大値が画像主点の真値と一致するようになる。さらに、学習終了時には図6Bに示すように、ヒートマップは、画像主点確率が画像主点の真値を対称軸とする線対称な分布に近くなる。図6Aは学習途中におけるヒートマップの一例を示すグラフである。図6Bは学習終了時におけるヒートマップの一例を示すグラフである。図6A、図6Bにおいて、縦軸は画像主点確率を示し、横軸はある座標yにおけるヒートマップの断面を示す。
 図6Aと図6Bとを比較した場合、画像主点確率の値とx軸との間の面積は概略等しい。一方、学習終了時(図6B)では、ある像高rにおける平均画像主点確率ε´(r、H、Cx、Cy)からの画像主点確率のずれは、学習途中(図6A)における前記ずれに比べて小さい。そのため、学習終了時においては、ヒートマップにおける画像主点確率の分布は、図6Bで示すような形状となる。したがって、学習済みのディープニューラルネットワークは、図5で示すように、画像主点Pxを中心とする同心円状のヒートマップを出力するようになる。
 なお、ヒートマップの全画素が0の場合、画像主点誤差J(H、Cx、Cy)は最小である0となる。しかし、乱数初期化したディープニューラルネットワークの出力の全画素が0となるには、ディープニューラルネットワークのパラメータの大部分が0になる必要があり、通常の学習でこのようなことは起こらない。また、画像主点誤差J(H、Cx、Cy)はスケールを特定の値にする意図で設計されていない。そのため、学習において、ヒートマップの全画素の画像主点確率の平均は概略変わらず、画像主点確率の分布の形状が変化する。また、推定画像主点の座標は画像主点確率が最大値となる画素が選択されるため、ヒートマップのスケール(全画素を定数倍)による推定画像主点の座標への影響は無視できる。
 図7は多峰型のヒートマップの一例を示すグラフである。多峰型とは、画像主点確率の最大値を含むピーク以外にも高い画像主点確率を持つ領域が環状に存在するヒートマップである。式(1)に示す画像主点誤差J(H、Cx、Cy)は図7のような多峰型の場合でも小さい。しかし、この多峰型は画像主点確率が高い環の中心と画像主点の真値とがずれた場合に画像主点誤差J(H、Cx、Cy)が大きくなる。そのため、多峰型は学習途中で一時的に出力される場合はありうるが、学習終了時においては出力されない。よって、図5に示す単一のピークとなるヒートマップが出力される。
 画像主点座標のx座標とy座標とを直接回帰で推論するディープニューラルネットワークも設計可能である。しかし、ディープニューラルネットワークは出力ノイズを含むため、この出力ノイズにより画像主点の座標の精度が低下する。一方、画像主点確率を表すヒートマップを用いることで、多数の画素から画像主点の座標が推定される。そのため、ヒートマップに含まれる出力ノイズが低減され、高精度に画像主点が推定される。例えば、ヒートマップにおいて画像主点確率の最大値が画像主点の真値と一致しない場合でも、画像主点画素の真値の近傍に画像主点確率が最大となる画素があれば、概略、画像主点の真値と同じ画像主点の座標が得られる。
 なお、上述したように、ヒートマップ500において環状の領域内に注目画素を設定して画像主点を推定する場合、学習部16は、式(1)のrの範囲をr1~r2(<R)に設定すればよい。
 式(1)に示す画像主点誤差J(H、Cx、Cy)は、例えば、ε(r、θ、H、Cx、Cy)とε´(r、H、Cx、Cy)との二乗誤差で表現されているが、これは一例であり、ε(r、θ、H、Cx、Cy)とε´(r、H、Cx、Cy)とのHuber誤差で表現されてもよい。Huber誤差は、0.5より小さい絶対値誤差に対して2乗誤差、0.5以上の絶対値誤差に対しては1乗誤差で表現される誤差である。その他、画像主点誤差J(H、Cx、Cy)は、ε(r、θ、H、Cx、Cy)とε´(r、H、Cx、Cy)との絶対値誤差など種々の誤差表現手法を用いて表現されてもよい。
 図3のステップS203では、画像主点はx成分とy成分ともに推定されているが、これは一例である。カメラパラメータ算出部13は、x成分、y成分のうち片方の成分のみの画像主点を推定し、他方は設計値を用いても良い。この場合、x成分の設計値は画像の幅(x成分)の1/2の座標が採用され、y成分の設計値は画像の高さ(y成分)の1/2の座標が採用される。
 次に、実施の形態の効果について図5を用いて説明する。ヒートマップ500は、入力された学習画像と同じ画像サイズを有し、各画素が画像主点確率に応じた輝度で表されている。ヒートマップ500は理想的なヒートマップである。そのため、ヒートマップ500は、画像主点Pxが中心に位置し、画像主点Pxから離れるにつれて画像主点確率が低くなっている。すなわち、ヒートマップ500は、画像主点確率が最大の画素が中心に位置すると共に、画像主点確率が同心円状に分布している。
 しかし、実際に学習モデルが生成する多くのヒートマップはノイズを含んでおり、画像主点確率の分布は綺麗な同心円状になるとは限らない。
 本実施の形態は、式(1)に示すように、画像主点誤差J(H、Cx、Cy)を用いて、学習モデルが機械学習されている。すなわち、ヒートマップが示す画像主点確率の分布を考慮して推定画像主点が画像主点の真値に近づくように学習モデルは機械学習されている。そのため、ヒートマップに画像主点誤差を不正確に表す画素が多少含まれていても、画像主点Pxを精度よく推定し得る学習モデルが得られる。その結果、本実施の形態は、画像を学習モデルに入力して画像主点Pxを直接求める回帰の手法と比較して、高精度に画像主点Pxを推定することができる。これにより、本実施の形態は、1枚の画像から高精度に画像主点を推定することができる。
 (変形例)
 本開示は以下の変形例が採用できる。
 (1)上記実施の形態では、ヒートマップを構成する各画素の尤度として画像主点確率が採用されたが、これは一例である。ヒートマップを構成する各画素の尤度として、画像の歪の大きさが採用されてもよい。画像主点は光軸対称のカメラモデルにおける歪が0となる基準位置の意味合いがある。すなわち、画像主点確率の代わりに、歪の大きさを推定することで、実施の形態1と同様に画像主点を推定できる。
 (2)上記実施の形態において、画像主点に加えてさらに別のカメラパラメータを採用する場合、学習部16は、画像主点に加えて別のカメラパラメータが対応付けられた学習画像を用いて学習モデルを学習すればよい。別のパラメータの一例は、上述したように、カメラ2の回転角を示すパラメータ、カメラ2の並進を示すパラメータ、及びカメラ2のイメージセンサの画素ピッチなどである。
 (3)以上、本開示の一つまたは複数の態様に係るカメラパラメータ算出装置1について、実施の形態に基づいて説明したが、本開示は、この実施の形態に限定されるものではない。本開示の趣旨を逸脱しない限り、当業者が思いつく各種変形を本実施の形態に施したものや、異なる実施の形態における構成要素を組み合わせて構築される形態も、本開示の一つまたは複数の態様の範囲内に含まれてもよい。
本開示のカメラパラメータ算出装置は、カメラの校正において有用である。

Claims (9)

  1.  カメラで撮影された画像を取得する取得部と、
     前記取得部に取得された画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを生成し、生成した前記ヒートマップに基づいて前記カメラのカメラパラメータを算出するカメラパラメータ算出部と、を備え、
     前記学習モデルは、入力された学習画像から生成したヒートマップが示す推定画像主点が、前記推定画像主点に対応する真値に近づくように機械学習されたモデルである、
     カメラパラメータ算出装置。
  2.  前記カメラパラメータ算出部が算出した前記カメラパラメータを出力するカメラパラメータ出力部をさらに備える、
     請求項1記載のカメラパラメータ算出装置。
  3.  前記学習モデルは、前記尤度が同心円状に分布するヒートマップを出力するように機械学習される、
     請求項1又は2記載のカメラパラメータ算出装置。
  4.  前記学習モデルは、注目画素の前記尤度と、前記真値を中心とする円であって前記注目画素を通る前記円の円周上の画素の前記尤度の平均値と、の差を、最小化するように、機械学習される、
     請求項1又は2記載のカメラパラメータ算出装置。
  5.  前記学習モデルの学習過程において前記学習モデルから出力された前記ヒートマップをディスプレイに出力するヒートマップ出力部をさらに備える、
     請求項1又は2記載のカメラパラメータ算出装置。
  6.  前記尤度は、画像主点確率又は歪みである、
     請求項1又は2記載のカメラパラメータ算出装置。
  7.  前記カメラパラメータは、前記画像主点である、
     請求項1又は2記載のカメラパラメータ算出装置。
  8.  コンピュータが、
     カメラで撮影された画像を取得し、
     取得された画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを生成し、生成した前記ヒートマップに基づいて前記カメラのカメラパラメータを算出し、
     前記学習モデルは、入力された学習画像から生成したヒートマップが示す推定画像主点が、前記推定画像主点に対応する真値に近づくように機械学習されたモデルである、
     カメラパラメータ算出方法。
  9.  コンピュータに、
     カメラで撮影された画像を取得し、
     取得された画像を学習モデルに入力することにより、各画素が画像主点の尤度で表されたヒートマップを生成し、生成した前記ヒートマップに基づいて前記カメラのカメラパラメータを算出する、処理を実行させ、
     前記学習モデルは、入力された学習画像から生成されたヒートマップが示す推定画像主点が、前記推定画像主点に対応する真値に近づくように機械学習されたモデルである、
     カメラパラメータ算出プログラム。

     
PCT/JP2023/040439 2022-11-11 2023-11-09 カメラパラメータ算出装置、カメラパラメータ算出方法、カメラパラメータ算出プログラム WO2024101429A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022-180908 2022-11-11
JP2022180908 2022-11-11

Publications (1)

Publication Number Publication Date
WO2024101429A1 true WO2024101429A1 (ja) 2024-05-16

Family

ID=91032525

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2023/040439 WO2024101429A1 (ja) 2022-11-11 2023-11-09 カメラパラメータ算出装置、カメラパラメータ算出方法、カメラパラメータ算出プログラム

Country Status (1)

Country Link
WO (1) WO2024101429A1 (ja)

Similar Documents

Publication Publication Date Title
US9420276B2 (en) Calibration of light-field camera geometry via robust fitting
JP6764533B2 (ja) キャリブレーション装置、キャリブレーション用チャート、チャートパターン生成装置、およびキャリブレーション方法
US8355565B1 (en) Producing high quality depth maps
JP6079333B2 (ja) 校正装置、方法及びプログラム
JP6394005B2 (ja) 投影画像補正装置、投影する原画像を補正する方法およびプログラム
WO2016065632A1 (zh) 一种图像处理方法和设备
US10733705B2 (en) Information processing device, learning processing method, learning device, and object recognition device
JP5075757B2 (ja) 画像処理装置、画像処理プログラム、画像処理方法、および電子機器
US10540784B2 (en) Calibrating texture cameras using features extracted from depth images
CN106815869B (zh) 鱼眼相机的光心确定方法及装置
JP2015128242A (ja) 画像投影装置及びそのキャリブレーション方法
JP6045523B2 (ja) 画像処理装置およびその制御方法
EP3523777A1 (en) System and method for rectifying a wide-angle image
US8340399B2 (en) Method for determining a depth map from images, device for determining a depth map
JP2011155412A (ja) 投影システムおよび投影システムにおける歪み修正方法
WO2020092051A1 (en) Rolling shutter rectification in images/videos using convolutional neural networks with applications to sfm/slam with rolling shutter images/videos
JP2010217984A (ja) 像検出装置及び像検出方法
US20120038785A1 (en) Method for producing high resolution image
WO2024101429A1 (ja) カメラパラメータ算出装置、カメラパラメータ算出方法、カメラパラメータ算出プログラム
CN111353945B (zh) 鱼眼图像校正方法、装置及存储介质
JP2018044942A (ja) カメラパラメータ算出装置、カメラパラメータ算出方法、プログラム、及び記録媒体
KR100945555B1 (ko) 증강현실 공간을 제공하는 장치 및 방법
JP4548228B2 (ja) 画像データ作成方法
JP5955003B2 (ja) 画像処理装置および画像処理方法、プログラム
US11847784B2 (en) Image processing apparatus, head-mounted display, and method for acquiring space information