bvpl_batch.register_processes();
bvpl_batch.register_datatypes();


class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    self.type = type   # string

data_dir = "c:/Experiments/object_recognition/bvpl/CapitolSiteHigh/cropped_world"
output_dir = "c:/Experiments/object_recognition/bvpl/CapitolSiteHigh/gauss_xx_kernel"
#param_dir = "c:/Projects/vxl/vxl/contrib/brl/contrib/lemsvxl/src/contrib/isabel/params"


print("Load Voxel Grid");
bvpl_batch.init_process("bvxmLoadGridProcess");
bvpl_batch.set_input_string(0, data_dir +"/KL_gaussf1_cropped.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 3D edge kernel");
bvpl_batch.init_process("bvplCreateGauss3dXXKernelVectorProcess");
bvpl_batch.set_input_float(0, 1.5);  #Sigma1
bvpl_batch.set_input_float(1, 2);  #Sigma2 
bvpl_batch.set_input_float(2, 2);  #Sigma3
bvpl_batch.run_process();
(kernel_id,kernel_type)= bvpl_batch.commit_output(0);
kernel_vector = dbvalue(kernel_id,kernel_type);
bvpl_batch.register_processes()
bvpl_batch.register_datatypes()


class dbvalue:

    def __init__(self, index, type):
        self.id = index    # unsigned integer
        self.type = type   # string

# first creat an empty world.
world_dir = "D:/tests/lidar_edge_reg/"
cwd_dir = "D:/tests/lidar_edge_reg/"

print("Load Voxel World")
bvpl_batch.init_process("bvxmLoadGridProcess")
bvpl_batch.set_input_string(0, world_dir + "ocp_opinion_bin_0_scale_0.vox")
bvpl_batch.set_input_string(1, "ocp_opinion")
bvpl_batch.run_process()
(world_id, world_type) = bvpl_batch.commit_output(0)
world = dbvalue(world_id, world_type)

print("Creating 3D edge kernel")
bvpl_batch.init_process("bvplCreateEdge3dKernelVectorProcess")
bvpl_batch.set_input_unsigned(0, 2)
bvpl_batch.set_input_unsigned(1, 5)
bvpl_batch.set_input_unsigned(2, 5)
bvpl_batch.run_process()
(kernel_id, kernel_type) = bvpl_batch.commit_output(0)
kernel = dbvalue(kernel_id, kernel_type)
bvpl_batch.register_processes();
bvpl_batch.register_datatypes();


class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    self.type = type   # string

visualize_all = 1;
non_max = 1;
data_dir =  "/Users/isa/Experiments/CapitolSiteHigh_sfm/few_windows/corner2d_apm/0+45-360_plane_010_scale_331"
output_dir = "/Users/isa/Experiments/CapitolSiteHigh_sfm/few_windows/corner2d_apm/0+45-360_plane_010_scale_331/non_max"

print("Creating corner 2d kernel");
bvpl_batch.init_process("bvplCreateCorner2dKernelVectorProcess");
bvpl_batch.set_input_unsigned(0, 3);  #half length
bvpl_batch.set_input_unsigned(1, 3);  #half width
bvpl_batch.set_input_unsigned(2, 1);  #half thickness
bvpl_batch.run_process();
(kernel_id,kernel_type)= bvpl_batch.commit_output(0);
kernel_vector = dbvalue(kernel_id,kernel_type);

#time.sleep(30);
print("Load Response Grid");
bvpl_batch.init_process("bvxmLoadGridProcess");
bvpl_batch.set_input_string(0, data_dir + "/KL_gaussf1_response.vox");
bvpl_batch.set_input_string(1,"bsta_gauss_f1");
bvpl_batch.run_process();
(response_grid_id,response_grid_type)= bvpl_batch.commit_output(0);
response_grid = dbvalue(response_grid_id,response_grid_type);
bvpl_batch.register_processes()
bvpl_batch.register_datatypes()


class dbvalue:
    def __init__(self, index, type):
        self.id = index  # unsigned integer
        self.type = type  # string


# first creat an empty world.
world_dir = "D:/tests/lidar_edge_reg/"
cwd_dir = "D:/tests/lidar_edge_reg/"

print("Load Voxel World")
bvpl_batch.init_process("bvxmLoadGridProcess")
bvpl_batch.set_input_string(0, world_dir + "ocp_opinion_bin_0_scale_0.vox")
bvpl_batch.set_input_string(1, "ocp_opinion")
bvpl_batch.run_process()
(world_id, world_type) = bvpl_batch.commit_output(0)
world = dbvalue(world_id, world_type)

print("Creating 3D edge kernel")
bvpl_batch.init_process("bvplCreateEdge3dKernelVectorProcess")
bvpl_batch.set_input_unsigned(0, 2)
bvpl_batch.set_input_unsigned(1, 5)
bvpl_batch.set_input_unsigned(2, 5)
bvpl_batch.run_process()
(kernel_id, kernel_type) = bvpl_batch.commit_output(0)
kernel = dbvalue(kernel_id, kernel_type)
#directions = "main_plane"
#output_dir = "/Users/isa/Experiments/CapitolSFM/few_windows/corner2d_coexist/main_plane_331"
#num_corners = 8;

