Method
__init__
(self, new_shape, dst_constant, ratio, padding, interpolation=None, border_type=None, color=(127.5, 127.5, 127.5))
Source from the content-addressed store, hash-verified
| 56 | class LetterBoxTransform(Transform): |
| 57 | |
| 58 | def __init__(self, new_shape, dst_constant, ratio, padding, interpolation=None, border_type=None, color=(127.5, 127.5, 127.5)): |
| 59 | super().__init__() |
| 60 | self._set_attributes(locals()) |
| 61 | self.interpolation = cv2.INTER_AREA if interpolation is None else interpolation |
| 62 | self.border_type = cv2.BORDER_CONSTANT if border_type is None else border_type |
| 63 | self.color = color |
| 64 | |
| 65 | def apply_image(self, img, interp=None): |
| 66 | top, bottom, left, right = self.dst_constant |
Callers
nothing calls this directly
Tested by
no test coverage detected