def image_range(img): bvxm_batch.init_process('vilImageRangeProcess') bvxm_batch.set_input_from_db(0,img) bvxm_batch.run_process() (id,type) = bvxm_batch.commit_output(0) minVal = bvxm_batch.get_output_float(id) (id,type) = bvxm_batch.commit_output(1) maxVal = bvxm_batch.get_output_float(id) return minVal, maxVal
def image_range(img): bvxm_batch.init_process('vilImageRangeProcess') bvxm_batch.set_input_from_db(0, img) bvxm_batch.run_process() (id, type) = bvxm_batch.commit_output(0) minVal = bvxm_batch.get_output_float(id) (id, type) = bvxm_batch.commit_output(1) maxVal = bvxm_batch.get_output_float(id) return minVal, maxVal
def image_mean(img): bvxm_batch.init_process("vilImageMeanProcess") bvxm_batch.set_input_from_db(0, img) bvxm_batch.run_process() (id, type) = bvxm_batch.commit_output(0) mean_val = bvxm_batch.get_output_float(id) bvxm_batch.remove_data(id) return mean_val
def image_mean(img): bvxm_batch.init_process("vilImageMeanProcess") bvxm_batch.set_input_from_db(0,img) bvxm_batch.run_process() (id,type) = bvxm_batch.commit_output(0) mean_val = bvxm_batch.get_output_float(id) bvxm_batch.remove_data(id) return mean_val
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 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 get_output_float(id): fval = bvxm_batch.get_output_float(id) return fval