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();
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()
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
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
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
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
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;
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
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
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
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()
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
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;
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
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