Ejemplo n.º 1
0
def image_range(img):
    bstm_batch.init_process("vilImageRangeProcess")
    bstm_batch.set_input_from_db(0, img)
    bstm_batch.run_process()
    (id, type) = bstm_batch.commit_output(0)
    minVal = bstm_batch.get_output_float(id)
    (id, type) = bstm_batch.commit_output(1)
    maxVal = bstm_batch.get_output_float(id)
    return minVal, maxVal
Ejemplo n.º 2
0
def image_range(img):
    bstm_batch.init_process('vilImageRangeProcess')
    bstm_batch.set_input_from_db(0, img)
    bstm_batch.run_process()
    (id, type) = bstm_batch.commit_output(0)
    minVal = bstm_batch.get_output_float(id)
    (id, type) = bstm_batch.commit_output(1)
    maxVal = bstm_batch.get_output_float(id)
    return minVal, maxVal
Ejemplo n.º 3
0
def project_point(camera, x, y, z):
    bstm_batch.init_process('vpglProjectProcess')
    bstm_batch.set_input_from_db(0, camera)
    bstm_batch.set_input_float(1, x)
    bstm_batch.set_input_float(2, y)
    bstm_batch.set_input_float(3, z)
    bstm_batch.run_process()
    (id, type) = bstm_batch.commit_output(0)
    u = bstm_batch.get_output_float(id)
    (id, type) = bstm_batch.commit_output(1)
    v = bstm_batch.get_output_float(id)
    return (u, v)
Ejemplo n.º 4
0
def scene_statistics(scene, cache):
    bstm_batch.init_process("bstmSceneStatisticsProcess")
    bstm_batch.set_input_from_db(0, scene)
    bstm_batch.set_input_from_db(1, cache)
    bstm_batch.run_process()
    (s1_id, s1_type) = bstm_batch.commit_output(0)
    (s2_id, s2_type) = bstm_batch.commit_output(1)
    (s3_id, s3_type) = bstm_batch.commit_output(2)
    s1 = bstm_batch.get_output_float(s1_id)
    s2 = bstm_batch.get_output_float(s2_id)
    s3 = bstm_batch.get_output_unsigned(s3_id)
    return [s1, s2, s3]
Ejemplo n.º 5
0
def scene_statistics(scene, cache):
    bstm_batch.init_process("bstmSceneStatisticsProcess");
    bstm_batch.set_input_from_db(0, scene );
    bstm_batch.set_input_from_db(1, cache );
    bstm_batch.run_process();
    (s1_id, s1_type) = bstm_batch.commit_output(0);
    (s2_id, s2_type) = bstm_batch.commit_output(1);
    (s3_id, s3_type) = bstm_batch.commit_output(2);
    s1 = bstm_batch.get_output_float(s1_id);
    s2 = bstm_batch.get_output_float(s2_id);
    s3 = bstm_batch.get_output_unsigned(s3_id);
    return [s1,s2,s3]
Ejemplo n.º 6
0
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
Ejemplo n.º 7
0
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
Ejemplo n.º 8
0
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
Ejemplo n.º 9
0
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