Automatic calibration method and apparatus for focal length using CNN regression on depth white line images

The use of CNN regression with CG images from a CAVE model automates focal length estimation in virtual production, addressing inefficiencies in manual calibration and lens aberrations, achieving high precision and cost-effectiveness.

JP2026185497APending Publication Date: 2026-11-27HOEIKK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025082677
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-05-16
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Estimating focal length in virtual production is time-consuming and challenging due to lens aberrations, requiring manual calibration methods that are inefficient and prone to errors, especially with wide-range focal length changes and complex image scenes.

Method used

Utilizing CNN regression with CG images generated from a CAVE model to automate focal length estimation, incorporating lens aberration distortion parameters, and reducing the need for extensive training data collection by employing data augmentation techniques.

Benefits of technology

Achieves high-precision focal length estimation in virtual production, even with lens aberration distortion, by automating the process and significantly reducing the time and cost of training data collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026185497000001_ABST
    Figure 2026185497000001_ABST
Patent Text Reader

Abstract

The objective is to enable highly accurate estimation of camera focal length for virtual production, even for images containing lens aberrations and distortions. [Solution] The focal length of camera 200 for virtual production is estimated by CNN regression using a set of multiple depth white line images 100 times. For training and evaluation images, CG images are used in which arbitrary texture images are applied inside a CAVE (cave) model 300 generated by OpenGL. The position of camera 200 is fixed, and these are multiple rotated images with arbitrary pan-tilt rotation applied to an arbitrary fixed focal length. By defining a virtual radial lens aberration distortion parameter curve based on the focal length, the focal length can be estimated even for images containing lens aberration distortion, and the accuracy of focal length estimation is improved compared to images without lens aberration distortion.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] This invention relates to an automatic calibration method and apparatus for the focal length of a group of depth white line images using CNN regression. [Background technology]

[0002] [Estimating Focal Length in Virtual Production] Virtual production, also known as a virtual studio, is a system that replaces all scenes with computer graphics (CG) without bringing actual art sets into the studio. Blue screens and green screens are replaced with CG-created virtual sets, creating a virtual space. The coordination of actual cameras with virtual sets allows for effects that would be impossible with a real studio set.

[0003] At this point, the actual focal length and camera parameters representing the camera's movement are needed for CG rendering. Estimating these camera parameters is called "camera calibration," and it is a major problem in computer vision, with various methods being studied for a long time.

[0004] Camera parameter estimation in virtual production has been commercialized using various sensor technologies and image recognition [Patent Document 1][Patent Document 2][Patent Document 5]. In particular, for internal parameters such as focal length (FOV, Field of View), in the case of zoom lenses, the position of the zoom ring is output as an encoder value, so calibration is often performed in advance according to that encoder output. On the other hand, for external parameters, camera position and rotation parameters must be estimated in real time.

[0005] Various methods have been proposed for camera rotation calibration, including a feature point-based method [Non-Patent Document 10] which estimates the rotational projection transformation matrix by performing feature point extraction such as SIFT [Patent Document 3][Patent Document 4][Non-Patent Document 11][Non-Patent Document 14][Non-Patent Document 3], then associating feature points between images using RANSAC [Non-Patent Document 8], and then determining the focal length by decomposing it; a pixel-based method [Non-Patent Document 20] which uses the Lucas-Kanade method [Non-Patent Document 15][Non-Patent Document 2] to calculate the pixel value gradient and minimize the squared difference between two images using the Gauss-Newton method [Non-Patent Document 13] to calculate the projection transformation matrix; and a method using a reference plate with a black and white checkerboard pattern attached [Non-Patent Document 16][Non-Patent Document 23].

[0006] Furthermore, actual cameras exhibit distortion caused by lens aberrations. This distortion converts straight lines into curves, and methods for calibrating computer vision, including distortion parameters, have been proposed [Non-Patent Literature 4][Non-Patent Literature 22][Non-Patent Literature 23]. However, the purpose of these methods was "distortion correction," which returns curves caused by distortion back to straight lines.

[0007] In virtual production, it is necessary to perform "distortion transformation" to reflect the distortion caused by the actual camera in the CG. Therefore, this differs in purpose from conventional methods known for computer vision calibration that include distortion parameters [Non-Patent Literature 4][Non-Patent Literature 22][Non-Patent Literature 23], and from methods for "distortion correction" that return distorted curves to straight lines.

[0008] The inventors have empirically estimated the focal length by photographing long, straight scenes such as corridors and using trial-and-error methods to determine the focal length [Figure 2]. As shown in Figure 2, the camera is mounted on a tripod to fix its position, a measuring tape is placed on the floor in front of the camera position, and the focal length is determined so that the position of the measuring tape does not shift even when the camera is rotated using the pan and tilt functions while changing the focal length. Figure 2 shows an example image of the actual depth white line 100, and the green line 110 is a CG guide superimposed to show how well it matches the white line. [Prior art documents] [Patent Documents]

[0009] [Patent Document 1] US006122013A, M. Tamir, A. Sharir, Chromakeying system, Date of Patent: Sep. 19, 2000. [Patent Document 2] US006556722B1,RTRussell,GAThomas,Positiondetermination,DateofPatent:Apr.29,2003. [Patent Document 3] US6,711,293B1,DavidG.Lowe,METHODANDAPPARATUSFORIDENTIFYINGSCALEINVARIANTFEATURESINANIMAGEANDUSEOFSAMEFORLOCATINGANOBJECTINANIMAGE,DateofPatent:Mar.23,2004 [Patent Document 4] US2009 / 0238460A1,RyujiFunayama,HiromichiYanagihara,LucVanGool,TinneTuytelaars,HerbertBay,ROBUSTINTERESTPOINTDETECTORANDDESCRIPTOR,DateofPatent:Sep.24,2009 [Patent Document 5] US20190206072A1,MPAGeissler,MPParsley,OPTICALNAVIGATION&POSITIONINGSYSTEM,Pub.Date:Jul.4,2019. [Non-patent literature]

[0010] [Non-Patent Document 1] S. Azizi, S. Kornblith, C. Saharia, M. Norouzi, and D. J. Fleet,SyntheticdatafromdiffusionmodelsimprovesImageNetclassification.ArXiv,abs / 2304.08466(2023). [Non-Patent Document 2] S.BakerandI.Matthews,Lucas-Kanade20yearson:Aunifyingframework,InternationalJournalofComputerVision,56-3(2004),221?255. [Non-Patent Document 3] G. Bradski, K. Konolige, V. RabaudandE. Rublee, ORB:AnefficientalternativetoSIFTorSURF,2011IEEEInternationalConferenceonComputerVision(ICCV2011),Barcelona,2011,pp.2564?2571. [Non-Patent Document 4] DCBrown, Close-range camera calibration, Photogrammetric Engineering, 37(1971), 855?866. [Non-Patent Document 5] MBBrownandA.B.Forsythe,Robusttestsfortheequalityofvariances,JournaloftheAmericanStatisticalAssociation,69-346(Jun.1974),364?367.

Wood 6

Waterfall 7

Fashion 8

Number 9

Wood 10

Fashion 11

Non-licensed Document 18

Non-licensed Document 19

Non-licensed Document 20

Non-licensed Document 21

Non-licensed Document 22

Non-licensed Document 23

[0011] It is known that estimating focal length (or equivalently, FOV (Field of View)) by eye is time-consuming. This process involves gradually changing the focal length, panning the camera, and checking the degree of alignment with the superimposed CG line used as a guide, while performing calibration by eye. In the case of lenses with a wide range of focal length changes, such as zoom lenses, this process must be repeated while changing the zoom.

[0012] Various methods have been used to attempt to automate calibration. These methods involve matching multiple images to calculate the geometric relationships between them, which are generally represented as a transformation matrix. This matrix can then be decomposed to determine individual camera parameters such as focal length. When a camera is fixed in position by a tripod and only performs pan-tilt rotation, the relationship between two images is described by a rotational projection transformation matrix.

