class_docstr: Container for all keypoints on a single image.
  
  Parameters
  ----------
  keypoints : list of imgaug.augmentables.kps.Keypoint
      List of keypoints on the image.
  
  shape : tuple of int
      The shape of the image on which the objects are placed, i.e. the
      result of ``image.shape``.
      Should include the number of channels, not only height and width.
  
  Examples
  --------
  >>> import numpy as np
  >>> from imgaug.augmentables.kps import Keypoint, KeypointsOnImage
  >>>
  >>> image = np.zeros((70, 70))
  >>> kps = [Keypoint(x=10, y=20), Keypoint(x=34, y=60)]
  >>> kps_oi = KeypointsOnImage(kps, shape=image.shape)
class_docstr_tok: ["Container","for","all","keypoints","on","a","single","image",".","Parameters","--","--","--","--","--","keypoints",":","list","of","imgaug.augmentables.kps.Keypoint","List","of","keypoints","on","the","image",".","shape",":","tuple","of","int","The","shape","of","the","image","on","which","the","objects","are","placed",",","i.e",".","the","result","of","``","image.shape","``",".","Should","include","the","number","of","channels",",","not","only","height","and","width",".","Examples","--","--","--","--",">",">",">","import","numpy","as","np",">",">",">","from","imgaug.augmentables.kps","import","Keypoint",",","KeypointsOnImage",">",">",">",">",">",">","image","=","np.zeros","(","(","70",",","70",")",")",">",">",">","kps","=","[","Keypoint","(","x=10",",","y=20",")",",","Keypoint","(","x=34",",","y=60",")","]",">",">",">","kps_oi","=","KeypointsOnImage","(","kps",",","shape=image.shape",")"]
docstr: Generate a ``(H,W,N)`` array of distance maps for ``N`` keypoints.
  
  The ``n``-th distance map contains at every location ``(y, x)`` the
  euclidean distance to the ``n``-th keypoint.
  
  This function can be used as a helper when augmenting keypoints with a
  method that only supports the augmentation of images.
  
  Parameters
  -------
  inverted : bool, optional
      If ``True``, inverted distance maps are returned where each
      distance value d is replaced by ``d/(d+1)``, i.e. the distance
      maps have values in the range ``(0.0, 1.0]`` with ``1.0`` denoting
      exactly the position of the respective keypoint.
  
  Returns
  -------
  (H,W,N) ndarray
      A ``float32`` array containing ``N`` distance maps for ``N``
      keypoints. Each location ``(y, x, n)`` in the array denotes the
      euclidean distance at ``(y, x)`` to the ``n``-th keypoint.
      If `inverted` is ``True``, the distance ``d`` is replaced
      by ``d/(d+1)``. The height and width of the array match the
      height and width in ``KeypointsOnImage.shape``.
docstr_tok: ["Generate","a","``","(","H",",","W",",","N",")","``","array","of","distance","maps","for","``","N","``","keypoints",".","The","``","n","``","-th","distance","map","contains","at","every","location","``","(","y",",","x",")","``","the","euclidean","distance","to","the","``","n","``","-th","keypoint",".","This","function","can","be","used","as","a","helper","when","augmenting","keypoints","with","a","method","that","only","supports","the","augmentation","of","images",".","Parameters","--","--","--","-","inverted",":","bool",",","optional","If","``","True","``",",","inverted","distance","maps","are","returned","where","each","distance","value","d","is","replaced","by","``","d\/","(","d+1",")","``",",","i.e",".","the","distance","maps","have","values","in","the","range","``","(","0.0",",","1.0","]","``","with","``","1.0","``","denoting","exactly","the","position","of","the","respective","keypoint",".","Returns","--","--","--","-","(","H",",","W",",","N",")","ndarray","A","``","float32","``","array","containing","``","N","``","distance","maps","for","``","N","``","keypoints",".","Each","location","``","(","y",",","x",",","n",")","``","in","the","array","denotes","the","euclidean","distance","at","``","(","y",",","x",")","``","to","the","``","n","``","-th","keypoint",".","If","`","inverted","`","is","``","True","``",",","the","distance","``","d","``","is","replaced","by","``","d\/","(","d+1",")","``",".","The","height","and","width","of","the","array","match","the","height","and","width","in","``","KeypointsOnImage.shape","``","."]
code: def to_distance_maps(self, inverted=False):
      """Generate a ``(H,W,N)`` array of distance maps for ``N`` keypoints.
  
      The ``n``-th distance map contains at every location ``(y, x)`` the
      euclidean distance to the ``n``-th keypoint.
  
      This function can be used as a helper when augmenting keypoints with a
      method that only supports the augmentation of images.
  
      Parameters
      -------
      inverted : bool, optional
          If ``True``, inverted distance maps are returned where each
          distance value d is replaced by ``d/(d+1)``, i.e. the distance
          maps have values in the range ``(0.0, 1.0]`` with ``1.0`` denoting
          exactly the position of the respective keypoint.
  
      Returns
      -------
      (H,W,N) ndarray
          A ``float32`` array containing ``N`` distance maps for ``N``
          keypoints. Each location ``(y, x, n)`` in the array denotes the
          euclidean distance at ``(y, x)`` to the ``n``-th keypoint.
          If `inverted` is ``True``, the distance ``d`` is replaced
          by ``d/(d+1)``. The height and width of the array match the
          height and width in ``KeypointsOnImage.shape``.
  
      """
      height, width = self.shape[0:2]
      distance_maps = np.zeros(
          (height, width, len(self.keypoints)), dtype=np.float32
      )
  
      yy = np.arange(0, height)
      xx = np.arange(0, width)
      grid_xx, grid_yy = np.meshgrid(xx, yy)
  
      for i, keypoint in enumerate(self.keypoints):
          y, x = keypoint.y, keypoint.x
          distance_maps[:, :, i] = (grid_xx - x) ** 2 + (
              grid_yy - y
          ) ** 2
      distance_maps = np.sqrt(distance_maps)
      if inverted:
          return 1 / (distance_maps + 1)
      return distance_maps
  
imports: from __future__ import print_function, division, absolute_import
  import numpy
  import scipy.spatial.distance
  import six.moves
  from ..None import imgaug
  from .base import IAugmentable
  from .utils import normalize_imglike_shape, project_coords, _remove_out_of_image_fraction_, _handle_on_image_shape
label_desc: Use image node_id 23 for calling the KeypointsOnImage obj's underlying member method code with example usage: obj.to_distance_maps(inverted) and returns: distance_maps, unknown