spymicmac.resample
spymicmac.resample is a collection of tools for resampling images
- spymicmac.resample.downsample(img, fact=4)[source]
Rescale an image using Lanczos resampling
- Parameters:
img (array-like) – the image to rescale
fact (numeric) – the number by which to divide the image width and height (default: 4)
- Returns:
rescaled (array-like) – the rescaled image
- spymicmac.resample.resample_hex(fn_img, scale, ori='InterneScan')[source]
Resample a KH-9 Mapping Camera image based on the reseau grid, using gdal.Warp
- Parameters:
fn_img (str) – the filename of the image to resample
scale (int) – the number of pixels per mm of the scanned image
ori (str) – the Ori directory that contains both MeasuresCamera.xml and MeasuresIm (default: InterneScan)