[0013] However, determining the transformation matrix is ​​often extremely difficult. Feature-point-based methods extract feature points from scene images used for calibration using features extraction processes such as SIFT, but matching these points between images is challenging. Even with matching techniques like RANSAC, mismatches are often unavoidable depending on the image scene.

[0014] This is also true for pixel-based methods using the Lucas-Kanade algorithm. Fundamentally, if the scene image lacks easily distinguishable features from other pixels, it's impossible to calculate the correct transformation matrix.

[0015] One method that has recently attracted attention as a way to solve such image matching problems is a machine learning-based method. In the case of camera focal length calibration, various scene images to be calibrated and the true focal length values ​​at those times are used as training data. The focal length is estimated by regressing the resulting feature vectors in a high-dimensional space using a neural network called a fully connected layer, which is classified as "supervised learning." In this invention, this is referred to as "CNN regression." Here, "true focal length" in CG images refers not to the physically accurate focal length provided by the camera or lens, but to the focal length adjusted based on rendering and visual effects. In computer graphics (CG), camera settings can function differently from physical lenses. For example, in 3D rendering, changing the field of view (FOV) can alter the perspective of the image and adjust how objects appear. Therefore, among those skilled in CG technology, the term "true focal length" refers to the calculated angle of view adjustment, not the specifications of a real lens. Some CG software allows users to set parameters similar to those of a real camera, and when combined with physically based rendering (PBR), it is possible to create more realistic images. Specifically, in 3D tools such as Blender and Maya, the field of view and perspective can be reproduced by adjusting the "focal length."

[0016] However, when using supervised learning such as CNN regression, a large amount of training data is required, consisting of various scene images and their corresponding true focal lengths for calibration. Even if the true value is the focal length determined by eye alignment, there are limits to collecting thousands of training data images along with the eye-aligned focal length.

[0017] This invention has been made in view of the above-mentioned problems, and aims to enable high-precision estimation of the focal length of a camera for virtual production, even for images that include lens aberration distortion. [Means for solving the problem]

[0018] The focal length of a camera for virtual production is estimated using CNN regression with a set of 100 images representing depth lines. The training and evaluation images are CG images (Figures 1(a)-(e)) created by applying arbitrary texture images to a CAVE (cave) model 300 generated using OpenGL. The camera 200's position is fixed, and the images are multiple rotated images with arbitrary pan-tilt rotations applied to an arbitrary fixed focal length. By defining a virtual radial lens aberration distortion parameter curve based on focal length, the focal length can be estimated even in images containing lens aberration distortion, and the estimation accuracy is improved compared to images without lens aberration distortion.

[0019] This invention proposes an attempt to automate focal length calibration using CNN regression, a type of supervised learning.

[0020] The biggest problem with supervised learning is the collection of training data. One possible solution to this problem is data augmentation by performing actions such as flipping, rotating, geometric transformation, brightness and color transformation, smoothing, and noise addition on a small number of training images. However, these simple methods, while applicable to so-called image recognition—classification problems that determine what objects are in an image—may not be applicable to regression problems that calculate focal length from an image.

[0021] In recent years, it has been possible to generate images using generative AI, which has attracted considerable attention [Non-Patent Literature 12][Non-Patent Literature 1][Non-Patent Literature 21]. Images generated by generative AI can be so realistic that they are indistinguishable from real photographs, but it has not been possible to generate multiple images of the same scene by specifying focal length (FOV) or camera rotation parameters.

[0022] Therefore, we consider generating training data using CG images [Non-Patent Literature 9][Non-Patent Literature 18][Non-Patent Literature 17]. However, many of these generate 3D objects for image recognition classification problems rather than scene images. Generating CG images requires considerable time and cost, starting with the creation of 3D models. Generating scene images takes incomparably more time and cost than generating single objects.

[0023] In this invention, we propose reducing the time and cost required for data collection by using CG images in which arbitrary texture images are applied inside a simple CAVE (cave) model generated by OpenGL, for both training data and evaluation data [Figure 1]. [Effects of the Invention]

[0024] This invention makes it possible to estimate the focal length of a camera for virtual production with high accuracy, even for images that include lens aberration distortion. Furthermore, by using a simplified CAVE (cave) model generated with OpenGL, the time and cost required to collect training images (CG images generated using the true focal length) for CNN regression and evaluation images to assess them can be significantly reduced and automated. Furthermore, automatic feature extraction using CNNs is expected to improve image matching performance compared to conventional methods using feature points or pixel value gradients. Furthermore, it becomes possible to estimate the focal length even if lens aberration distortion is present. The CNN automatically acquires image features of lens aberration distortion, improving the estimation accuracy. [Brief explanation of the drawing]

[0025] [Figure 1] This diagram illustrates the generation of depth white line images using the CAVE (cave) model of the present invention. By applying randomly selected textures [Non-Patent Literature 6] to the five surfaces of the inside of a rectangular parallelepiped—the floor, ceiling, both walls, and depth—a set of five CG images is rendered using OpenGL with a fixed camera position, an arbitrary fixed focal length, and arbitrary pan-tilt rotation. [Figure 2] This diagram shows an example of an actual depth-of-field image with white lines. The green lines are computer-generated guides, superimposed to show how well they match the white lines. [Figure 3] This is a block diagram of a CNN regression network used to estimate focal length as FOV. [Figure 4] This is a diagram illustrating the concept of a convolutional layer. [Figure 5] This diagram illustrates the processing of the batch normalization layer. [Figure 6] This diagram illustrates the concept of a Max pooling layer that outputs the maximum value of 2x2 surrounding pixels. [Figure 7] This diagram illustrates the graph of the activation function, where α = 0.1 is assumed for Leaky ReLU. [Figure 8] This figure illustrates the algorithm procedure for calculating inverse distortion coordinate values ​​using Newton's method [Non-Patent Document 7]. [Figure 9] (a) is an example of a virtual lens aberration distortion parameter curve with respect to focal length. The horizontal axis is focal length, and the vertical axis is radial distortion parameters k1 and k2. (b) shows distortion images at both ends of the parameter curve for wide-angle (barrel distortion) using a black and white checkerboard pattern image for easier visualization of distortion, and (c) shows distortion images at both ends of the parameter curve for telephoto (pincushion distortion) using a black and white checkerboard pattern image for easier visualization of distortion. [Figure 10]This figure illustrates the results of estimating focal length using a set of depth-of-field white line images. (a) to (c) show the case without lens aberration distortion, and (d) to (f) show the case with lens aberration distortion. Each figure represents the results of 5 training iterations with 200 epochs and a batch size of 64. (a) and (d) show examples of training curves, (b) and (e) show residual histograms of the FOV inference result of the evaluation image with the true value based on all training results, and (c) and (f) explain the respective QQ plots. [Figure 11] This figure illustrates the change in the unbiased variance of the evaluation image for a CNN layer. More specifically, it shows the change in the unbiased variance of the inference result of the evaluation image with lens aberration distortion when a CNN layer without a Max pooling layer is added after the CNN layer processing result, which ultimately became 80 × 45 × 128 channels. [Figure 12] This figure illustrates an example of a real-world image experiment. Calibration was performed using five depth-of-field white line images captured with an actual camera that had been calibrated by eye alignment. For training the CNN regression with five extended CNN layers added without a Max pooling layer, CG images rendered using Brainstorm's eStudio® were used, based on the lens aberration distortion parameter curve of an actual camera. With five extended CNN layers, the focal length inference result was 60.162 as a horizontal FOV value, while the result from eye alignment was 59.888. Using Zhang's method [Non-Patent Literature 23], the result was 61.521 (five HD input images, aspect ratio 1, optical axis point (principal point) at the center of the image, and only lens aberration distortion parameters k1 and k2 were estimated). [Figure 13] This is a schematic diagram illustrating the relationship between focal length and distance to the subject. [Modes for carrying out the invention]

