コード例 #1
0
ファイル: bmdl.py プロジェクト: rfabbri/vpe
##########################################################################
# Created by Gamze D. Tunali
#            LEMS, Brown University
#            Oct 15, 2007
##########################################################################
import bmdl_batch
bmdl_batch.register_processes()
bmdl_batch.register_datatypes()

##########################################################################
# Please replace your paths to the LIDAR images instead of first_return.tif,
#last_return.tif and ground.tif
###########################################################################
print("Labeling the Lidar")
bmdl_batch.init_process("bmdlClassifyProcess")
bmdl_batch.set_input_string(0, "./first_ret.tif")
bmdl_batch.set_input_string(1, "./last_ret.tif")
bmdl_batch.run_process()
label_img = bmdl_batch.commit_output(0)
height_img = bmdl_batch.commit_output(1)

print("Saving Labeled Image")
bmdl_batch.init_process("SaveImageViewProcess")
bmdl_batch.set_input_from_db(0, label_img)
bmdl_batch.set_input_string(1, "./label.tif")
bmdl_batch.run_process()

print("Tracing Boundaries")
bmdl_batch.init_process("bmdlTraceBoundariesProcess")
bmdl_batch.set_input_from_db(0, label_img)
bmdl_batch.set_input_string(1, "./polygons.bin")
コード例 #2
0
ファイル: bmdl_tiled.py プロジェクト: yochju/vxl
##########################################################################
# Created by Gamze D. Tunali
#            LEMS, Brown University
#            Nov 11, 2008
##########################################################################
import brl_init
import bmdl_batch as batch
dbvalue = brl_init.register_batch(batch)
xdim = 2000
ydim = 2000
xover = 50
yover = 50
batch.init_process("bmdlModelingProcess")
batch.set_params_process("./modeling_params.xml")
batch.set_input_string(
    0, "C://test_images//BaghdadLIDAR//dem_1m_a1_baghdad_tile39.tif")
batch.set_input_string(
    1, "C://test_images//BaghdadLIDAR//dem_1m_a2_baghdad_tile39.tif")
batch.set_input_string(2, "")
batch.set_input_string(3, "C://test_images//IMESH//bmdl_kmz")
batch.set_input_unsigned(4, xdim)
batch.set_input_unsigned(5, ydim)
batch.set_input_unsigned(6, xover)
batch.set_input_unsigned(7, yover)
batch.run_process()