(self, img)
| 204 | self._init(locals()) |
| 205 | |
| 206 | def get_transform(self, img): |
| 207 | do = self._rand_range() < self.prob |
| 208 | if do: |
| 209 | height, width = img.shape[:2] |
| 210 | M, a, s = self.get_warp_matrix(height, width) |
| 211 | return FairAffineTransform(width, height, self.border_value, M, a) |
| 212 | else: |
| 213 | return NoOpTransform() |
| 214 | |
| 215 | def get_warp_matrix(self, height, width): |
| 216 | border = 0 # width of added border (optional) |
nothing calls this directly
no test coverage detected