(self, input)
| 24 | |
| 25 | class OpWarpPerspective(AbstractOpBase): |
| 26 | def setup(self, input): |
| 27 | super().setup(input) |
| 28 | self.xform = np.array( |
| 29 | [ |
| 30 | [3.46153846e-01, 3.33031674e-01, 1.28000000e02], |
| 31 | [0.00000000e00, 6.92307692e-01, 0.00000000e00], |
| 32 | [-4.50721154e-04, 5.65610860e-04, 1.00000000e00], |
| 33 | ], |
| 34 | np.float32, |
| 35 | ) |
| 36 | self.flags = cvcuda.Interp.LINEAR |
| 37 | self.border_mode = cvcuda.Border.CONSTANT |
| 38 | self.border_value = [] |
| 39 | |
| 40 | def run(self, input): |
| 41 | return cvcuda.warp_perspective( |