docstr: Initialized the Q matrix of the horizontal stereo setup. See the Q property.
  
  Returns:
      The Q matrix of shape :math:`(B, 4, 4)`.
docstr_tok: ["Initialized","the","Q","matrix","of","the","horizontal","stereo","setup",".","See","the","Q","property",".","Returns",":","The","Q","matrix","of","shape",":","math",":","`","(","B",",","4",",","4",")","`","."]
code: def _init_Q_matrix(self) -> Tensor:
      r"""Initialized the Q matrix of the horizontal stereo setup. See the Q property.
  
      Returns:
          The Q matrix of shape :math:`(B, 4, 4)`.
      """
      Q = zeros(
          (self.batch_size, 4, 4), device=self.device, dtype=self.dtype
      )
      baseline: Tensor = -self.tx
      Q[:, 0, 0] = self.fy * baseline
      Q[:, 0, 3] = -self.fy * self.cx_left * baseline
      Q[:, 1, 1] = self.fx * baseline
      Q[:, 1, 3] = -self.fx * self.cy * baseline
      Q[:, 2, 3] = self.fx * self.fy * baseline
      Q[:, 3, 2] = -self.fy
      Q[:, 3, 3] = self.fy * (
          self.cx_left - self.cx_right
      )  # NOTE: This is usually zero.
      return Q
  
imports: from typing import Any
  import torch
  from kornia.core import Tensor, stack, zeros
  from kornia.geometry.linalg import transform_points
  from kornia.utils.grid import create_meshgrid
label_desc: Use image node_id 11 for calling the StereoCamera obj's underlying member method code with example usage: obj._init_Q_matrix() and returns: Q