Beispiel #1
0
data_file_path = output_dir_path + data_file + data_ext
if data_file_2:
    data_file_path_2 = output_dir_path + data_file_2 + data_ext
if data_file_3:
    data_file_path_3 = output_dir_path + data_file_3 + data_ext
if data_file_4:
    data_file_path_4 = output_dir_path + data_file_4 + data_ext

match_dict = associate.read_file_list(match_text)
groundtruth_dict = associate.read_file_list(groundtruth_text)

rgb_folder_full = dataset_root + rgb_folder
depth_folder_full = dataset_root + depth_folder

rgb_files = ListGenerator.get_files_from_directory(rgb_folder_full,
                                                   delimiter='.')
depth_files = ListGenerator.get_files_from_directory(depth_folder_full,
                                                     delimiter='.')

rgb_file_total = len(rgb_files)
depth_file_total = len(depth_files)

#image_groundtruth_dict = dict(associate.match(rgb_text, groundtruth_text,max_difference=0.2,with_duplicates=True))
image_groundtruth_dict = dict(associate.match(rgb_text,
                                              groundtruth_text))  #f1_d2

parameters = data_file.split('_')
if data_file_2:
    parameters_2 = data_file_2.split('_')
if data_file_3:
    parameters_3 = data_file_3.split('_')
Beispiel #2
0
rgb_folder = 'rgb/'
depth_folder = 'depth/'

dataset_root = bench_path+xyz_dataset
output_dir_path = dataset_root + output_dir
rgb_text = dataset_root +'rgb.txt'
depth_text = dataset_root+'depth.txt'
match_text = dataset_root+'matches_with_duplicates.txt'
groundtruth_text = dataset_root+'groundtruth.txt'

groundtruth_dict = associate.read_file_list(groundtruth_text)

rgb_folder = dataset_root+rgb_folder
depth_folder = dataset_root+depth_folder

rgb_files = ListGenerator.get_files_from_directory(rgb_folder, delimiter='.')
depth_files = ListGenerator.get_files_from_directory(depth_folder, delimiter='.')

rgb_file_total = len(rgb_files)
depth_file_total = len(depth_files)

ground_truth_acc = np.identity(4,Utils.matrix_data_type)
se3_estimate_acc = np.identity(4,Utils.matrix_data_type)
ground_truth_list = []
pose_estimate_list = []
ref_image_list = []
target_image_list = []
vo_twist_list = []

depth_factor = 5000.0
#depth_factor = 1.0
Beispiel #3
0
#bench_path = '/Users/marchaubenstock/Workspace/Diplomarbeit_Resources/rccar_26_09_18/'
bench_path = '/Users/marchaubenstock/Workspace/Diplomarbeit_Resources/rccar_15_11_18/'
#bench_path = '/Users/marchaubenstock/Workspace/Diplomarbeit_Resources/VO_Bench/'
dataset = 'marc_2_full/'
img_source_dir = 'depth_rect/'
img_target_dir = 'depth_large_rect_norm/'

#img_source_dir = 'depth_rect/'
#img_target_dir = 'depth_rect_large_norm/'

full_source_path = bench_path + dataset + img_source_dir
full_target_path = bench_path + dataset + img_target_dir

compression_params = [int(cv2.IMWRITE_PNG_COMPRESSION), 9]

timestamps = ListGenerator.get_files_from_directory(full_source_path, '.')

source_files = list(
    map(lambda float: full_source_path + f'{float:.9f}' + '.png', timestamps))
target_files = list(
    map(lambda float: full_target_path + f'{float:.9f}' + '.png', timestamps))

zipped_files = zip(source_files, target_files)

if not os.path.exists(full_target_path):
    os.mkdir(full_target_path, mode=0o0755)

for source_path, target_path in zipped_files:
    image = cv2.imread(source_path, cv2.IMREAD_ANYDEPTH)
    #image = cv2.imread(source_path, cv2.IMREAD_ANYCOLOR)
    count = np.count_nonzero(image)
Beispiel #4
0
rgb_folder = 'rgb/'
depth_folder = 'depth/'

dataset_root = bench_path+xyz_dataset
rgb_text = dataset_root +'rgb.txt'
depth_text = dataset_root+'depth.txt'
match_text = dataset_root+'matches.txt'
groundtruth_text = dataset_root+'groundtruth.txt'

match_dict = associate.read_file_list(match_text)
image_groundtruth_dict = dict(associate.match(rgb_text, groundtruth_text))

rgb_folder = dataset_root+rgb_folder
depth_folder = dataset_root+depth_folder

rgb_files = ListGenerator.get_files_from_directory(rgb_folder, delimiter='.')
depth_files = ListGenerator.get_files_from_directory(depth_folder, delimiter='.')

rgb_file_total = len(rgb_files)
depth_file_total = len(depth_files)

id_refs, id_targets, ref_files_failed_to_load = ListGenerator.generate_files_to_load(
    rgb_files,
    start=0,
    max_count=20,
    offset=1,
    ground_truth_dict=image_groundtruth_dict,
    match_dict=match_dict)

debug = 1