(self, img)
| 93 | """ |
| 94 | |
| 95 | def get_transform(self, img): |
| 96 | img_shape = img.shape[:2] |
| 97 | assert self.background_shape[0] > img_shape[0] and self.background_shape[1] > img_shape[1] |
| 98 | |
| 99 | y0 = self._rand_range(self.background_shape[0] - img_shape[0]) |
| 100 | x0 = self._rand_range(self.background_shape[1] - img_shape[1]) |
| 101 | l = int(x0), int(y0) |
| 102 | return TransformFactory(name=str(self), apply_image=lambda img: self._impl(img, l)) |
| 103 | |
| 104 | def _impl(self, img, loc): |
| 105 | x0, y0 = loc |
nothing calls this directly
no test coverage detected