[Notes] How covariance matrix determind 3DGS and 2DGS

The covariance matrix ( cov \text{cov} cov) defines the shape and orientation of the Gaussian in both 3D and 2D. The covariance matrix plays a key role in determining the geometric properties of the Gaussian splat in space. Let’s break down the key aspects of the 3D and 2D covariance matrices and compare how they influence the resulting shape and orientation of the splat.

1. Covariance in 3D ( cov3d \text{cov3d} cov3d)

The 3D covariance matrix describes the shape and orientation of the Gaussian in 3D space. It’s a symmetric 3x3 matrix, which can be written as:
cov3d = [ σ x x σ x y σ x z σ x y σ y y σ y z σ x z σ y z σ z z ] \text{cov3d} = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\ \sigma_{xy} & \sigma_{yy} & \sigma_{yz} \\ \sigma_{xz} & \sigma_{yz} & \sigma_{zz} \end{bmatrix} cov3d= σxxσxyσxzσxyσyyσyzσxzσyzσzz

  • Diagonal elements ( σ x x , σ y y , σ z z \sigma_{xx}, \sigma_{yy}, \sigma_{zz} σxx,σyy,σzz): These represent the variances (or square of the standard deviations) along the principal axes x x x, y y y, and z z z of the 3D space. They define the size or extent of the Gaussian along these axes. In other words, they control how the Gaussian stretches or contracts along these directions.

  • Off-diagonal elements ( σ x y , σ x z , σ y z \sigma_{xy}, \sigma_{xz}, \sigma_{yz} σxy,σxz,σyz): These represent the correlations between different axes. They define how much the Gaussian is tilted or sheared in space, which controls the orientation of the ellipsoid that the Gaussian forms in 3D.

Influence of 3D Covariance Matrix:
  1. Shape: The eigenvalues of the 3D covariance matrix determine the shape of the Gaussian ellipsoid. Large eigenvalues correspond to a more spread-out Gaussian along the corresponding eigenvector, while small eigenvalues correspond to a more compact Gaussian.

  2. Orientation: The eigenvectors of the covariance matrix define the orientation of the Gaussian ellipsoid in 3D space. The off-diagonal terms ( σ x y , σ x z , σ y z \sigma_{xy}, \sigma_{xz}, \sigma_{yz} σxy,σxz,σyz) control how the Gaussian is rotated relative to the axes.

2. Covariance in 2D ( cov2d \text{cov2d} cov2d)

