(normal: np.ndarray, mask: np.ndarray = None)
| 48 | |
| 49 | |
| 50 | def colorize_normal(normal: np.ndarray, mask: np.ndarray = None) -> np.ndarray: |
| 51 | if mask is not None: |
| 52 | normal = np.where(mask[..., None], normal, 0) |
| 53 | normal = normal * [0.5, -0.5, -0.5] + 0.5 |
| 54 | normal = (normal.clip(0, 1) * 255).astype(np.uint8) |
| 55 | return normal |
| 56 | |
| 57 | |
| 58 | def colorize_error_map(error_map: np.ndarray, mask: np.ndarray = None, cmap: str = 'plasma', value_range: Tuple[float, float] = None): |
nothing calls this directly
no outgoing calls
no test coverage detected