def run(self):
     while not self.kill_received:
          # get a task
         try:
             job = self.work_queue.get_nowait()
         except Queue.Empty:
             break
         
         start_time = time.time();
         dbrec3d_batch.set_stdout('logs/log_' + str(os.getpid())+ ".txt");
         
         dbrec3d_batch.init_process("bof_learn_category_codebook_salient_process");
         dbrec3d_batch.set_input_from_db(0,job.categories);
         dbrec3d_batch.set_input_unsigned(1, job.class_id);
         dbrec3d_batch.set_input_unsigned(2, job.num_means);
         dbrec3d_batch.set_input_double(3, job.fraction);
         dbrec3d_batch.set_input_unsigned(4, job.J);
         dbrec3d_batch.set_input_unsigned(5, job.max_it);
         dbrec3d_batch.set_input_float(6, job.top_p);
         dbrec3d_batch.set_input_string(7, job.class_mean_dir);
         dbrec3d_batch.run_process();
         
         
         dbrec3d_batch.clear();
         dbrec3d_batch.reset_stdout();
    def run(self):
        while not self.kill_received:
            # get a task
            try:
                job = self.work_queue.get_nowait()
            except Queue.Empty:
                break

            start_time = time.time()
            dbrec3d_batch.set_stdout("logs/log_" + str(os.getpid()) + ".txt")

            dbrec3d_batch.init_process("bof_learn_categories_salient_process")
            dbrec3d_batch.set_input_from_db(0, job.codebook)
            dbrec3d_batch.set_input_int(1, job.scene_id)
            dbrec3d_batch.set_input_float(2, job.top_p)
            dbrec3d_batch.set_input_from_db(3, job.categories)
            dbrec3d_batch.set_input_string(4, job.path_out)
            dbrec3d_batch.run_process()

            dbrec3d_batch.clear()
            dbrec3d_batch.reset_stdout()
Exemplo n.º 3
0
min_y = -30;
max_y = 30;
min_z = -15;
max_z = 15;

axes_x=[-1.0,0.0,0.0];
axes_y=[0.0,-1.0,0.0];
axes_z=[0.0,0.0,-1.0];

angle =  0.0;


axis_x = axes_x[0];
axis_y = axes_y[0];
axis_z = axes_z[0];

print("Creating 3D edge kernel");
dbrec3d_batch.init_process("bvplCreateEdge3dKernelProcess");
dbrec3d_batch.set_input_int(0,min_x);
dbrec3d_batch.set_input_int(1,max_x);
dbrec3d_batch.set_input_int(2,min_y);
dbrec3d_batch.set_input_int(3,max_y);
dbrec3d_batch.set_input_int(4,min_z);
dbrec3d_batch.set_input_int(5,max_z);
dbrec3d_batch.set_input_float(6,axis_x);
dbrec3d_batch.set_input_float(7,axis_y);
dbrec3d_batch.set_input_float(8,axis_z);
dbrec3d_batch.set_input_float(9,angle);
dbrec3d_batch.run_process();
(kernel_id,kernel_type)= dbrec3d_batch.commit_output(0);
kernel = dbvalue(kernel_id,kernel_type);
Exemplo n.º 4
0
#!/bin/python

#  scene_to_pcl.py
#  voxels-at-lems
#
#  Created by Isabel Restrepo on 11/2/11.
#  Copyright (c) 2011 Brown University. All rights reserved.


import dbrec3d_batch;
import os;
import optparse;

dbrec3d_batch.register_processes();
dbrec3d_batch.register_datatypes();

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

ply_fname = "/Users/isa/Experiments/helicopter_providence/tests_normals/max_level_6/flipped_normals.ply"
pcd_fname = "/Users/isa/Experiments/helicopter_providence/tests_normals/max_level_6/flipped_normals.pcd"
dbrec3d_batch.init_process("pcl_read_and_filter_ply_normals_process");

dbrec3d_batch.set_input_string(0, ply_fname);
dbrec3d_batch.set_input_string(1, pcd_fname);
dbrec3d_batch.set_input_float(2, 0.0701328); #this value corresponds to 5%
dbrec3d_batch.run_process();