[0026] This invention is characterized by replacing conventional feature point-based or pixel-based image matching with automatic generation of inter-image features using high-dimensional feature vectors extracted by a CNN, and by generating and using CG images using a simple CAVE model to address the biggest challenge in supervised learning: collecting a large number of training and evaluation images.

[0027] In this invention, CNN regression is used to estimate the focal length, and a set of multiple CG images rendered using OpenGL are used as training images and evaluation images. A depth white line model (hereinafter referred to as the "CAVE model") is created by applying randomly selected textures [Non-Patent Literature 6] to the five surfaces of the inside of a rectangular prism model, such as the floor, ceiling, both walls, and depth shown in [Figure 1], and drawing white lines on the floor. With the camera position fixed, five images are used as input images, each with an arbitrary fixed focal length and arbitrary pan-tilt rotation.

[0028] In order to realize the above-mentioned characteristic configuration of the present invention, important elemental technologies are: • Multiple images scaled down while maintaining the aspect ratio of the original image resolution, with a fixed camera position, an arbitrary fixed focal length, various lens aberration distortion parameter curves depending on the focal length, and CG generation with pan-tilt rotation to create training images and evaluation images. CNN layer processing consisting of multiple cascaded connections of convolutional layers, batch normalization layers, activation functions, and Max pooling layers. • Flattening process by raster scanning and concatenating the output images of the CNN layer. • Fully connected layer processing that estimates focal length by regressing flattened high-dimensional feature vectors. We can list some examples.

[0029] [CNN Regression] Figure 3 is a block diagram of a CNN regression network for estimating focal length as FOV. Since the original HD resolution images cannot fit into GPU memory, five color images scaled down to 320x180 pixels while maintaining a 16:9 aspect ratio are used as input images, resulting in an input image of 320x180x5x3 channels. These are then convolved with a kernel size of 3x3, followed by batch normalization, and the image size is halved using Max pooling. The number of channels is expanded from 15 to 64.

[0030] The ReLU activation function was used. Further processing was then performed, and finally, the CNN layer processing result, which was 80×45×128 channels, was flattened to obtain a 460,800-dimensional feature vector. This was input into a fully connected layer, and the focal length was estimated as the field of view (FOV) through regression processing. Leaky ReLU was used as the activation function in the fully connected layer.

[0031] In Figure 3, since multiple HD images cannot be loaded into the GPU memory, five scaled-down color images with the same aspect ratio are used as input images. The output of the CNN layer that automatically extracts image features is flattened, and the high-dimensional feature vector is input to a fully connected layer for regression processing, finally outputting the FOV (focal length).

[0032] Therefore, the individual processes of CNN regression will be explained in order below.

[0033] [Convolutional layer] For simplicity, if we have 1 channel for image input, 1 channel for the convolution kernel, and 1 channel for image output, the convolution layer will take the pixel values ​​of the input layer as x i,j , the pixel values ​​of the convolutional layer are y i,j Therefore, the mathematical formula is as follows:

[0034]

number

[0035] Here, ω k,lis the weight coefficient, and b is the bias term. These are estimated from training image data as unknown parameters. The convolutional kernel consisting of the weight parameters is 3x3, and together with the bias term b, there are 10 unknown parameters. ReLU is placed as the activation function at the output of each convolutional layer. The output of the convolutional layer is called a "feature map". Figure 4 shows a conceptual diagram of the convolutional layer. Furthermore, in [Equation 1] and Figure 4 above, i and j are variables representing pixel positions, and k and l are variables representing the range to be convolution performed.

[0036] [Batch normalization layer] The batch normalization layer processing is as follows (see Figure 5): 1. Input x i Calculate the mean and variance for each mini-batch (where i=1, ..., m), where m is an arbitrary integer. 2. Normalize using the mean and variance for each mini-batch. Here, ε added to the denominator represents an infinitesimal value, and the variance

[0037]

number

[0038]

number

[0039] [Max pooling layer] After connecting several convolutional layers, a Max pooling layer is used to output, for example, the maximum value of a 2x2 peripheral pixel, thereby creating a reduced image with fewer pixels. Figure 6 shows a conceptual diagram of a Max pooling layer that outputs the maximum value of a 2x2 peripheral pixel. The image size is halved both horizontally and vertically. Specifically, the maximum value of 42 from the top left square pixel values ​​15, 42, 9, 0 on the left side of Figure 6 is output to the top left pixel value 42 on the right side; the maximum value of 10 from the top right square pixel values ​​10, 9, 3, 6 on the left side of Figure 6 is output to the top right pixel value 10 on the right side; the maximum value of 120 from the bottom left square pixel values ​​66, 88, 110, 120 on the left side of Figure 6 is output to the bottom left pixel value 120 on the right side; and the maximum value of 61 from the bottom right square pixel values ​​61, 32, 7, 0 on the left side of Figure 6 is output to the bottom right pixel value 61 on the right side.

[0040] [Nonlinear activation function] The nonlinear activation function uses ReLU at the output of each convolutional batch normalization layer in the CNN layer, and Leaky ReLU at the output of each fully connected layer in the fully connected regression network. Figure 7 illustrates the graph of the activation function, where α = 0.1 is set for Leaky ReLU. While both activation functions and nonlinear activation functions are used to refer to functions that determine the output of a neuron within a neural network, they are distinguished by the fact that the relationship between input and output is not linear (nonlinear). In other words, within the overall concept of activation functions, a nonlinear activation function specifically refers to a nonlinear function. In this invention, we particularly utilize deactivation functions among activation functions (typically Leaky ReLU).

[0041] [Flattening] This process involves raster scanning the final output of the CNN layer (80 x 45 x 128 channels) sequentially from channel 1 and concatenating them. In this case, a 460,800-dimensional feature vector is obtained. This feature vector is thought to contain information about the correspondence between the five input images.

[0042] [Fully connected layer] Assuming that the flattened feature vector is an input vector x=(x1,···,x 460,800 ) to the input layer of the fully connected layer, a node y in the next intermediate layer (also referred to as a hidden layer) of the input layer β is expressed as the following mathematical expression.

[0043] [Mathematical formula] Here,

[0044] [Mathematical formula] is a weight parameter in the fully connected layer, and b β is a node y β is a bias term at. Similar to the convolutional layer, these are estimated from training image data as unknown parameters. A Leaky ReLU is arranged as an activation function in an output section of each fully connected layer.

[0045] [Generation of radial lens aberration distortion image] FIG. 8 is a diagram for explaining an algorithm procedure [Non-Patent Document 7] for calculating an inverse distortion coordinate value by the Newton method. FIG. 9 is (a) an example of a virtual lens aberration distortion parameter curve according to a focal length. The horizontal axis represents the focal length, and the vertical axis represents radial distortion parameters k1 and k2. For easy viewing of distortion, (b) shows a wide-angle (barrel) distortion image using a black-and-white checkerboard pattern image, and (c) shows a telephoto (pincushion) distortion image at both ends of a parameter curve using a black-and-white checkerboard pattern image.

[0046] In order to generate a geometric transformation (rotation, enlargement / reduction, affine transformation, projective transformation, etc.) of an image, an inverse transformation of the transformation is required. Distortion is also one of transformations, and is represented by the following expression according to the distance from an image optical axis point (principal point) [Non-Patent Document 4].

[0047] [Mathematical formula]

[0048] This is called "radial distortion," and it is the dominant distortion in lens aberrations. r is the distance from the optical axis of the image, and its subscript u indicates no distortion (undistortion), while d indicates distortion (distortion).

[0049] When generating a distorted image or correcting a distorted image, the inverse function coordinate values ​​for each pixel of the above number [3] are required, but this is because r u We must solve a quintic equation relating to . We will solve this using Newton's method. Figure 8 shows the procedure for the algorithm that calculates the inverse distortion coordinate values ​​using Newton's method.

