def trajectory_size(trajectory): bstm_batch.init_process("bstmViewTrajectorySizeProcess") bstm_batch.set_input_from_db(0, trajectory) bstm_batch.run_process() (id, type) = bstm_batch.commit_output(0) size = bstm_batch.get_output_unsigned(id) bstm_batch.remove_data(id) return size
def trajectory_size(trajectory): bstm_batch.init_process("bstmViewTrajectorySizeProcess") bstm_batch.set_input_from_db(0, trajectory) bstm_batch.run_process() (id,type) = bstm_batch.commit_output(0) size = bstm_batch.get_output_unsigned(id) bstm_batch.remove_data(id) return size
def image_mean(img): bstm_batch.init_process("vilImageMeanProcess") bstm_batch.set_input_from_db(0, img) bstm_batch.run_process() (id, type) = bstm_batch.commit_output(0) mean_val = bstm_batch.get_output_float(id) bstm_batch.remove_data(id) return mean_val
def load_image(file_path): bstm_batch.init_process("vilLoadImageViewProcess") bstm_batch.set_input_string(0, file_path) bstm_batch.run_process() (id, type) = bstm_batch.commit_output(0) (ni_id, ni_type) = bstm_batch.commit_output(1) (nj_id, nj_type) = bstm_batch.commit_output(2) ni = bstm_batch.get_output_unsigned(ni_id) nj = bstm_batch.get_output_unsigned(nj_id) img = dbvalue(id, type) bstm_batch.remove_data(ni_id) bstm_batch.remove_data(nj_id) return img, ni, nj