#directions = "all_corners"
#output_dir = "/Users/isa/Experiments/CapitolSFM/few_windows/corner2d_coexist/all_corners_331"
#num_corners = 104;#112;

if not os.path.isdir( output_dir + "/"):
  os.mkdir( output_dir + "/");

if (find_corners):

  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);
  app_grid = dbvalue(world_id,world_type);

  print("Creating corner 2d kernel");
  bvpl_batch.init_process("bvplCreateCorner2dKernelVectorProcess");
  bvpl_batch.set_input_unsigned(0, corner_length);  #half length
  bvpl_batch.set_input_unsigned(1, corner_width);  #half width
  bvpl_batch.set_input_unsigned(2, corner_thickness);  #half thickness
  bvpl_batch.set_input_string(3, directions);
  bvpl_batch.run_process();
  (kernel_id,kernel_type)= bvpl_batch.commit_output(0);
  corners_kernel_vector = dbvalue(kernel_id,kernel_type);
# Script to run find 2d corners on appearance grid
# Author : Isabel Restrepo
#8-31-2009
import bvpl_batch
import time
#time.sleep(30);
bvpl_batch.register_processes();
bvpl_batch.register_datatypes();

class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    self.type = type   # string
find_corners = 1;
pair_corners = 1;
save_corners_vrml = 1;
save_hue = 0;
data_dir = "/Users/isa/Experiments/CapitolSFM/few_windows"

output_dir = "/Users/isa/Experiments/CapitolSFM/few_windows/ocp+app/main_corners_331"
directions = "main_corners"
if (find_corners):
	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);
	app_grid = dbvalue(world_id,world_type);
	
# Script to run find 2d corners on appearance grid
# Author : Isabel Restrepo
#8-31-2009
import bvpl_batch
import time
import os
import sys
#time.sleep(30);
bvpl_batch.register_processes();
bvpl_batch.register_datatypes();

class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    self.type = type   # string
find_corners = 1;
load_corners = 0;
pair_corners = 1;
save_corners_vrml = 0;
save_pairs_vrml = 0;
save_centers_vrml = 0;
corner_length = 3;
corner_width = 3;
corner_thickness =1;
data_dir = sys.argv[1];
output_dir = sys.argv[2];
directions = sys.argv[3];
num_corners = int(sys.argv[4]);
print("Data Dir");
print data_dir;
# time.sleep(60);
bvpl_batch.register_processes()
bvpl_batch.register_datatypes()


class dbvalue:
    def __init__(self, index, type):
        self.id = index  # unsigned integer
        self.type = type  # string


data_dir = "/Volumes/Experiments/object_recognition/bvpl/CapitolSiteHigh/cropped_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 3D edge kernel")
bvpl_batch.init_process("bvplCreateEdge3dKernelVectorProcess")
bvpl_batch.set_input_unsigned(0, 3)
bvpl_batch.set_input_unsigned(1, 3)
bvpl_batch.set_input_unsigned(2, 3)
bvpl_batch.run_process()
(kernel_id, kernel_type) = bvpl_batch.commit_output(0)
kernel_vector = dbvalue(kernel_id, kernel_type)
#num_corners = 8;

#directions = "all_corners"
#data_dir = "/Users/isa/Experiments/CapitolSFM/few_windows/ocp+app/all_corners_331/pair1"
#output_dir = "/Users/isa/Experiments/CapitolSFM/few_windows/ocp+app/all_corners_331/pair2"
#num_corners = 104;#112;

opposite_angle = 180;

if not os.path.isdir( output_dir + "/"):
  os.mkdir( output_dir + "/");



print("Load Pair Grid");
bvpl_batch.init_process("bvplLoadPairGridProcess");
bvpl_batch.set_input_string(0, data_dir +"/pair_centers.vox");
bvpl_batch.run_process();
(id, type)= bvpl_batch.commit_output(0);
pair_grid = dbvalue(id, type);
	
	
if pair_pairs:

  print("Creating kernels to search for corners");
  bvpl_batch.init_process("bvplCreateWCKernelVectorProcess");
  bvpl_batch.set_input_int(0, 0);  #min length
  bvpl_batch.set_input_int(1, 5);   #max length
  bvpl_batch.set_input_int(2, -5);  #min width
  bvpl_batch.set_input_int(3, 0);   #max width
  bvpl_batch.set_input_int(4, -2);  #min thickness
bvpl_batch.register_processes();
bvpl_batch.register_datatypes();


class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    self.type = type   # string

save_hue = 1;
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.register_processes();
bvpl_batch.register_datatypes();


class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    self.type = type   # string

