import boxm_batch
import sys
import optparse
import os
import glob

# import matplotlib.pyplot as plt;
boxm_batch.register_processes()
boxm_batch.register_datatypes()


class dbvalue:
    def __init__(self, index, type):
        self.id = index  # unsigned integer
        self.type = type  # string


dir = "/Users/isa/Experiments/super3d/scene/expectedImgs_2"
test_frames = [8, 112, 96, 208]

for frame in test_frames:
    boxm_batch.init_process("vilLoadImageViewProcess")
    boxm_batch.set_input_string(0, dir + "/predicted_img_mask_%(#)05d.tiff" % {"#": frame})
    boxm_batch.run_process()
    (id, type) = boxm_batch.commit_output(0)
    vis_img = dbvalue(id, type)

    boxm_batch.init_process("vilThresholdImageProcess")
    boxm_batch.set_input_from_db(0, vis_img)
    boxm_batch.set_input_float(1, 0.99)
    boxm_batch.set_input_bool(2, True)
Beispiel #2
0
#############################
#  Exampler script to extract keypoints from an image sequence and compute tracks of correspondences across frames
#  Final output is an xml file in the bwm_video_site format
#############################

import boxm_batch
boxm_batch.register_processes()
boxm_batch.register_datatypes()


class dbvalue:
    def __init__(self, index, type):
        self.id = index  # unsigned integer
        self.type = type  # string


class id_pair:
    def __init__(self, first, second):
        self.first = first
        self.second = second


python_path = "C:\\projects\\bundler\\bundler-v0.3-binary\\examples\\kermit\\vxl_bundler\\"
img_path = "C:\\projects\\bundler\\bundler-v0.3-binary\\examples\\kermit\\jpg_imgs\\"
img_name = "kermit%03d.jpg"
img_cnt = 11  # ids 0, 1, 2
output_path = python_path
out_img_name = "kermit%03d_with_keys.jpg"
out_key_name = "kermit%03d.key"
out_match_img_name = "kermit%03d_with_keys_of%03d.jpg"
out_match_img_refined_name = "kermit%03d_with_keys_of%03d_refined.jpg"