rescale_images_to_reference_shape

menpofit.builder.rescale_images_to_reference_shape(images, group, reference_shape, verbose=False)[source]

Function that normalizes the images’ sizes with respect to the size of the provided reference shape. In other words, the function rescales the provided images so that the size of the bounding box of their attached shape is the same as the size of the bounding box of the provided reference shape.

Parameters
  • images (list of menpo.image.Image) – The set of images that will be rescaled.

  • group (str or None) – If str, then it specifies the group of the images’s shapes. If None, then the images must have only one landmark group.

  • reference_shape (menpo.shape.PointCloud) – The reference shape.

  • verbose (bool, optional) – If True, then progress information is printed.

Returns

normalized_images (list of menpo.image.Image) – The rescaled images.