MCPcopy Create free account
hub / github.com/AiuniAI/Unique3D / transform_back_normal_to_front

Function transform_back_normal_to_front

scripts/mesh_init.py:60–64  ·  view source on GitHub ↗
(normal_pil)

Source from the content-addressed store, hash-verified

58 return height
59
60def transform_back_normal_to_front(normal_pil):
61 arr = np.array(normal_pil) # in [0, 255]
62 arr[..., 0] = 255-arr[..., 0]
63 arr[..., 2] = 255-arr[..., 2]
64 return Image.fromarray(arr.astype(np.uint8))
65
66def calc_w_over_h(normal_pil):
67 if isinstance(normal_pil, Image.Image):

Callers 1

build_meshFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected