(x, size)
| 29 | |
| 30 | |
| 31 | def high_quality_resize(x, size): |
| 32 | if x.shape[0] != size[1] or x.shape[1] != size[0]: |
| 33 | if (size[0] * size[1]) < (x.shape[0] * x.shape[1]): |
| 34 | interpolation = cv2.INTER_AREA |
| 35 | else: |
| 36 | interpolation = cv2.INTER_LANCZOS4 |
| 37 | |
| 38 | y = cv2.resize(x, size, interpolation=interpolation) |
| 39 | else: |
| 40 | y = x |
| 41 | return y |
| 42 | |
| 43 | |
| 44 | def crop_and_resize_image(detected_map, resize_mode, h, w): |
no outgoing calls
no test coverage detected