menpodetect.detect.menpo_image_to_uint8(image, channels_at_back=True)[source]

Return the given image as a uint8 array. This is a copy of the image.

  • image (menpo.image.Image) – The image to convert. If already uint8, only the channels will be rolled to the last axis.
  • channels_at_back (bool, optional) – If True, the image channels are placed onto the last axis (the back) as is common in many imaging packages. This is contrary to the Menpo default where channels are the first axis (at the front).

uint8_image (ndarray) – uint8 Numpy array, channels as the back (last) axis if channels_at_back == True.