(img, mask, background=0, return_rgba=False)
| 987 | |
| 988 | |
| 989 | def draw_mask(img, mask, background=0, return_rgba=False): |
| 990 | img = load_image(img) |
| 991 | h, w, _ = img.shape |
| 992 | if type(background) == int: # noqa |
| 993 | background = np.ones((h, w, 3)).astype(np.uint8) * 255 * background |
| 994 | backgournd = cv2.resize(background, (w, h)) |
| 995 | img_rgba = np.concatenate([img, mask], -1) |
| 996 | return alphaMerge(img_rgba, background, 0, 0, return_rgba=True) |
| 997 | |
| 998 | |
| 999 | def draw_pcd(pcd_list, save_path=None): |
nothing calls this directly
no test coverage detected