[0050] Radial lens aberration distortion changes depending on the focal length. If the horizontal axis is focal length and the vertical axis is radial distortion parameters k1 and k2, then for wide-angle lenses, the distortion is barrel-shaped as shown in Figure 9(b), and for telephoto lenses, it is pincushion-shaped as shown in Figure 9(c). Figure 9 is a diagram illustrating an example of a hypothetical lens aberration distortion parameter curve depending on the focal length. Depending on the focal length, k1 and k2 are determined by this parameter curve and a distorted image is generated. For clarity of distortion, distorted images at both ends of the parameter curves for wide-angle (barrel-shaped) and telephoto (pincushion-shaped) lenses are shown as a black and white checkerboard pattern image.

[0051] Here, the parameter curve refers to the curve shown in the graph of Figure 9(a) that shows the values ​​of the distortion parameters k1 and k2 with respect to focal length, and the distorted images generated using the values ​​of k1 and k2 at both ends (left and right ends) of that parameter curve are shown in Figures 9(b) and 9(c). The image in Figure 9(b) is the distorted image due to the values ​​of the distortion parameters k1 and k2 at the left end of the parameter curve shown in Figure 9(a), and the image in Figure 9(c) is the distorted image due to the values ​​of the distortion parameters k1 and k2 at the right end.

[0052] CAVE (cave) images generated by OpenGL are distorted using distortion parameters k1 and k2 corresponding to the focal length. The focal length is determined as FOV (deg) using a uniformly distributed random number in the interval [20, 50]. This corresponds to the interval [193, 510]. The pan-tilt rotation angles (deg) are determined using uniformly distributed random numbers in the intervals [-20, 20] and [-5, 5], respectively, and a set of 5 images is used as the input image. Evaluation images are generated in the same manner as the training images.

[0053] Figure 10 illustrates the results of estimating focal length using a set of depth white line images. (a) to (c) show the case without lens aberration distortion, and (d) to (f) show the case with lens aberration distortion. 1000 sets of 5000 images were used for training, and 400 sets of 2000 images were used for evaluation, which were different from the training images. The loss function was smoothing L1, and the Adam algorithm was used for optimization. Each result is from 5 training iterations with 200 epochs and a batch size of 64. For inference after training, the weight parameters that minimized the loss function value of the evaluation images were used.

[0054] (a) and (d) show examples of learning curves, (b) and (e) show residual histograms of the FOV inference results of evaluation images with the true value based on all learning results, and (c) and (f) explain the respective QQ plots. In both the skewed and unskewed cases, the residual histograms were determined not to be normally distributed by the Shapiro-Wilk test [Non-Patent Literature 19], so the Brown-Forsyth test [Non-Patent Literature 5] was performed, and it was determined that the variances of the skewed and unskewed cases were different. The mean for the unskewed case was -0.127 and the unbiased variance was 11.71, while the mean for the skewed case was 0.162 and the unbiased variance was 4.53. Clearly, the skewed case has less variability and shows improved accuracy. This is presumed to be due to the acquisition of skewed features through learning by the CNN.

[0055] Figure 11 illustrates the change in unbiased variance of evaluation images for a CNN layer. More specifically, it shows the change in unbiased variance of the inference results for evaluation images with lens aberration distortion when a CNN layer without a Max pooling layer is added after the CNN layer processing result, which ultimately became 80 × 45 × 128 channels. The scale of the graph in Figure 11 is log-log, and the point plotted on the far left of the graph represents the result of the network without an extended CNN layer without a Max pooling layer. Subsequently, the extended CNN layer was increased one layer at a time. Each point represents the result after 5 training iterations. As can be seen from Figure 11, the unbiased variance (Test Loss Unbiased Variance) decreases as the number of CNN layers (Parameters) increases. Such a power law is known to be observed in deep learning, including LLMs (Large-Scale Language Models) and CNNs.

[0056] Figure 12 illustrates an example of a real-image experiment. In Figure 12, calibration was performed using five depth white line images (a) to (e) taken with an actual camera that had been calibrated by eye alignment. Furthermore, for training a CNN regression with five extended CNN layers added without a Max pooling layer, a CG image rendered using Brainstorm eStudio® (https: / / www.brainstorm3d.com / products / estudio / ) was used, based on the lens aberration distortion parameter curve of an actual camera. The focal length inference result was 60.162 as a horizontal FOV value with five extended CNN layers, while the result from eye alignment was 59.888. Using Zhang's method [Non-Patent Literature 23], the result was 61.521 (five HD input images, aspect ratio 1, optical axis point (principal point) at the center of the image, and only lens aberration distortion parameters k1 and k2 were estimated).

[0057] When calibrating an unknown lens, this can be addressed by training the system using training images and evaluation images generated from various lens aberration distortion parameter curves based on focal length.

[0058] [Focal length and FOV] Focal length is a characteristic of a lens. It is the distance between the lens and the sensor plane, and is determined when the lens is focused on an object at infinity. When used as a sensor, the unit is usually expressed in [mm]. FOV (Field of View) refers to the field of view, which is the maximum area of ​​the scene that a camera can focus on / capture, and is expressed in degrees. It can be expressed horizontally, vertically, or diagonally. It is sometimes also called "angle of view." The conversion between focal length f and FOV angle α can be done as follows:

[0059]

number

[0060]

number

[0061] (Other configurations, etc., for realizing the functions of the present invention) While CNN regression training can be performed on a local server, GPU memory limitations prevent direct input of the original image resolution, such as 1920x1080 pixels (digital terrestrial HD resolution), into the network. By using cloud servers with larger computing resources such as GPU memory, it will be possible to use input images with a size of 320 x 180 pixels or larger for training. Furthermore, by increasing the number of layers in the CNN, it is expected that more detailed feature vectors can be obtained, which is expected to enable more accurate estimation of focal length.

[0062] While inference using weight parameters from training results can be performed via software on a CPU or GPU, hardware implementation and execution using FPGAs or custom ASICs is also possible, which can lead to improved processing speed. Furthermore, it is expected that increasing the number of input images, similar to expanding the resolution of input images and expanding the CNN layers, will increase the amount of information and improve the accuracy of focal length estimation.

[0063] (supplementary explanation) As described above, the result of automatically extracting image features using a convolutional neural network (CNN) is a high-dimensional feature vector. In the above embodiment, it is described as a 460,800-dimensional vector, but it is not limited to 460,800 dimensions and can be any high-dimensional vector. Furthermore, a typical example is shown in which five images are input to the CNN, and the image features (same as inter-image features) obtained as a result of processing a set of five images with the CNN are output as a high-dimensional feature vector.

[0064] Furthermore, deep learning using CNNs (and machine learning in general) typically consists of the following two phases. 1. Training phase using pre-training images and evaluation images. 2. Inference phase using unknown input images Both the training images and evaluation images used in the learning phase are computer graphics rendered using OpenGL. Training images and evaluation images can be considered separate and independent images. Specifically, the training images and evaluation images are CG images that have different textures applied to them and are rendered using different camera parameters (focal length, camera position, camera rotation (pan and tilt angles)). Here, camera parameters generally refer to focal length, distortion parameter, camera position, and camera rotation. However, in this invention, the distortion parameters k1 and k2 are determined from a distortion parameter curve (Figure 9) defined by the focal length, as explained in paragraphs

[0050] to

[0052] above. Therefore, in this invention, the distortion parameter is not a value determined by a uniform random number, while other camera parameters, excluding the distortion parameter, use values ​​set by uniform random numbers. Furthermore, the camera position is assumed to be fixed.

