Transpose the image.
| 195 | |
| 196 | |
| 197 | class TransposeTransform(Transform): |
| 198 | """ |
| 199 | Transpose the image. |
| 200 | """ |
| 201 | def apply_image(self, img): |
| 202 | ret = cv2.transpose(img) |
| 203 | if img.ndim == 3 and ret.ndim == 2: |
| 204 | ret = ret[:, :, np.newaxis] |
| 205 | return ret |
| 206 | |
| 207 | def apply_coords(self, coords): |
| 208 | return coords[:, ::-1] |
| 209 | |
| 210 | |
| 211 | class NoOpTransform(Transform): |
no outgoing calls
no test coverage detected
searching dependent graphs…