self.type = type # string data_dir = "/Volumes/Experiments/object_recognition/bvpl/CapitolSiteHigh/cropped_world" param_dir = "/Projects/lemsvxl/src/contrib/isabel/params" #first creat an empty world. print("Load Voxel World"); bvpl_batch.init_process("bvxmLoadGridProcess"); bvpl_batch.set_input_string(0, data_dir +"/ocp_cropped.vox"); bvpl_batch.set_input_string(1,"float"); bvpl_batch.run_process(); (world_id,world_type)= bvpl_batch.commit_output(0); world = dbvalue(world_id,world_type); print("Creating 2D edge kernel"); bvpl_batch.init_process("bvplCreateEdge2dKernelProcess"); bvpl_batch.set_params_process(param_dir + "/edge2d_kernel_params.xml"); bvpl_batch.run_process(); (kernel_id,kernel_type)= bvpl_batch.commit_output(0); kernel = dbvalue(kernel_id,kernel_type); print("Running Operator"); bvpl_batch.init_process("bvplNeighborhoodOperatorProcess"); bvpl_batch.set_input_from_db(0,world ); bvpl_batch.set_input_from_db(1,kernel); bvpl_batch.set_input_string(2,"float"); bvpl_batch.set_input_string(3,"edge2d"); bvpl_batch.set_input_string(4, data_dir + "/edge2d_100.vox"); bvpl_batch.run_process(); (result_x_world_id,result_x_world_type)= bvpl_batch.commit_output(0); result_x_world = dbvalue(result_x_world_id,result_x_world_type);
def __init__(self, index, type): self.id = index # unsigned integer self.type = type # string # first creat an empty world. print("Load Voxel World") bvpl_batch.init_process("bvxmLoadGridProcess") bvpl_batch.set_input_string( 0, "D:/vj/scripts/Lidar_edges/ocp_bin_0_scale_0.vox") bvpl_batch.set_input_string(1, "float") bvpl_batch.run_process() (world_id, world_type) = bvpl_batch.commit_output(0) world = dbvalue(world_id, world_type) print("Crop Voxel World") bvpl_batch.init_process("bvxmCropGridProcess") bvpl_batch.set_params_process( "D:/vj/scripts/Lidar_edges/bvxmCropGridProcess.xml") bvpl_batch.set_input_from_db(0, world) bvpl_batch.run_process() (crop_world_id, crop_world_type) = bvpl_batch.commit_output(0) crop_world = dbvalue(crop_world_id, crop_world_type) print("Writing World") bvpl_batch.init_process("bvxmSaveGridRawProcess") bvpl_batch.set_input_from_db(0, crop_world) bvpl_batch.set_input_string(1, "D:/vj/scripts/Lidar_edges/crop_world.raw") bvpl_batch.set_input_string(2, "float") bvpl_batch.run_process()
def __init__(self, index, type): self.id = index # unsigned integer self.type = type # string #first creat an empty world. print("Load Voxel World") bvpl_batch.init_process("bvxmLoadGridProcess") bvpl_batch.set_input_string(0, "D:/vj/scripts/Lidar_edges/ocp_bin_0_scale_0.vox") bvpl_batch.set_input_string(1, "float") bvpl_batch.run_process() (world_id, world_type) = bvpl_batch.commit_output(0) world = dbvalue(world_id, world_type) print("Crop Voxel World") bvpl_batch.init_process("bvxmCropGridProcess") bvpl_batch.set_params_process( "D:/vj/scripts/Lidar_edges/bvxmCropGridProcess.xml") bvpl_batch.set_input_from_db(0, world) bvpl_batch.run_process() (crop_world_id, crop_world_type) = bvpl_batch.commit_output(0) crop_world = dbvalue(crop_world_id, crop_world_type) print("Writing World") bvpl_batch.init_process("bvxmSaveGridRawProcess") bvpl_batch.set_input_from_db(0, crop_world) bvpl_batch.set_input_string(1, "D:/vj/scripts/Lidar_edges/crop_world.raw") bvpl_batch.set_input_string(2, "float") bvpl_batch.run_process()
data_dir = "/Users/isa/Experiments/CapitolSFM/few_windows" output_dir = "/Users/isa/Experiments/CapitolSFM/few_windows/corner2d_apm/0_plane_010_scale_331" print("Load Voxel Grid"); bvpl_batch.init_process("bvxmLoadGridProcess"); bvpl_batch.set_input_string(0, data_dir +"/KL_gaussf1.vox"); bvpl_batch.set_input_string(1,"bsta_gauss_f1"); bvpl_batch.run_process(); (world_id,world_type)= bvpl_batch.commit_output(0); world = dbvalue(world_id,world_type); print("Creating corner 2d kernel"); bvpl_batch.init_process("bvplCreateCorner2dKernelProcess"); bvpl_batch.set_params_process(output_dir +"/corner2d_params.xml"); bvpl_batch.run_process(); (kernel_id,kernel_type)= bvpl_batch.commit_output(0); kernel = dbvalue(kernel_id,kernel_type); print("Running Operator"); bvpl_batch.init_process("bvplNeighborhoodOperatorProcess"); bvpl_batch.set_input_from_db(0,world ); bvpl_batch.set_input_from_db(1,kernel); bvpl_batch.set_input_string(2,"bsta_gauss_f1"); bvpl_batch.set_input_string(3,"positive_gauss_convolution"); bvpl_batch.set_input_string(4, output_dir + "/KL_gaussf1_response.vox"); bvpl_batch.run_process(); (response_grid_id,response_grid_type)= bvpl_batch.commit_output(0); response_grid = dbvalue(response_grid_id,response_grid_type);
self.type = type # string #first creat an empty world. print("Load Voxel World") bvpl_batch.init_process("bvxmLoadGridProcess") bvpl_batch.set_input_string( 0, "D:/vj/scripts/Lidar_edges/ocp_200_100_0_250_200_100.vox") bvpl_batch.set_input_string(1, "float") bvpl_batch.run_process() (world_id, world_type) = bvpl_batch.commit_output(0) world = dbvalue(world_id, world_type) print("Creating 2D edge kernel") bvpl_batch.init_process("bvplCreateEdge2dKernelProcess") bvpl_batch.set_params_process("./edge2d_kernel_params.xml") bvpl_batch.run_process() (kernel_id, kernel_type) = bvpl_batch.commit_output(0) kernel = dbvalue(kernel_id, kernel_type) print("Running Operator") bvpl_batch.init_process("bvplNeighborhoodOperatorProcess") bvpl_batch.set_input_from_db(0, world) bvpl_batch.set_input_from_db(1, kernel) bvpl_batch.set_input_string(2, "float") bvpl_batch.set_input_string(3, "edge2d") bvpl_batch.set_input_string(4, "D:/vj/scripts/Lidar_edges/x_conv.vox") bvpl_batch.run_process() (result_x_world_id, result_x_world_type) = bvpl_batch.commit_output(0) result_x_world = dbvalue(result_x_world_id, result_x_world_type)
import bvpl_batch as batch dbvalue = brl_init.register_batch(batch) # first creat an empty world. print("Load Voxel World") batch.init_process("bvxmLoadGridProcess") batch.set_input_string( 0, "D:/vj/scripts/Lidar_edges/ocp_200_100_0_250_200_100.vox") batch.set_input_string(1, "float") batch.run_process() (world_id, world_type) = batch.commit_output(0) world = dbvalue(world_id, world_type) print("Creating 2D edge kernel") batch.init_process("bvplCreateEdge2dKernelProcess") batch.set_params_process("./edge2d_kernel_params.xml") batch.run_process() (kernel_id, kernel_type) = batch.commit_output(0) kernel = dbvalue(kernel_id, kernel_type) print("Running Operator") batch.init_process("bvplNeighborhoodOperatorProcess") batch.set_input_from_db(0, world) batch.set_input_from_db(1, kernel) batch.set_input_string(2, "float") batch.set_input_string(3, "edge2d") batch.set_input_string(4, "D:/vj/scripts/Lidar_edges/x_conv.vox") batch.run_process() (result_x_world_id, result_x_world_type) = batch.commit_output(0) result_x_world = dbvalue(result_x_world_id, result_x_world_type)