MCPcopy Create free account
hub / github.com/cdcseacave/openMVS / main

Function main

scripts/python/MvsReadDMAP.py:28–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 pyvips.Image.new_from_array(np.uint8(dmap['confidence_map'] * (1 / dmap['confidence_map'].max()) * 255)).write_to_file('%s_confidence_map.png' % basename)
27
28def main():
29 parser = ArgumentParser()
30 parser.add_argument('-i', '--input', type=str, required=True, help='Path to the DMAP file directory')
31 parser.add_argument('-t', '--threads', type=int, default=int(os.cpu_count() * 0.5) - 1, help='Number of parallel computations')
32 parser.add_argument('-o', '--output', type=str, required=True, help='Path to the output directory')
33 args = parser.parse_args()
34
35 dmap_paths = glob(os.path.join(args.input, '*.dmap'))
36
37 os.makedirs(args.output, exist_ok = True)
38 os.chdir(args.output)
39
40 with ProcessPoolExecutor(max_workers=args.threads) as executor:
41 executor.map(exportDMAPContent, dmap_paths)
42
43if __name__ == '__main__':
44 main()

Callers 1

MvsReadDMAP.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected