예제 #1
0
파일: main.py 프로젝트: manyids2/kornia-1
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
예제 #2
0
파일: main.py 프로젝트: shijianjian/kornia
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
예제 #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()
예제 #4
0
파일: util_k.py 프로젝트: wpfhtl/VideoPopup
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