def pixel(img, point): bstm_batch.init_process("vilPixelValueProcess") bstm_batch.set_input_from_db(0, img) bstm_batch.set_input_int(1, int(point[0])) bstm_batch.set_input_int(2, int(point[1])) bstm_batch.run_process() (id, type) = bstm_batch.commit_output(0) val = bstm_batch.get_output_float(id) return val
def resize(img, ni, nj, pixel="float"): bstm_batch.init_process("vilResampleProcess") bstm_batch.set_input_from_db(0, img) bstm_batch.set_input_int(1, ni) bstm_batch.set_input_int(2, nj) bstm_batch.set_input_string(3, pixel) bstm_batch.run_process() (id, type) = bstm_batch.commit_output(0) img = dbvalue(id, type) return img
def label_change(scene, device, cache, cam, change_img, change_t, label, time): bstm_batch.init_process("bstmOclLabelRayProcess") bstm_batch.set_input_from_db(0, device) bstm_batch.set_input_from_db(1, scene) bstm_batch.set_input_from_db(2, cache) bstm_batch.set_input_from_db(3, cam) bstm_batch.set_input_from_db(4, change_img) bstm_batch.set_input_float(5, change_t) bstm_batch.set_input_float(6, time) bstm_batch.set_input_int(7, label) bstm_batch.run_process()
def label_change(scene, device, cache, cam, change_img, change_t, label, time) : bstm_batch.init_process("bstmOclLabelRayProcess"); bstm_batch.set_input_from_db(0,device); bstm_batch.set_input_from_db(1,scene); bstm_batch.set_input_from_db(2,cache); bstm_batch.set_input_from_db(3,cam); bstm_batch.set_input_from_db(4,change_img); bstm_batch.set_input_float(5, change_t); bstm_batch.set_input_float(6, time); bstm_batch.set_input_int(7, label); bstm_batch.run_process();