[0065] The system is trained using training images, and the resulting weight parameters from the CNN processing are used to estimate (infer) the focal length when an evaluation image is input. The plot of the learning error and evaluation error (between the true focal length) at this time is called the residual curve or learning curve, and is shown as graphs (a) and (d) in Figure 10, respectively. In Figure 10, the learning error is shown as "train" and the evaluation error as "eval". Instead of using the training image as input, the CNN weight parameters that minimize the evaluation error when using a different evaluation image as input are considered the best and are used in the inference phase.

[0066] After this learning phase is complete, in the inference phase, a CNN is typically used to process an unknown input image (i.e., a depth scene image taken by a real camera, not a CG image) using the CNN weight parameters that minimize the evaluation error. As a result, the focal length is estimated (inferred) and output. Therefore, the output of the CNN processing result in the inference phase is the estimated (inferred) value of the focal length (or FOV).

[0067] In the learning phase, it is extremely difficult to prepare a large number of actual images (non-CG images) of real-world depth scenes. Therefore, the essential part of this invention is a technological concept that enables the use of CG-generated images as substitute images (training images and evaluation images) for actual depth scene images during the learning phase.

[0068] When generating CG images, both OpenGL and other 3DCG renderers require a CG model and camera parameters. In this invention, the CG model used is a CAVE (cave) model, which, as already explained, is a rectangular prism with a texture (pattern) image applied to its interior. Camera parameters generally refer to focal length (or FOV), camera position, camera rotation (pan and tilt angles), and distortion parameters. When the CAVE (cave) model, which is the CG model, is photographed by a virtual camera in a 3DCG renderer that has been given camera parameters (this process is called rendering), a CG image is generated. Therefore, the focal length given to the 3DCG renderer (typically OpenGL) as a camera parameter when generating the CG image becomes the true focal length.

[0069] Furthermore, the training dataset consists of pairs of five training images and the true focal lengths given to the 3DCG renderer when generating them. In the embodiment described above, training is performed using 1000 pairs (5000 CG images), as explained in Figure 10. In practice, the best CNN weight parameters are determined by using the CNN weight parameters determined by the training images and estimating (inferring) the results using evaluation images different from the training images. Training means determining the best CNN weight parameters so that an estimate of the true focal length for an unknown image can be calculated from such a large training phase dataset (training images and evaluation images (CG images) and their respective focal lengths). The determination of the weight parameters of a CNN can be expressed as shown in equation [Equation 6] below.

[0070]

number

[0071] (Additional supplementary explanation) In this invention, a large training dataset is used. Training is performed using 1000 pairs of CG-generated images (5 images per pair) and their rendered focal lengths (the camera parameters, particularly FOV, are given to the CG renderer). This type of machine learning is specifically called supervised learning. In reality, in embodiments of this invention, 400 pairs (2000 CG-generated images) are used as evaluation datasets, which are different from the training dataset (rendered with different texture images and different camera parameters (particularly FOV)). Here, the training phase dataset refers to the data set for the entire training phase, including training images, evaluation images, and the focal length values ​​of each image. Similarly, the evaluation dataset refers to the data set of training images and their focal length values ​​used in the training stage (not the evaluation stage) of the training phase.

[0072] Using a training dataset of 1000 images, the weight parameters in the CNN are optimized so that the true focal length estimate is obtained, i.e., the loss function value L is minimized (i.e., the training error (train) is minimized). Next, the loss function value L (i.e., evaluation error (eval)) for an evaluation dataset, which is different from the training dataset, is calculated using the CNN weight parameters optimized for the training dataset. Here, the loss function value L for the training images is the training error (train), and the loss function value L for the evaluation images is the evaluation error (eval).

[0073] The CNN weight parameters that minimize the evaluation error are determined as the best ones (i.e., parameters that can calculate an estimate of the true focal length), and these parameter values ​​are used to estimate (infer) the actual focal length in the "2. Inference Phase Using an Unknown Input Image" described above. The CNN weight parameters are optimized using the training dataset by employing iterative gradient descent (specifically, the Adam algorithm, a variation thereof). In the learning phase, the CNN weight parameters are calculated using an iterative gradient method, using the CG image (training image) generated by the CAVE model and the true focal length of the CG image, so as to minimize the training error (train), i.e., minimize the loss function L. Furthermore, during the evaluation phase of the learning phase, the CNN weight parameters obtained during the learning phase are used to calculate the best CNN weight parameters that minimize the evaluation error (eval). In this case, the iterative gradient method is not used in the calculation during the evaluation phase. More specifically, the loss function value L is calculated using the evaluation image as the input image, with each CNN weight parameter estimated at each iteration during the learning phase immediately preceding the evaluation phase. This calculation of the loss function value L in the evaluation phase is an inference (estimation) process, and the iterative gradient method is not used in this case. The learning phase consists of estimating CNN weight parameters using iterative gradient descent with training images and their true focal lengths (learning stage), and inference using evaluation images and their true focal lengths (evaluation stage). In the evaluation phase of the inference (estimation) accuracy during the learning phase, the same inference (estimation) processing calculations are performed as in the subsequent inference phase. However, while the inference phase uses an unknown image as input to infer the focal length of that unknown image, the evaluation phase does not use an unknown image. Although not explicitly explained, the CNN weight parameters are estimated using iterative gradient descent from training images and their true focal lengths (i.e., the training phase of the training phase). Then, using the CNN weight parameters at that time, inference (estimation) is performed using evaluation images different from the training images and their true focal lengths (i.e., the evaluation phase of the training phase), and the evaluation error is calculated as a result. To reiterate, the iterative gradient method is used only during the learning phase of the learning process. During the learning phase, each time a CNN weight parameter can be calculated during the learning phase, it is recalculated in the evaluation phase, and the learning and evaluation phases are repeated until the best CNN weight parameters are found. Therefore, the evaluation phase, which is performed each time a CNN weight parameter is calculated using the iterative gradient method during the learning phase, calculates the best CNN weight parameters that minimize the evaluation error. The steps in the learning phase are detailed as follows: (Step 1) to (Step 3). (Step 1) Calculate the CNN weight parameters using the training images and their true focal lengths by iterative gradient descent. (Step 2) Using the CNN weight parameters calculated by the iterative gradient method described above, the evaluation error is calculated using the evaluation image and its true focal length. (Step 3) Repeat Steps 1 and 2 above a specified number of times for each iteration, and select the CNN weight parameters that minimize the evaluation error to find the best solution. Here, the evaluation error in the above (step 2) is obtained as a result of an inference (estimation) calculation process using the evaluation image and its true focal length. In the inference phase, which follows the learning phase, the input images are actual camera images (unknown images from the perspective of the 3DCG renderer or virtual CG image creator), and typically, a single inference (estimation) process is performed on a set of five images. However, in step 2 of the learning phase, the evaluation images and their true focal lengths can be calculated from, for example, 400 sets of 2000 images. Furthermore, the "iterations" in (Step 3) refer to the iterative gradient method. Step 1 includes processing calculations using the iterative gradient method, where the CNN weight parameters are calculated using the iterative gradient method (Step 1), and the evaluation error is calculated with each iteration (Step 2). The CNN weight parameters that minimize the evaluation error are then considered (determined or deemed) to be the best. Calculating the evaluation error means performing the same calculations as when an unknown image is input and processed (focal length is estimated) in the inference phase, but this time using an evaluation image as the input image (estimates the focal length). Therefore, the evaluation stage of the learning phase also includes calculations similar to those in the inference phase.

[0074] Figures 10(a) and (d) show graphs where the horizontal axis represents the training error (train) using training images and the evaluation error (eval) using evaluation images, respectively, with epochs (number of iterations). From Figures 10(a) and (d), it can be seen that the error decreases as the number of epochs (iterations) increases. Here, the reason we determine the CNN weight parameters that minimize the evaluation error across different evaluation images, rather than minimizing the learning error across training images, and then use these parameter values ​​to estimate (infer) the real focal length in "2. Inference Phase Using Unknown Input Images" is that it contributes to improving the inference performance (accuracy) for unknown input images, and this is called generalization performance.