The 2D covariance matrix describes the shape and orientation of the Gaussian after it has been projected from 3D into 2D space (e.g., onto an image plane). It’s a symmetric 2x2 matrix, which can be written as:
cov2d = [ σ x x ′ σ x y ′ σ x y ′ σ y y ′ ] \text{cov2d} = \begin{bmatrix} \sigma_{xx}' & \sigma_{xy}' \\ \sigma_{xy}' & \sigma_{yy}' \end{bmatrix} cov2d=[σxxσxyσxyσyy]
Where:

  • Diagonal elements ( σ x x ′ \sigma_{xx}' σxx, σ y y ′ \sigma_{yy}' σyy): These represent the variances (or squares of the standard deviations) along the principal axes (now in 2D, typically the image plane). They define the width and height of the Gaussian in 2D.

  • Off-diagonal element ( σ x y ′ \sigma_{xy}' σxy): This represents the correlation between the x x x and y y y axes in 2D. If non-zero, it indicates that the 2D Gaussian is tilted or rotated with respect to the x x x- and y y y-axes.

Influence of 2D Covariance Matrix:
  1. Shape: Similar to the 3D case, the eigenvalues of the 2D covariance matrix determine the shape of the Gaussian ellipse in 2D. This ellipse corresponds to the 2D projection of the original 3D ellipsoid.

  2. Orientation: The off-diagonal term ( σ x y ′ \sigma_{xy}' σxy) indicates the tilt or rotation of the 2D Gaussian. If σ x y ′ = 0 \sigma_{xy}' = 0 σxy=0, the Gaussian is aligned with the x x x- and y y y-axes. If σ x y ′ ≠ 0 \sigma_{xy}' \neq 0 σxy=0, the Gaussian is rotated.


Comparing cov3d and cov2d

The key difference between the 3D and 2D covariance matrices is that cov3d defines the shape and orientation of the Gaussian in the full 3D space, while cov2d defines the shape and orientation of the Gaussian after it has been projected into 2D. The projection process involves several transformations (such as applying the view matrix, perspective divide, and Jacobian), which change the shape and orientation of the Gaussian.

How the 3D Covariance Matrix Affects the 2D Projection:
  1. Projection of the 3D Ellipsoid:

    • The 3D Gaussian is represented by an ellipsoid defined by the covariance matrix cov3d \text{cov3d} cov3d. When projected onto the 2D image plane, this ellipsoid becomes an ellipse.
    • The shape of the 2D ellipse is determined by how the 3D ellipsoid is aligned relative to the camera. If the ellipsoid is aligned with the viewing direction, the 2D ellipse will be circular. If not, the ellipse will be elongated in certain directions.
    • The orientation of the 2D ellipse depends on the orientation of the 3D ellipsoid. This orientation is encoded in the off-diagonal terms of cov3d \text{cov3d} cov3d, which describe the correlations between the x x x, y y y, and z z z axes. After projection, these correlations are transformed into the 2D off-diagonal term σ x y ′ \sigma_{xy}' σxy.
  2. Effects of Camera and Perspective:

    • The view matrix and the projection matrix (which includes the focal lengths f x fx fx and f y fy fy affect how the 3D covariance matrix is transformed into 2D. These transformations are applied as part of the projection process.
    • The perspective division (using 1 / z 1/z 1/z) in the projection step introduces non-linearity, meaning that points farther from the camera are projected differently than points closer to the camera. This also affects the size of the projected Gaussian in 2D space.
    • The Jacobian matrix J J J, which is involved in the transformation from 3D to 2D, plays a critical role in determining how the 3D covariance matrix is modified during the projection. Specifically, it adjusts the scale of the Gaussian based on the depth ( z z z) and the camera parameters ( f x fx fx, f y fy fy).

Specific Parameters and Their Influence

Parameter in 3D CovarianceInfluence in 3DInfluence in 2D (after projection)
σ x x \sigma_{xx} σxx (Variance along x x x)Controls the spread along the x x x-axis in 3D space.Influences the width of the Gaussian in the image plane, especially if the 3D Gaussian is aligned with the camera.
σ y y \sigma_{yy} σyy (Variance along y y y)Controls the spread along the y y y-axis in 3D space.Influences the height of the Gaussian in the image plane. If the 3D Gaussian is oriented along the viewing direction, this will affect the vertical spread of the projected Gaussian.
σ z z \sigma_{zz} σzz (Variance along z z z)Controls the spread along the z z z-axis (depth) in 3D space.Influences the overall size of the Gaussian in 2D after perspective projection. If the object is far from the camera, the Gaussian will appear smaller in the image plane.
σ x y \sigma_{xy} σxy (Correlation between x x x and y y y)Introduces a tilt or shear in the 3D ellipsoid.After projection, this results in a rotated or tilted Gaussian in the image plane.
σ x z \sigma_{xz} σxz (Correlation between x x x and z z z)Introduces a tilt or shear between the x x x- and z z z-axes in 3D.After projection, this affects the apparent size and orientation of the Gaussian in 2D. It can lead to a stretched Gaussian if the point is far from the camera.
σ y z \sigma_{yz} σyz (Correlation between y y y and z z z)Introduces a tilt or shear between the y y y- and z z z-axes in 3D.Affects the vertical size of the Gaussian in the image plane, especially if the point is far from the camera.

Summary of Key Differences and Influences

  • The 3D covariance matrix ( cov3d \text{cov3d} cov3d) defines the full 3D shape and orientation of the Gaussian in space. It controls the spread along each axis (via the diagonal elements) and the orientation or tilt (via the off-diagonal elements).

  • The 2D covariance matrix ( cov2d \text{cov2d} cov2d) is the result of projecting the 3D Gaussian onto the 2D image plane. It defines the width, height, and tilt of the Gaussian in the image space. The 3D covariance matrix is transformed through the camera projection matrix and perspective division, leading to the 2D covariance matrix.

  • Diagonal elements in both cov3d and cov2d control the size of the Gaussian along each axis, while off-diagonal elements control the orientation or tilt of the Gaussian.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值