save_hue = 1;
data_dir = "/Users/isa/Experiments/CapitolSiteHigh_sfm/few_windows"
output_dir = "/Users/isa/Experiments/CapitolSiteHigh_sfm/few_windows/corner2d_apm/0+45-360_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("bvplCreateCorner2dKernelVectorProcess");
bvpl_batch.set_input_unsigned(0, 3);  #half length
bvpl_batch.set_input_unsigned(1, 3);  #half width
bvpl_batch.set_input_unsigned(2, 1);  #half thickness
bvpl_batch.run_process();
(kernel_id,kernel_type)= bvpl_batch.commit_output(0);
kernel_vector = dbvalue(kernel_id,kernel_type);
Beispiel #12
0
import bvpl_batch
bvpl_batch.register_processes()
bvpl_batch.register_datatypes()


class dbvalue:
    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_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)
import time
#time.sleep(60);
bvpl_batch.register_processes();
bvpl_batch.register_datatypes();


class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    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("bvplCreateEdge2dKernelVectorProcess");
bvpl_batch.set_input_unsigned(0, 5);
bvpl_batch.set_input_unsigned(1, 5);
bvpl_batch.run_process();
(kernel_id,kernel_type)= bvpl_batch.commit_output(0);
kernel_vector = dbvalue(kernel_id,kernel_type);

print("Running Operator");
bvpl_batch.register_processes();
bvpl_batch.register_datatypes();


class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    self.type = type   # string

save_hue = 1;
data_dir = "/Users/isa/Experiments/CapitolSiteHigh_sfm/few_windows"
output_dir = "/Users/isa/Experiments/CapitolSiteHigh_sfm/few_windows/corner2d_coexist/0+45-360_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("bvplCreateCorner2dKernelVectorProcess");
bvpl_batch.set_input_unsigned(0, 3);  #half length
bvpl_batch.set_input_unsigned(1, 3);  #half width
bvpl_batch.set_input_unsigned(2, 1);  #half thickness
bvpl_batch.run_process();
(kernel_id,kernel_type)= bvpl_batch.commit_output(0);
kernel_vector = dbvalue(kernel_id,kernel_type);
Beispiel #15
0
import bvpl_batch
bvpl_batch.register_processes()
bvpl_batch.register_datatypes()


class dbvalue:
    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")
Beispiel #16
0
import bvpl_batch
bvpl_batch.register_processes()
bvpl_batch.register_datatypes()


class dbvalue:

    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")
Beispiel #17
0
# time.sleep(30);
bvpl_batch.register_processes()
bvpl_batch.register_datatypes()

data_dir = "/Users/isa/Experiments/CapitolSFM/smaller_capitol/ocp+app/corners"


class dbvalue:
    def __init__(self, index, type):
        self.id = index  # unsigned integer
        self.type = type  # string


print("Load Pair Grid")
bvpl_batch.init_process("bvplLoadPairGridProcess")
bvpl_batch.set_input_string(0, data_dir + "/pair_centers.vox")
bvpl_batch.run_process()
(id, type) = bvpl_batch.commit_output(0)
pair_grid = dbvalue(id, type)

print("Extract Response")
bvpl_batch.init_process("bvplPairToFloatProcess")
bvpl_batch.set_input_from_db(0, pair_grid)
bvpl_batch.set_input_string(1, data_dir + "/pair_resp.vox")
bvpl_batch.run_process()
(id, type) = bvpl_batch.commit_output(0)
float_grid = dbvalue(id, type)

print("Writing Response Grid")
bvpl_batch.init_process("bvxmSaveGridRawProcess")
import time
#time.sleep(60);
bvpl_batch.register_processes();
bvpl_batch.register_datatypes();


class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    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 3D edge kernel");
bvpl_batch.init_process("bvplCreateEdge3dKernelVectorProcess");
bvpl_batch.set_input_unsigned(0, 5);  #width
bvpl_batch.set_input_unsigned(1, 5);  #height
bvpl_batch.set_input_unsigned(2, 5);  #length
bvpl_batch.run_process();
(kernel_id,kernel_type)= bvpl_batch.commit_output(0);
kernel_vector = dbvalue(kernel_id,kernel_type);
#!/usr/bin/python
# Script to run find 2d corners on appearance grid
# Author : Isabel Restrepo
#8-31-2009
import bvpl_batch
import time
import sys
import os
#time.sleep(30);
bvpl_batch.register_processes();
bvpl_batch.register_datatypes();

class dbvalue:
  def __init__(self, index, type):
    self.id = index    # unsigned integer
    self.type = type   # string
save_hue = 0;
#data_dir = "/Users/isa/Experiments/CapitolSFM/few_windows"
#output_dir = "/Users/isa/Experiments/CapitolSFM/few_windows/ocp+app/all_directions"
data_dir = sys.argv[1];
output_dir = sys.argv[2];
if not os.path.isdir( output_dir + "/"):
  os.mkdir( output_dir + "/");
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);
app_grid = dbvalue(world_id,world_type);