Example #1
0
def load_camera_data(file_name):
    """Loads the camera data using the sintel SDK and converts to torch.Tensor.
    """
    assert os.path.isfile(file_name), "Invalid file {}".format(file_name)
    import sintel_io
    intrinsic, extrinsic = sintel_io.cam_read(file_name)
    return intrinsic, extrinsic
Example #2
0
def load_camera_data(file_name):
    """Load the camera data using the syntel SDK and converts to torch.Tensor."""
    if not os.path.isfile(file_name):
        raise AssertionError(f"Invalid file {file_name}")
    import sintel_io

    intrinsic, extrinsic = sintel_io.cam_read(file_name)
    return intrinsic, extrinsic
Example #3
0
import numpy as np
from matplotlib import pyplot as plt
import sys
sys.path.append('../')
import sintel_io as sio

# Test and display some real data
folder_name = 'alley_1'
frame_no = 1  #smaller than 10
DEPTHFILE = '/cluster/scratch/takmaza/CVL/MPI-Sintel-complete/training/depth/' + folder_name + '/frame_000' + str(
    frame_no) + '.dpt'
CAMFILE = '/cluster/scratch/takmaza/CVL/MPI-Sintel-complete/training/camdata_left/' + folder_name + '/frame_0001.cam'

# Load data
depth = sio.depth_read(DEPTHFILE)
I, E = sio.cam_read(CAMFILE)

print(depth.shape)
# Display data
#plt.figure()
#plt.imshow(depth,cmap='gray')
#plt.title('depth')

print(I)
print(E)

#plt.show()
Example #4
0
def get_K_Sintel(cam_folder, seq_folder, frame):

    I, E = sio.cam_read(cam_folder + seq_folder +
                        '/frame_{:04d}.cam'.format(frame + 1))

    return I