(self, img, dst_width: int, dst_height: int)
| 11 | """ |
| 12 | |
| 13 | def __init__(self, img, dst_width: int, dst_height: int): |
| 14 | if dst_width < 0 or dst_height < 0: |
| 15 | raise ValueError("Destination width/height should be > 0") |
| 16 | |
| 17 | self.img = img |
| 18 | self.src_w = img.shape[1] |
| 19 | self.src_h = img.shape[0] |
| 20 | self.dst_w = dst_width |
| 21 | self.dst_h = dst_height |
| 22 | |
| 23 | self.ratio_x = self.src_w / self.dst_w |
| 24 | self.ratio_y = self.src_h / self.dst_h |
| 25 | |
| 26 | self.output = self.output_img = ( |
| 27 | np.ones((self.dst_h, self.dst_w, 3), np.uint8) * 255 |
| 28 | ) |
| 29 | |
| 30 | def process(self): |
| 31 | for i in range(self.dst_h): |
nothing calls this directly
no outgoing calls
no test coverage detected