コード例 #1
0
ファイル: bvxm_vil_adaptor.py プロジェクト: mirestrepo/vxl
def read_CLIF07(indir,outdir,camnum,datatype="CLIF06") :
  bvxm_batch.init_process("bilReadCLIF07DataProcess")
  bvxm_batch.set_input_string(0,indir);
  bvxm_batch.set_input_string(1,outdir);
  bvxm_batch.set_input_int(2,camnum);
  bvxm_batch.set_input_string(3,datatype);
  bvxm_batch.run_process();
コード例 #2
0
ファイル: bvxm_vil_adaptor.py プロジェクト: caioc2/vxl
def read_CLIF07(indir, outdir, camnum, datatype="CLIF06"):
    bvxm_batch.init_process("bilReadCLIF07DataProcess")
    bvxm_batch.set_input_string(0, indir)
    bvxm_batch.set_input_string(1, outdir)
    bvxm_batch.set_input_int(2, camnum)
    bvxm_batch.set_input_string(3, datatype)
    bvxm_batch.run_process()
コード例 #3
0
ファイル: bvxm_vil_adaptor.py プロジェクト: caioc2/vxl
def median_filter(img, operator_half_size):
    bvxm_batch.init_process("vilMedianFilterProcess")
    bvxm_batch.set_input_from_db(0, img)
    bvxm_batch.set_input_int(1, operator_half_size)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    img_out = dbvalue(id, type)
    return img_out
コード例 #4
0
ファイル: bvxm_vil_adaptor.py プロジェクト: mirestrepo/vxl
def median_filter(img, operator_half_size):
    bvxm_batch.init_process("vilMedianFilterProcess")
    bvxm_batch.set_input_from_db(0,img)
    bvxm_batch.set_input_int(1, operator_half_size)
    bvxm_batch.run_process()
    (id,type) = bvxm_batch.commit_output(0)
    img_out = dbvalue(id,type)
    return img_out
コード例 #5
0
ファイル: bvxm_vil_adaptor.py プロジェクト: caioc2/vxl
def undistort_image(img, param_file, iters):
    bvxm_batch.init_process("vilUndistortImageProcess")
    bvxm_batch.set_input_from_db(0, img)
    bvxm_batch.set_input_string(1, param_file)
    bvxm_batch.set_input_int(2, iters)
    bvxm_batch.run_process()
    (o_id, o_type) = bvxm_batch.commit_output(0)
    out_img = dbvalue(o_id, o_type)
    return out_img
コード例 #6
0
ファイル: bvxm_vil_adaptor.py プロジェクト: caioc2/vxl
def pixel(img, point):
    bvxm_batch.init_process("vilPixelValueProcess")
    bvxm_batch.set_input_from_db(0, img)
    bvxm_batch.set_input_int(1, int(point[0]))
    bvxm_batch.set_input_int(2, int(point[1]))
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    val = bvxm_batch.get_output_float(id)
    return val
コード例 #7
0
ファイル: bvxm_vil_adaptor.py プロジェクト: mirestrepo/vxl
def undistort_image(img, param_file, iters) :
  bvxm_batch.init_process("vilUndistortImageProcess");
  bvxm_batch.set_input_from_db(0,img)
  bvxm_batch.set_input_string(1, param_file);
  bvxm_batch.set_input_int(2, iters);
  bvxm_batch.run_process();
  (o_id,o_type) = bvxm_batch.commit_output(0);
  out_img = dbvalue(o_id,o_type);
  return out_img;
コード例 #8
0
ファイル: bvxm_vil_adaptor.py プロジェクト: mirestrepo/vxl
def pixel(img, point):
    bvxm_batch.init_process("vilPixelValueProcess")
    bvxm_batch.set_input_from_db(0,img)
    bvxm_batch.set_input_int(1, int(point[0]))
    bvxm_batch.set_input_int(2, int(point[1]))
    bvxm_batch.run_process()
    (id,type) = bvxm_batch.commit_output(0)
    val = bvxm_batch.get_output_float(id)
    return val
コード例 #9
0
ファイル: bvxm_vil_adaptor.py プロジェクト: caioc2/vxl
def bvxm_resize(img, ni, nj, pixel="float"):
    bvxm_batch.init_process("vilResampleProcess")
    bvxm_batch.set_input_from_db(0, img)
    bvxm_batch.set_input_int(1, ni)
    bvxm_batch.set_input_int(2, nj)
    bvxm_batch.set_input_string(3, pixel)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    img = dbvalue(id, type)
    return img
コード例 #10
0
ファイル: bvxm_vil_adaptor.py プロジェクト: mirestrepo/vxl
def bvxm_resize(img, ni, nj, pixel="float"):
    bvxm_batch.init_process("vilResampleProcess")
    bvxm_batch.set_input_from_db(0,img)
    bvxm_batch.set_input_int(1, ni)
    bvxm_batch.set_input_int(2, nj)
    bvxm_batch.set_input_string(3, pixel);
    bvxm_batch.run_process()
    (id,type) = bvxm_batch.commit_output(0)
    img = dbvalue(id,type)
    return img
