示例#1
0
def scale_3D(img3D):
    p_cloud=pc.create_point_cloud(img3D,False)
    start_dims=p_cloud.find_max()
    end_dims=(60,60,60)
    new_dims=new_dim(start_dims,end_dims)
    p_cloud.rescale(new_dims)
    return p_cloud.to_scaled_img(end_dims)
示例#2
0
def read_projection(file_path):
    img=image.imread(file_path)
    p_cloud=pc.create_point_cloud(img,True)
    dim=img.shape
    #print(p_cloud.points[0])
    p_cloud.rescale(dim)
    #print(p_cloud.points[0])
    return p_cloud
示例#3
0
def scale_2D(imgs2D):
    start_dims=[img.shape for img in imgs2D]
    end_dims=[(60,60) for img in imgs2D]
    new_dims=[new_dim(d0,d1) for d0,d1 in zip(start_dims,end_dims)]
    p_clouds=[pc.create_point_cloud(img,True) for img in imgs2D]
    for p_cloud,dim in zip(p_clouds,new_dims):
        p_cloud.rescale(dim) 
    projections=[p_cloud.to_img(dim) for p_cloud,dim in zip(p_clouds,end_dims)]
    return projections
示例#4
0
def make_action(raw_action_path):
	raw_action=utils.read_object(raw_action_path)
	p_clouds=[create_point_cloud(img) for img in raw_action.frames]
	return Action(p_clouds)