integrated finger process pipeline on remapped 2d image
This commit is contained in:
@@ -14,17 +14,19 @@ if SRC_DIR not in sys.path:
|
||||
sys.path.insert(0, SRC_DIR)
|
||||
|
||||
import orisys
|
||||
from orisys.unroll import UVDomain
|
||||
|
||||
|
||||
def load_flatten_remap(path):
|
||||
remap = np.load(path)
|
||||
"""Load flatten cache; returns dict compatible with legacy viewer code."""
|
||||
domain = UVDomain.load(path)
|
||||
result = {
|
||||
"map_x": remap["map_x"].astype(np.float32),
|
||||
"map_y": remap["map_y"].astype(np.float32),
|
||||
"valid_mask": remap["valid_mask"].astype(bool),
|
||||
"map_x": domain.remap.map_x,
|
||||
"map_y": domain.remap.map_y,
|
||||
"valid_mask": domain.valid_mask,
|
||||
}
|
||||
if "flat_xyz" in remap:
|
||||
result["flat_xyz"] = remap["flat_xyz"].astype(np.float32)
|
||||
if domain.surface is not None:
|
||||
result["flat_xyz"] = domain.surface.flat_xyz
|
||||
return result
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user