Load and resize an image.
(path, H, W)
| 33 | return frames, input_depths, timestamps |
| 34 | |
| 35 | def get_image(path, H, W): |
| 36 | """Load and resize an image.""" |
| 37 | img = cv2.imread(path) |
| 38 | img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) |
| 39 | img = cv2.resize(img, (W, H), interpolation=cv2.INTER_LINEAR) |
| 40 | return img |
| 41 | |
| 42 | def get_depth(path, H, W): |
| 43 | """Load and resize a depth map.""" |