MCPcopy Create free account
hub / github.com/AutonomousVehicleLaboratory/SemVecNet / save_semantic_image

Function save_semantic_image

tools/nusc_semantic_mapping.py:128–133  ·  view source on GitHub ↗

save semantic image or map

(semantic_image, new_path, RGB2BGR=True)

Source from the content-addressed store, hash-verified

126
127
128def save_semantic_image(semantic_image, new_path, RGB2BGR=True):
129 """ save semantic image or map"""
130 Path('/'.join(new_path.split('/')[:-1])).mkdir(parents=True, exist_ok=True)
131 if RGB2BGR == True:
132 semantic_image = cv2.cvtColor(semantic_image, cv2.COLOR_BGR2RGB)
133 cv2.imwrite(new_path, semantic_image)
134
135
136def get_dynamic_map(nusc, scene, cfg, dm_dict):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected