BrownModel.compute_pixel_jacobian

giant.camera_models.brown_model:

BrownModel.compute_pixel_jacobian(vectors_in_camera_frame, image=0, temperature=0)[source]

This method computes the Jacobian matrix \(\partial\mathbf{x}_P/\partial\mathbf{x}_C\) where \(\mathbf{x}_C\) is a vector in the camera frame that projects to \(\mathbf{x}_P\) which is the pixel location.

This method is used in the LimbScanning process in order to predict the change in a projected pixel location with respect to a change in the projected vector. The vectors_in_camera_frame input should be a 3xn array of vectors which the Jacobian is to be computed for.

\(\mathbf{x}_C'\) is the camera frame point after applying the misalignment, \(\boldsymbol{\delta\theta}\) is the misalignment vector, \(\mathbf{x}_C\) is the camera frame point before misalignment is applied, \(\mathbf{x}_P\) is the pixel location, \(\mathbf{x}_I\) is the gnomic location, \(a_{1-3}\) are the temperature coefficients, \(T\) is the temperature, \(f_x\) is the focal length in the x direction, \(f_y\) is focal length in the y direction, \(\alpha\) is the skewness term, \(k_{1-3}\) are the radial distortion terms, \(p_{1-2}\) are the tangential distortion terms, and \(\mathbf{T}_{\boldsymbol{\delta\theta}}\) is the rotation matrix corresponding to rotation vector \(\boldsymbol{\delta\theta}\).

Parameters:
  • vectors_in_camera_frame (Sequence | ndarray) – The vectors to compute the Jacobian at

  • image (int) – The index of the image being projected onto (only applicable with multiple misalignments)

  • temperature (Real) – The temperature to project the points at

Returns:

The Jacobian matrix as a nx2x3 array

Return type:

ndarray

Mathematically the Jacobian matrix is defined as

\[\frac{\partial\mathbf{x}_P}{\partial\mathbf{x}_C} = \frac{\partial\mathbf{x}_P}{\partial\mathbf{x}_I'} \frac{\partial\mathbf{x}_I'}{\partial\mathbf{x}_I} \frac{\partial\mathbf{x}_I}{\partial\mathbf{x}_C'} \frac{\partial\mathbf{x}_C'}{\partial\mathbf{x}_C}\]

where

\begin{gather} \frac{\partial\mathbf{x}_P}{\partial\mathbf{x}_I'} = (1+a_1T+a_2T^2+a_3T^3) \left[\begin{array}{cc} f_x & \alpha \\ 0 & f_y \end{array}\right] \\ \begin{split} \frac{\partial\mathbf{x}_I'}{\partial\mathbf{x}_I} = &\left(1 + k_1r^2+k_2r^4+k_3r^6\right) \mathbf{I}_{2\times 2} + \left[\begin{array}{cc}2p_1y_I+4p_2x_I & 2p_1x_I \\ 2p_2y_I & 4p_1y_I+2p_2x_I \end{array}\right] + \\ & \left(2k_1+4k_2r^2+6k_3r^4\right)\mathbf{x}_I\mathbf{x}_I^T + 2 \left[\begin{array}{cc} p_2x_I & p_2y_I \\ p_1x_I & p_1y_I \end{array}\right] \end{split}\\ \frac{\partial\mathbf{x}_I}{\partial\mathbf{x}_C'} = \frac{1}{z_C'}\left[ \begin{array}{ccc}1 & 0 & \frac{-x_C'}{z_C'} \\ 0 & 1 & \frac{-y_C'}{z_C'} \end{array}\right] \\ \frac{\partial\mathbf{x}_C'}{\partial\mathbf{x}_C} = \mathbf{T}_{\boldsymbol{\delta\theta}} \end{gather}