コード例 #11
0
ファイル: bvxm_adaptor.py プロジェクト: drewgilliam/vxl
def update_edges(world, cropped_cam, cropped_edge_image, edge_prob_mask_size=21, edge_prob_mask_sigma=1.0, scale=0):
    batch.init_process("bvxmUpdateEdgesProcess")
    batch.set_input_from_db(0, world)
    batch.set_input_from_db(1, cropped_cam)
    batch.set_input_from_db(2, cropped_edge_image)
    batch.set_input_unsigned(3, 0)
    batch.set_input_int(4, edge_prob_mask_size)
    batch.set_input_float(5, edge_prob_mask_sigma)
# batch.set_params_process(update_params_xml); #
# "./bvxmUpdateEdgesProcess.xml");
    batch.run_process()
コード例 #12
0
ファイル: bvxm_vil_adaptor.py プロジェクト: caioc2/vxl
def detect_shadow_ridge(region_img, blob_size_t, sun_angle):
    bvxm_batch.init_process("vilShadowRidgeDetectionProcess")
    bvxm_batch.set_input_from_db(0, region_img)
    bvxm_batch.set_input_int(1, blob_size_t)
    bvxm_batch.set_input_float(2, sun_angle)
    bvxm_batch.run_process()
    (o_id, o_type) = bvxm_batch.commit_output(0)
    region_img = dbvalue(o_id, o_type)
    (o_id, o_type) = bvxm_batch.commit_output(1)
    out_img = dbvalue(o_id, o_type)
    (o_id, o_type) = bvxm_batch.commit_output(2)
    dist_img = dbvalue(o_id, o_type)
    return region_img, out_img, dist_img
コード例 #13
0
ファイル: bvxm_vil_adaptor.py プロジェクト: mirestrepo/vxl
def detect_shadow_ridge(region_img,blob_size_t, sun_angle) :
  bvxm_batch.init_process("vilShadowRidgeDetectionProcess");
  bvxm_batch.set_input_from_db(0,region_img)
  bvxm_batch.set_input_int(1, blob_size_t);
  bvxm_batch.set_input_float(2, sun_angle);
  bvxm_batch.run_process();
  (o_id,o_type) = bvxm_batch.commit_output(0);
  region_img = dbvalue(o_id,o_type);
  (o_id,o_type) = bvxm_batch.commit_output(1);
  out_img = dbvalue(o_id,o_type);
  (o_id,o_type) = bvxm_batch.commit_output(2);
  dist_img = dbvalue(o_id,o_type);
  return region_img, out_img, dist_img;
コード例 #14
0
ファイル: bvxm_adaptor.py プロジェクト: yochju/vxl
def update_edges(world,
                 cropped_cam,
                 cropped_edge_image,
                 edge_prob_mask_size=21,
                 edge_prob_mask_sigma=1.0,
                 scale=0):
    batch.init_process("bvxmUpdateEdgesProcess")
    batch.set_input_from_db(0, world)
    batch.set_input_from_db(1, cropped_cam)
    batch.set_input_from_db(2, cropped_edge_image)
    batch.set_input_unsigned(3, 0)
    batch.set_input_int(4, edge_prob_mask_size)
    batch.set_input_float(5, edge_prob_mask_sigma)
    # batch.set_params_process(update_params_xml); #
    # "./bvxmUpdateEdgesProcess.xml");
    batch.run_process()
コード例 #15
0
ファイル: bvxm_vil_adaptor.py プロジェクト: caioc2/vxl
def bae_raw_stream(file_path, ni=0, nj=0, pixelsize=0):
    bvxm_batch.init_process("bilCreateRawImageIstreamProcess")
    bvxm_batch.set_input_string(0, file_path)
    bvxm_batch.set_input_int(1, ni)
    bvxm_batch.set_input_int(2, nj)
    bvxm_batch.set_input_int(3, pixelsize)
    bvxm_batch.run_process()
    (id, type) = bvxm_batch.commit_output(0)
    stream = dbvalue(id, type)
    (id, type) = bvxm_batch.commit_output(1)
    numImgs = bvxm_batch.get_output_int(id)
    return stream, numImgs
コード例 #16
0
ファイル: bvxm_vil_adaptor.py プロジェクト: mirestrepo/vxl
def bae_raw_stream(file_path,ni=0,nj=0,pixelsize=0) :
  bvxm_batch.init_process("bilCreateRawImageIstreamProcess")
  bvxm_batch.set_input_string(0,file_path);
  bvxm_batch.set_input_int(1,ni);
  bvxm_batch.set_input_int(2,nj);
  bvxm_batch.set_input_int(3,pixelsize);
  bvxm_batch.run_process();
  (id, type) = bvxm_batch.commit_output(0);
  stream = dbvalue(id, type);
  (id, type) = bvxm_batch.commit_output(1);
  numImgs = bvxm_batch.get_output_int(id);
  return stream, numImgs