class_docstr: Blur a tensor using a Joint Bilateral filter.
  
  This operator is almost identical to a Bilateral filter. The only difference
  is that the color Gaussian kernel is computed based on another image called
  a guidance image. See :class:`BilateralBlur` for more information.
  
  Arguments:
      kernel_size: the size of the kernel.
      sigma_color: the standard deviation for intensity/color Gaussian kernel.
        Smaller values preserve more edges.
      sigma_space: the standard deviation for spatial Gaussian kernel.
        This is similar to ``sigma`` in :func:`gaussian_blur2d()`.
      border_type: the padding mode to be applied before convolving.
        The expected modes are: ``'constant'``, ``'reflect'``,
        ``'replicate'`` or ``'circular'``. Default: ``'reflect'``.
      color_distance_type: the type of distance to calculate intensity/color
        difference. Only ``'l1'`` or ``'l2'`` is allowed. Use ``'l1'`` to
        match OpenCV implementation.
  
  Returns:
      the blurred input tensor.
  
  Shape:
      - Input: :math:`(B, C, H, W)`, :math:`(B, C, H, W)`
      - Output: :math:`(B, C, H, W)`
  
  Examples:
      >>> input = torch.rand(2, 4, 5, 5)
      >>> guidance = torch.rand(2, 4, 5, 5)
      >>> blur = JointBilateralBlur((3, 3), 0.1, (1.5, 1.5))
      >>> output = blur(input, guidance)
      >>> output.shape
      torch.Size([2, 4, 5, 5])
class_docstr_tok: ["Blur","a","tensor","using","a","Joint","Bilateral","filter",".","This","operator","is","almost","identical","to","a","Bilateral","filter",".","The","only","difference","is","that","the","color","Gaussian","kernel","is","computed","based","on","another","image","called","a","guidance","image",".","See",":","class",":","`","BilateralBlur","`","for","more","information",".","Arguments",":","kernel_size",":","the","size","of","the","kernel",".","sigma_color",":","the","standard","deviation","for","intensity\/color","Gaussian","kernel",".","Smaller","values","preserve","more","edges",".","sigma_space",":","the","standard","deviation","for","spatial","Gaussian","kernel",".","This","is","similar","to","``","sigma","``","in",":","func",":","`","gaussian_blur2d","(",")","`",".","border_type",":","the","padding","mode","to","be","applied","before","convolving",".","The","expected","modes","are",":","``","'constant","'","``",",","``","'reflect","'","``",",","``","'replicate","'","``","or","``","'circular","'","``",".","Default",":","``","'reflect","'","``",".","color_distance_type",":","the","type","of","distance","to","calculate","intensity\/color","difference",".","Only","``","'l1","'","``","or","``","'l2","'","``","is","allowed",".","Use","``","'l1","'","``","to","match","OpenCV","implementation",".","Returns",":","the","blurred","input","tensor",".","Shape",":","-","Input",":",":","math",":","`","(","B",",","C",",","H",",","W",")","`",",",":","math",":","`","(","B",",","C",",","H",",","W",")","`","-","Output",":",":","math",":","`","(","B",",","C",",","H",",","W",")","`","Examples",":",">",">",">","input","=","torch.rand","(","2",",","4",",","5",",","5",")",">",">",">","guidance","=","torch.rand","(","2",",","4",",","5",",","5",")",">",">",">","blur","=","JointBilateralBlur","(","(","3",",","3",")",",","0.1",",","(","1.5",",","1.5",")",")",">",">",">","output","=","blur","(","input",",","guidance",")",">",">",">","output.shape","torch.Size","(","[","2",",","4",",","5",",","5","]",")"]
code: def forward(self, input: Tensor, guidance: Tensor) -> Tensor:
      return joint_bilateral_blur(
          input,
          guidance,
          self.kernel_size,
          self.sigma_color,
          self.sigma_space,
          self.border_type,
          self.color_distance_type,
      )
  
file_path: kornia/kornia/filters/bilateral.py
imports: from __future__ import annotations
  from typing import Optional
  from kornia.core import Module, Tensor, pad
  from kornia.core.check import KORNIA_CHECK, KORNIA_CHECK_IS_TENSOR, KORNIA_CHECK_SHAPE
  from .kernels import _unpack_2d_ks, get_gaussian_kernel2d
  from .median import _compute_zero_padding
label_desc: Use image node_id 1 for calling the JointBilateralBlur obj's underlying member method code with example usage: obj.forward(input, guidance) and returns: joint_bilateral_blur