[0075] The CNN weight parameters that minimize the learning error on the training images naturally result in good fit (inference accuracy) to those training images. However, it is unknown at that point whether the CNN weight parameters that minimize the learning error on the training images will also result in good inference accuracy for unknown input images. It is quite possible that even if the fit (fit (inference accuracy)) to the training images is good, the inference accuracy for unknown input images may not be good. This is called overfitting, a state of excessive fit (fit) to the training dataset due to excessive training, and is considered something that should be avoided when building machine learning-based inference.

[0076] Therefore, after calculating the CNN weight parameters that minimize the learning error based on training images, the parameters are further evaluated using an evaluation dataset consisting of evaluation images different from the training images (however, in this case, the weight parameters are the CNN weight parameters that minimize the learning error based on training images). The CNN weight parameters that minimize the evaluation error (eval) (inference error (loss function value L)) on the evaluation dataset are determined to be the best CNN weight parameters and are used for estimating and inferring the true focal length in reality.

[0077] (Additional supplementary explanation 2) Although some of the above has already been explained or briefly mentioned, additional explanations are provided below for clarification. Furthermore, some explanations may be redundant, but these are considered necessary to more clearly explain the present invention, so they will be described carefully below without hesitation.

[0078] Regarding the relationship between CNN weight parameters, camera parameters, focal length (included in camera parameters), and the best CNN weight parameters to be calculated and determined: Generally, camera parameters refer to focal length, distortion parameters k1 and k2, camera position, and camera rotation (pan and tilt angles). Therefore, focal length is included in the camera parameters. Furthermore, the process of estimating (determining) camera parameters is called camera calibration. In this invention, camera parameters other than the distortion parameters k1 and k2, namely focal length, camera position, and camera rotation (pan and tilt angles), are set using uniformly random values.

[0079] Furthermore, CNN weight parameters refer to all ω in [Equation 1][Equation 2] k,l This refers to the values ​​of (weight coefficients) and b (bias term). Although it is called a CNN, it includes all network parameters mentioned in this book, including the fully connected layer (i.e., all ω in [Equation 1] and [Equation 2]). k,l This refers to (weighting coefficient) and b (bias term). Here, "all networks" for all network parameters (i.e., CNN weight parameters) refers to convolutional neural networks (CNNs), CNN regression networks, fully connected regression networks, and networks without extended CNN layers and without Max pooling layers. To optimize the CNN weight parameters, training is performed using a training dataset, specifically a set of five training and evaluation images generated by a 3DCG renderer (typically OpenGL or eStudio®), along with their corresponding true focal lengths (the actual value given to the 3DCG renderer is the FOV value / ).

[0080] Here, the true focal length (which is actually given to the 3DCG renderer as the FOV value) is the value of the focal length generated by a uniform random number generator, and is the value given to the 3DCG renderer. In this invention, the camera parameters (focal length, camera position, camera rotation (pan and tilt angles)) given to the 3DCG renderer are generated by a uniform random number generator, except for the distortion parameters k1 and k2.

[0081] Furthermore, learning involves determining the CNN weight parameters using a training dataset so that the loss function value L (explained in [Equation 6]) in the evaluation image is minimized (this requires going through both a training phase and an evaluation phase). In this invention, the determined CNN weight parameters are considered the best CNN weight parameters. Since the loss function value L is defined, these can also be understood as the optimal CNN weight parameters in the sense of minimizing the loss function value L. To determine the CNN weight parameters in this learning process, this invention employs an iterative gradient method.

[0082] Regarding the interrelationships between the three technical terms: "image features (same as inter-image features)," "high-dimensional feature vectors," and "CNN weight parameters": In this invention, image features are automatically obtained by inputting an image into a CNN. These image features, represented as vectors, are referred to in this invention as high-dimensional feature vectors.

[0083] As mentioned earlier, the optimal weight parameters of a CNN are determined during the training phase using the training dataset and evaluation dataset. More specifically, all ω in [Equation 1][Equation 2] k,l The values ​​of (weight coefficients) and b (bias term) are determined. When the input image is computed using the determined CNN weight parameters, an image feature vector is obtained. By regressing the feature vector using a fully connected layer, the objective of this invention, which is to estimate the true focal length for an unknown image when an unknown image is input, is inferred and output.

[0084] The estimated true focal length (inferred value) is the estimated output value calculated using the best CNN weight parameters for a real input image during the inference phase after the learning phase, which is the objective of this invention. However, the true focal length (the FOV value actually given to the 3DCG renderer) is a value determined by random numbers along with other camera parameters actually given to the 3DCG renderer. Here, true focal length, in other words, is the focal length given to the 3DCG renderer when generating training images and evaluation images during the learning phase. Furthermore, the true focal length estimate (inference value) is the result of estimating the focal length of a real, unknown input image in the inference phase using the best CNN weight parameters determined in the learning phase. The true focal length is used in the training phase, and in the inference phase, the best CNN weight parameters determined in the training phase are used to input an unknown image captured by an actual camera, and an estimated true focal length for that input image is calculated and output. In other words, what is obtained in the inference phase is an estimated (inferred) value of the focal length. Furthermore, while the true focal length (the FOV value actually provided to the 3DCG renderer) is determined by a uniform random number in this invention, as described above, it is obtained by setting a uniform random number as a focal length within a possible range in the simulation, and it should be noted that in a real camera this would be the lens encoder value.

[0085] The process of estimating the focal length of an unknown input image using the best CNN weight parameters determined through learning is called inference, and this invention is a method devised with ingenuity to make this inference more reliable and accurate.

[0086] Regarding the term "true focal length" in the explanation "A set of 5 training images and the true focal length given when generating them are paired, and 1000 such pairs (5000 images) are used as the training dataset" (Figure 10 and paragraph

[0069] , etc.): The true focal length refers to the value given to the 3DCG renderer when generating training and evaluation images, and in this document, it will simply be referred to as the true focal length. The 3DCG renderer generates a CG image when given a CG model (in this case, a CAVE (cave) model) and camera parameters for a virtual camera (focal length, distortion parameter, camera position, camera rotation). The process of generating a CG image is also called rendering. Furthermore, the camera parameters (focal length, camera rotation) for the virtual camera given to the 3DCG renderer are values ​​determined by random numbers (however, even if the values ​​are generated by random numbers, they are uniform random values ​​within a defined range that is appropriate). Furthermore, the camera position among the camera parameters is fixed, and the CAVE (cave) model is placed so that the coordinate origin in the 3DCG renderer coincides with the center of the depth plane in the CAVE model, and the camera position in the depth direction is set to the negative depth distance of the CAVE model. Therefore, the virtual camera in the 3DCG renderer will take pictures as if looking through the edge of the CAVE model. Furthermore, the camera rotation is adjusted so that the five faces of the CAVE model (depth, ceiling, floor, and left and right walls) are not cut off. For example, as described in paragraph

[0052] , the pan-tilt rotation angles (deg) are determined by uniformly random numbers in the intervals [-20,20] and [-5,5], respectively, and a set of 5 images can be used as the input image.

[0087] In this invention, the best CNN weight parameters are determined by learning using a set of CG images rendered by a 3DCG renderer based on a CG model (CAVE (cave) model) and camera parameters (uniform random values) of a virtual camera, along with the true focal length at the time the CG images were generated (this is the training dataset). That is, the camera parameters (including the true focal length) determined by random numbers are used when generating training and / or evaluation CG images, and in subsequent processing, i.e., the processing to determine the best CNN weight parameters (i.e., the training dataset (in particular, the camera parameters included in the training dataset) and evaluation dataset for executing the training phase), the true focal length used at the time the CG images were generated is used along with the generated CG images (these are the training dataset and evaluation dataset).

