Image resampling
Using simple morphological operations, an X-ray image with some set of intrinsic parameters can be resampled with a different set of intrinsics.
source
resample
def resample(
img:torch.Tensor, focal_len:float, delx:float, x0:float=0, y0:float=0, new_focal_len:float=None,
new_delx:float=None, new_x0:float=None, new_y0:float=None
)->torch.Tensor:
Resample an image with new intrinsic parameters.
Pinhole camera’s
Convert the intrinsic and extrinsic geometries, as implemented in DiffDRR, to a standard pinhole camera.
source
get_pinhole_camera
def get_pinhole_camera(
drr:diffdrr.drr.DRR, pose:diffdrr.pose.RigidTransform, dtype:torch.dtype=torch.float64
)->__main__.PinholeCamera: