imlab.extractor_wrapper.letterbox

imlab.extractor_wrapper.letterbox(img: <module 'PIL.Image' from '/usr/lib/python3/dist-packages/PIL/Image.py'>, img_size: int = 640, color: (<class 'int'>, <class 'int'>, <class 'int'>) = (114, 114, 144)) <module 'PIL.Image' from '/usr/lib/python3/dist-packages/PIL/Image.py'>[source]

letterbox. resize image and pad it to be of (img_size,img_size) size

Parameters
  • img (Image) –

  • img_size (int) –

  • color ((int, int, int)) –

Return type

Image