[0088] Furthermore, the best CNN weight parameters are determined through learning to minimize the loss function value L. During the learning phase, the CNN weight parameters that minimize the evaluation error (eval) (inference error (loss function value L)) using the evaluation dataset, i.e., the best determined CNN weight parameters, are used to infer the focal length of an unknown input image (i.e., the estimated true focal length (inferred value)) from that unknown input image. This can be considered to be a value close to the accurate focal length of the unknown input image and a likely value.

[0089] The true focal length is the value given to the 3DCG renderer, and the estimated (inferred) true focal length is output as the result of the calculation process for an unknown input image using the best CNN weight parameters obtained through the evaluation stage of the learning phase. The method of the present invention is an ingenious design that makes it possible to calculate this estimated (inferred) true focal length more reliably and accurately.

[0090] Furthermore, paragraph

[0052] of this document states that "the focal length is determined as FOV(deg) by a uniform random number in the interval [20,50]...", but all camera parameters in this document are set and determined by a uniform random number (the operator of the simulation of the present invention may determine an arbitrary random number, or it may be a random number output by a program), and are input to a 3DCG renderer for rendering (generation of a CG image).

[0091] Furthermore, the focal length value generated by a uniform random number generator and input into the 3DCG renderer is the true focal length value. Since uniform random numbers are generated, every value within a given random number range is generated with the same probability, and all values ​​are selected with equal probability. Furthermore, the camera parameter values ​​(including focal length) generated each time are always different. Consequently, the CNN weight parameters trained (including the training and evaluation phases in the training phase) using CG images generated with camera parameter values ​​(including the true focal length) based on uniform random numbers will always be different. However, the estimated true focal length of the input unknown image, which is output as an estimation result, is always considered to be reliable.

[0092] In this invention, the initial values ​​of the CNN weight parameters are also set using random numbers, but by updating them using the iterative gradient method, local optimization based on the iterative gradient method is achieved. It seems impossible to estimate the globally optimal values ​​for unknown CNN weight parameters within their possible range, regardless of the method used. However, as proposed in this invention, by using a sufficiently large number of datasets for the training phase (although there is no definitive definition or understanding of how many datasets for the training phase should be used), it is believed that technically meaningful estimation results (estimates of the true focal length based on what is considered the best CNN weight parameters) can be obtained.

[0093] Furthermore, because the training dataset for the training phase includes uniformly random values ​​(i.e., camera parameters (including the true focal length)), even if different training results are obtained for each training session, this is not a problem as long as the estimation accuracy is sufficient. Therefore, the inventors believe that this is not a problem in the present invention as the estimation accuracy is sufficient. The inventors believe that the estimation accuracy can be evaluated not from the training CG image and its true focal length value, but from the inference results based on the evaluation image and its true focal length value.

[0094] However, it is also true that estimation errors can never be reduced to absolutely zero, regardless of the method used. Nevertheless, if the estimated focal length can be used to obtain a composite image of live-action footage and CG without any noticeable discrepancies, then it can be considered sufficiently practical. The inventors believe that the present invention will yield results that are sufficiently practical.

[0095] <Considerations for the practical application and realization of this invention as a device for use in virtual production and virtual studios> Generally, camera parameters refer to focal length, distortion parameter, camera position, and camera rotation. However, in this invention, the distortion parameters k1 and k2 are determined from a distortion parameter curve defined by the focal length (the graph shown in Figure 9), as explained in paragraphs

[0050] to

[0052] . Therefore, in this invention, the distortion parameters k1 and k2 are not set using uniform random values. Furthermore, the camera position is fixed in this invention.

[0096] While OpenGL is presented as a typical example of a 3DCG renderer in this book, Brainstorm's eStudio® is used for training the focal length estimation in the actual virtual studio, as shown in the real-image experiments. The learning process using OpenGL-based CG image generation is merely a simulation to demonstrate the significance of the present invention. In a real virtual studio system, it is considered possible to generate training images, evaluation images, and their true focal lengths as a dataset for the learning phase, using eStudio®, which is tailored to the virtual studio system, as follows. In other words, the true focal length in eStudio® is not determined by a uniform random value set during simulation, but rather by the estimation result obtained through visual alignment, as explained above. Actual cameras output an encoder value that corresponds to the zoom level (representing the position of the zoom ring). This value can range from 0 to 65535. The true values ​​of the focal length and distortion parameters are then determined by visual adjustment based on this value. In other words, the parameter curve shown in the graph of Figure 9 is obtained for the focal length and distortion parameter. However, in this case, the horizontal axis represents the lens encoder value from 0 to 65535. Then, a uniform random number is generated with a value between 0 and 65535. This random number is used as the encoder value, and the focal length (actually the FOV value) and distortion parameter values ​​k1 and k2 are determined from the parameter curve, which is the result of estimation by visual alignment. The distortion parameters k1 and k2 are also estimated by visual cues and their true values ​​are used. The method for estimating (determining) the distortion parameters by visual adjustment involves displaying a chessboard pattern, as shown in the distorted image in Figure 9, on a video monitor and then adjusting k1 and k2 through trial and error until the distortion disappears when the pattern is captured from the front with an actual camera.

[0097] Furthermore, the network configuration described above is merely one example, and the present invention can be realized with a variety of other network configurations as well. For example, it can be implemented as a network model consisting of a convolutional neural network layer that automatically extracts image features from multiple input images and a fully connected layer that regresses the focal length from the image feature vector obtained from the convolutional neural network layer. Preferably, the convolutional neural network layer includes: A. A batch normalization layer for normalizing the results of the convolution process. B. Max pooling layer for reducing image size, C. Processing steps using nonlinear activation functions, Each of the above processes is included, and more preferably, it can be realized as a configuration in which each of the above processes ABC is connected in a dependent manner.

[0098] Furthermore, the differences in the learning phase between simulation and applying the present invention to an actual camera in a virtual studio, etc., are as follows. In the simulation, a hypothetical distortion parameter curve based on focal length is defined, and focal lengths within a certain range are generated using uniformly random numbers and rendered using OpenGL. In the simulation, the true focal length and distortion parameter are the focal lengths generated by uniformly random numbers and the values ​​determined from the hypothetical distortion parameter curve based on focal length. On the other hand, when applying the present invention to an actual camera, the focal length and distortion parameters determined by eye alignment according to the lens encoder value are considered true values. Using a uniform random number with encoder values ​​from 0 to 65535, rendering is performed using eStudio® with the corresponding focal length and distortion parameters. Although the handling of camera parameters differs in each case, there is no difference between the two in that the CAVE (cave) model, when the focal length and distortion parameters are changed as camera parameters, and furthermore, when the camera position is fixed and the camera rotation is changed within an appropriate range, is captured by a virtual camera in a 3DCG renderer, and the resulting images are used as training images and evaluation images.

[0099] The disclosures described in the embodiments above are not limited to the specific examples described therein. Within the scope of the technical concept of the present invention, it is possible to use publicly known or well-known technologies accessible to those skilled in the art by combining and applying them as appropriate, or by arranging them as appropriate.

[0100] The methods, processes, and procedures of the present invention described above can be executed in whole or in part by a computer, server, or workstation, or they can be created as a program for such execution, or they can be carried around as memory, HD, flash memory, etc. containing the program, or they can be configured to be downloaded or distributed online. Processing data can also be received and obtained online from a client, processed using the methods of the present invention, and then the processed result data can be distributed or delivered online. [Industrial applicability]

[0101] The present invention is suitable for video equipment in general, and in particular for camera calibration devices and methods used in virtual studios that combine computer graphics (CG) and live-action footage, as well as for 3D measurement and 3D reconstruction from images. [Explanation of symbols]

[0102] 100... White lines indicating depth, 110... Green guide lines created using CG, 300... CAVE (cave) model generated using OpenGL, 200... Camera.

Claims

