resize_image#

cellpose_omni.transforms.resize_image(img0, Ly=None, Lx=None, rsz=None, interpolation=1, no_channels=False)[source]#

resize image for computing flows / unresize for computing dynamics

Parameters
  • img0 (ND-array) -- image of size [Y x X x nchan] or [Lz x Y x X x nchan] or [Lz x Y x X]

  • Ly (int, optional) --

  • Lx (int, optional) --

  • rsz (float, optional) -- resize coefficient(s) for image; if Ly is None then rsz is used

  • interpolation (cv2 interp method (optional, default cv2.INTER_LINEAR)) --

Returns

imgs -- image of size [Ly x Lx x nchan] or [Lz x Ly x Lx x nchan]

Return type

ND-array