pad_image_ND#
- cellpose_omni.transforms.pad_image_ND(img0, div=16, extra=1, dim=2)[source]#
pad image for test-time so that its dimensions are a multiple of 16 (2D or 3D)
- Parameters
img0 (ND-array) -- image of size [nchan (x Lz) x Ly x Lx]
div (int (optional, default 16)) --
- Returns
I (ND-array) -- padded image
ysub (array, int) -- yrange of pixels in I corresponding to img0
xsub (array, int) -- xrange of pixels in I corresponding to img0