1. An automatic calibration method for focal length using CNN regression, In the learning phase process using pre-training CG images and evaluation CG images, The CNN weight parameters are calculated by using at least one first CG image, generated by a 3DCG renderer from an image in which an arbitrary texture image has been applied to the inside of a CAVE (cave) model, as training data, and at least one second CG image, different from the first CG image, generated by a 3DCG renderer from an image in which an arbitrary texture image has been applied to the inside of a CAVE (cave) model, as evaluation data. In the inference phase process using an unknown input image, Using the calculated CNN weight parameters, the focal length for the unknown input image is calculated by CNN regression. An automatic calibration method for focal length characterized by the following:

2. In the automatic focal length calibration method described in claim 1, The CAVE (cave) model uses a set of white line images in both the training data and the evaluation data. An automatic calibration method for focal length characterized by the following:

3. In the automatic focal length calibration method according to claim 1 or claim 2, The first CG image and the second CG image are a plurality of rotated images obtained by applying arbitrary pan-tilt rotations with an arbitrary fixed focal length from a camera with a fixed position. An automatic calibration method for focal length characterized by the following:

4. In the automatic focal length calibration method described in claim 1, The calculated CNN weight parameters are parameters that satisfy the condition for minimizing the evaluation error calculated using the evaluation data. An automatic calibration method for focal length characterized by the following:

5. In the automatic focal length calibration method described in claim 1, In the aforementioned learning phase, the CNN weight parameters are calculated using the training data by either the iterative gradient method or the Adam algorithm. An automatic calibration method for focal length characterized by the following:

6. In the automatic focal length calibration method described in claim 1, The first and second CG images are generated using distortion parameters derived from various lens aberration distortion parameter curves based on focal length. By defining a virtual radial lens aberration distortion parameter curve based on focal length, it becomes possible to estimate the true focal length for an image that includes lens aberration distortion. An automatic calibration method for focal length characterized by the following:

7. In the automatic focal length calibration method described in claim 1, The aforementioned CNN regression is, The CNN layer processing process, A flattening process is performed by raster scanning the output image set of the CNN layer processing and concatenating them to calculate a high-dimensional feature vector. The process includes a fully connected layer step that estimates the focal length by regressing the flattened high-dimensional feature vector. An automatic calibration method for focal length characterized by the following:

8. In the automatic focal length calibration method described in claim 7, The CNN layer processing steps include a convolutional layer, a batch normalization layer, a Max pooling layer, and a nonlinear activation function. An automatic calibration method for focal length characterized by the following:

9. In the automatic focal length calibration method described in claim 1, The aforementioned 3DCG renderer is OpenGL. An automatic calibration method for focal length characterized by the following:

10. In the automatic focal length calibration method described in claim 1, The aforementioned focal length is the FOV (Field of View). An automatic calibration method for focal length characterized by the following:

11. In the automatic focal length calibration method described in claim 1, The aforementioned CAVE (cave) model is a rectangular prism model with randomly selected textures applied to the five inner surfaces: floor, ceiling, both walls, and depth, and a depth white line model with white lines drawn on the floor surface. With the camera position fixed, five images are taken at an arbitrary fixed focal length and with arbitrary pan-tilt rotation. Multiple sets of these five images are then used as the first and second CG images, respectively. An automatic calibration method for focal length characterized by the following:

12. In the automatic focal length calibration method described in claim 1, When generating the first CG image and / or the second CG image, the camera parameters provided to the 3DCG renderer along with the CAVE model are, during simulation, The camera position is fixed. The true focal length and camera rotation (pan and tilt angles) are defined as values ​​generated by uniformly distributed random numbers within a specified range. The distortion parameter is a value determined from the virtual distortion parameter curve based on the true focal length. An automatic calibration method for focal length characterized by the following:

13. In the automatic focal length calibration method described in claim 1, When generating the first CG image and / or the second CG image, the camera parameters provided to the 3DCG renderer along with the CAVE model are, in estimation of the actual camera image, The camera position is fixed. The focal length and distortion parameter are determined by visually adjusting the lens based on a uniformly random value in the range of 0 to 65535, where the encoder value is set to 0. The camera's rotation (pan and tilt angles) is a value generated by a uniformly random number within a defined range. An automatic calibration method for focal length characterized by the following:

14. In the automatic focal length calibration method according to claim 12, When generating the first CG image, the camera parameters provided to the 3DCG renderer along with the CAVE model, The camera parameters provided to the 3DCG renderer along with the CAVE model when generating the second CG image are different values ​​from each other. An automatic calibration method for focal length characterized by the following:

15. In the automatic focal length calibration method according to claim 8, The aforementioned convolutional layer is When there is one channel for image input, one channel for the convolutional kernel, and one channel for image output, the pixel values ​​of the input layer are x i,j , the pixel values ​​of the convolutional layer are y i,j So, [Math 1] And here, ω k,l is the weighting coefficient, b is the bias term, and ω k,l With b as an unknown parameter, it is estimated from the training image data, the convolution kernel consisting of weight parameters is 3x3, and together with the bias term b, there are a total of 10 unknown parameters, and an activation function is placed at the output of each convolutional layer. An automatic calibration method for focal length characterized by the following:

16. In the automatic focal length calibration method according to claim 15, The batch normalization layer processing described above is: Input x i The process involves calculating the mean and variance for each mini-batch (where i = 1, ..., m) (where m is an arbitrary integer), The process of normalizing using the mean and variance for each mini-batch, wherein ε added to the denominator represents an infinitesimal value, and the variance [Math 2] A process to stabilize the calculation when it is small, As a means and variance adjustment (scale and shift), input x i To change the distribution, we introduced a parameter β corresponding to the mean and a parameter γ corresponding to the standard deviation, and normalized it. [Math 3] This process involves shifting the value by β and changing the scale by γ, thereby setting the mean of each feature map to 0 and the standard deviation to 1, eliminating the effects of distribution bias and scaling. An automatic calibration method for focal length characterized by the following:

17. In the automatic focal length calibration method according to claim 16, The aforementioned Max pooling layer processing is This process involves outputting the maximum value of a 2x2 peripheral pixel to create a reduced image by downsampling pixels. An automatic calibration method for focal length characterized by the following:

18. In the automatic focal length calibration method according to claim 8, The activation function used in the aforementioned nonlinear activation function processing is Leaky ReLU. An automatic calibration method for focal length characterized by the following:

19. In the automatic focal length calibration method according to claim 17, The aforementioned nonlinear activation function processing uses Leaky ReLU as the activation function. An automatic calibration method for focal length characterized by the following:

20. A computer that performs the automatic focal length calibration method according to claim 1 or claim 2.

21. A storage device containing a program for performing the automatic focal length calibration method described in claim 1 or claim 2.

22. Apparatus provided in a virtual production system used to perform the automatic focal length calibration method described in claim 1 or claim 2.

23. In the automatic focal length calibration method described in claim 1, The first CG image used as training data and the second CG image used as evaluation data are CG images in which different textures are applied separately to the interior of the CAVE (cave) model and rendered using different camera parameters. An automatic calibration method for focal length characterized by the following:

24. In the automatic focal length calibration method described in claim 23, The aforementioned camera parameters are the focal length, the camera position, and the pan-tilt angle, which indicates the rotation of the camera. An automatic calibration method for focal length characterized by the following:

25. In the automatic focal length calibration method described in claim 4, The condition for minimizing the aforementioned evaluation error means that the loss function value L calculated by [Equation 4] below is minimized. [Math 4] However, N is the total number of training datasets, and α is the identification number of the training dataset. [Math 4-1] Assume that this is the case. An automatic calibration method for focal length characterized by the following:

26. In the automatic focal length calibration method described in claim 25, The aforementioned evaluation error is, The true focal length shown as [Equation 4-1] above and the input image are used, and the inferred true focal length obtained when these are processed by CNN is as follows: The true focal length shown as [Equation 4-1] above, It is the absolute difference of An automatic calibration method for focal length characterized by the following: